SPOJ 2916 GSS5 - Can you answer these queries V

NoSuchKey