a[10]={ 7, 8, 9, 4, 5, 6, 1, 2, 3, 0 }; main(n){ scanf("%d",&n); printf("%d",a[n+1]); }