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()
N = len(S)
for i in range(N):
    for j in range(i, N):
        if S[i] == "C" and S[j] == "F":
            print("Yes")
            exit()
print("No")

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

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

Solution (Python):
def examA():
    S = SI()
    ans = "No"
    flag = False
    for s in S:
        if flag:
            if s=="F":
                ans = "Yes"
                break
        else:
            if s=="C":
                flag = True
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

Solution (Python):
s = input()

flag = 0

if s.count('C')*s.count('F')==0:
	print('No')
	exit()
	
for i in range(len(s)):
	if s[i]=='C':
		flag = 1
	if flag == 1 and s[i]=='F':
		print('Yes')
		exit()

print('No')

Solution (Python):
a = list(input())
p = 0
f = 0
for i in a:
    if i == 'C':
        p = 1
    elif i == 'F' and p == 1:
        print('Yes')
        f = 1
        break
if f != 1:
    print('No')

Solution (Python):
S = input()

cf = "CF"
i = 0
for s in S:
    if s == cf[i]:
        i += 1

    if i == 2:
        break

if i == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
s=str(input())
count=0
for i in range(len(s)):
  if count==0 and s[i]=='C':
    count+=1
  elif count==1 and s[i]=='F':
    count+=1
    print('Yes');exit()
    
print('No')

Solution (Python):
s=input()
if "C"not in s:print("No")
elif s.find("C",0)<s.find("F",s.find("C",0)+1):print("Yes")
else:print("No")

Solution (Python):
s=input()

ans='No'
temp=''
for i in range(len(s)):
    if s[i]=='C':
        temp=s[i:]
        break
for i in temp:
    if i=='F':
        ans='Yes'
        break
        
print(ans)

Solution (Python):
import sys
s = list(input())
t = len(s)
for i in range(len(s)):
    if s[i] == "C":
        t = i
        break
for i in range(t,len(s)):
    if s[i] == "F":
        print("Yes")
        sys.exit()
print("No")

Solution (Python):

s = input()

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

Solution (Python):
s = input()
C = s.find('C')
F = s.rfind('F')

if -1 < C < F:
    print('Yes')
else:
    print('No')

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

for i in s:
    if i == 'C':
        C = True
    elif i == 'F' and C:
        F = True

if C and F:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s=input()

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

Solution (Python):
S = input()
c =False
ok = False
for s in S:
  if s == 'C':
    c = True
  elif s == 'F' and c:
    ok = True
ans = 'Yes' if ok else 'No'
print(ans)

Solution (Python):
s = input()
c = len(s)
f = 0
for x,i in enumerate(s):
  if i == "C":
    c = min(c,x)
  elif i == "F":
    f = max(f,x)
if c < f:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    cnt = 0
    for i in range(len(s)):
        if cnt == 0:
            if s[i] == "C":
                cnt += 1
        elif cnt == 1:
            if s[i] == "F":
                print("Yes")
                exit()
    print("No")


if __name__ == '__main__':
    solve()

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

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

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

Solution (Python):
n=list(input())
cindex=[i for i,j in enumerate(n) if j=="C"]
findex=[i for i,j in enumerate(n) if j=="F"]
if ("C" in n and "F" in n) and (min(cindex)<max(findex)):
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
S = input()
C = len(S)
F = 0
for i, s in enumerate(S):
    if s == 'C':
        C = min(i, C)
    if s == 'F':
        F = max(i, F)

if C < F:
    print('Yes')
else:
    print('No')

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

Solution (Python):

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

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

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

c = -1
f = -1

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

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

Solution (Python):
s = input()
f = 0
for i in s:
    if i == "C" and f == 0:
        f += 1
    if i == "F" and f == 1:
        print("Yes")
        exit()
print("No")

Solution (Python):

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

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

Solution (Python):
s = input()
t = s.find("C")
if s[t:].find("F") > 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()

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

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

Solution (Python):
S = input()

c, f = False, False
for s in S:
    if s == 'C':
        c = True
    if c and s == 'F':
        f = True
if c and f:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
c = 0
f = 0
for i in s:
    if i == "C":
        c += 1
    if c == 0:
        continue
    if i == "F":
        print("Yes")
        exit(0)
print("No")

