import java.io.*;
import java.util.*;
class Ideone {
public static void main
(String[] args
) {
List<List<Short>> boards = genBoardsOfLength(2);
out.println(boards.size());
out.println(boardListToString(boards));
out.close();
}
public static String boardListToString
(List
<List
<Short
>> boards
) { StringJoiner ret = new StringJoiner("\n");
for (List<Short> board : boards) {
StringJoiner sj = new StringJoiner("\n");
for (short line : board)
sj.add(lineToString(line));
ret.add(sj.toString() + "\n");
}
return ret.toString();
}
public static boolean conflicts(List<Short> board, short line) {
if (board == null || board.size() == 0)
return false;
short lastRow = board.get(board.size() - 1);
if (hasJumps(lastRow) && hasJumps(line))
return true;
return false;
}
public static boolean hasJumps(short line) {
}
public static List<List<Short>> genBoardsOfLength(int n) {
List<List<Short>> ret = new ArrayList<>();
if (n == 0) {
return ret;
} else if (n == 1) {
for (short line: genRows()) {
List<Short> board = new ArrayList<Short>();
board.add(line);
ret.add(board);
}
return ret;
} else {
List<List<Short>> prevBoards = genBoardsOfLength(n - 1);
for (List<Short> board : prevBoards) {
for (short line : genRows()) {
if (conflicts(board, line))
continue;
List<Short> newBoard = new ArrayList<Short>(board);
newBoard.add(line);
ret.add(newBoard);
}
}
}
return ret;
}
public static String lineToString
(short line
) { StringBuilder sb = new StringBuilder();
int count
= Integer.
bitCount(line
); sb.append((line & 1) > 0 ? '<' : '.');
sb.append((line & 2) > 0 ? '^' : '.');
sb.append((line & 4) > 0 ? 'v' : '.');
sb.append((line & 8) > 0 ? '>' : '.');
return sb.toString();
}
public static List<Short> genRows() {
List<Short> ret = new ArrayList<>();
for (short i
= 0; i
< (short)Math.
pow(2,
4); i
++) { ret.add(i);
}
return ret;
}
static class MyScanner {
public MyScanner() {
}
public boolean hasNext() {
try {
boolean a = br.ready();
return a;
return false;
}
}
while (st == null || !st.hasMoreElements()) {
try {
e.printStackTrace();
}
}
return st.nextToken();
}
public int nextInt() {
}
public long nextLong() {
return Long.
parseLong(next
()); }
public double nextDouble() {
return Double.
parseDouble(next
()); }
public char nextChar() {
return next().charAt(0);
}
try {
str = br.readLine();
e.printStackTrace();
}
return str;
}
}
}