#include<bits/stdc++.h>
using namespace std;

const int N = 5e4+5, M = 1e6+5;
int n,m;

int hed[M],cnt=1,to[M],nxt[M],cap[M],flow[M];
void adde(int u,int v,int _cap,int tpe=0){
	++cnt;to[cnt]=v,cap[cnt]=_cap,nxt[cnt]=hed[u],flow[cnt]=0;hed[u]=cnt;
	if(!tpe){++cnt;to[cnt]=u,cap[cnt]=0,nxt[cnt]=hed[v],flow[cnt]=0;hed[v]=cnt;}
}
namespace graph{
	int S,T;
	int d[M];bool vis[M];
	
	queue<int>Q;
	bool bfs(){
		memset(vis,0,sizeof(vis));
		memset(d,0,sizeof(d));
		Q.push(S);vis[S]=1;
		while(!Q.empty()){
			int u=Q.front();Q.pop();
			for(int i=hed[u];i;i=nxt[i]){
				int v=to[i];
				if(!vis[v]&&cap[i]>flow[i]){
					vis[v]=1,d[v]=d[u]+1;
					Q.push(v);
				}
			}
		}
		return vis[T];
	}
	int dfs(int u,int F){
		if(u==T||!F)return F;
		int flownow=0;
		for(int i=hed[u];i;i=nxt[i]){
			int v=to[i];if(d[v]!=d[u]+1)continue;
			int f=dfs(v,min(F,cap[i]-flow[i]));
			flownow+=f;
			F-=f;
			flow[i]+=f,flow[i^1]-=f;
			if(!F)break;
		}
		if(!flownow)d[u]=0;
		return flownow;
	}
	const int inf=0x3f3f3f3f;
	int max_flow(){
		int fw=0;
		while(bfs()){
			fw+=dfs(S,inf);
			if(fw>1)break;
		}
		return fw;
	}
}


int nd[M],col[M];

namespace Subtask_1{
	bitset<N> last[N];
	int u[M],v[M];
	bool vis[M];
	inline void mdfs(int x){
		for(int i=hed[x];i;i=nxt[i]){
			int vv=to[i];
			if(!vis[vv]){
				// cout << x << ":" << vv << endl;
				vis[vv]=1;
				mdfs(vv);
				if(v[vv]==u[x]||v[vv]==v[x])col[vv]=1;
			}
		}
	}
	inline void solve(){
		int flg=0;
		for(int i=1;i<=n;i++)last[i].set(i);
		for(int i=1;i<=m;i++){
			scanf("%d%d",&u[i],&v[i]);
			adde(i,nd[u[i]],0,1),adde(i,nd[v[i]],0,1);
			last[u[i]] = last[v[i]] = last[u[i]]|last[v[i]];
			nd[u[i]]=nd[v[i]]=i;
			if(last[u[i]].count()==(unsigned)n){
				mdfs(i);
				flg=1;
				goto END;
			}
		}
		END:;
		if(!flg)puts("-1");
		else{
			for(int i=1;i<=m;i++){
				printf("%c",col[i]?'v':'^');
			}puts("");
		}
		return;
	}
}

int ed[M];
int E[M][2];
namespace Subtask_2{
	int u[M],d[M];
	inline void solve(){
		graph::S=m*2+1,graph::T=m*2+2;
		for(int i=1;i<=m;i++){
			scanf("%d%d",&u[i],&d[i]);
		}
		for(int i=m;i;i--){
			adde(i,m+i,1);
			if(!nd[u[i]])adde(m+i,graph::T,1),ed[u[i]]=i;
			else adde(m+i,nd[u[i]],1);
			if(!nd[d[i]])adde(m+i,graph::T,1),ed[d[i]]=i;
			else adde(m+i,nd[d[i]],1);
			E[i][0]=nd[u[i]],E[i][1]=nd[d[i]];
			// cout << nd[u[i]] << ":" << nd[d[i]] << endl;
			nd[u[i]]=nd[d[i]]=i;
		}
		for(int i=1;i<=n;i++){
			if(!nd[i])adde(graph::S,graph::T,1);
			else adde(graph::S,nd[i],1);
		}
		int ret=graph::max_flow();
		if(ret<=1){
			puts("-1");
			return ;
		}
			// cout << ed[1] << ":" << ed[2] << " " << ed[3] << endl;
		for(int i=m+1;i<=m*2;i++){
			// int ccnt=0;
			for(int e=hed[i];e;e=nxt[e])if(cap[e]>0&&flow[e]>0){
				int v=to[e];
				if(v==m*2+2){
					if(ed[u[i-m]]==i-m)col[i-m]=0;
					else col[i-m]=1;
					continue;
				}else{
					// ++ccnt;
					// if(ccnt==2){cout << "Err" << endl;return;}
					if(E[i-m][1]==v)col[i-m]=1;
				}
			}
		}
		for(int i=1;i<=m;i++){
			// cout << (col[i]?d[i]:u[i]) << "::" << f[col[i]?d[i]:u[i]] << "|";
			printf("%c",col[i]?'v':'^');
			// puts("");
			// if(f[col[i]?d[i]:u[i]]==6){cout << i << endl;return;}
		}puts("");
	}
}

int T;
int main()
{
	// freopen("02-03.txt","r",stdin);
	cin >> n >> m >> T;
	if(T==1){
		Subtask_1::solve();
	}else{
		Subtask_2::solve();
	}
}
/*
3 7 2
1 3
1 2
1 2
2 3
1 3
2 3
1 2
1 3
1 3
2 3
2 3
1 2
2 3
2 3

4 8 2
1 3
1 3
2 4
1 2
1 2
3 4
2 3
2 3
 */

Measured memory_bytes: 338304