Solution (Python):
def main():
  s=input()
  x = s.find("C")
  y = s.find("F")
  if x<0 or y<0:
    print("No")
    return 0
  while x<len(s):
    if s[x]=="F":
      print("Yes")
      return 0
    x+=1
  print("No")
  

    
main()

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

Solution (Python):
s=raw_input()
l=len(s)

for i in range(l):
	for j in range(i,l):
		if s[i]+s[j]=="CF":
			print "Yes"
			quit()
else:
	print "No"

Solution (Python):
s = input()

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

Solution (Python):
S=input()

flag=False
for s in S:
  if flag==True and s=='F':
    print('Yes')
    exit()
  if flag==False and s=='C':
    flag=True
print('No')

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    ss = ""
    for i in range(len(s)):
        if ss == "" and s[i] == "C":
            ss = s[i]
        elif ss == "C" and s[i] == "F":
            print("Yes")
            exit()
    print("No")


if __name__ == '__main__':
    slove()

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

Solution (Python):
import re


def resolve():
    s = input()
    print("Yes" if re.match(r".*C.*F.*", s) else "No")


if __name__ == "__main__":
    resolve()

Solution (Python):

s=input()
b=0
for i in range(len(s)):
    if s[i] == 'C':
        for j in range(i+1,len(s)):
            if(s[j]=='F'):b=1
print('Yes')if b else print('No')

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

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

Solution (Python):
s=str(input())
n=s.find('C');m=s.rfind('F')

if 0<=n<m:print('Yes')
else:print('No')

Solution (Python):
s=input()

c=False

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

Solution (Python):

s = list(input())

f1 = False
f2 = False

for i in range(len(s)):
    if s[i] == 'C':
        f1 = True
    if f1 and s[i] == 'F':
        f2 = True
if f1 and f2:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()
c_index = float('inf')
f_index = 0
for i, c in enumerate(s):
    if c == "C":
        c_index = min(c_index, i)
    if c == "F":
        f_index = max(f_index, i)
if c_index < f_index:
    print("Yes")
else:
    print("No")

Solution (Python):
s=list(input())
c=len(s)+10
n=len(s)
f=-len(s)
for i in range(len(s)):
    if s[n-1-i]=='F':
        f=n-1-i
        break
for i in range(n):
    if s[i]=="C":
        c=i
        break
if c<f:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
from sys import stdin

def readString() :
    return  stdin.readline().rstrip()

def solve() :
    S = readString()
    pos = S.find('C')
    if(pos ==-1):
        print("No")
        return
    pos = S[pos:].find('F')
    if(pos !=-1):
        print("Yes")
    else :
        print("No")

solve()

Solution (Python):
S=input()
N=len(S)

if "C" in S and "F" in S:
  c=S.index("C")
  S=S[::-1]
  f=N-S.index("F")-1
  
  print("Yes" if c<f else "No")
else: 
  print("No")

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

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

Solution (Python):
s=input()
try:
    A = s.index("C")
except ValueError:
    print("No")
    exit()
try:
    B = s[A:].index("F")
    print("Yes")
except ValueError:
    print("No")
    exit()

Solution (Python):
def main():

    s = input()
    Cidx = -1
    for i in range(len(s)):
        if s[i] == "C":
            Cidx = i
            break
    if Cidx == -1:
        return "No"

    for i in range(Cidx+1, len(s)):
        if s[i] == "F":
            return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())

Solution (Python):
s = input()
minc = 101
maxf = 0

for i in range(len(s)):
    if minc == 101:
        if s[i] == 'C':
            minc = i

    if maxf == 0:
        if s[-i - 1] == 'F':
            maxf = len(s) - i - 1

if minc < maxf:
    print('Yes')
else:
    print('No')

Solution (Python):
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)

from math import factorial
import heapq, bisect
import math
import itertools


import queue
from collections import deque




def main():
    a = input()
    flg = 0
    for ele in a:
        if flg == 0 and ele == 'C':
            flg += 1
        if flg == 1 and ele == 'F':
            flg += 1
    if flg == 2:
        print('Yes')

    else:
        print('No')







if __name__ == '__main__':
    main()

Solution (Python):
s = input()
i = s.find("C")
if i < 0:
  print("No")
  exit()
j = s.find("F", i)
if j < 0:
  print("No")
  exit()
