You are given a directed acyclic graph with n vertices and m edges. There are no self-loops or multiple edges between any pair of vertices. Graph can be disconnected.

You should assign labels to all vertices in such a way that:

  * Labels form a valid permutation of length n — an integer sequence such that each integer from 1 to n appears exactly once in it. 
  * If there exists an edge from vertex v to vertex u then labelv should be smaller than labelu. 
  * Permutation should be lexicographically smallest among all suitable. 



Find such sequence of labels to satisfy all the conditions.

Input

The first line contains two integer numbers n, m (2 ≤ n ≤ 105, 1 ≤ m ≤ 105).

Next m lines contain two integer numbers v and u (1 ≤ v, u ≤ n, v ≠ u) — edges of the graph. Edges are directed, graph doesn't contain loops or multiple edges.

Output

Print n numbers — lexicographically smallest correct permutation of labels of vertices.

Examples

Input

3 3
1 2
1 3
3 2


Output

1 3 2 


Input

4 5
3 1
4 1
2 3
3 4
2 4


Output

4 1 2 3 


Input

5 4
3 1
2 1
2 3
4 5


Output

3 1 2 4 5 
#include <bits/stdc++.h>
using namespace std;
const int MN = 1e5 + 44;
vector<int> graf[MN];
vector<int> graT[MN];
int ans[MN];
const int LOG = 17;
int jump[MN][LOG];
int minj[MN][LOG];
enum { waiting = 0, active = 1, done = 2 };
char state[MN];
void get_active(int x, vector<int> &g) {
  ;
  if (state[x] != waiting) return;
  state[x] = active;
  for (auto v : graf[x]) get_active(v, g);
  g.push_back(x);
}
int deg[MN];
int dep[MN];
vector<int> make_order(int x) {
  vector<int> act;
  get_active(x, act);
  vector<int> ans;
  for (auto y : act)
    for (auto x : graf[y]) deg[x]++;
  vector<int> leaves;
  for (auto c : act) {
    if (deg[c] == 0) leaves.push_back(c);
  }
  while (!leaves.empty()) {
    int x = leaves.back();
    leaves.pop_back();
    ans.push_back(x);
    for (auto y : graf[x]) {
      if (state[y] == active) {
        deg[y]--;
        if (deg[y] == 0) leaves.push_back(y);
      }
    }
  }
  return ans;
}
int under_min[MN];
void init(int x) {
  ;
  for (int i = 0; i < LOG; ++i) {
    minj[x][i] = jump[x][i] = x;
  }
}
bool under(int a, int b) {
  int del = dep[a] - dep[b];
  if (del < 0) return false;
  for (int i = LOG - 1; i >= 0; --i)
    if (del & (1 << i)) a = jump[a][i];
  return a == b;
}
bool better(int a, int b) {
  ;
  if (under(a, b)) {
    ;
    return true;
  }
  if (under(b, a)) {
    ;
    return false;
  }
  int amin = MN, bmin = MN;
  bool swaped = false;
  if (dep[a] > dep[b]) {
    swap(a, b);
    swaped = true;
  }
  int diff = dep[b] - dep[a];
  ;
  for (int i = 0; i < LOG; ++i) {
    if (diff & (1 << i)) {
      bmin = min(bmin, minj[b][i]);
      b = jump[b][i];
    }
  };
  for (int i = LOG - 1; i >= 0; --i) {
    int aa = jump[a][i], bb = jump[b][i];
    if (aa != bb) {
      amin = min(amin, minj[a][i]);
      bmin = min(bmin, minj[b][i]);
      a = aa;
      b = bb;
    }
  };
  amin = min(amin, a);
  bmin = min(bmin, b);
  ;
  if (amin == bmin) return !swaped;
  bool res = amin < bmin;
  if (swaped) res = !res;
  return res;
}
void add(int x) {
  int y = -1;
  for (auto z : graT[x]) {
    ;
    if (state[z] == active) {
      ;
      if (y == -1)
        y = z;
      else if (better(z, y))
        y = z;
    }
  };
  dep[x] = dep[y] + 1;
  ;
  jump[x][0] = y;
  minj[x][0] = x;
  for (int i = 1; i < LOG; ++i) {
    jump[x][i] = jump[jump[x][i - 1]][i - 1];
    minj[x][i] = min(minj[x][i - 1], minj[jump[x][i - 1]][i - 1]);
    ;
  }
}
int satbqkqh[MN], lrcgthnbm[MN];
const int SIZE = 1 << 17;
int tree[SIZE * 2];
void edit(int x, int pos) {
  if (x == MN)
    ;
  else
    ;
  pos += SIZE;
  tree[pos] = x;
  pos /= 2;
  while (pos) {
    tree[pos] = min(tree[pos * 2], tree[pos * 2 + 1]);
    pos /= 2;
  }
}
int read(int l, int r, int wh = 1, int lb = 0, int rb = SIZE - 1) {
  if (lb > r || rb < l) return MN;
  if (l <= lb && r >= rb) return tree[wh];
  return min(read(l, r, wh * 2, lb, (lb + rb) / 2),
             read(l, r, wh * 2 + 1, (lb + rb) / 2 + 1, rb));
}
void enumerate(int x) {
  static int start = 0;
  start++;
  satbqkqh[x] = start;
  ;
  edit(x, start);
  for (auto y : graf[x])
    if (jump[y][0] == x) enumerate(y);
  lrcgthnbm[x] = start;
  ;
}
void res_count(int x) {
  ;
  edit(MN, satbqkqh[x]);
  static int nr = 0;
  int n;
  while ((n = read(satbqkqh[x], lrcgthnbm[x])) != MN) {
    ;
    res_count(n);
  }
  ans[x] = ++nr;
  ;
}
int main() {
  for (int i = 0; i < 2 * SIZE; ++i) tree[i] = MN;
  int n, m;
  scanf("%d%d", &n, &m);
  while (m--) {
    int a, b;
    scanf("%d%d", &a, &b);
    graf[b].push_back(a);
    graT[a].push_back(b);
  }
  for (int v = 1; v <= n; ++v) {
    if (state[v] == done) continue;
    ;
    vector<int> topo = make_order(v);
    ;
    for (auto y : topo)
      ;
    ;
    init(v);
    for (auto y : topo)
      if (y != v) add(y);
    enumerate(v);
    res_count(v);
    for (auto y : topo) state[y] = done;
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d ", ans[i]);
  }
  printf("\n");
}
