import java.util.*;
import java.io.*;
class Main {
static int n,m;
//稀疏图,邻接表存储
static int idx;
static int[] h = new int[100010];
static int[] e = new int[200010];
static int[] ne = new int[200010];
static {
Arrays.fill(h,-1);
Arrays.fill(e,-1);
Arrays.fill(ne,-1);
}
//存储点的入度
static int[] v = new int[100010];
//队列
static int[] queue = new int[100010];
static int head, tail;
static void insert(int x, int y) {
e[idx] = y;
ne[idx] = h[x];
v[y]++;
h[x] = idx++;
}
static boolean topSort() {
//入度为0全部加入队列
for (int i = 1; i<=n; i++)
if (v[i] == 0) queue[tail++] = i;
while (tail > head) {
int x = queue[head++];
for (int i = h[x]; i!=-1; i=ne[i]) {
int y = e[i];
v[y]--;
if (v[y] == 0) queue[tail++] = y;
}
if (tail == n) return true;
}
return false;
}
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(isr);
String[] strs = in.readLine().split(" ");
n = Integer.parseInt(strs[0]);
m = Integer.parseInt(strs[1]);
for (int i = 0; i < m; i++) {
strs = in.readLine().split(" ");
int a = Integer.parseInt(strs[0]);
int b = Integer.parseInt(strs[1]);
insert(a,b);
}
in.close();
isr.close();
OutputStreamWriter osw = new OutputStreamWriter(System.out);
BufferedWriter out = new BufferedWriter(osw);
if (topSort())
for (int i = 0; i < n; i++) out.write(queue[i]+" ");
else
out.write("-1");
out.flush();
out.close();
osw.close();
}
}