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()
c = False
f = False
for i in s:
	if i == "C":
		c = True
	elif i == "F" and c:
		f = True
print("Yes" if c and f else "No")

Solution (Python):
s = input()
flag = "off"
for i in s:
    if i == "C":
        flag = "on"
    if flag == "on" and i == "F":
        print("Yes")
        exit()
print("No")

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

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

Solution (Python):

import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    if 'C' in s and 'F' in s and s.find('C')<s.rfind('F'):
        print('Yes')
    else:
        print('No')
resolve()

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        s=list(input())
        ls=len(s)
        for i in range(ls-1):
            for j in range(i+1,ls):
                if s[i]=='C' and s[j]=='F':
                    return 'Yes'
        return 'No'
    print(main())
    
resolve()

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

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

def my_index(l, x, default=-1):
    if x in l:
        return l.index(x)
    else:
        return default

while True:
    cc = my_index(s,'C')
    ff = my_index(s,'F')
    if cc == -1 or ff ==-1:
        print('No')
        exit()
    if cc < ff:
        print('Yes')
        exit()
    else:
        s.pop(ff)

Solution (Python):
s = input()
c = s.find("C")
if c == -1:
    print("No")
    exit()
f = s.find("F", c+1)
if f == -1:
    print("No")
    exit()
print("Yes")

Solution (Python):
import re
s = input()
t = []
for ch in s:
    if ch == 'C' or ch == 'F':
        t.append(ch)
t = "".join(t)
if "CF" in t:
    print("Yes")
else:
    print("No")

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):
import sys
def input(): return sys.stdin.readline().strip()
def resolve():
    s=input()
    if 'C' in s:
        if 'F' in s[s.index('C'):]:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
resolve()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    num=0
    for i in s:
        
        
        
        
        
        if i=='C' and num==0:
            num+=1
        if i=='F' and num==1:
            num+=1
    if num==2:
        print('Yes')
    else:
        print('No')
resolve()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
       s=input()
       for i in range(len(s)):
           for j in range(i+1,len(s)):
               if s[i]=='C' and s[j]=='F':
                   return 'Yes'
       return 'No'
    print(main())
resolve()

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    s=input()
    a=s.find('C')
    b=s.rfind('F')
    if a==-1 or b==-1:
        print('No')
    else:
        if a<b:
            print('Yes')
        else:
            print('No')
resolve()

Solution (Python):
s = input()

a = s.find("C")
b = s.rfind("F")
if a == -1 or b == -1:
	print ("No")
else:
	if a < b:
		print ("Yes")
	else:
		print ("No")

Solution (Python):
s = input()
sc = ''
c = 0

for i in range(len(s)):
  if 'C' == s[i]:
    sc = s[i+1:]
    for j in range(len(sc)):
      if 'F' == sc[j]:
        c += 1

if c > 0:
  print('Yes')
else:
  print('No')

Solution (Python):
a=input()
ans=int()
for i in range(len(a)):
    if 'C' in a[i]:
        b=a[i+1:]
        for j in range(len(b)):
            if 'F' in b[j]:
                ans+=1
print('Yes' if ans>0 else 'No')

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:
  if 'F' in s[s.index('C'):]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    s = input()
    flg = False
    for i in s:
        if i == "C":
            flg = True

        if flg and i == "F":
            print("Yes")
            break
    else:
        print("No")


if __name__ == '__main__':
    resolve()

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

Solution (Python):
S=input()
if 'C' in S and 'F' in S:
    l=S.index('C')
    r=-1
    for i in reversed(range(len(S))):
        if S[i]=='F':
            r=i
            break
    if r==-1 or l>=r:
        print('No')
    else:
        print('Yes')
else:
    print('No')

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    s = input().rstrip()
    res = 0
    for i in s:
        if i=='C' and res==0:
            res += 1
        if i=='F' and res==1:
            res += 1
    if res==2:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):
import re

s = input()
p = re.compile('C.*F')
m = re.search(p, s)
print('Yes' if m is not None else 'No')

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

ans = 'No'
for i in s:
    if i == 'C':
        C = True

    if i == 'F' and C:
        ans = 'Yes'
        break
print(ans)

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

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

C = []
F = []
for i, s in enumerate(S):
    if s == "C":
        C.append(i)
    elif s == "F":
        F.append(i)

if len(C) > 0 and len(F):
    if min(C) < max(F):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
s = list(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):
S = [x for x in input()]
flg=False
for i in range(len(S)-1):
    for j in range(i+1, len(S)):
        if S[i]=='C' and S[j]=='F':
            flg=True
            break
ans='Yes' if flg else 'No'
print(ans)

Solution (Python):
s = input()

ans = False
found_c = False
for l in s:
    if found_c:
        if l == 'F':
            ans = True
            break
    else:
        if l == 'C':
            found_c = True
print('Yes' if ans else 'No')

Solution (Python):
s = input()
f = 0
for c in s:
    if f == 0 and c == 'C':
        f = 1
    elif f == 1 and c == 'F':
        f = 2
        break
if f == 2:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

iC = s.find('C')
if iC < 0:
    print("No")
    exit()

iF = s[iC:].find("F")
if iF < 0:
    print("No")
    exit()

print("Yes")

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

Solution (Python):
import sys

s = list(input())
cm = []
fM = []
for i, j in enumerate(s):
    if j == "C":
        cm.append(i)
    if j == "F":
        fM.append(i)
if "C" not in s or "F" not in s:
    print("No")
    sys.exit()
if max(fM) - min(cm) > 0:
    print("Yes")
else:
    print("No")

Solution (Python):

import re
import math
import itertools
from copy import deepcopy
import fractions
import random
from heapq import heappop,heappush
import time
import os
import queue
import sys
import datetime
from functools import lru_cache
readline=sys.stdin.readline
sys.setrecursionlimit(2000)

alphabet="abcdefghijklmnopqrstuvwxyz"
mod=int(10**9+7)
inf=int(10**20)
def yn(b):
    if b:
        print("yes")
    else:
        print("no")
def Yn(b):
    if b:
        print("Yes")
    else:
        print("No")
def YN(b):
    if b:
        print("YES")
    else:
        print("NO")
class union_find():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(N)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def is_power(a,b):
    now=b
    while now<a:
        now*=b
    if now==a:return True
    else:return False
def bin_(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def fac_list(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def next_comb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:
        return num
def get_primes(n,type="int"):
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    if(type=="bool"):return A
    B=[]
    for a in range(n+1):
        if(A[a]):B.append(a)
    return B
def is_prime(num):
    if(num<=2):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(a,b,c):
    if a:return b
    else:return  c
def join(A,c=" "):
    n=len(A)
    A=list(map(str,A))
    s=""
    for a in range(n):
        s+=A[a]
        if(a<n-1):s+=c
    return s
def factorize(n,type_="dict"):
    b = 2
    list_ = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            list_.append(b)
        b+=1
    if n > 1:list_.append(n)
    if type_=="dict":
        dic={}
        for a in list_:
            if a in dic:
                dic[a]+=1
            else:
                dic[a]=1
        return dic
    elif type_=="list":
        return list_
    else:
        return None

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

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    s =input()


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

Solution (Python):
s = input()
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()
print('No')

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

Solution (Python):
def main():
    word = input()
    index = [word.find("C"), 0]
    if index[0] >= 0:
        index[1] = word.find("F", index[0])
    print("Yes" if index[0] >= 0 and index[1] >= 0 else "No")


if __name__ == '__main__':
    main()

Solution (Python):
s=input()
t=0
for i in s:
    if i == 'C' and t == 0:
        t = 1
    elif i == 'F' and t == 1:
        t = 2
        break
if t == 2:
    print('Yes')
else:
    print('No')

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10


def solve():
    s = S()
    ans = [0, 0]
    for i in s:
        ans[0] |= i == "C"
        ans[1] |= i == "F" and ans[0]
    print("Yes" if ans[1] else "No")
    return



if __name__ == '__main__':
    solve()

Solution (Python):
s = input()

if (s.find("C") != -1 ) and (s.rfind("F") !=-1) and(s.find("C") < s.rfind("F")):
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()

a = []

for i in s:
    if i == "C" or i == "F":
        a.append(i)
a = "".join(a)
if a.count("CF") > 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = 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()
if "C" in s and "F" in s and s.find("C")<len(s)-1-s[::-1].find("F"):
    print("Yes")

else: print("No")

Solution (Python):
S = input()
flag = False
for s in S:
    if s == "C":
        flag = True

    if flag:
        if s == "F":
            print("Yes")
            break
else:
    print("No")

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

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

if ("C" in l) & ("F" in l):
  if min([i for i, x in enumerate(l) if x == 'C']) < max([i for i, x in enumerate(l) if x == 'F']):
  	print("Yes")
  else:
    print("No")
else:
  print("No")

Solution (Python):
c  = 0
s = input()
for i,si in enumerate(s):
  if si == "C":
    c = 1
  elif si == "F" and c:
    print("Yes")
    exit()
print("No")

Solution (Python):
s = input()
res = ""
for letter in s:
    if res == "" and letter =="C":
        res += letter
    elif res =="C" and letter == "F":
        res +=letter
        break
    else:
        continue
if res == "CF":
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
res = ""
for letter in s:
    if res == "" and letter =="C":
        res += letter
    elif res =="C" and letter == "F":
        res +=letter
        break
    else:
        continue
if res == "CF":
    print("Yes")
else:
    print("No")

Solution (Python):



S = input()


is_ok_1 = False
is_ok_2 = False


for s in S:
    if s=="C":
        is_ok_1 = True

    if is_ok_1 and s=="F":
        is_ok_2 = True


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

Solution (Python):
s = input()
flag = 0
ans = "No"

for i in range(len(s)):
    if s[i] == "C":
        flag = 1

    if flag == 1 and s[i] == "F":
        ans = "Yes"
        break

print(ans)

Solution (Python):
s = input()
cf = ""
for e in s:
    if e in ["C", "F"]:
        cf += e

if cf.count("CF"):
    ans = "Yes"
else:
    ans = "No"

print(ans)

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

Solution (Python):
def main():
    s = input().rstrip()
    a, b = len(s), -1
    for i in range(len(s)):
        if s[i] == "C":
            a = i
            break
    for i in reversed(range(len(s))):
        if s[i] == "F":
            b = i
            break
    if a < b:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Solution (Python):
import sys
S = input()


if S.count("C") != 0 and S.count("F") != 0:
    pass
else:
    print("No")
    sys.exit()

ans = 0
for i in range(len(S)):
    if S[i] == "C":
        if S[i:len(S)].count("F") != 0:
            print("Yes")
            sys.exit()

print("No")

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007



def main():
	s = input()
	if s.count('C') == 0 or s.count('F')==0:
		return 'No'
	ii=s.index('C')
	k=s[ii+1:]
	if k.count('F')>0:
		return 'Yes'
	return 'No'
	
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
S = input()

c = []
f = []

for i, si in enumerate(S):
    if si == 'C':
        c.append(i)
    elif si == 'F':
        f.append(i)

if len(c) == 0 or len(f) == 0:
    print('No')
elif min(c) < max(f):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

cpos = -1

ans = False

for i, si in enumerate(S):
    if si == 'C':
        cpos = i
        break

if cpos >= 0:
    fpos = -1
    for i, si in enumerate(S):
        if si == 'F':
            fpos  = i
    if fpos > cpos:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
S = input()

C = False

ans = False
for si in S:
    if si == 'C':
        C = True
    if C and si == 'F':
        ans = True

if ans:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
if 'C' in s:
  i=s.index('C')
  print('NYoe s'['F' in s[i+1:]::2])
else:
  print('No')

Solution (Python):
s=list(input())
cflag=0
fflag=0

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

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

Solution (Python):
import re

print('Yes' if re.match('.*C.*F.*',input()) else 'No')

Solution (Python):
S = input()
a= S.find('C')
b= S.find('F',a+1)
print('Yes') if a>=0 and b>=0 and a<b else print('No')

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

Solution (Python):


text = input().rstrip()
c_index = text.find("C")
f_index = text.find("F", c_index)

print("Yes" if (0 <= c_index < f_index and f_index >= 0) else "No")

Solution (Python):
s=list(input())
c=False
for x in s:
    if not c:
        if x=="C":c=True
    if c and x=="F":
        print("Yes")
        exit(0)
print("No")

Solution (Python):
s = input()
if s.find('C') >= 0 and s.find('F') >= 0:
    if s.index('C') < s.rindex('F'):
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

Solution (Python):
S=input()
A=S.find("C")
print("YNeos"[not(A>=0 and S.find("F", A+1)>=0)::2])

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

Solution (Python):


import re
s = input()
m = re.findall(r"C.*F", s)
print("Yes") if m else print("No")

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

Solution (Python):

s = input()
c_bit = 0
for i in range(len(s)):
    if c_bit and s[i] == "F":
        print("Yes")
        exit()
    if s[i] == "C":
        c_bit = 1
print("No")

Solution (Python):
S = input()

a = 0

for i in S:
  if a == 0 and i == "C":
    a += 1
  if a == 1 and i == "F":
    a += 1
    
if a == 2:
  print ("Yes")
else:
  print ("No")

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

Solution (Python):
s = input()
ans = []

for i in range(len(s)):
  if len(ans) == 0 and s[i] == 'C':
    ans.append(s[i])
  elif len(ans) == 1 and s[i] == 'F':
    ans.append(s[i])

if len(ans) == 2 and ans[0] == 'C' and ans[1] == 'F':
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
for i in s:
	if i =="C":
		for j in s[s.index("C"):]:
			if j =="F":
				print("Yes")
				exit()

print("No")

Solution (Python):
def main():
    S = input()
    c = S.find("C")
    f = S[::-1].find("F")
    
    if c >= 0 and f >= 0 and c < len(S) - f - 1:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    C = False
    F = False
    for s in S:
        if s=="C":
            C=True
        if s=="F":
            if C:
                F=True

    if C and F:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

Solution (Python):
c_f = False
f_f = False
S = input()
for i in range(len(S)):
	if S[i] == "C":
		c_f = True
	if c_f == True and S[i] == "F":
		f_f = True
if c_f == True and f_f == True:
	print("Yes")
else:
	print("No")

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    S=ST()
    C = False
    F = False
    for s in S:
        if s=="C":
            C=True
        if s=="F":
            if C:
                F=True

    if C and F:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

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

f = False
for ss in s:
    if f:
        if ss == "F":
            print("Yes")
            import sys
            sys.exit()
    if ss == "C":
        f = True

print("No")

Solution (Python):
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
print('Yes' if flag == True else 'No')

Solution (Python):
s = input()
flag = False
if 'C' in s and 'F' in s and s.index('C') < s.rindex('F'):
  flag = True
  
print('Yes' if flag == True else 'No')

Solution (Python):
s = input()
prev = -1
 
se = set()
for i in ['c','f']:
    for idx,j in enumerate(s):
        if j.lower() == i and idx > prev:
            se.add(j.lower())
            prev = idx
            break
            
print('Yes' if len(se) == 2 else 'No')

Solution (Python):
s=input()
t=[]
c=200
f=0
for i in range(len(s)):
  if s[i]=="C" and c>i:
    c=i
  elif s[i]=="F" and f<i:
    f=i

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

Solution (Python):
from sys import stdin

s = stdin.readline().rstrip()
now = 0
for i in s:
    if now == 0 and i == "C":
        now += 1
    elif now == 1 and i == "F":
        print("Yes")
        exit()
print("No")

Solution (Python):
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0):
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def gcd(a,b): 
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): 
    return a/gcd(a,b)*b

