#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

const int N=1000; // حداکثر تعداد رئوس
int n, m; // تعداد رئوس و تعداد یال‌های جهت دار
vector<int> g[N]; // برای هر راس یک پشته که شامل راس‌هایی که به آن‌ها یال خروجی دارد
bool used[N]; 
bool end[N]; 
vector<int> ans;
 
bool dfs (int v) {
	used[v] = true;
	for (int i=0; i<g[v].size(); ++i) {
		int to = g[v][i];
		if (!used[to])
			dfs (to);
		if(used[to]==true && end[to]==false)
			return false;
	}
	ans.push_back (v);
	end[v] = true;
	return true;
}
 
bool topological_sort() {
	fill_n(used,n,false);
	fill_n(end,n,false);
	
	ans.clear();
	for (int i=0; i<n; ++i)
		if (!used[i] && dfs(i)==false)
			return false;
	
	return true;
}

int main() {
	cin >> n>>m;
	for(int i=0; i<m; i++){
		int t,r;
		cin >>t>>r;
		g[--t].push_back(--r); // است n-1 از ورودی یکی کم می‌کنیم چون بازه‌ی معتبر ما از صفر تا
	}
	if (topological_sort())
		for(int i=n-1; i>=0; i--)
			cout << ans[i]+1 <<endl; // است n-1 به خروجی یکی اضافه می‌کنیم چون بازه‌ی معتبر ما از صفر تا
	else
		cout << "Fail!";
}