#include <bits/stdc++.h>
using namespace std;
const signed int inf = (signed)((1u << 31) - 1);
const double eps = 1e-6;
const int binary_limit = 128;
template <typename T>
inline bool readInteger(T& u) {
  char x;
  int aFlag = 1;
  while (!isdigit((x = getchar())) && x != '-' && x != -1)
    ;
  if (x == -1) {
    ungetc(x, stdin);
    return false;
  }
  if (x == '-') {
    x = getchar();
    aFlag = -1;
  }
  for (u = x - '0'; isdigit((x = getchar())); u = (u << 1) + (u << 3) + x - '0')
    ;
  ungetc(x, stdin);
  u *= aFlag;
  return true;
}
typedef class Edge {
 public:
  int end;
  int next;
  Edge(const int end = 0, const int next = -1) : end(end), next(next) {}
} Edge;
typedef class MapManager {
 public:
  int ce;
  int* h;
  vector<Edge> edge;
  MapManager() {}
  MapManager(int points) : ce(0) {
    h = new int[(const int)(points + 1)];
    memset(h, -1, sizeof(int) * (points + 1));
  }
  inline void addEdge(int from, int end) {
    edge.push_back(Edge(end, h[from]));
    h[from] = ce++;
  }
  inline void addDoubleEdge(int from, int end) {
    addEdge(from, end);
    addEdge(end, from);
  }
  Edge& operator[](int pos) { return edge[pos]; }
  inline void clear() {
    edge.clear();
    delete[] h;
  }
} MapManager;
int n, m;
MapManager g;
int* dag;
int* dep;
inline bool init() {
  if (!readInteger(n)) return false;
  readInteger(m);
  g = MapManager(n);
  dag = new int[(n + 1)];
  dep = new int[(n + 1)];
  memset(dag, 0, sizeof(int) * (n + 1));
  for (int i = 1, a, b; i <= m; i++) {
    readInteger(a);
    readInteger(b);
    g.addEdge(b, a);
    dag[a]++;
  }
  return true;
}
priority_queue<int> que;
inline void topu() {
  for (int i = 1; i <= n; i++)
    if (!dag[i]) {
      que.push(i);
    }
  int cnt = 0;
  while (!que.empty()) {
    int e = que.top();
    dep[e] = cnt++;
    que.pop();
    for (int i = (g).h[(e)]; i != -1; i = g[i].next) {
      int& eu = g[i].end;
      dag[eu]--;
      if (!dag[eu]) que.push(eu);
    }
  }
}
inline void solve() {
  topu();
  for (int i = 1; i <= n; i++) printf("%d ", n - dep[i]);
}
int main() {
  init();
  solve();
  return 0;
}
