from collections import deque import sys input = sys.stdin.readline N, M = map(int, input().split()) graph = [[] for _ in range(N+1)] indegree = [0]*(N+1) for _ in range(M) : a, b = map(int, input().split()) graph[a].append(b) indegree[b] += 1 qu = deque() for i in range(1,N+1) : if indegree[i] == 0 : qu.append(i) ans = [] while qu : now = qu.popleft() ans.append(str(now)) for next in graph[now] : indegree[next] -= 1 if indegree[next] == 0 : qu.append(next) print(" ".join(ans))