#include "bits/stdc++.h" using namespace std; typedef pair P; #define int long long #define ll long long #define mod 1000000007 #define INF (1LL<<60) #define rep(i,n) for(int i=0, i##_len=(n); i> s; if (s == "NONE"){ ans *= 16 * 16; continue; } int cnt = 0; for (int j = 0; j < s.length(); j++) if (s[j] == ',') cnt++; cnt++; ans *= (16 - cnt) * (16 - cnt); } cout << ans << endl; return 0; }