you give direct graph n vertex m edge Vertices number 1 n there token vertex 1the follow action allow Token movement to token vertex u vertex v edge u v graph this action take 1 second Graph transposition to transpose edge graph replace edge u v edge v u this action take increasingly time kth transposition take 2k1 second ie transposition take 1 second second take 2 second take 4 second the goal token vertex 1 vertex n short possible time Print time modulo 998244353