Working with Locks 3

Problem Name:
Working with Locks 3
Site:CodeForces
Links:
Tags:
Problem setters: