/*
Solução exercício A Simulado
 */
package maratonacps2020;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

/**
 *
 * @author Henrique Louro
 */
public class Palin {

    public static void main(String[] args) throws FileNotFoundException, IOException {

        String linha = "";

        BufferedReader entrada;

        entrada = new BufferedReader(new InputStreamReader(System.in));

        while ((linha = entrada.readLine()) != null) {

            if (linha.equals("0")) {
                break;
            }

            int n = Integer.parseInt(linha);

            String bin = Integer.toBinaryString(n);

            boolean pal = true;
            int tam = bin.length();

            for (int x = 0; x < tam; x++) {
                if (!bin.substring(x, x + 1).equals(bin.substring(tam - x - 1, tam - x))) {
                    pal = false;
                    break;
                }
            }
            if (pal) {
                System.out.println("V");
            } else {
                System.out.println("F");
            }
        }
        entrada.close();
        System.exit(0);
    }
}
