#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
struct UnionFind {
	using T = int;
	const T def = 0;
	T f(T a, T b) { return a + b; }
	//==========================================
	vector<int> par;
	vector<T> value;
	UnionFind() {}
	UnionFind(int NV) { init(NV); }
	void init(int NV) { par.clear(); rep(i, 0, NV) par.push_back(i); value.resize(NV, 1); }
	void reset() { rep(i, 0, par.size()) par[i] = i; }
	int operator[](int x) {
		if (par[x] == x) return x;
		else {
			int res = operator[](par[x]);
			if (res != par[x]) {
				value[res] = f(value[res], value[par[x]]);
				value[par[x]] = def;
			}
			return par[x] = res;
		}
	}
	// uf(x,y)->y
	void operator()(int x, int y) {
		x = operator[](x); y = operator[](y);
		if (x != y) {
			value[y] += value[par[x]];
			value[par[x]] = def;
			par[x] = y;
		}
	}
	T getValues(int x) { return value[operator[](x)]; };
};
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     @hamayanhamayan0
　　　　／　　　＼　 　  |　|
　　　 /　　 /￣￣￣￣/　　|
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
　 　　　＼/＿＿＿＿/　（u　⊃
---------------------------------------------------------------------------------------------------*/














int N, M, T;
int X[101010], Y[101010];
#define UP '^'
#define DOWN 'v'
//---------------------------------------------------------------------------------------------------
using BS = bitset<50101>;
BS dp[50101];
void solve1() {
	rep(i, 0, N) dp[i].set(i);

	rep(i, 0, M) dp[X[i]] = dp[Y[i]] = dp[X[i]] | dp[Y[i]];
	rep(i, 0, N) if (dp[i].count() == N) {
		int goal = i;
		UnionFind uf(N);
		string ans = "";
		rrep(j, M - 1, 0) {
			int g = uf[goal];
			int x = uf[X[j]];
			int y = uf[Y[j]];

			if (g != x and g != y) ans += UP;
			else if (g == x and g == y) ans += UP;
			else if (g == x) {
				ans += UP;
				uf(x, y);
			}
			else {
				ans += DOWN;
				uf(x, y);
			}
		}
		reverse(all(ans));
		cout << ans << endl;
		return;
	}

	cout << -1 << endl;
}
//---------------------------------------------------------------------------------------------------
int B[50101], cnt[50101];
void solve2() {
	if (N == 2) {
		cout << -1 << endl;
		return;
	}

	rep(i, 0, N) B[i] = i, cnt[i] = 2;

	string ans = "";
	rrep(i, M - 1, 0) {
		int x = X[i], y = Y[i];
		int bx = B[x], by = B[y];

		if (cnt[bx] > cnt[by]) {
			ans += DOWN;
			cnt[by]++;
			cnt[bx]--;
			B[x] = by;
		}
		else {
			ans += UP;
			cnt[bx]++;
			cnt[by]--;
			B[y] = bx;
		}
	}
	reverse(all(ans));
	cout << ans << endl;
}
//---------------------------------------------------------------------------------------------------
void _main() {
	cin >> N >> M >> T;
	rep(i, 0, M) {
		cin >> X[i] >> Y[i];
		X[i]--, Y[i]--;
	}

	if (T == 1) solve1();
	else solve2();
}







Measured memory_bytes: 308860