def divisors(a): 
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): 
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): 
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): 
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

def main():
    s = input()
    C = False
    F = False
    for i in range(len(s)):
        if s[i] == 'C':
            C = True
        elif s[i] == 'F' and C:
            F = True
    if C and F:
        print('Yes')
    else:
        print('No')
    return

if __name__=='__main__':
    main()

Solution (Python):
s = input()

a = 0
b = 0
for i in range(len(s)):
    if s[i] == "C":
        a = 1
    if s[i] == "F" and a == 1:
        b = 1

if b == 1:
    print("Yes")
else:
    print("No")

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

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

if __name__ == '__main__':
    main()

Solution (Python):
s = input()

for i in range(len(s)):
    if s[i] == "C":
        break
    elif i == len(s) - 1:
        print("No")

if i != len(s) - 1:
    for j in range(i, len(s)):
        if s[j] == "F":
            print("Yes")
            break
        elif j == len(s) - 1:
            print("No")

Solution (Python):
print('YNeos'[1-any(['F' in i for i in input().split('C')[1:]])::2])

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

Solution (Python):
S = input()
if "C" not in S:
  print("No")
  exit()
idx = S.index("C")
if idx == len(S) - 1:
  print("No")
  exit()
if "F" not in S[idx+1:]:
  print("No")
  exit()
print("Yes")

Solution (Python):


s = input()

c = s.find('C')
f = s.rfind('F')

print('Yes' if c != -1 and f != -1 and c < f else 'No')

Solution (Python):

 
import math
import itertools
import sys
import copy
 





s = str(input())

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

Solution (Python):
s = input()
flg = [0,0]

for i in range(len(s)):
	if s[i] == "C":
		if flg[0] == 0:
			flg[0] = 1
		else:
			continue

	if s[i] == "F":
		if flg[0] == 1 and flg[1] == 0:
			flg[1] = 1
		else:
			continue

if flg == [1,1]:
	print("Yes")
else:
	print("No")

Solution (Python):
s=input()
n=len(s)
t = 1000
u = 1000
for i in range(n):
  if s[i] == "C":
    t = i
    break
for i in range(n-1,-1,-1):
  if s[i] == "F":
    u = i
    break
if max(t,u) != 1000 and t<u:
  print("Yes")
else:
  print("No")

Solution (Python):
s=input()

if 'C' in s and 'F' in s:
    if s.find('C') < s.rfind('F'):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
S = input()
i1 = S.find('C')
i2 = S.rfind('F') 
print('Yes' if i1!=-1 and i1<i2 else 'No')

Solution (Python):
S = input()
A = 0
for i in range(len(S)):
  if S[i] == "F":
    A = i
if S.count("C") > 0:
  if S.index("C") < A:
  	print("Yes")
  else:
    print("No")
else:
  print("No")

Solution (Python):
s = input().strip()
if "C" in s:
    indc = s.index("C")
else:
    indc = 10**3
if "F" in s[indc:]:
    indf = indc+s[indc:].index("F")
else:
    indf = -1
if indc<indf:
    print("Yes")
else:
    print("No")