#!/usr/bin/env python3 S=[3*i for i in range(8)]+[2*i for i in range(12)] for x in "R2 U F2".split(): a="URFDLB".index(x[0])