Problem: Fibonacci numbers are the sequence of integers: f0 = 0, f1 = 1, f2 = 1, f3 = 2, f4 = 3, f5 = 5, ..., fn = fn - 2 + fn - 1. So every next number is the sum of the previous two.

Bajtek has developed a nice way to compute Fibonacci numbers on a blackboard. First, he writes a 0. Then, below it, he writes a 1. Then he performs the following two operations:

  * operation "T": replace the top number with the sum of both numbers; 
  * operation "B": replace the bottom number with the sum of both numbers. 



If he performs n operations, starting with "T" and then choosing operations alternately (so that the sequence of operations looks like "TBTBTBTB..."), the last number written will be equal to fn + 1.

Unfortunately, Bajtek sometimes makes mistakes and repeats an operation two or more times in a row. For example, if Bajtek wanted to compute f7, then he would want to do n = 6 operations: "TBTBTB". If he instead performs the sequence of operations "TTTBBT", then he will have made 3 mistakes, and he will incorrectly compute that the seventh Fibonacci number is 10. The number of mistakes in the sequence of operations is the number of neighbouring equal operations («TT» or «BB»).

You are given the number n of operations that Bajtek has made in an attempt to compute fn + 1 and the number r that is the result of his computations (that is last written number). Find the minimum possible number of mistakes that Bajtek must have made and any possible sequence of n operations resulting in r with that number of mistakes.

Assume that Bajtek always correctly starts with operation "T".

Input

The first line contains the integers n and r (1 ≤ n, r ≤ 106).

Output

The first line of the output should contain one number — the minimum possible number of mistakes made by Bajtek. The second line should contain n characters, starting with "T", describing one possible sequence of operations with that number of mistakes. Each character must be either "T" or "B".

If the required sequence doesn't exist, output "IMPOSSIBLE" (without quotes).

Examples

Input

6 10


Output

2
TBBTTB


Input

4 5


Output

0
TBTB


Input

2 1


Output

IMPOSSIBLE

Solution (in JAVA):

Solution:
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.math.BigDecimal;
import java.io.BufferedWriter;
import java.util.Locale;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Jacob Jiang
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskB {
    int operateNumber = 0;
    int errorNumber = 0;
    int answerErrorNumber = Integer.MAX_VALUE;
    int answer;

    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.nextInt();
        int r = in.nextInt();
        if (n == 1) {
            if (r == 1) {
                out.println(0);
                out.println('T');
            } else {
                out.println("IMPOSSIBLE");
            }
            return;
        }
        if (r == 1 || r < n) {
            out.println("IMPOSSIBLE");
            return;
        }
        for (int i = 1; i < r; i++) {
            operateNumber = 0;
            errorNumber = -1;
            if (gcd(i, r) == 1 && operateNumber == n) {
                if (answerErrorNumber > errorNumber) {
                    answerErrorNumber = errorNumber;
                    answer = i;
                }
            }
        }
        if (answerErrorNumber == Integer.MAX_VALUE) {
            out.println("IMPOSSIBLE");
            return;
        }
        out.println(answerErrorNumber);
        boolean[] isError = new boolean[n];
        int index = 0;
        int a = answer, b = r;
        while (a > 0) {
            if (a == 1 && b == 1) {
                break;
            }
            if (a + a <= b) {
                b -= a;
                if (a == 1 && b == 1) isError[index++] = false;
                else isError[index++] = true;
            } else {
                int c = b - a;
                b = a;
                a = c;
                isError[index++] = false;
            }
        }
        StringBuilder result = new StringBuilder();
        char cur = 'T';
        result.append(cur);
        for (int i = n - 2; i >= 0; i--) {
            if (!isError[i]) {
                cur = chg(cur);
            }
            result.append(cur);
        }
        out.println(result);
    }

    private char chg(char cur) {
        return cur == 'T' ? 'B' : 'T';
    }

    private int gcd(int a, int b) {
        if (a == 0) return b;
        int c = b % a;
        int tmp = (b - c) / a;
        operateNumber += tmp;
        errorNumber += tmp - 1;
        return gcd(c, a);
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1 << 20];
    private int curChar;
    private int numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int nextInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c & 15;
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    }

class OutputWriter {
    private PrintWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(stream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void println(int x) {
        writer.println(x);
    }

    public void println(char x) {
        writer.println(x);
    }

    public void println(Object x) {
        writer.println(x);
    }

    public void println(String x) {
        writer.println(x);
    }

    public void close() {
        writer.close();
    }

    }