#include "iostream"
#include "vector"
#include "stack"
#include "fstream"
using namespace std;
vector<int> graf[10000];
int nod[10000], n, m;
stack<int> st;
ifstream sortare_in("sortaret.in");
ofstream sortare_out("sortaret.out");
void dfs(int nod_start)
{
for (int i = 0; i < graf[nod_start].size(); i++)
{
if (nod[graf[nod_start][i]] == 0)
dfs(graf[nod_start][i]);
}
nod[nod_start] = 1;
st.push(nod_start);
}
int main()
{
int x, y;
sortare_in >> n >> m;
for (int i = 0; i < m; i++)
{
sortare_in >> x >> y;
graf[x].push_back(y);
}
dfs(1);
while (!st.empty())
{
sortare_out << st.top()<<' ';
st.pop();
}
return 0;
}