using System.Linq; using System; public class Hello { static void Main() { var ans = 1; for (int i = 0; i < 3; i++) { var s = Console.ReadLine().Trim(); if (s == "NONE") ans *= 16 * 16; else { var c = s.Split(',').Count(); ans *= (16 - c) * (16 - c); } } Console.WriteLine(ans); } }