private void writeInput(PrintWriter out, int input, boolean frameBoundary) {
    out.print(frameBoundary ? "F" : ".");
    out.print(".|");
    out.print((input & Move.A) != 0 ? "A" : ".");
    out.print((input & Move.B) != 0 ? "B" : ".");
    out.print((input & Move.SELECT) != 0 ? "s" : ".");
    out.print((input & Move.START) != 0 ? "S" : ".");
    out.print((input & Move.RIGHT) != 0 ? "r" : ".");
    out.print((input & Move.LEFT) != 0 ? "l" : ".");
    out.print((input & Move.UP) != 0 ? "u" : ".");
    out.println((input & Move.DOWN) != 0 ? "d" : ".");
  }