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.



Sample input:
CODEFESTIVAL


Sample output:
Yes

Submission status: Accepted

Solution code:
S = input()

f = -1

for i in range(len(S)):
    if S[i]=='C' and f==-1:
        f=0
    elif S[i]=='F' and f==0:
        f = 1
        
if f>0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = input()

flg1 = False
for i in range(len(S)):
  if S[i] == 'C' and not flg1:
    flg1 = True
  elif flg1 and S[i] == 'F':
    print("Yes")
    exit(0)
print("No")

Submission status: Accepted

Solution code:
s = input()
c = False
f = False

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

Submission status: Accepted

Solution code:
s = input()
n = len(s)
i = 0
while i < n:
  if s[i] == "C":
    break
  i += 1
while i < n:
  if s[i] == "F":
    print("Yes")
    exit()
  i += 1
print("No")

Submission status: Accepted

Solution code:
L = list(input())
if L.count("C") == 0 :
    ans = "No"
else :
    for i in range(len(L)) :
        if L[i] == "C" :
            if "F" in L[i:] :
                ans = "Yes"
            else :
                ans = "No"
            break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
print("YNeos"[re.match(".*C.*F.*",input())==None::2])

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
import re
print('Yes'if re.match('.*C.*?F.*',input())else 'No')

Submission status: Accepted

Solution code:
s=input()
x=0;y=0
for i in range(len(s)):
  if s[i]=='C':
    x=i+1
    break
for j in range(len(s)):
  if s[j]=='F':
    y=j+1
if x*y!=0 and x<y:print('Yes')
else:print('No')

Submission status: Accepted

Solution code:
s = str(input())
if (("C" in s) and ("F" in s)):
    if s.index("C") < s.rindex("F"):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

Solution code:
def solve(s):
    (head_C, sep_C, tail_C) = s.partition('C')
    if sep_C == '':
        return 'No'
    (head_F, sep_F, tail_F) = tail_C.partition('F')
    if sep_F == '':
        return 'No'
    return 'Yes'

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = list(input())
i = 0
while True:
    if i >= len(S):
        break
    if S[i] != "C" and S[i] != "F":
        del S[i]
        i -= 1
    i += 1
    
ans = -1
for i in range(1, len(S)):
    if S[i - 1] == "C" and S[i] == "F":
        print("Yes")
        ans = 1
        break
if ans == -1:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())

S = input()
tmp = 0
for s in S:
	if tmp == 0 and s == 'C':
		tmp += 1
	elif tmp == 1 and s == 'F':
		print('Yes')
		sys.exit()

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
c = 0
f = 0
for x in s:
    if x == 'C':c = 1
    if x == 'F' and c == 1:f = 1
if c==1 and f==1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
print ['No', 'Yes'][re.match('.*C.*F.*', raw_input()) != None]

Submission status: Accepted

Solution code:
import re
print ['No', 'Yes'][re.match('.*C.*F.*', raw_input()) != None]

Submission status: Accepted

Solution code:
S = input()
if S.count("C") == 0 or S.count("F") == 0:
  print("No")
else:
  S = S[S.index("C"):]
  if S.count("F") > 0:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
if s == 'FCF':
    print('Yes')
elif 'C' in s and 'F' in s and s.index('C') < s.index('F'):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#AT2084
s = list(input())

r = 'No'
a = []
for i in s:
    if i == 'C' or i == 'F':
        a.append(i)
for i in range(len(a)-1):
    if a[i] == 'C' and a[i+1] == 'F':
        r = 'Yes'
        break
print(r)

Submission status: Accepted

Solution code:
a = input()
b = list(a)
s = 0
for i in range(len(b)):
    if b[i] == 'C' and 'F' in b[i:]:
        print('Yes')
        s = 0
        break
    else :
        s = 1
if s == 1:
    print('No')

Submission status: Accepted

Solution code:
def main():
    s = input()
    if s.count('C') == 0 or s.count('F') == 0:
        print('No')
        return
    l = len(s)
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')
main()

Submission status: Accepted

