#include<cstdio>
#include<cctype>
#include<queue>
#include<cmath>
#include<cstring>
#include<algorithm>
#define rep(i,s,t) for(int i=s;i<=t;i++)
#define dwn(i,s,t) for(int i=s;i>=t;i--)
#define ren for(int i=first[x];i;i=next[i])
using namespace std;
const int BufferSize=1<<16;
char buffer[BufferSize],*head,*tail;
inline char Getchar() {
if(head==tail) {
int l=fread(buffer,1,BufferSize,stdin);
tail=(head=buffer)+l;
}
return *head++;
}
inline int read() {
int x=0,f=1;char c=getchar();
for(;!isdigit(c);c=getchar()) if(c==‘-‘) f=-1;
for(;isdigit(c);c=getchar()) x=x*10+c-‘0‘;
return x*f;
}
const int maxn=700010;
int n,m,sumv[maxn*3];
void build(int o,int l,int r) {
if(l==r) sumv[o]=1;
else {
int mid=l+r>>1,lc=o<<1,rc=lc|1;
build(lc,l,mid);build(rc,mid+1,r);
sumv[o]=sumv[lc]+sumv[rc];
}
}
void update(int o,int l,int r,int p) {
if(l==r) sumv[o]--,printf("%d\n",l);
else {
int mid=l+r>>1,lc=o<<1,rc=lc|1;
if(p<=sumv[lc]) update(lc,l,mid,p);
else update(rc,mid+1,r,p-sumv[lc]);
sumv[o]=sumv[lc]+sumv[rc];
}
}
int main() {
m=n=read();build(1,1,n);
int p=0;
rep(i,1,n) {
(p+=read())%=m;
update(1,1,n,p+1);
m--;
}
return 0;
}