Words from cubes

Problem Name:
Words from cubes
Site:CodeForces
Links:
Tags:
Problem setters: