Problem:
 Score : 100 points    Problem Statement This contest is CODEFESTIVAL , which can be shortened to the string CF by deleting some characters.  Mr. Takahashi, full of curiosity, wondered if he could obtain CF from other strings in the same way.  You are given a string s consisting of uppercase English letters.
Determine whether the string CF can be obtained from the string s by deleting some characters.      Constraints  2 ≤ |s| ≤ 100  All characters in s are uppercase English letters ( A - Z ).         Input The input is given from Standard Input in the following format:  s       Output Print Yes if the string CF can be obtained from the string s by deleting some characters.
Otherwise print No .        Sample Input 1 CODEFESTIVAL      Sample Output 1 Yes  CF is obtained by deleting characters other than the first character C and the fifth character F .       Sample Input 2 FESTIVALCODE      Sample Output 2 No  FC can be obtained but CF cannot be obtained because you cannot change the order of the characters.       Sample Input 3 CF      Sample Output 3 Yes  It is also possible not to delete any characters.       Sample Input 4 FCF      Sample Output 4 Yes  CF is obtained by deleting the first character.

Solution (Python):
s = input()
f = 0
for i in range(len(s)):
  if f == 0 and s[i] == "C":
    f = 1
  if f == 1 and s[i] == "F":
    f = 2
    break
if f == 2:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
C = False

for i in range(len(s)):
    if s[i] == "C":
        C = True
    elif C and s[i] == "F":
        print("Yes")
        exit()

print("No")

Solution (Python):
import re
print("Yes" if re.search(("C.*F"),input()) else "No")

Solution (Python):
import re
print("Yes" if re.search(("C.*F"),input()) else "No")

Solution (Python):
s = input()
if s.count("C")>=1 and s.count("F")>=1:
    if s.index("C")<s.index("F") or s.index("C")<len(s)-(1+s[::-1].index("F")):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
s = input()
is_C = False
for i in range(len(s)):
  if s[i] == "C":
    is_C = True
  if is_C and s[i] == "F":
    print("Yes")
    exit()
  if i == len(s)-1:
    print("No")

Solution (Python):
s = input()

num = 0
flag = False
for i in range(len(s)):
    if s[i] == "C" and num == 0:
        num = 1
    elif s[i] == "F" and num == 1:
        flag = True
        break

if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
c, f = -1, -1
for i, s in enumerate(S):
    if s == 'C':
        c = i
        break
for i, s in enumerate(S[::-1]):
    if s == 'F':
        f = len(S)-i-1
        break
if c >= 0 and f >= 0 and c < f:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    s = input()
    flag = True

    for i in range(len(s)):
        if flag:
            if s[i] == "C":
                flag = False
        else:
            if s[i] == "F":
                print("Yes")
                exit()
    else:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):

s=input()
n=len(s)
flg=False
flg_=False
a=0
b=0
for i in range(n):
    if s[i]=="C":
        a=i
        flg=True
        break
for i in range(n-1,-1,-1):
    if s[i]=="F":
        b=i
        flg_=True
        break
if flg and flg_ and a<b:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    S = input()

    def judge():
        if "C" in S:
            idx = S.index("C")
            for char in S[idx:]:
                if char == "F":
                    return True
        return False

    print("Yes" if judge() else "No")


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    s=input()
    c,f=False,False
    for i in s:
        if c and i == "F":
            f=True
        elif i == "C":
            c=True
    print("Yes" if c and f else "No")
    
if __name__ == "__main__":
    main()

Solution (Python):
s=str(input())
if 'C' in s and 'F' in s:
  if s.find('C')<s.rfind('F'):
    print('Yes')
  else:
    print('No')
else:
  print('No')
  exit()

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    S = input().rstrip('\n')
    a = S.find("C")
    b = S.rfind("F")
    if 0 <= a < b:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
a = len(S)
b = -1
for i in range(len(S)):
    if S[i] == "C":
        a = i
        break
for i in range(len(S)):
    if S[len(S)-i-1] == "F":
        b = len(S)-i-1
        break
if a < b:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
ans = "No"
for i in range(len(s)):
    for j in range(len(s)):
        if i < j and s[i] == "C" and s[j] == "F":
            ans = "Yes"
print(ans)

Solution (Python):
s=input()
if 'C' in s:
	if 'F' in s[s.index('C'):]:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Solution (Python):
s = input()
if 'C' in s and 'F' in s[s.index('C')+1:]:
    print('Yes')
    exit()
else:
    print('No')

Solution (Python):
s = input()
n = len(s)
sw = 0
if "C" in s:
    a = s.index("C")
    if "F" in s:
        b = s[::-1].index("F")
        b = n-1 - b
        if a < b:
            sw = 1
            
print(["No","Yes"][sw])

Solution (Python):
s = input()
flg = False
for ss in s:
    if ss == "C":
        flg = True
    if ss == "F" and flg:
        print("Yes")
        break
else:
    print("No")

Solution (Python):
S = input ()
x = 0
for i in range (len(S)):
  if S[i] == 'C':
    x = 1
    break
if x == 1:
  for j in range (len(S)-i):
    if S[j+i] == 'F':
      x = 2
      break
if x == 2:
  print ('Yes')
else:
  print ('No')

Solution (Python):
s = list(input())

c = False
f = False
for i in range(len(s)):
  if s[i]=="C":
    c = True
  if c and s[i]=="F":
    f = True

if c and f:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

s = rr()
a = re.search(r'C.*F', s)
if a:
    print('Yes')
else:
    print('No')

Solution (Python):
n = input()
if "C" in n and "F" in n[n.index("C"):]:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()

pos_c = s.find('C')
if pos_c >= 0 and s[pos_c:].find('F') >= 0:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

pos_c = s.find('C')
if pos_c >= 0 and s[pos_c:].find('F') > 0:
    print('Yes')
else:
    print('No')

Solution (Python):
import collections


def main():
    s = list(input())
    if s.count("C") == 0 or s.count("F") == 0:
        print("No")
        return

    clen, flen = 0, 0
    for i in range(len(s)):
        if clen == 0:
            if s[i] == "C":
                clen = i
        if s[i] == "F":
            flen = i
    print("Yes" if flen > clen else "No")


if __name__ == '__main__':
    main()

Solution (Python):
import sys, math, re
from functools import lru_cache
from collections import defaultdict
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    s = input()
    n = len(s)

    for i in range(n):
        if s[i] == 'C':
            for j in range(i+1, n):
                if s[j] == 'F':
                    print('Yes')
                    return

    print('No')


if __name__ == '__main__':
    main()

Solution (Python):
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import re
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write

  s=pin()[:-1]
  if re.fullmatch(r"[A-Z]*C+[A-Z]*F+[A-Z]*", s)==None:
    print("No")
    return
  print("Yes")
  return

main()

Solution (Python):
s = input()
flg = 0
for i in range(len(s)):
    if s[i] == "C":
        for j in range(i,len(s)):
            if s[j] == "F":
                flg = 1
if flg == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
flag = 0
for i in range(len(S)):
    if S[i] == 'C':
        flag = 1
    elif S[i] == 'F' and flag:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
s = input()

if 'C' in s and 'F' in s:
    c_index = s.index('C')
    f_index = s.rindex('F')
    if c_index < f_index:
        ans = 'Yes'
    else:
        ans = 'No'
else:
    ans = 'No'

print(ans)

Solution (Python):
s = str(input())
cnt = 0
for i in range(len(s)):
    if s[i] == "C":
        cnt += 1
    if cnt >= 1 and s[i] == "F":
        print("Yes")
        exit()
print("No")

Solution (Python):
s = input()
n = len(s)
ans = 'No'
for i in range(n):
    for j in range(i+1,n):
        if s[i] == 'C' and s[j] == 'F':
            ans = 'Yes'
            break
print(ans)

Solution (Python):
s = input()
flag = False
for i in s:
  if i == "C":
    flag = True
  elif i == "F":
    if flag == True:
      print("Yes")
      break
else:
  print("No")

Solution (Python):
S=input()
F=0
for i in range(len(S)):
    if F==0:
        if S[i]=="C":
            F=1
    if F==1:
        if S[i]=="F":
            print("Yes")
            exit()
print("No")

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    S = input()
    idx = S.find('C')
    if idx == -1:
        print('No')
    else:
        i = S[idx:].find('F')
        if i == -1:
            print('No')
        else:
            print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):
s=input()

if 'C' in s:
    A=s.index('C')
    for i in range(A,len(s)):
        if s[i]=='F':
            print('Yes')
            break
    else:
        print('No')
else:
    print('No')

Solution (Python):
S = input()

i = 0
for l in S:
    if l == 'C':
        i = 1
    if i == 1 and l == 'F':
        print('Yes')
        exit()

print('No')

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

S = list(input())
c_ok = False
for s in S:
    if s=='C':
        c_ok = True
    if s=='F' and c_ok:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
s = input()

in_c = False

for c in s:
    if not in_c:
        if 'C' == c:
            in_c = True
    else:
        if 'F' == c:
            print('Yes')
            exit()

print('No')

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
s = input()
c = False
f = False
i = 0
while i < len(s):
    if s[i] == 'C':
        c = True
    elif s[i] == 'F' and c:
        f = True
        break
    i += 1
if f:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
ans = "No"
for i in range(len(s)):
    if s[i] == "C":
        for j in range(i+1, len(s)):
            if s[j] == "F":
                ans = "Yes"
                break
print(ans)

Solution (Python):
def check():
  S = input()
  ind = S.find('C')
  if ind==-1:
    return 'No'
  ind2 = S[ind+1:].find('F')
  if ind2==-1:
    return 'No'
  return 'Yes'
print(check())

Solution (Python):
def solve():
    S = input()
    flag_c = False
    flag_f = False
    ans = ''
    for s in S:
        if s == 'C':
            flag_c = True
        if flag_c and s == 'F':
            flag_f = True
    if flag_c and flag_f:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    solve()

Solution (Python):
*S, = input()
ans = []

for s in S:
    if s == 'C':
        ans.append(s)
    if s == 'F':
        ans.append(s)

print('Yes' if 'CF' in ''.join(ans) else 'No')

Solution (Python):
S = input()
CFlag = False
FFlag = False
for T in S:
    if T=='C':
        CFlag = True
    if CFlag and T=='F':
        FFlag = True
        break
if FFlag:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
c=-1
f=-1
for i in range(len(s)):
  if s[i]=='C':
    if c==-1:
      c=i
  if s[i]=='F':
    f=max(f,i)
if c!=-1 and f>c:
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
if "C" in s and "F" in s:
    for i in range(len(s)):
        if s[i]=="C":
            ind = i
            break
    flag = 0
    for j in range(ind,len(s)):
        if s[j]=="F":
            flag = 1
            break
    if flag==1:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
S = str(input())

if S.count('C') > 0:
	D = S.index('C')
	if S[D::].count('F') > 0:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Solution (Python):
S = input()

c = 0
f = 0
for s in S:
    if s == "C":
        c = 1
    elif c and s == "F":
        f = 1
        break

if c and f:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
cf = False
for si in s:
    if si =='C': cf = True
    if cf and si == 'F':
        print('Yes')
        break
else:
    print('No')

Solution (Python):
s = input()
c = s.rfind('C')
f = s.rfind('F')
print('Yes') if c >= 0 and f >= 0 and (c - f) < 0 else print('No')

Solution (Python):
s =  list(input())
if ("C" in s and "F" in s):
    if(s.count("F") == 1):
        if(s.index("C") < s.index("F")):
            print("Yes")
        else:
            print("No")
    else:
        if(s.index("C") < s.index("F",1)):
            print("Yes")
        else:
            print("No")

else:
    print("No")

Solution (Python):
S=input()

nc=-1
nf=-1
for i in range(len(S)):
    if S[i]=='C':
        nc=i
        break
for i in range(len(S)):
    if S[i]=='F':
        nf=i

print('Yes' if nc < nf and nc>=0 and nf>=1 else 'No')

Solution (Python):
s = input()
isC = s.find('C')
ret = False
if(  isC != -1):
    if( s[isC+1:].find('F') != -1):
        ret = True
if ret:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
ans = 'No'
if 'C' in s:
    if 'F' in ''.join(s.split('C')[1:]):
        ans = 'Yes'
print(ans)

Solution (Python):
s=input()
b=False
for i in s:
    if i=="C":
        b=True
    if b and i=="F":
        print("Yes")
        exit()
print("No")

Solution (Python):
s=input()
ans="No"
flag=False
for i in range(len(s)):
  if not flag and s[i]=="C":
    flag=True
  elif flag and s[i]=="F":
    ans="Yes"
    break
print(ans)

Solution (Python):
s = input()
flag = 0
for i in range(len(s)):
    if flag == 0 and s[i] == "C":
        flag += 1
    if flag == 1 and s[i] == "F":
        flag += 1
if flag == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
num = 0
for x in s:
  if num == 0 and x == 'C':
    num += 1
  if num == 1 and x == 'F':
    num += 1
if num == 2:
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
n = len(s)
yes = False
for i in range(n):
    for j in range(i + 1, n):
        if s[i] == "C" and s[j] == "F":
            yes = True
if yes:
    print("Yes")
else:
    print("No")

Solution (Python):
def main():
    s=input()
    a=s.find('C')
    if(a==-1):
        print('No')
    else:
        a2=s.find('F',a+1,len(s))
        if(a2==-1):
            print('No')
        else:
            print('Yes')

main()

Solution (Python):
s=input()
print("Yes" if 0<=s.find("C")<s.rfind("F") else "No")

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    s = SS()

    ans = 'No'
    if 'C' in s:
        idx_c = s.index('C')
        if 'F' in s[idx_c:]:
            ans = 'Yes'

    print(ans)

if __name__ == '__main__':
    resolve()

Solution (Python):
import sys
s=str(input())
c=0
for i in s:
    if i=='C':
        c=1
    if i=='F' and c==1:
        print('Yes')
        sys.exit()

print('No')

Solution (Python):
s = input()
flag = False
for i in range(len(s)):
  if s[i]=='C':
    for j in range(i+1,len(s)):
      if s[j] == 'F':
        flag = True
        break
    if flag:
      break
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()

c_idx = len(s)
f_idx = -1
for i in range(len(s)):
    if s[i] == 'C':
        c_idx = min(c_idx, i)
    if s[i] == 'F':
        f_idx = max(f_idx, i)
print('Yes' if c_idx < f_idx else 'No')

Solution (Python):
s = input()
a = s.find("C")
b = s.rfind("F")

if -1 < a < b:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
n = len(s)
for i in range(n):
  if s[i]=="C":
    for j in range(i,n):
      if s[j]=="F":
        print("Yes")
        exit()
else:
  print("No")

Solution (Python):
s=str(input())
s=list(s)
temp=0
for i in range(len(s)):
  if s[i]=="C":
    temp=1
  if temp==1 and s[i]=="F":
    temp=2
if temp==2:
  print("Yes")
else:
  print("No")

Solution (Python):
import re
s = input()
s = re.sub('[^F^C]', '', s)
if s.count('CF') > 0: print('Yes')
else: print('No')

Solution (Python):
s = list(input())
cf = ["C", "F"]
i = 0
for t in s:
    if t == cf[i]:
        i += 1
    if i == 2:
        break
print("Yes" if i == 2 else "No")

Solution (Python):
def main():
    S = input()
    c = False
    for s in S:
        if s == 'C':
            c = True
        if c and s == 'F':
            print('Yes')
            exit()
    print('No')
if __name__ == '__main__':
    main()

Solution (Python):
S = input()
if S.count("C") > 0:
  k = S.index("C")
  if S[k+1:].count("F") > 0:
    print("Yes")
    exit()
print("No")

Solution (Python):
s = input() + 'C'
t = s[::-1] + 'F'





idx_C = s.index('C')
idx_F = len(s) - 1 - t.index('F')

if idx_C < idx_F:
    print('Yes')
else:
    print('No')

Solution (Python):
import re
S = input()
print('No' if re.search(r'C.*F', S) is None else 'Yes')

Solution (Python):
s = input()
if 'C' in s:
    c = s.index("C")
    if "F" in s[c:]:
        print('Yes')
        exit()
print('No')

Solution (Python):
import re;print(re.search('C.*F',input())and'Yes'or'No')

Solution (Python):
S=input()
import re
if re.search('C.*F',S):
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
for i,c in enumerate(s):
	for j in range(len(s)-i):
		if s[i]+s[j+i] == 'CF':
			print('Yes')
			exit()
print('No')

Solution (Python):
s = input()

if 'C' in s and 'F' in s:
    if 'F' in s[s.index('C'):]:
        print('Yes')
        exit()
print('No')

Solution (Python):
s=input();print("Yes" if "C" in s and "F" in s and s.index("C")<len(s)-s[::-1].index("F")-1 else "No")

Solution (Python):
s = list(input())

sc = -1
sf = -1

for i in range(len(s)):
    if s[i] == "C":
        sc = i
    elif s[i] == "F":
        sf = i

if (sc == -1) or (sf == -1):
    print("No")
elif sc < sf:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())

sc = -1
sf = -1

for i in range(len(s)):
    if s[i] == "C":
        sc = i
    elif s[i] == "F":
        sf = i

if (sc == -1) or (sf == -1):
    print("No")
elif sc < sf:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

s = input()
print("Yes" if re.search('C.*F', s) else "No")

Solution (Python):
s=input()
flag_c=False
flag_f=False
for i in range(len(s)):
  if s[i]=="C":
    flag_c=True
  if s[i]=="F" and flag_c:
    print("Yes")
    flag_f=True
    break
if not flag_f:
  print("No")

Solution (Python):

s = input()
n = len(s)
a = n; b = -1;
for i in range(n):
	if s[i] == 'C':
		a = i
		break
for i in range(n-1, -1, -1):
	if s[i] == 'F':
		b = i
		break
if b < a:
	print('No')
else:
	print("Yes")

Solution (Python):
s = input()
check1 = False
check2 = False
for i in range(len(s)):
    if s[i] == "C":
        if not check1:
            check1 = True
    if s[i] == "F":
        if check1:
            check2 = True
if check1 and check2:
    print("Yes")
else:
    print("No")

Solution (Python):
import re
ans = re.match('.*C.*F.*', input())
print("Yes" if ans else "No")

Solution (Python):


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    s = input()
    n = len(s)
    c_ind = inf
    f_ind = -1
    for i in range(n):
        if s[i] == 'C':
            c_ind = i
            break
    for i in range(n-1, -1, -1):
        if s[i] == 'F':
            f_ind = i
            break
    print('Yes') if c_ind < f_ind else print('No')


if __name__ == "__main__":
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

s = input()

for i in range(len(s)):
	if s[i] == "C" and 1 <= s[i+1:].count("F") :
		print("Yes")
		break
else:
	print("No")

Solution (Python):
import re
s = input()
m = re.compile('[A-Z]*C[A-Z]*F[A-Z]*')
if m.fullmatch(s):
  print('Yes')
else:
  print('No')

Solution (Python):
s=input()
ans='No'
for i in range(len(s)):
  if s[i]=='C':
    for j in s[i+1:]:
      if j=='F':
        ans='Yes'
print(ans)

Solution (Python):
S = input()
start = -1
next = 0
for i in range(len(S)):
  if S[i] == 'C':
    start = i
    break
if start == -1:
  print('No')
  exit()
if 'F' in S[start:]:
  print('Yes')
  exit()
print('No')

Solution (Python):
s=input()
c=101
f=0
for i in range(len(s)):
    if s[i]=="C":
        c=min(c,i)
    elif s[i]=="F":
        f=max(f,i)

if s.count("C")>=1 and s.count("F")>=1 and f-c>0:
    print("Yes")
else:
    print("No")

Solution (Python):
def resolve():
    S = input()
    c = 0
    f = 0
    C = []
    F = []
    for i in range(len(S)):
        if S[i] == "C":
            c = 1
            C.append(i)
        elif S[i] == "F":
            f = 1
            F.append(i)
    print("Yes" if c == 1 and f == 1 and min(C) < max(F) else "No")
resolve()

Solution (Python):
s = input()
count = 0
for i in s:
  if i == 'C' and count == 0:
    count+=1
  if i == 'F' and count == 1:
    count+=1
if count == 2:
  print("Yes")
else:
  print("No")

Solution (Python):
def main():
    S = list(input())
    flag = False
    for s in S:
        if s == 'C':
            flag = True
        else:
            pass
        if flag and s == 'F':
            print('Yes')
            break
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
s=input()
foundc=False
for i in range(len(s)):
  if s[i]=="C":
    foundc=True
  if foundc and s[i]=="F":
    print("Yes")
    exit()
print("No")

Solution (Python):
S = input()
if "C" in S and "F" in S:
  if S.index("C")<[i for i, x in enumerate(S) if x == "F"][-1]:
    print("Yes")
    exit()
print("No")

Solution (Python):
s = list(input())
i = 0
while i < len(s):
    if s[i] == 'C':
        j = i + 1
        while j < len(s):
            if s[j] == 'F':
                print('Yes')
                exit(0)
            j = j + 1
    i = i + 1

print('No')

Solution (Python):
s = input()
c = 0
f = 0
for i in range(len(s)):
    if s[i] == 'C':
        c += 1
    elif s[i] == 'F' and c > 0:
        f += 1

if f > 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
x = 0

for c in s:
    if c == "C":
        x = 1
    elif c == "F" and x == 1:
        print("Yes")
        exit()

print("No")

Solution (Python):
def solve():
    s = input()
    bit = 0
    for i in range(len(s)):
        if bit == 0:
            if s[i] == "C":
                bit = 1
        if bit == 1:
            if s[i] == "F":
                bit = 2
                break
    if bit == 2:
        print("Yes")
    else:
        print("No")
    return 0

if __name__ == "__main__":
    solve()