Solution code:
s = input()
f = False
l = False
for i in range(len(s)):
    if s[i] == 'C':
        for j in range(i, len(s)):
            if s[j] == 'F':
                print('Yes')
                f = True
                break
        if f == False:
            print('No')
        l = True
        break
if l == False:
    print('No')

Submission status: Accepted

Solution code:
s=input();a=b=0
for i in range(len(s)):
  if s[i]=='C':a=1
  if s[i]=='F'and a==1:b=1
print('Yes'*b or'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
f = False
l = False
for i in range(len(s)):
    if s[i] == 'C':
        for j in range(i, len(s)):
            if s[j] == 'F':
                print('Yes')
                f = True
                l = True
                break
        if f == False:
            print('No')
            l = True
            break
        else:
            l = True
            break
if l == False:
    print('No')

Submission status: Accepted

Solution code:
s=input()

Cflag=0

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

Submission status: Accepted

Solution code:
s=input()
c=s.find("C")
f=s.rfind("F")
if c>=0 and f>=0 and c<f:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
c = False
f = False
for i in s:
  if i == 'C':
    c = True
  
  if c == True and i == 'F':
    f = True
    break
if c and f:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S = [x for x in input()]
b = 101
e = 0

for k in range(len(S)):
    if S[k]=="C":
        b = k
        break

for k in range(1,len(S)):
    if S[-k]=="F":
        e = len(S)-k
        break

print("Yes" if b<e else "No")

Submission status: Accepted

Solution code:
import sys
S = input().strip()

for j in range(len(S)):
  for k in range(j+1,len(S)):
    if S[j] == 'C' and S[k] == 'F':
      print('Yes')
      sys.exit()
print('No')

Submission status: Accepted

Solution code:
a = False
for i in input():
    if(i == "C"):
        a = True
    elif(a and i == "F"):
        print("Yes")
        break
else:
    print("No")

Submission status: Accepted

Solution code:
s=input().rstrip()
if 'C' in s and 'F' in s:
  indC,indF=100,0
  for i in range(len(s)):
    if s[i] == 'C':
      indC = min(indC,i)
    elif s[i] == 'F':
      indF = max(indF,i)
    if indC < indF:
      print('Yes')
      exit()
  print('No')
else:
  print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# CODE FESTIVAL 2016 qual C
# Problem A

if __name__ == '__main__':
    import re
    s = input()
    
    # See:
    # https://beta.atcoder.jp/contests/code-festival-2016-qualc/submissions/942114
    if re.search('C.*F', s):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# CODE FESTIVAL 2016 qual C
# Problem A

if __name__ == '__main__':
    s = input()
    cf = 'CF'
    count = 0

    for si in s:
        if count == 0 and si == cf[0]:
            count += 1
        elif count == 1 and si == cf[1]:
            print('Yes')
            exit()

    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()
count=0
for i in range(len(s)):
    if s[i]=="C":
        for j in range(len(s[i+1:])):
            if s[j+i+1]=="F" :
                print("Yes")
                count=1
                break
        break
if count==0:
    print("No")

Submission status: Accepted

Solution code:
def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result

arr_data = getinputdata()

s = arr_data[0][0]


cnt1 = s.find("C")
cnt2 = s.find("F", cnt1)

#print(cnt1,cnt2)

print("Yes" if 0 <= cnt1 < cnt2 else "No")

Submission status: Accepted

Solution code:
s = input()
c = 0
for i in s:
    if i == 'C':
        c = 1
    if c == 1 and i == 'F':
        print('Yes')
        break
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
idx1 = s.find('C');

if idx1 >= 0 :
    idx2 = s.find('F',idx1+1)
    if idx2 > idx1 :
        print("Yes");
    else:
        print("No");
else:
    print("No");

Submission status: Accepted

Solution code:
a = input()

n = len(a)

b = 0

for i in range(n):
    for j in range(i,n):
        if a[i] =='C' and a[j] =='F':
            b = 1
if b == 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
s = list(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
print(['No', 'Yes'][b])

Submission status: Accepted

Solution code:
import sys
s=input()
if("C" in s and "F" in s):
  for i in range(len(s)):
    if(s[i]=="C"):
      c=i
      break
  for i in range(len(s))[::-1]:
    if(s[i]=="F"):
      f=i
      break
  if(c<f):
    print("Yes")
    sys.exit()
print("No")

Submission status: Accepted

Solution code:
s = list(str(input()))
key = 0
for i in range(len(s)):
  if s[i] == "C" or key == 1:
    key = 1
    if s[i] == "F":
      print("Yes")
      exit()
print("No")

Submission status: Accepted

Solution code:
def main():
    S = input()

    if "C" not in S:
        print("No")
        return

    c_idx = S.index("C")
    if "F" not in S[c_idx + 1:]:
        print("No")
        return

    print("Yes")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=input()
flag=0
for i in S:
    if flag==0 and i=="C":
        flag=1
    if flag==1 and i=="F":
        flag=2
if flag==2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import re

def main():
    S = input()

    ok = bool(re.search(r"C.*F", S))
    print("Yes" if ok else "No")

if __name__ == "__main__": main()

Submission status: Accepted

Solution code:
S = input()
c = S.find('C')
f = S.rfind('F')
if c < 0 or f < 0:
    print('No')
else:
    print('Yes' if c<f else 'No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import re
s = input()
print('Yes' if (re.match(r'.*C.*F', s)) else 'No')

Submission status: Accepted

Solution code:
s=input()
t='CF'
j=0
for i in range(len(s)):
  if j<2 and s[i]==t[j]:
    j+=1
print('Yes' if j==2 else 'No')

Submission status: Accepted

Solution code:
def solve():
    s = input()
    C_index, F_index = -1, -1
    for i, c in enumerate(s):
        if c == "C" and C_index == -1:
            C_index = i
        if c == "F":
            F_index = i
    if C_index < F_index and C_index > -1 and F_index > -1:
        print("Yes")
    else:
        print("No")
        
solve()

Submission status: Accepted

Solution code:
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

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

Submission status: Accepted

Solution code:
s = input()
 
ans_flag = False
for i in range(len(s)-1):
    if s[i] == "C":
        if "F" in s[i+1:]:
            ans_flag = True
            break
        else:
            break
 
if ans_flag == True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans_flag = False
for i in range(len(s)-1):
    if s[i] == "C":
        if "F" in s[i+1:]:
            ans_flag = True

if ans_flag == True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=str(input())
p=[chr(i) for i in range(65, 65+26)]
p.remove("C")
p.remove("F")
for i in p:
    s=s.replace(i,'')
 
if 'CF' in s:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

def main():
    s = input().strip()
    find_c = False
    for c in s:
        if find_c:
            if c == "F":
                print("Yes")
                return
        elif c == "C":
            find_c = True
    print("No")
    return

main()

Submission status: Accepted

Solution code:
from sys import stdin
a = stdin.readline().strip()
ans = 'Yes'
if 'C' not in a:
 ans = 'No'
else:
 b = a.split('C')[1:]
 b = ''.join(b)
 if 'F' not in b:
  ans = 'No'
print ans

Submission status: Accepted

Solution code:
s=str(input())
p=list('ABDEGHIJKLMNOPQRSTUVWXYZ')
for i in p:
    s=s.replace(i,'')

if 'CF' in s:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = raw_input()
fil = filter(lambda x:x == "C" or x == "F",s)
flag = False
for var in fil:
    if var == "F" and flag:
        print "Yes"
        exit()
    flag = var == "C"
print "No"

Submission status: Accepted

Solution code:
s = input()
c = s.find('C')
print('Yes' if c >= 0 and s.find('F', c) >= 0 else 'No')

Submission status: Accepted

Solution code:
a = raw_input()
flag = -1
for z in range(0, len(a)) :
    if 'C' == a[z]:
        flag = z
if flag == -1:
    print 'No'
else:
    flag2 = -1
    for z in range(flag+1, len(a)):
        if 'F' == a[z]:
            flag2 = z
    if flag2 == -1:
        print 'No'
    else:
        print 'Yes'

Submission status: Accepted

Solution code:
s = raw_input()
c = s.find('C')
if c <= len(s):
    f = s[c:].find('F')
    if f >= 1:
        print 'Yes'
    else:
        print 'No'
else:
    print 'No'

Submission status: Accepted

Solution code:
s = input()


def main(s):
    if 'C' in s and 'F' in s:
        for i in range(s.count('C')):
            if i != 0:
                s_l = list(s)
                del s_l[c_i]
                s = ''.join(s_l)
            c_i = s.index('C')
        for i in range(s.count('F')):
            if i != 0:
                s_l = list(s)
                del s_l[f_i]
                s = ''.join(s_l)
            f_i = s.index('F')

        if c_i <= f_i:
            return 'Yes'
        else:
            return 'No'
    else:
        return 'No'

print(main(s))

Submission status: Accepted

Solution code:
ini=raw_input()
a=list(ini)
check=0
if "C" in a and "F" in a:
	c=a.index("C")
	f=0
	for i in range(len(a)):
		if a[i]=="F":
			f=i
	if c<f:
		check=1
if check==1:
	print "Yes"
else:
	print "No"

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# get a string
s = raw_input()

out = 'No'
for i, c in enumerate(s):
    if c == 'C':
        for c in s[i + 1:]:
            if c == 'F':
                out = 'Yes'
                break

# output
print out

Submission status: Accepted

Solution code:
a = raw_input()

c = []
f = []
for i in range(len(a)):
    if a[i] == 'C':
        c.append(i)

    elif a[i] == 'F':
        f.append(i)

if c==[] or f==[]:
    print 'No'
elif min(c)<max(f):
    print 'Yes'

else:
    print 'No'

Submission status: Accepted

Solution code:
s = raw_input()

c = []
f = []
for i in xrange(len(s)):
    if s[i] == 'C':
        c.append(i)
    elif s[i] == 'F':
        f.append(i)

if len(c) and len(f) and c[0]<f[-1]:
    print 'Yes'
else:
    print 'No'

Submission status: Accepted

Solution code:
line = input()
if "C" in line and "F" in line:
    if line.index("C") < line.index("F"):
        print('Yes')
    elif line.index("C") > line.index("F"):        
        line1 = line[line.index("C"):]
        
        if "F" in line1:
            print('Yes')
        else:
            print('No')
    else:
        print('No')    
else:
    print('No')

Submission status: Accepted

Solution code:
import sys 
s = sys.stdin.readline().strip()
c_find = False                                                                                                                                                                                                                        
f_find = False
for c in s:
    if c_find:
        if c == 'F':
            print 'Yes'
            exit(0)
    else:
        if c == 'C':
            c_find = True
print 'No'

Submission status: Accepted

Solution code:
s = raw_input()
c = s.find('C')
if c == -1:
    print 'No'
else:
    f = s[c+1:].find('F')
    if f == -1:
        print 'No'
    else:
        print 'Yes'

Submission status: Accepted

Solution code:
s=raw_input()
c=s.find('C')
if c+1:
    f=s[c:].find('F')
    if f+1:
        print "Yes"
    else:
        print "No"
else:
    print "No"

Submission status: Accepted

Solution code:
s = list(input())

offset_f = []
offset_c = []
for i in range(len(s)):
        if s[i] == 'F':
                offset_f += [i]

offset_f.sort()


for i in range(len(s)):
        if s[i] == 'C':
                offset_c += [i]

offset_c.sort()


if offset_f and offset_c:
        if offset_f[-1] > offset_c[0]:
                print('Yes')
        else:
                print('No')
else:
        print('No')

Submission status: Accepted

Solution code:
s = input()
i, j = [s.find('C'), s.rfind('F')]
j = -2 if i == -1 or j == -1 else j
print("Yes" if i < j else "No")

Submission status: Accepted

Solution code:
s = raw_input()
s = filter(lambda x: x == 'C' or x == 'F', s)

flag = False
if 'C' not in s:
    flag= True
    print "No"

if not flag:
    flag = False
    i = s.index('C')
    s_ = filter(lambda x: x== 'F', s[i:len(s)])
    if len(s_) == 0:
        print "No"
        flag = True

    if not flag:
        print "Yes"

Submission status: Accepted

Solution code:
def main():
    s = input()
    for i, c1 in enumerate(s):
        if c1 == 'C':
            for c2 in s[i+1:]:
                if c2 == 'F':
                    print('Yes')
                    return
            else:
                print('No')
                return
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
i = len(s)

C_list = []
C_num = []
F_list = []
F_num = []

for x in range(i):
    if s[x] == 'C':
        C_list.append(s[x])
        C_num.append(x)
    elif s[x] == 'F':
        F_list.append(s[x])
        F_num.append(x)


if len(C_list) > 0 and len(F_list) > 0:
    if C_num[0] < F_num[-1]:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
s = raw_input()
cFound = False
fFound = False

for c in s:
    if c == 'C' and not cFound:
        cFound = True
    elif c == 'F' and cFound:
        fFound = True
        break

print "Yes" if cFound and fFound else "No"

Submission status: Accepted

Solution code:
s = input()
if "C" in s and "F" in s:
  a = s.index("C")
  b = s.rindex("F")
  if a < b:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
import re
S1 = input()
p = r'C.+F|CF'
result = re.search(p, S1)
if result:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
s = input()
C=False
for c in s:
    if C:
        if c=='F':
            print('Yes')
            break
    elif c=='C':
        C=True
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
for line in sys.stdin:
    a = line.rstrip()
    first = a.find("C")
    if first != -1:
        second = a.find("F",first)
        if second != -1:
            print("Yes")
        else:
            print("No")
    else:
            print("No")

Submission status: Accepted

Solution code:
import re

str = input()

print("Yes" if re.match(".*C.*F.*", str) else "No")

Submission status: Accepted

Solution code:
st = input()
l = len(st)
f = 1
for i in range(l):
    if st[i] == 'C' or st[i] == 'c':
        for j in range(i,l
                       ):
            if st[j]=='F' or st[j] == 'f':
                print('Yes')
                f = 0
                break
        if f ==0:
            break

if f:
    print('No')

Submission status: Accepted

Solution code:
s = input()
state = 0
for c in s:
    if c == 'C':
        if state == 0:
            state = 1
    if c == 'F':
        if state == 1:
            state = 2

if state == 2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def check_cf(s):
    try:
        idx_c = s.index('C')
        idx_f = s[idx_c:].index('F') + idx_c
    except:
        return 'No'

    if idx_c < idx_f:
        return 'Yes'

    return 'No'

if __name__ == '__main__':
    print check_cf(raw_input())

Submission status: Accepted

Solution code:
import re

m = input()

m2 = re.search('C[A-Z]*F', m)

if m2:
    
    print ("Yes")

else:
    print ("No")

#print (m2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = raw_input()

c = s.find('C')

t = s[::-1]

f = t.find('F')

if c == -1 or f == -1:
    print 'No'
elif c < len(s)-t.find('F')-1:
    print 'Yes'
else:
    print 'No'

Submission status: Accepted

Solution code:
S = raw_input()

pc = S.index("C") if "C" in S else -1
pf = S.rindex("F") if "F" in S else -1
if pc > -1 and pf > -1 and pc < pf:
    print "Yes"
else:
    print "No"

Submission status: Accepted

Solution code:
from collections import Counter
S = raw_input().strip()
str = "No"
Cpos = S.find('C')
Fpos = S[Cpos:].find('F')
if Cpos != -1 and Fpos != -1:
  str = "Yes"
print str

Submission status: Accepted

Solution code:
s = raw_input()

s1 = s.find('C')
s2 = len(s) - 1 - s[::-1].find('F')

if s1 < s2 and s1 >= 0 and s2 < len(s):
    print 'Yes'
else:
    print 'No'

Submission status: Accepted

Solution code:
s = input()

cl = []
fl = []

for i, c_test in zip(range(len(s)), s):
    if c_test == 'C':
        cl.append(i)

for i, f_test in zip(range(len(s)), s):
    if f_test == 'F':
        fl.append(i)
if len(cl) == 0 or len(fl) == 0:
    print("No")    
elif max(fl) > min(cl):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
def f():
    s = input()
    j = True
    for i in s:
        if j:
            if i == 'C':
                j = False
        else:
            if i == 'F':
                return 'Yes'
    return 'No'

print (f())

Submission status: Accepted

Solution code:
s = input()
c = s.find('C')
f = s.rfind('F')

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

Submission status: Accepted

Solution code:
S = raw_input()
tt = S.find("C")
if tt == -1:
    print "No"
else:
    S = S[tt+1:]

    t2 = S.find("F")
    if t2 == -1:
        print "No"
    else:
        print "Yes"

Submission status: Accepted

Solution code:
#coding: utf-8

import re

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

st = str(raw_input())

if st.find('C') != -1:
    i = st.find('C')
    if st.find('F',i) != -1:
        print 'Yes'
    else:
        print 'No'
else:
    print 'No'

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

# get a string
s = raw_input()
i = s.find('C')
if i < 0:
    print 'No'
    sys.exit(0)

s = s[i+1:]
i = s.find('F')
if i < 0:
    print 'No'
else:
    print 'Yes'

Submission status: Accepted

Solution code:
import sys
s=input()
for i in range(len(s)):
    if i==len(s)-1:
        print("No")
        sys.exit()
    if s[i]=="C":
        for j in range(i+1,len(s)):
            if s[j]=="F":
                print("Yes")
                sys.exit()
            if j==len(s)-1:
                print("No")
                sys.exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
s = input()
pattern = re.compile(r'C.*F')
match = pattern.search(s)
if match:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
s = raw_input()
s_i = s.find("C")
if s_i == -1:
    print "No"
else:
    s_i2 = s.rfind("F")
    if s_i2 == -1:
        print "No"
    elif s_i > s_i2:
        print "No"
    else:
        print "Yes"

Submission status: Accepted

Solution code:
import re
s = input()
p = re.compile('C.*F')
if p.search(s) == None:
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
a = raw_input()
flags = 0
flage = 0
for s in a:
	if s == 'C':
		flags = 1
	if flags == 1 and s == 'F':
		flage = 1

if flage == 1:
	print 'Yes'
else:
	print 'No'

Submission status: Accepted

Solution code:
s=input()
a=""
for i in range(len(s)):
    if s[i]=='C':
        a+="c"
    if s[i]=='F':
        a+="f"
if "cf" in a:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
s = input()
C = False
c_index = None
F = False
f_index = None

for i in range(len(s)):
    if s[i] == "C":
        C = True
        c_index = i
    if s[i] == "F":
        F = True
        f_index = i

if C == True and F == True:
    if c_index < f_index:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
def solve():
    s = raw_input()
    if 'C' not in s:
        return False
    for i in range(s.index('C'), len(s)):
        if s[i] == 'F':
            return True
    return False

if __name__ == '__main__':
    print('Yes' if solve() else 'No')

Submission status: Accepted

Solution code:
s = list(str(input()))
ans = False
if 'C' in s:
    c_index = s.index('C')
    for i in range(len(s)):
        char = s[len(s) - i - 1]
        if char == 'F':
            f_index = len(s) - i - 1
            if c_index < f_index:
                ans = True
if ans:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
import re
s = sys.stdin.readline()
c_i = None
f_i = None
for i, c in enumerate(s):
    if c == 'C':
        c_i = i
        break
for i, c in reversed(list(enumerate(s))):
    if c == 'F':
        f_i = i
        break
if c_i is not None and f_i is not None and c_i < f_i:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
S = raw_input()
c = False
cf = False
for _ in S:
	if not c and _ == 'C':
		c = True
	if c and _ == 'F':
		cf = True
		break

print 'Yes' if cf else 'No'

Submission status: Accepted

Solution code:
s=raw_input()
print 'Yes' if 'C' in s and 'F' in s[s.index('C'):] else 'No'

Submission status: Accepted

Solution code:
s=raw_input()
f=0
for i in xrange(len(s)):
    if "C"==s[i] and f==0:
        f+=1
    if f==1 and "F"==s[i]:
        print("Yes")
        exit()
print("No")