Drazil created a following problem about putting 1 × 2 tiles into an n × m grid:

"There is a grid with some cells that are empty and some cells that are occupied. You should use 1 × 2 tiles to cover all empty cells and no two tiles should cover each other. And you should print a solution about how to do it."

But Drazil doesn't like to write special checking program for this task. His friend, Varda advised him: "how about asking contestant only to print the solution when it exists and it is unique? Otherwise contestant may print 'Not unique' ".

Drazil found that the constraints for this task may be much larger than for the original task!

Can you solve this new problem?

Note that you should print 'Not unique' either when there exists no solution or when there exists several different solutions for the original task.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 2000).

The following n lines describe the grid rows. Character '.' denotes an empty cell, and the character '*' denotes a cell that is occupied.

Output

If there is no solution or the solution is not unique, you should print the string "Not unique".

Otherwise you should print how to cover all empty cells with 1 × 2 tiles. Use characters "<>" to denote horizontal tiles and characters "^v" to denote vertical tiles. Refer to the sample test for the output format example.

Examples

Input

3 3
...
.*.
...


Output

Not unique


Input

4 4
..**
*...
*.**
....


Output

&lt;&gt;**
*^&lt;&gt;
*v**
&lt;&gt;&lt;&gt;


Input

2 4
*..*
....


Output

*&lt;&gt;*
&lt;&gt;&lt;&gt;


Input

1 1
.


Output

Not unique


Input

1 1
*


Output

*

Note

In the first case, there are indeed two solutions:
    
    
      
    <>^  
    ^*v  
    v<>  
    

and
    
    
      
    ^<>  
    v*^  
    <>v  
    

so the answer is "Not unique".

import java.util.*;
import java.io.*;
import java.math.*;

public class Main {

    static BufferedReader in;
    static StringTokenizer stk;
    static boolean[] isPrime = new boolean[5000];

    static char[][] grid;
    static int n, m;

    static class Pair {
        int r, c;

        Pair(int r, int c) {
            this.r = r;
            this.c = c;
        }
    }

    static Stack<Pair> s = new Stack<Pair>();
    static int[][] dirs = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
    static char[] otherCell = {'^', 'v', '<', '>'};
    static char[] thisCell = {'v', '^', '>', '<'};
    static int[][] num;
    static boolean possible = true;

    public static void main(String[] args) throws Exception {
        in = new BufferedReader(new InputStreamReader(System.in));
        stk = new StringTokenizer(in.readLine());
        // Start of User Code
        n = ni();
        m = ni();

        grid = new char[n + 2][m + 2];
        Arrays.fill(grid[0], '*');
        Arrays.fill(grid[n + 1], '*');
        for (int i = 1; i <= n; i++) {
            String s = ns();
            grid[i][0] = '*';
            grid[i][m + 1] = '*';
            for (int j = 1; j <= m; j++) {
                grid[i][j] = s.charAt(j - 1);
            }
        }
        num = new int[n + 2][m + 2];
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= m; j++) {
                if (grid[i][j] == '.') {
                    updatePossible(i, j);
                    if (num[i][j] == 0) {
                        possible = false;
                    }
                    if (num[i][j] == 1) {
                        s.push(new Pair(i, j));
                    }
                }
            }
        }

        while (!s.isEmpty()) {
            Pair p = s.pop();
            for (int i = 0; i < 4; i++) {
                int tr = p.r + dirs[i][0];
                int tc = p.c + dirs[i][1];
                if (grid[tr][tc] == '.') {
                    grid[p.r][p.c] = thisCell[i];
                    grid[tr][tc] = otherCell[i];
                    updateVicinity(tr, tc);
                    break;
                }
            }
        }



