	#include <bits/stdc++.h>
	#include <cstdio>
	#include <cstring>
	#include <cmath>
	#include <cstring>
	#include <chrono>
	#include <complex>
	#define endl "\n"
	#define ll long long int
	#define vi vector<int>
	#define vll vector<ll>
	#define vvi vector < vi >
	#define pii pair<int,int>
	#define pll pair<long long, long long>
	#define mod 1000000007
	#define inf 1000000000000000001;
	#define all(c) c.begin(),c.end()
	#define mp(x,y) make_pair(x,y)
	#define mem(a,val) memset(a,val,sizeof(a))
	#define eb emplace_back
	#define f first
	#define s second
	#define rf freopen("inputf.in" ,"r", stdin)
	#define wf freopen("outputf.in" ,"w", stdout)
	#define  w(data) while(data--)
	#define in(input1) cin>>input1 
	#define out(input2) std::cout<<input2<<endl
	#define start int main(void) 
	#define fast ios_base::sync_with_stdio(false); cin.tie(NULL)
	#define it int a,b,temp,c,d,e,f,g,h,l,m,n,o,p,min1,max1,temp_min1,temp_max1,min_index,max_index
	#define st string s1,s2,s3;
	#define ma 1000000
	int arr[ma],arr1[ma];
	using namespace std;
	start{//rf;wf;
	fast;it;st;
	in(a);d=a;
	for (int i = 0; i < ma; ++i)
	{arr[i]=0;arr1[i]=0;
		/* code */
	}for (int i = 0; i < a-1; ++i)
	{in(arr1[i]);
		/* code */
	}
	sort(arr1,arr1+a-1);
	for (int i = 0; i < a-1; ++i)
	{temp=arr1[i];
		arr[temp]+=1;//out(arr[temp]);
	}
	for(int i=1;i<ma;i++){
		if(arr[i]==0){
			c=i;break;
		}
	}
	for (int i = 1; i <c ; ++i)
	{out(arr[i]);d--;
		/* code */
	}

	for (int i = 0; i <d; ++i)
	{out("0");
		/* code */
	}
	}
