#include <fstream>
#include <vector>
#include <stack>
using namespace std;
ifstream fin ("sortaret.in");
ofstream fout ("sortaret.out");
const int nmax=50005;
int n,m;
bool viz[nmax];
vector <int> muchii[nmax];
stack <int> st;
void dfs(int nod)
{
viz[nod]=true;
for (int i=0;i<muchii[nod].size();i++)
{
int vecin=muchii[nod][i];
if (!viz[vecin])
dfs(vecin);
}
st.push(nod);
}
int main()
{
fin >> n >> m;
for (int i=1;i<=m;i++)
{
int x,y;
fin >> x >> y;
muchii[x].push_back(y);
}
for (int i=1;i<=n;i++)
{
if (!viz[i])
dfs(i);
}
while (!st.empty())
{
fout << st.top() << " ";
st.pop();
}
}