'''
Created on Sep 17, 2015

@author: Susan
'''
def mystery(word):
    print "len(word)", len(word)
    print "range(len(word))", range(len(word))
    s = 0
    for i in range(len(word)):
        print "i is", i, " character at i is ", word[i]
        if word[i] == 'c':
            s += 1
    return s

def mystery2(word):
    answer = ""
    for i in range(1,len(word)):
        if word[i-1] == 'c':
            answer = answer + word[i]
    return answer


print mystery("chicken")
print mystery2("thechicken")
print mystery2("chickenc")
print mystery2("chcceachacbecy")