Table of Contents

## Rubik’s Cube Coloring (easy version) solution codeforces

It is the easy version of the problem. The difference is that in this version, there are no nodes with already chosen colors.

**Theofanis is starving, and he wants to eat his favorite food, sheftalia. However, he should first finish his homework. Can you help him with this problem?**

### Rubik’s Cube Coloring (easy version) solution codeforces

You have a perfect binary tree of 2πβ12kβ1 nodesΒ β a binary tree where all vertices πi from 11 to 2πβ1β12kβ1β1 have exactly two children: vertices 2π2i and 2π+12i+1. Vertices from 2πβ12kβ1 to 2πβ12kβ1 don’t have any children. You want to color its vertices with the 66 Rubik’s cube colors (White, Green, Red, Blue, Orange and Yellow).

Let’s call a coloring good when all edges connect nodes with colors that are neighboring sides in the Rubik’s cube.

A picture of Rubik’s cube and its 2D map.

- a white node can not be neighboring with white and yellow nodes;
- a yellow node can not be neighboring with white and yellow nodes;
- a green node can not be neighboring with green and blue nodes;
- a blue node can not be neighboring with green and blue nodes;
- a red node can not be neighboring with red and orange nodes;
- an orange node can not be neighboring with red and orange nodes;

You want to calculate the number of the good colorings of the binary tree. Two colorings are considered different if at least one node is colored with a different color.

The answer may be too large, so output the answer modulo 109+7109+7.

### Rubik’s Cube Coloring (easy version) solution codeforces

The first and only line contains the integers πk (1β€πβ€601β€kβ€60)Β β the number of levels in the perfect binary tree you need to color.

### Rubik’s Cube Coloring (easy version) solution codeforces

Output

Print one integerΒ β the number of the different colorings modulo 109+7109+7.

3

24576

### Rubik’s Cube Coloring (easy version) solution codeforces

input

14

### Rubik’s Cube Coloring (easy version) solution codeforces

output

934234

### Rubik’s Cube Coloring (easy version) solution codeforces

Note

In the picture below, you can see one of the correct colorings of the first example.