#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <bitset>

using namespace std;
typedef long long ll;
const int MAXN = 50005, MAXM = 100005;
inline int readint()
{
	int res = 0, f = 1;
	char c = 0;
	while(!isdigit(c))
	{
		c = getchar();
		if(c=='-')
			f = -1;
	}
	while(isdigit(c))
		res = res*10+c-'0', c = getchar();
	return res*f;
}
int n,m,type,x[MAXM],y[MAXM];
bitset<MAXN> f[MAXN];
bool t[MAXN];
char ans[MAXM];
inline void solve1()
{
	for(int i = 1; i<=n; i++)
	    f[i][i] = 1;
	for(int i = m; i>=1; i--)
	    f[x[i]] = f[y[i]] = f[x[i]]|f[y[i]];
	for(int i = 2; i<=n; i++)
	    f[1] &= f[i];
	int now = 0;
	for(int i = 1; i<=n; i++)
        if(f[1][i])
        	now = i;
	if(!now)
	{
    	cout << -1 << endl;
    	return;
	}
	t[now] = true;
	for(int i = m; i>=1; i--)
	{
        if(t[x[i]])
        	ans[i] = '^';
        else
            ans[i] = 'v';
        t[x[i]] = t[y[i]] = t[x[i]]|t[y[i]];
	}
	for(int i = 1; i<=m; i++)
	    cout << ans[i];
	cout << endl;
}
int g[MAXN],h[MAXN];
inline void solve2()
{
	if(n==2&&m>=1)
	{
        cout << -1 << endl;
        return;
	}
	for(int i = 1; i<=n; i++)
		g[i] = 1, h[i] = i;
	for(int i = m; i>=1; i--)
	{
		if(g[h[x[i]]]>g[h[y[i]]])
			g[h[x[i]]]--, g[h[y[i]]]++, h[x[i]] = h[y[i]], ans[i] = 'v';
		else
		    g[h[x[i]]]++, g[h[y[i]]]--, h[y[i]] = h[x[i]], ans[i] = '^';
	}
	for(int i = 1; i<=m; i++)
		cout << ans[i];
	cout << endl;
}

int main()
{
	n = readint(), m = readint(), type = readint();
	for(int i = 1; i<=m; i++)
		x[i] = readint(), y[i] = readint();
	if(type==1)
	    solve1();
	else
	    solve2();
	return 0;
}
