System.in.splitEachLine(/\b/){_,n,l->(n as int).step(f=1,-l.count){f*=it} println f}