#include<bits/stdc++.h>
#define REP(i,first,last) for(int i=first;i<=last;++i)
#define DOW(i,first,last) for(int i=first;i>=last;--i)
#define LL long long
using namespace std;
const int MAXN=1e6+7;
const int MAXM=2e6+7;
const int MOD=998244353;
class Edge
{
	public:
	int next,to;
}edge[MAXM];
int edge_cnt=0;
int edge_head[MAXN];
void AddEdge(const int u,const int v)
{
	edge[++edge_cnt].next=edge_head[u];
	edge[edge_cnt].to=v;
	edge_head[u]=edge_cnt;
}
#define FOR(u) for(int edge_i=edge_head[u];edge_i;edge_i=edge[edge_i].next)
#define TO edge[edge_i].to

int cnt=0;
int id[MAXN];
int size[MAXN];
int cnt_e[MAXN];
int u[MAXN],v[MAXN];
int father[MAXN];
int color[MAXN];
bool g[MAXN];
int n,m;
int Find(int now)
{
	if(now==father[now])
	{
		return now;
	}
	return father[now]=Find(father[now]);
}
bool Check(int e_id)
{
	REP(i,1,n)
	{
		father[i]=i;
	}
	REP(i,1,m)
	{
		if(i==e_id)
		{
			continue;
		}
		if(Find(u[i])!=Find(v[i]))
		{
			father[Find(u[i])]=Find(v[i]);
		}
	}
	int f=Find(1);
	REP(i,2,n)
	{
		if(f^Find(i))
		{
			return 1;
		}
	}
	return 0;
}
bool app[MAXN];
LL dp[MAXN];
LL f[MAXN];
LL pow2[MAXN];
int si[MAXN];
void DFS(const int now,const int father=0)
{
	si[now]=1;
	LL p=(pow2[size[now]]-1+MOD)%MOD;
	dp[now]=0;
	LL sum=0,sum_=0;
	LL add=p+1;
	FOR(now)
	{
		if(TO!=father)
		{
			DFS(TO,now);
			add=add*(f[TO]*2ll+dp[TO]);
			si[now]+=si[TO];
		}
	}
	FOR(now)
	{
		if(TO!=father)
		{
			dp[now]=(dp[now]+dp[TO]*pow2[si[now]-si[TO]-1])%MOD;
		}
	}
	f[now]=pow2[si[now]-1];
	dp[now]=(dp[now]+add-f[now]+MOD)%MOD;
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	REP(i,1,m)
	{
		scanf("%d%d",&u[i],&v[i]);
	}
	int q=0;
	REP(i,1,m)
	{
		g[i]=Check(i);
		q+=g[i];
	}
	int cnt=0;
	REP(i,1,n)
	{
		father[i]=i;
	}
	REP(i,1,m)
	{
		if(!g[i])
		{
			if(Find(u[i])!=Find(v[i]))
			{	
				father[Find(u[i])]=v[i];
			}
		}
	}
	REP(i,1,n)
	{
		if(!app[Find(i)])
		{
			app[father[i]]=1;
			color[i]=color[father[i]]=++cnt;
			size[cnt]=1;
		}
		else
		{
			color[i]=color[Find(i)];
			size[color[i]]++;
		}
	}
	REP(i,1,m)
	{
		if(g[i])
		{
			AddEdge(color[u[i]],color[v[i]]);
			AddEdge(color[v[i]],color[u[i]]);
		}
		else
		{
			++cnt_e[color[u[i]]];
		}
	}
	pow2[0]=1;
	REP(i,1,m)
	{
		pow2[i]=pow2[i-1]*2ll%MOD;
	}
	DFS(1);
	printf("%lld\n",1ll*dp[1]*pow2[m-q]%MOD);
	return 0;
}