print("Yes")

Solution (Python):
S = input()
for i,c in enumerate(S):
    if c=='C': break
print('Yes' if 'F' in S[i+1:] else 'No')

Solution (Python):
f=0
for c in input():
 if c=="C":f=1
 if f&(c=="F"):f=2
print("YNeos"[f!=2::2])

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    ie = False
    s = str(input().rstrip('\n'))
    for i in range(len(s)):
        if s[i] == "C":
            ie = True
        elif ie and s[i] == "F":
            print("Yes")
            exit()
    print("No")


if __name__ == '__main__':
    slove()

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

Solution (Python):
def solve(s):
    key = "CF"
    position = 0
    for c in s:
        if key[position] == c:
            position += 1
            if position == len(key):
                return "Yes"
    return "No"

s = input()
print(solve(s))

Solution (Python):
s = input()
def serch(s):
  position_C = s.find("C")
  if position_C == -1:
    return False
  else:
    position_F = s.rfind("F")
    if position_F == -1:
      return False
    elif position_C < position_F:
      return True
    else:
      return False

if serch(s) == True:
  print("Yes")
else:
  print("No")

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

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

Solution (Python):
S = input()
f = 0
for s in S:
  if f==0:
    if s=="C":
      f = 1
  elif f==1:
    if s=="F":
      f = 2
if f == 2:
  print("Yes")
else:
  print("No")

Solution (Python):
print('Yes' if 'CF' in ''.join([_ for _ in input() if _=='C' or _=='F']) else 'No')

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

Solution (Python):
S = input()
num = 0
for i in range(len(S)):
    if num == 0 and S[i] == 'C':
        num += 1
    if num == 1 and S[i] == 'F':
        print('Yes')
        exit()

print('No')

Solution (Python):
def lcs(str1, str2):
    '''文字列str1, str2の最長共通部分列(Lowest Common Subsequence, LCS)を求める
    計算量O(len(str1)*len(str2))  
    '''
    dp = [[0]*(len(str2) + 1) for _ in range(len(str1) + 1)]
    for i in range(len(str1)):
        for j in range(len(str2)):
            if str1[i] == str2[j]:
                dp[i+1][j+1] = dp[i][j] + 1
            else:
                dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])

    '''復元を実行
    最長の長さを求めるなら return dp[len(str1)][len(str2)] をするとよい
    '''
    res = ''
    i, j = len(str1), len(str2)
    while i > 0 and j > 0:
        if dp[i][j] == dp[i-1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j-1]:
            j -= 1
        else:
            res = str1[i-1] + res
            i -= 1
            j -= 1
    return res


s = input()
if len(lcs(s, "CF")) == 2:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
s=input()
for k in range(len(s)):
    if s[k]=='C':
        for l in range(k+1,len(s)):
            if s[l]=='F':
                print('Yes')
                sys.exit()
else:
    print('No')

Solution (Python):



s = input()






index01 = s.find('C')
index02 = s.find('F', index01)




if index01 >= 0 and index02 >= 0:
    print('Yes')
else:
    print('No')

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=2
    print("Yes")
    exit()
print("No")

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

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

Solution (Python):
s = input()

c = s.find("C")
f = s.find("F", c)

if c != -1 and f != -1:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
flag = 0

for i in s:
    if i == 'C':
        flag = 1
    if i == 'F' and flag == 1:
        print('Yes')
        exit()
print('No')

Solution (Python):

def main():
    S = input()
    flg = 0 <= S.find("C") < S.rfind("F")
    print("Yes" if flg else "No")


if __name__ == "__main__":
    main()

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

flag =0
for i in range(len(s)):
  if s[i] == 'C':
    flag = 1
  elif flag == 1 and s[i] == 'F':
    print('Yes')
    exit()
  else:
    pass
else:
  print('No')

Solution (Python):

s=input()

flag=False
for i in range(len(s)):
    if s[i] == 'C':
        for j in range(i,len(s)):
            if s[j]=='F':
                flag=True
print('Yes' if flag else 'No')

Solution (Python):
s = input()

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

Solution (Python):
def solve():
    s = input()
    cpos = s.find('C')
    if cpos < 0:
        print('No')
        return
    fpos = s[cpos:].find('F')
    if fpos >= 0:
        print('Yes')
    else:
        print('No')

