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

int g[100][100];

int main() {
  int n, m;
  while(cin >> n >> m) {
    memset(g,0x3f,sizeof(g));
    while(m--) {
      int a,b;
      cin >> a >> b;
      a--;b--;
      g[b][a] = -1;
    }
    for (int i=0; i<n; ++i) g[n][i] = 0;
    n++;
    for (int k=0; k<n; ++k)
      for (int i=0; i<n; ++i)
        for (int j=0; j<n; ++j)
          g[i][j] = min(g[i][j], g[i][k] + g[k][j]);
    vector<pair<int,int>> v;
    for (int i=0; i<n-1; ++i) {
      v.emplace_back(g[n-1][i], i);
    }
    sort(v.begin(), v.end());
    for (auto p : v) {
      cout << p.second+1 << endl;
    }
  }
}