#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a,i##end=b;i<=i##end;i++)
#define drep(i,a,b) for(int i=a,i##end=b;i>=i##end;i--)
inline int read() {
	int x=0,f=1;char c=getchar();
	while(c<48||c>57){if(c=='-')f=-1;c=getchar();}
	while(c>=48&&c<=57)x=(x<<1)+(x<<3)+(c^48),c=getchar();
	return x*f;
}
using namespace std;
typedef long long ll;
const int M=1000;
ll C[M][M];
void solve() {
	int A=read(),B=read();long long k;scanf("%lld",&k);
	rep(i,0,M-1){
		C[i][0]=1;
		rep(j,1,i)C[i][j]=C[i-1][j]+C[i-1][j-1];
	}
	int a=A,b=B;
	rep(i,1,A+B){
		if(a==0){
			putchar('b');
			continue;
		}
		if(b==0){
			putchar('a');
			continue;
		}
		ll cnt=C[a+b-1][a-1];
		if(cnt>=k)putchar('a'),a--;
		else k-=cnt,putchar('b'),b--;
	}
}
int main() {
	int T=1;
	while(T--)solve();
	return 0;
}

#include <bits/stdc++.h>
#define rep(i, n) for (decltype(+n) i = 0; i < (n); i++)
using namespace std;

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> a(M), b(M), c(N);
  rep(i, M) {
    cin >> a[i] >> b[i];
    a[i]--, b[i]--;
  }
  for (int &x: c) cin >> x;

  vector<vector<int>> e(N);
  rep(i, M) {
    if (c[a[i]] >= c[b[i]]) e[a[i]].emplace_back(i);
    if (c[a[i]] <= c[b[i]]) e[b[i]].emplace_back(i);
  }
  vector<string> ans(M);
  function<void(int)> dfs = [&](int x) {
    for (int i: e[x]) if (ans[i] == "") {
      bool d = a[i] == x;
      ans[i] = d ? "->" : "<-";
      dfs(d ? b[i] : a[i]);
    }
  };
  rep(i, N) dfs(i);
  for (string x: ans) cout << x << endl;
}
