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

#define rep(i, a, b) for(int i=a; i<=b; i++)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int) x.size()
#define pb push_back
#define f first
#define s second
#define nl "\n"
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
const int MOD = 1e9+7;
// const int MOD = 998244353;
template<class T> using pqg = priority_queue<T,vector<T>,greater<T>>;

int n, m;
vector<pii> adj[101];
bool vis[101];
pii edge[10001];
int dir[10001];
int c[10001];

void dfs(int x){
  vis[x]=true;
  trav(p, adj[x]){
    if(c[p.f]==c[x]){
      dir[p.s]=x;
      if(!vis[p.f]) dfs(p.f);
    }
  }
}

bool comp(int a, int b){
  return (c[a]<c[b]);
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  // freopen("input.txt", "r", stdin); 
  // freopen("output.txt", "w", stdout);

  cin >> n >> m;
  rep(i, 1, m){
    cin >> edge[i].f >> edge[i].s;
    adj[edge[i].f].pb({edge[i].s, i});
    adj[edge[i].s].pb({edge[i].f, i});
  }
  rep(i, 1, n) cin >> c[i];

  rep(i, 1, n){
    if(vis[i]) continue;
    dfs(i);
  }

  vi vec;
  rep(i, 1, n) vec.pb(i);
  sort(all(vec), comp);
  rep(i, 0, n-1){
    int x=vec[i];
    trav(p, adj[x]){
      if(dir[p.s]!=0) continue;
      dir[p.s]=p.f;
    }
  }
  rep(i, 1,m){
    if(dir[i]==edge[i].f) cout << "->" << nl;
    else cout << "<-" << nl;
  }
}
#include<iostream>

using namespace std;

int main() {
  int a, b, c, d;
  cin>>a>>b;
  cin>>c>>d;
  cout<<(b-c);
}
