For this Question: Find the lexicographically smallest permutation P of integers from 1 to N such that:
1. It should not be strictly increasing i. e. there must be an i such that P[i] < P[i-1] for 2 <= i <= N
2. Sum of every three consecutive elements should be divisible by 3.The only line of input contains a single integer N, denoting the number of elements in the permutation.

3 <= N <= 15Print a single line containing N space separated integers denoting the elements of the permutation.Sample Input:
4

Sample Output:
1 3 2 4

Explanation:
Some permutations of 4 integers are:
1. [1, 2, 3, 4] - not valid since it is strictly increasing
2. [1, 3, 4, 2] - not valid since sum of [1, 3, 4] is not divisible by 3
3. [4, 3, 2, 1] - not valid because its not lexicographically smallest, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException
	{
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);

        int n = Integer.parseInt(br.readLine());

		StringBuffer sb = new StringBuffer("");

		if(n == 3)
			System.out.println("1 3 2");
		else if(n == 4)
			System.out.println("1 3 2 4");
		else
		{
			for(int i=1; i<n-3; i++)
			{
				sb.append(i+" ");
			}
			sb.append(n+" ").append(n-2+" ").append(n-1+" ").append(n-3+" ");

			System.out.println(sb);
		}

	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?