#include <algorithm>  
#include <iostream>  
#include <sstream>  
#include <string>  
#include <vector>  
#include <queue>  
#include <set>  
#include <map>  
#include <cstdio>  
#include <cstdlib>  
#include <cctype>  
#include <cmath>  
#include <cstring>
#include <list>  
#include <cassert>
#include <climits>
#include <bitset>
using namespace std;  

#define PB push_back  
#define MP make_pair  
#define SZ(v) ((int)(v).size())  
#define FOR(i,a,b) for(int i=(a);i<(b);++i)  
#define REP(i,n) FOR(i,0,n)  
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)  
#define REPE(i,n) FORE(i,0,n)  
#define FORSZ(i,a,v) FOR(i,a,SZ(v))  
#define REPSZ(i,v) REP(i,SZ(v))  
typedef long long ll;  
ll gcd(ll a,ll b) { return b==0?a:gcd(b,a%b); }

const int MAXN = 50000;
const int MAXM = 100000;
typedef bitset<MAXN> bs;

int n, m, kind;
int e[MAXM][2];
char ans[MAXM + 1];

bs reach[MAXN];
bool reachdest[MAXN];


bool solveuniform() {
	REP(i, n) { reach[i].reset(); reach[i].set(i); }
	for (int i = m - 1; i >= 0; --i) {
		int a = e[i][0], b = e[i][1];
		reach[a] = reach[b] = reach[a] | reach[b];
	}
	bs all = reach[0]; FOR(i, 1, n) all = all & reach[i];
	int dest = -1; REP(i, n) if (all[i]) { dest = i; break; } if (dest == -1) return false;
	REP(i, n) reachdest[i] = i == dest;
	for (int i = m - 1; i >= 0; --i) {
		int a = e[i][0], b = e[i][1];
		if (reachdest[a]) ans[i] = '^'; else if (reachdest[b]) ans[i] = 'v'; else ans[i] = 'v';
		reachdest[a] = reachdest[b] = reachdest[a] | reachdest[b];
	}
	return true;
}

bool solvenonuniform() {
	if (n == 2) {
		if (m >= 1) return false;
		return true;
	}
	int need = 0;
	for (int i = m - 1; i >= 0; --i) {
		int a = e[i][0], b = e[i][1];
		if (b >= 3) { ans[i] = '^'; continue; }
		if (a != need && b != need) { ans[i] = '^'; continue; }
		if (a == need) {
			ans[i] = '^'; need = 3 - a - b;
		} else {
			ans[i] = 'v'; need = 3 - a - b;
		}
	}
	return true;
}

bool solve() {
	REP(i, n) ans[i] = '?'; ans[m] = '\0';
	if (kind == 1) return solveuniform();
	if (kind == 2) return solvenonuniform();
	return false;
}

void run() {
	scanf("%d%d%d", &n, &m, &kind);
	REP(i, m) REP(j, 2) scanf("%d", &e[i][j]), --e[i][j];
	if (!solve()) { printf("-1\n"); return; }
	printf("%s\n", ans);
}

int main() {
	run();
	return 0;
}