solve()

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

Solution (Python):
import re
print("YNeos"[not re.match('.*C.*F',input())::2])

Solution (Python):
s = input()
if 'C' in s:
    d = s.find('C')
    if 'F' in s[d:]:
        print('Yes')
        exit(0)
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()
c = s.find('C')
print('Yes' if s.rfind('F') > c and c != -1 else 'No')

Solution (Python):


import re
if re.match("[A-Z]*?C[A-Z]*?F[A-Z]*?", input()):
	print("Yes")
else:
	print("No")

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

Solution (Python):
s=input()[::-1]
ans="No"
try:
  c=s.index("C")
  f=s.index("F")
  if c>f:
    ans="Yes"
except:
  pass
print(ans)

Solution (Python):
c = 1000000007
f = 0
s = input()
for i in range(len(s)):
    if s[i] == 'C':
        c = min(c,i)
    if s[i] == 'F':
        f = max(f,i)
if c<f:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s=list(input())
flag=0
for x in s:
    if flag==0 and x=="C":
        flag=1
    if flag==1 and x=="F":
        flag=2
if flag==2:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
flg=False
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')
exit()

Solution (Python):
s = input()

if 'C' in s and 'F' in s:
    c = int(s.index('C'))
    f = max(int(s.index('F')), int(s.rindex('F')))
    if c <= f:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
N=input()
c=0
flag = 0
for i in N:
    if i=='C' and  c==0 :c+=1
    if i=='F' and c==1: flag=1
if flag==1:print("Yes")
else :print("No")

Solution (Python):
import re

s = input()

if re.match(r'.*C.*F', s):
    print('Yes')
else:
    print('No')

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

Solution (Python):
import re

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

Solution (Python):
S=input()
ans=False
c=0
for s in S:
  if c==0 and s=="C":c=1
  elif c==1 and s=="F":ans=True
print("Yes" if ans else "No")

Solution (Python):
a1 = input()
n = 0
a = [a1[i] for i in range(len(a1))]
for i in range(len(a)):
    if a[i] == 'C':
        n = 1
    if n == 1 and a[i] == 'F':
        n = 2
if n == 2:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
pt_c = s.find('C')
if pt_c != -1 and s[pt_c + 1:].find('F') != -1:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

c, f = False, False
for s in S:
	if s == "C":
		c = True
	if s == "F" and c:
		f = True
print(["Yes", "No"][not(all([c, f]))])

Solution (Python):
def main():
    S = input()
    try:
        c = S.index("C")
        s = S[c:].index("F")
        print("Yes")
    except:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
mode = None
for s in S:
    if s == "C":
        mode = "C"
    elif mode == "C" and s == "F":
        print("Yes")
        exit()
print("No")

Solution (Python):
import re
s = input()
s = re.sub(r'[^CF]', '', s)
print('Yes' if re.search(r'CF', s) else 'No')

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

Solution (Python):
S = input()
i = 0
C = 1000
F = 0
for s in S:
    if s == 'C':
        C = min(C, i)
    elif s == 'F':
        F = max(F, i)
    i += 1
if C < F:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
c=float('inf')
f=0
for i in range(len(s)):
    if s[i]=='C':
        c=i+1
        break

for j in range(len(s)):
    if s[-(j+1)]=='F':
        f=len(s)-j
        break
if c<f:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
c_flag = False; f_flag = False
for s in S:
    if s == 'C': c_flag = True
    elif c_flag and s == 'F': f_flag = True
print('Yes' if f_flag else 'No')

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

