#include<cstdio>
#include<bitset>
#define RI register int
#define CI const int&
using namespace std;
const int N=50005;
int n,m,tp,x[N<<1],y[N<<1]; char s[N<<1];
namespace Case1
{
	bitset <N> vis[N]; bool c[N];
	inline void solve(void)
	{
		RI i,j; for (i=1;i<=n;++i) vis[i].set(i);
		for (i=1;i<=m;++i) vis[x[i]]=vis[y[i]]=vis[x[i]]|vis[y[i]];
		for (i=1;i<=n;++i) if (vis[i].count()==n)
		{
			for (c[i]=1,j=m;j;--j) if (c[x[j]]) s[j]='^',c[y[j]]=1;
			else if (c[y[j]]) s[j]='v',c[x[j]]=1; else s[j]='^';
			return (void)(puts(s+1));
		}
		puts("-1");
	}
};
namespace Case2
{
	int tar[N],c[N];
	inline void solve(void)
	{
		if (n<=2) return (void)(puts("-1")); RI i;
		for (i=1;i<=n;++i) c[tar[i]=i]=1; for (i=m;i;--i)
		if (c[tar[x[i]]]>=c[tar[y[i]]]) s[i]='v',--c[tar[x[i]]],++c[tar[x[i]]=tar[y[i]]];
		else s[i]='^',--c[tar[y[i]]],++c[tar[y[i]]=tar[x[i]]]; puts(s+1);
	}
};
int main()
{
	RI i; for (scanf("%d%d%d",&n,&m,&tp),i=1;i<=m;++i)
	scanf("%d%d",&x[i],&y[i]); if (tp==1) Case1::solve(); else Case2::solve();
	return 0;
}