loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ingredients = input()

countIceCream = 0
countMilk = 0
countIceCubes = 0

for ingred in ingredients:
  if ingred == "I":
    countIceCream += 1
  elif ingred == "M":
    countMilk += 1
  elif ingred == "C":
    countIceCubes += 1

if countIceCream < 2:
  print("I")
elif countMilk < 1:
  print("M")
elif countIceCubes < 3:
  print("C")
else:
  print("W")