#!/usr/bin/env python3
#encoding: windows-1252

# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.

import sys

def DecToBin(decNum):
    bin = ""
    while decNum > 0:
        resto = decNum % 2
        decNum = int(decNum/2)
        bin = bin + str(resto)

    return bin

if __name__ == "__main__":

    while True:
            
        linha = input()
        
        if linha in '0':
            break

        n = int(linha)

        bin = DecToBin(n)

        pal = True
        tam = len(bin)

        for x in range(tam):
            if not bin[x:x + 1] == bin[tam - x - 1: tam - x]:
                pal = False
                break

        if pal:
            print("V")
        else:
            print("F")
            
sys.exit()