#include <iostream>
#include <bitset>

const int maxn = 50000+7;
const int maxm = 100000+7;

std::pair<int, int> balancer[maxm];
std::bitset<maxn> b[maxn];
int x[maxn], num[maxn];
int n, m, t;

int main(int argc, char *argv[]) {  
	std::ios::sync_with_stdio(false);
	std::cin.tie(0); 
	std::cin >> n >> m >> t;
	for (int i = 0; i < m; i++) {
		std::cin >> balancer[i].first >> balancer[i].second;
		balancer[i].first--;
		balancer[i].second--;
	}
	if (t == 1) {
		for (int i = 0; i < n; i++) {
			b[i].set(i);
		}
		for (int i = 0; i < m; i++) {
			b[balancer[i].first] = b[balancer[i].second] = b[balancer[i].first] | b[balancer[i].second];
		}
		for (int i = 0; i < n; i++) {
			if ((int)b[i].count() == n) {
				std::bitset<maxn> now;
				now.set(i);
				std::string ans(m, 'v');
				while (m--) {
					if (now[balancer[m].first]) {
						now.set(balancer[m].second);
						ans[m] = '^';
					} else {
						now[balancer[m].first] = now[balancer[m].second];
					}
				}
				std::cout << ans << '\n';
				exit(0);
			}
		}
		std::cout << "-1\n";
		exit(0);
	} else {
		if (n == 2) {
			std::cout << "-1\n";
			exit(0);
		}
		std::string ans(m, '^');
		for (int i = 0; i < n; i++) {
			x[i] = i;
			num[i] = 1;
		}
		for (int i = m - 1; i >= 0; i--) {
			if (num[x[balancer[i].first]] > 1) {
				num[x[balancer[i].first]]--;
				num[x[balancer[i].second]]++;
				x[balancer[i].first] = x[balancer[i].second];
				ans[i] = 'v';
			} else {
				num[x[balancer[i].first]]++;
				num[x[balancer[i].second]]--;
				x[balancer[i].second] = x[balancer[i].first];
			}
		}
		std::cout << ans << '\n';
	}
}