A court in Beijing on Thursday sentenced two men to one month in detention for cheating on graduate school entrance exams after China made it a criminal offense last year.

One of the two men, surnamed Hou, was found to be taking the entrance exam to a graduate school on Dec. 26 last year on behalf of the other man, surnamed Hu. Police arrested Hou that day, while Hu turned himself in two days later.

In addition to one month in detention for each, the court also fined Hou and Hu 10,000 and 8,000 yuan, respectively.

An amendment to the Criminal Law, which took effect on Nov. 1, stipulates that organizing or facilitating cheating or hiring others to sit state-level exams are punishable by detention or imprisonment of up to seven years.