def solve(s: str):
    sl = [i for i in list(s) if i =='C' or i == 'F']
    if(''.join(sl).count('CF') > 0):
        print(YES)
    else:
        print(NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    s = next(tokens)  
    solve(s)

if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
s=input()

bool1=False

for i in range(len(s)-1):
  if s[i]=='C':
    for j in range(i+1,len(s)):
      if s[j]=='F':
        bool1=True
        
print('Yes' if bool1==True else 'No')

Solution (Python):
s=input()

bool1=False

for i in range(len(s)-1):
  if s[i]=='C':
    for j in range(i,len(s)):
      if i < j and s[j]=='F':
        bool1=True
        
print('Yes' if bool1==True else 'No')

Solution (Python):
s = input()
ans = 'No'
c = s.find('C')
if c != -1:
  f = s[c:].find('F')
  if f != -1:
    ans = 'Yes'
print(ans)

Solution (Python):
S = list(input())
l = len(S)
c = 1000000000
f = 0

for i in range(l):
    if S[i] == 'C':
        c = min(c,i)
    if S[i] == 'F':
        f = max(f,i)

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

Solution (Python):
s=input()
a=len(s)
flag=0
for i in range(len(s)):
  if s[i]=='C':
    a=i
  if s[i]=='F':
    if i>a:
      flag=1
      break
    else:
      continue 
if flag==1:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
s = list(input())
c = None
f = None

for i in range(len(s)):
    if c == None and s[i] == 'C':
        c = i
    
    if s[i] == 'F':
        f = i
        if c != None:
            break

if c == None or f == None:
    print('No')
else:
    if c > f:
        print('No')
    else:
        print('Yes')

Solution (Python):
s = input()

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

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

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

for i, c in enumerate(s):
  if c == 'C':
    for j in s[i:]:
      if j=='F':
      	print('Yes')
      	sys.exit()
    print('No')
    sys.exit()
print('No')

Solution (Python):
s = input()
ans = "No"
if s.count("C") > 0:
	if s[(s.index("C")):].count("F") > 0:
		ans = "Yes"
print(ans)

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

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

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

Solution (Python):

import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())


S = input()

flag = 0
for i in range(1, len(S)): 
  if 'C' in S[:i]:
    if 'F' in S[i:]:
      print('Yes')
      exit()
print('No')

Solution (Python):

"""
A - CF
https://atcoder.jp/contests/code-festival-2016-qualc/tasks/codefestival_2016_qualC_a

"""
import sys


import re

def solve(s):
    if re.search(r'C.*F', s):
        return 'Yes'
    return 'No'


def main(args):
    s = input()
    ans = solve(s)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):

"""
A - CF
https://atcoder.jp/contests/code-festival-2016-qualc/tasks/codefestival_2016_qualC_a

"""
import sys


def solve(s):
    c_positions = [float('inf')]
    f_positions = [float('-inf')]
    for i, ch in enumerate(s):
        if ch == 'C':
            c_positions.append(i)
        elif ch == 'F':
            f_positions.append(i)
    c_positions.sort()
    f_positions.sort()
    if c_positions[0] < f_positions[-1]:
        return 'Yes'
    return 'No'


def main(args):
    s = input()
    ans = solve(s)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
n = input()

cflag = False

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

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':
                ans = 'Yes'

print(ans)

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

Solution (Python):




s = input()

findflg = 0
for i in range(len(s)):
    if findflg == 0 and s[i] == "C":
        findflg = 1
    elif findflg == 1 and s[i] == "F":
        findflg = 2
        break

if findflg == 2:
    ans = "Yes"
else:
    ans = "No"


print(ans)

Solution (Python):
from sys import exit, stdin
S = list(stdin.readline().rstrip())
ci, cf = 0, 0
if 'C' in S and 'F' in S:
    for i, c in enumerate(S):
        if c == 'C':
            ci = i
        elif c == 'F':
            cf = i
    if ci < cf:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
import sys
s=input()
c=s.find('C')
if c==-1:
     print('No')
     sys.exit()
s=s[::-1]
f=s.find('F')
if f==-1:
     print('No')
     sys.exit()
f=len(s)-f-1
if f>c:
     print('Yes')
else:
     print('No')

Solution (Python):
s = input()

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

if (c == -1 or f == -1 or f < c) :
    print("No")
else :
    print("Yes")

Solution (Python):
s=input()
c=[]
f=[]
for num in range(len(s)):
    if s[num] == 'C':
        c.append(num)
    if s[num] == 'F':
        f.append(num)
        
if 'C' in s and 'F' in s:
	print('Yes') if min(c) < max(f) else print('No')
else:
  print('No')

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

Solution (Python):
import re
S = input()
print(["Yes", "No"][re.match(".*C.*F.*", S) is None])

Solution (Python):
s = input()
try:
    if s.index('C') < len(s)-s[::-1].index('F')-1:
        print('Yes')
    else:
        print('No')
except:
    print('No')