n,m=map(int,input().split())
a=[0]*n
for i in range(m):
  s,c=map(int,input().split())
  if s<=n:
    if a[s-1]==c or a[s-1]==0:
      a[s-1]=c
    else:
        print("-1")
        exit()
  else:
    print("-1")
    exit()
    
print(str(a))
