I had an original question $g^x≡h\pmod p$ where $g=5$ $h=1000$ $p=1000777$ solving for $x$
I calculated $N=p-1=2^3\cdot3\cdot7^2\cdot23\cdot37=1000776$
calculating $g1,...,g5$ and $h1,...,h5$
$g1=5^{1000776/8}$ $h1=1000^{1000776/8}$
$g2=5^{1000776/3}$ $h2=1000^{1000776/3}$
$g3=5^{1000776/49}$ $h3=1000^{1000776/49}$
and so on for $i=4,5$
equating them for g1 raising it to the xI have
$$(5^{125097})^x= 1000^{125097} \bmod 1000776$$
My question is how would I solve this using baby step/giant step algorithms or any other way. Thank you.