using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.IO; using static System.Console; using static System.Math; public class Solve{ static public int mod = 1000000007; static public string al = "abcdefghijklmnopqrstuvwxyz"; public static void Main(){ // •ûj // var s = stra(); var w = int.Parse(s[0]); var h = int.Parse(s[1]); if(s[2] == "W"){ s[2] += "B"; }else{ s[2] += "W"; } var s1 = ""; var s2 = ""; for(int i=0;i=0;i--){if(binary[i] == '1'){value = value*a_power%mod;}a_power = a_power*a_power%mod;}return (int)value;} static int square2(int a,int b){long output = 1;var list = new List();int sh = 1;long n = a;list.Add(a);while(sh < b){sh *= 2;n = n*n%mod;list.Add(n);}for(int i=list.Count-1;i>=0;i--){if(b > sh){b -= sh;sh /= 2;output = output*list[i]%mod;}}return (int)output;} //Šeí“Çæ static string rstr(){ return ReadLine(); } static int rint(){ return int.Parse(ReadLine()); } static long rlong(){ return long.Parse(ReadLine()); } static string[] stra(){ return ReadLine().Split(' '); } static char[] chara(){ string[] a=stra();string b="";for(int i=0;i