#include<iostream>
#include<stack>
#include<utility>
#include<vector>
#include<algorithm>
#include<cassert>
#include<cstdio>
#define debug(i) cout<<"Reached "<<i<<endl
using namespace std;
using std::string;
 
static struct IO {
        char tmp[1 << 10];
 
        // fast input routines
        char cur;
 
//#define nextChar() (cur = getc_unlocked(stdin))
//#define peekChar() (cur)
        inline char nextChar() { return cur = getc_unlocked(stdin); }
        inline char peekChar() { return cur; }
 
        inline operator bool() { return peekChar(); }
        inline static bool isBlank(char c) { return (c < '-' && c); }
        inline bool skipBlanks() { while (isBlank(nextChar())); return peekChar() != 0; }
 
        inline IO& operator >> (char & c) { c = nextChar(); return *this; }
 
        inline IO& operator >> (char * buf) {
                if (skipBlanks()) {
                        if (peekChar()) {
                                *(buf++) = peekChar();
                                while (!isBlank(nextChar())) *(buf++) = peekChar();
                        } *(buf++) = 0; } return *this; }
 
        inline IO& operator >> (string & s) {
                if (skipBlanks()) {     s.clear(); s += peekChar();
                        while (!isBlank(nextChar())) s += peekChar(); }
                return *this; }
 
        inline IO& operator >> (double & d) { if ((*this) >> tmp) sscanf(tmp, "%lf", &d); return *this; }
 
#define defineInFor(intType) \
        inline IO& operator >>(intType & n) { \
                if (skipBlanks()) { \
                        int sign = +1; \
                        if (peekChar() == '-') { \
                                sign = -1; \
                                n = nextChar() - '0'; \
                        } else \
                                n = peekChar() - '0'; \
                        while (!isBlank(nextChar())) { \
                                n += n + (n << 3) + peekChar() - 48; \
                        } \
                        n *= sign; \
                } \
                return *this; \
        }
 
defineInFor(int)
defineInFor(unsigned int)
defineInFor(long long)
 
        // fast output routines
 
//#define putChar(c) putc_unlocked((c), stdout)
        inline void putChar(char c) { putc_unlocked(c, stdout); }
        inline IO& operator << (char c) { putChar(c); return *this; }
        inline IO& operator << (const char * s) { while (*s) putChar(*s++); return *this; }
 
        inline IO& operator << (const string & s) { for (int i = 0; i < (int)s.size(); ++i) putChar(s[i]); return *this; }
 
        char * toString(double d) { sprintf(tmp, "%lf%c", d, '\0'); return tmp; }
        inline IO& operator << (double d) { return (*this) << toString(d); }
 
 
#define defineOutFor(intType) \
        inline char * toString(intType n) { \
                char * p = (tmp + 30); \
                if (n) { \
                        bool isNeg = 0; \
                        if (n < 0) isNeg = 1, n = -n; \
                        while (n) \
                                *--p = (n % 10) + '0', n /= 10; \
                        if (isNeg) *--p = '-'; \
                } else *--p = '0'; \
                return p; \
        } \
        inline IO& operator << (intType n) { return (*this) << toString(n); }
 
defineOutFor(int)
defineOutFor(long long)
 
#define endl ('\n')
#define cout __io__
#define cin __io__
} __io__;

vector<vector<int> > v(10005);
vector<bool> disc(10005),exp(10005);
vector<int> t(10005);
stack<int> st,s;
int ret=0;
void visit(int n)
{
    if(disc[n]==true&&exp[n]==false)
		ret=1;
	if(disc[n]==false)
	{
		disc[n]=true;
		for(vector<int>::const_iterator it=v[n].begin();it!=v[n].end();it++)
			visit(*it);
		exp[n]=true;
		st.push(n);
	}
}
int main()
{
	int n,m;
	cin>>n>>m;
	vector<bool> inc(n,false);
	vector<int> red;
	while(m--)
	{
		int s,d;
		cin>>s>>d;
		if(inc[s-1]==false)
			inc[s-1]=true;
		if(inc[d-1]==false)
			inc[d-1]=true;
		v[d-1].push_back(s-1);
	}
	for(int i=0;i<n;i++)
	sort(v[i].begin(),v[i].end());
	for(int i=0;i<n;i++)
		if(inc[i]==false)
			red.push_back(i+1);
	for(int i=0;i<n;i++)
		if(exp[i]==false&&inc[i]==true)
			visit(i);
	int idx=0;
	int len=red.size();
	if(ret==1)
	{
		cout<<"Sandro fails.";
		return 0;
	}
	while(!st.empty())
	{
		s.push(st.top());
		st.pop();
	}
	while(!s.empty())
	{
		while(idx<len&&s.top()+1>red[idx])
			cout<<red[idx++]<<" ";
		cout<<s.top()+1<<" ";
		s.pop();
	}
	while(idx<len)
		cout<<red[idx++]<<" ";
	return 0;
}