Solution (Python):
s = input()
if not 'C' in s:
  print('No')
else:
  c = s.find('C')
  s = s[c:]
  if 'F' in s:
    print('Yes')
  else:
    print('No')

Solution (Python):
S = input()
id = -1
if 'C' in S:
  id = S.index('C')
  if 'F' in S[id:]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Solution (Python):
s=input()

ans="No"
for i in range(len(s)):
  if s[i]=="C":
    for j in range(i+1,len(s)):
      if s[j]=="F":
        print("Yes")
        exit()
else:
  print(ans)

Solution (Python):
s = input()
f = []
c = []
for i in range(len(s)):
    if s[i] == "F":
        f.append(i)
    elif s[i] == "C":
        c.append(i)
if f and c and (max(f)-min(c) > 0):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
c, f = False, False
for i in s:
    if i == 'C':
        c = True
    elif c and i == 'F':
        f = True
print("Yes" if c and f else "No")

Solution (Python):
import re
s = input()
reg = '[A-Z]*C[A-Z]*F[A-Z]*'
res = re.fullmatch(reg, s)
if res:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


s = S()
ans = ''
if 'C' in s:
    ans += 'C'
    if 'F' in s[s.find('C'):]:
        ans += 'F'
if ans == 'CF':
    print('Yes')
else:
    print('No')

Solution (Python):
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


s = S()
ans = ''
if 'C' in s:
    ans += 'C'
    if 'F' in s[s.index('C'):]:
        ans += 'F'
if ans == 'CF':
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
if s[:-1].count("C")>=1:
    x=s.index("C")
    if s[x:].count("F")>=1:
        print("Yes")
    else:
        print("No")
else:
    print("No")
    exit()

Solution (Python):
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    str = (input().rstrip())
    FC = INF
    LF = 0
    for x in range(len(str)):
        if(str[x] == 'C'):
            FC = min(FC,x+1)
        if(str[x] =='F'):
            LF = max(LF,x+1)
    
    if(FC*LF > 0 and LF > FC):
        print("Yes")
    else:
        print("No")


    print("")
if __name__ == '__main__':
    solve()

Solution (Python):
import re
s=input()
print("Yes" if re.match(".*C.*F",s) else "No")

Solution (Python):
s=input()
print("Yes" if 0<=s.find("C")<s.rfind("F") else "No")

Solution (Python):
s = input()
n = len(s)

f = 0
for i in range(n):
    if s[i] == 'C' and f == 0:
        f += 1
    if s[i] == 'F' and f == 1:
        print("Yes")
        exit()
print("No")

Solution (Python):
import sys
input = sys.stdin.readline


s = input()
n = s.find('C')

if n > -1:
	if 'F' in s[n:]:
		print('Yes')
		exit()

print('No')

Solution (Python):
s = input()
idx = 0
flg = False
for i in range(len(s)):
  if s[i] == 'C':
    idx += 1
  elif s[i] == 'F' and idx > 0:
    flg = True
    break
if flg:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
a = 0
for s in S:
    if a == 0 and s == 'C':
        a += 1
    if a == 1 and s == 'F':
        print('Yes')
        exit()
print('No')

Solution (Python):
c=False
f=False
s=input()
for i in s:
    if i=="C":
        c=True
    if i=="F" and c==True:
        f=True

if c and f:
    print("Yes")
else:
    print("No")

Solution (Python):
val = input()
count = 0
for i in range(len(val)):
    if val[i] == "C":
        for n in range(i+1, len(val)):
            if val[n] == "F" and count == 0:
                print("Yes")
                count += 1
if count == 0:
    print("No")

Solution (Python):
s = input()
n = len(s)
res = False
for i in range(n):
    for j in range(i, n):
        if s[i] == 'C' and s[j] == 'F':
            res = True
if res: print("Yes")
else:   print("No")

Solution (Python):
s = input()
ans = [0,0]
for v in s:
  if v == "C": ans[0] = 1
  elif v =="F" and ans[0] == 1:
    ans[1] = 1
print("Yes" if sum(ans)==2 else "No")

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    s = input().rstrip()
    N = len(s)

    i_C = -1
    for i in range(N):
        if s[i] == "C":
            i_C = i
            break
    i_F = -1
    for i in reversed(range(N)):
        if s[i] == "F":
            i_F = i
            break

    if i_C == -1 or i_F == -1:
        ans = "No"
    elif i_C < i_F:
        ans = "Yes"
    else:
        ans = "No"
    print(ans)


if __name__ == "__main__":
    main()