import java.util.*;
import java.lang.*;
import java.io.*;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// declaring a hardcoded int[] arr
		int[] arr = new  int[]{1, 1, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4};
		
		// delcaring a freqency array. Considering we know that max value in arr is N
		// which in this case happens to be 4
		int[] freqArr = new int[5];
		
		for(int i : arr){
			freqArr[i] = freqArr[i]+1;
		}
		// we have constructed our frequency array. now we will print the frequencies of
		//all elemnets in our input
		for(int i=1; i<5; i++){
			System.out.println("Frequency of element "+ i +" is "+ freqArr[i]);
		}
	}
}