There exist certain strings, known as $Unique$ $Strings$. They possess a unique property: 
- The character 'c' gets converted to "ff" and the character 'k' gets converted to "gg". Any letter besides 'c' and 'k' does not get converted to any other character.
Your job is to count the number of strings that could possibly be represented by a given unique string. Since the value could be very large, output the remainder when divided by $10^9+7$.
Note that if the given string is not a unique string, i.e. it contains either 'c' or 'k', output $0$.
-----Input:-----
- The first line of input contains a string, $s$.
-----Output:-----
- Output in a single line the possible number of strings modulo $10^9+7$.
-----Constraints-----
- $1 \leq |s| \leq 10^5$
where |s| denotes length of string.
-----Sample Input 1:-----
thing
-----Sample Input 2:-----
ggdffn
-----Sample Input 3:-----
fff
-----Sample Input 4:-----
cat
-----Sample Output 1:-----
1
-----Sample Output 2:-----
4
-----Sample Output 3:-----
3
-----Sample Output 4:-----
0
-----EXPLANATION:-----
The possible strings that can be represented by the given string in each of the examples are as follows:
$1)$ 'thing'
$2)$ 'ggdffn','kdffn','ggdcn','kdcn'
$3)$ 'fff','cf','fc'
$4)$ Since the string 'cat' contains 'c', it is certain that this string is not a unique string. Hence, the output is $0$.
def fib(n): 
  
 F = [[1, 1], 
   [1, 0]] 
 if (n == 0): 
  return 0
 power(F, n - 1) 
   
 return F[0][0] 
  
def multiply(F, M): 
  
 x = (F[0][0] * M[0][0] + 
   F[0][1] * M[1][0]) 
 y = (F[0][0] * M[0][1] + 
   F[0][1] * M[1][1]) 
 z = (F[1][0] * M[0][0] + 
   F[1][1] * M[1][0]) 
 w = (F[1][0] * M[0][1] + 
   F[1][1] * M[1][1]) 
  
 F[0][0] = x 
 F[0][1] = y 
 F[1][0] = z 
 F[1][1] = w 
   
# Optimized version of 
# power() in method 4  
def power(F, n): 
 
 if( n == 0 or n == 1): 
  return; 
 M = [[1, 1], 
   [1, 0]]; 
   
 power(F, n // 2) 
 multiply(F, F) 
   
 if (n % 2 != 0): 
  multiply(F, M)

s=input()
nr=len(s)
M=1000000007
cnt=1
i=0
while(i<nr):
 if(s[i]=="c" or s[i]=="k"):
  cnt=0
  break
 elif(s[i]=="g"):
  val=1
  i+=1
  while(i<nr and s[i]=="g"):
   i+=1
   val+=1
  if(val==1):
   cnt=cnt
  elif(val==2):
   cnt=(cnt*2)%M
  else:
   val=fib(val+1)
   cnt=(cnt*val)%M
 elif(s[i]=="f"):
  val=1
  i+=1
  while(i<nr and s[i]=="f"):
   i+=1
   val+=1
  if(val==1):
   cnt=cnt
  elif(val==2):
   cnt=(cnt*2)%M
  else:
   val=fib(val+1)
   cnt=(cnt*val)%M
 else:
  i+=1
print(cnt)
def fib(n): 
  
 F = [[1, 1], 
   [1, 0]] 
 if (n == 0): 
  return 0
 power(F, n - 1) 
   
 return F[0][0] 
  
def multiply(F, M): 
  
 x = (F[0][0] * M[0][0] + 
   F[0][1] * M[1][0]) 
 y = (F[0][0] * M[0][1] + 
   F[0][1] * M[1][1]) 
 z = (F[1][0] * M[0][0] + 
   F[1][1] * M[1][0]) 
 w = (F[1][0] * M[0][1] + 
   F[1][1] * M[1][1]) 
  
 F[0][0] = x 
 F[0][1] = y 
 F[1][0] = z 
 F[1][1] = w 
   
# Optimized version of 
# power() in method 4  
def power(F, n): 
 
 if( n == 0 or n == 1): 
  return; 
 M = [[1, 1], 
   [1, 0]]; 
   
 power(F, n // 2) 
 multiply(F, F) 
   
 if (n % 2 != 0): 
  multiply(F, M)

s=input()
nr=len(s)
M=1000000007
cnt=1
i=0
while(i<nr):
 if(s[i]=="c" or s[i]=="k"):
  cnt=0
  break
 elif(s[i]=="g"):
  val=1
  i+=1
  while(i<nr and s[i]=="g"):
   i+=1
   val+=1
  if(val==1):
   cnt=cnt
  elif(val==2):
   cnt=(cnt*2)%M
  else:
   val=fib(val+1)
   cnt=(cnt*val)%M
 elif(s[i]=="f"):
  val=1
  i+=1
  while(i<nr and s[i]=="f"):
   i+=1
   val+=1
  if(val==1):
   cnt=cnt
  elif(val==2):
   cnt=(cnt*2)%M
  else:
   val=fib(val+1)
   cnt=(cnt*val)%M
 else:
  i+=1
print(cnt)