//        Stack<Pair> tmp = new Stack<Pair>();
//
//        for(int i = 1; i<=n; i++){
//            for(int j = 1; j<=m; j++){
//
//                if(grid[i][j] == '.'){
//                    int b = 0;
//                    int w = 0;
//                    tmp.clear();
//                    tmp.push(new Pair(i, j));
//                    grid[i][j] = '+';
//                    if((i+j)%2 == 0) b++; else w++;
//
//                    while(!tmp.isEmpty()){
//                        Pair q = tmp.pop();
//                        if(grid[q.r][q.c] == '.') {
//                            for (int[] d : dirs) {
//                                int tr = q.r + d[0];
//                                int tc = q.c + d[1];
//                                if (grid[tr][tc] == '.'){
//                                    tmp.push(new Pair(tr, tc));
//                                    if((tr+tc)%2 == 0) b++; else w++;
//                                }
//                            }
//                        }
//                    }
//                    if(w == b){
//
//                    }
//
//                }
//            }
//        }

        boolean ok = true;
        for(int i = 1; i<=n; i++){
            for(int j = 1; j<=m; j++){
                if(grid[i][j] == '.'){
                    ok = false;

                }
            }
        }

        if ((!possible) || (!ok)) {
            System.out.println("Not unique");
            in.close();
            System.exit(0);
        }

        for(int i = 1; i <= n; i++){
            System.out.println(new String(grid[i], 1, m ));
        }

        // End of User Code
        in.close();
    }

    static void updateVicinity(int r, int c) {
        updatePossible(r, c);
        for (int[] dir : dirs) {
            int tr = r + dir[0];
            int tc = c + dir[1];
            updatePossible(tr, tc);
            if (grid[tr][tc] == '.' && num[tr][tc] == 0) {
                possible = false;
            }
            if (grid[tr][tc] == '.' && num[tr][tc] == 1) {
                s.push(new Pair(tr, tc));
            }
        }
    }

    static void updatePossible(int r, int c) {
        if (grid[r][c] == '.') {
            int t = 0;
            for (int[] dir : dirs) {
                int tr = r + dir[0];
                int tc = c + dir[1];
                if (grid[tr][tc] == '.') {
                    t++;
                }
            }
            num[r][c] = t;
        } else {
            num[r][c] = 0;
        }
    }

    static long modPow(long n, long pow, long mod) {
        return BigInteger.valueOf(n).modPow(BigInteger.valueOf(pow), BigInteger.valueOf(mod)).longValue();
    }

    static long modInv(long n, long mod, boolean isPrimeModuli) {
        if (isPrimeModuli) {
            return modPow(n, mod - 2, mod);
        }
        return BigInteger.valueOf(n).modInverse(BigInteger.valueOf(mod)).longValue();
    }

    // calc factorials
    static long[] fact;

    static void calcFactorials(int n) {
        fact = new long[n + 1];
        fact[0] = 1;
        for (int i = 1; i <= n; i++) {
            fact[i] = fact[i - 1] * i;
        }
    }

    static void calcFactorialsModM(int n, long M) {
        fact = new long[n + 1];
        fact[0] = 1;
        for (int i = 1; i <= n; i++) {
            fact[i] = fact[i - 1] * i;
            fact[i] %= M;
        }
    }

    static long ncr(int n, int r) {
        return fact[n] / (fact[n - r] * fact[r]);
    }

    static long ncrModM(int n, int r, long MOD, boolean isPrimeModuli) {
        return fact[n] * modInv(fact[n - r], MOD, isPrimeModuli) * modInv(fact[r], MOD, isPrimeModuli);
    }

    static long toL(String s) {
        return Long.parseLong(s);
    }

    static long toL(BigInteger n) {
        return n.longValue();
    }

    static int toI(String s) {
        return Integer.parseInt(s);
    }

    static double toD(String s) {
        return Double.parseDouble(s);
    }

    static String proc() {
        return null;
    }

    static void printf(String format, Object... args) {
        System.out.printf(format, args);
    }

    static int ni() throws Exception {
        while (!stk.hasMoreTokens()) {
            stk = new StringTokenizer(in.readLine());
        }
        return Integer.parseInt(stk.nextToken());
    }

    static long nl() throws Exception {
        while (!stk.hasMoreTokens()) {
            stk = new StringTokenizer(in.readLine());
        }
        return Long.parseLong(stk.nextToken());
    }

    static double nd() throws Exception {
        while (!stk.hasMoreTokens()) {
            stk = new StringTokenizer(in.readLine());
        }
        return Double.parseDouble(stk.nextToken());
    }

    static String ns() throws Exception {
        while (!stk.hasMoreTokens()) {
            stk = new StringTokenizer(in.readLine());
        }
        return stk.nextToken();
    }

    static int min(int a, int b) {
        return a < b ? a : b;
    }

    static int max(int a, int b) {
        return a > b ? a : b;
    }

    static long min(long a, long b) {
        return a < b ? a : b;
    }

    static long max(long a, long b) {
        return a > b ? a : b;
    }

    static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }
}