Joshua Burgess, Chaz West and Marquise Williams were all set to appear before a judge to defend themselves against home invasion and armed robbery charges.
They were going to go to trial and fight off the charges that they broke into a home on Christmas Day with guns in Pensacola.
And then one of the deputies escorting the men into the courtroom spotted a note one of the men had in their pocket.
The note was written by one of the other defendants, asking the three to make sure they got their stories straight to tell the judge.
According to a news release from the Escambia County Sheriff's Office, the three were in court on Monday when the deputy noticed one of the suspects digging into his jumpsuit pocket.
When the officer asked the man what he was doing, the suspect said he was looking for a letter from his attorney.
Deputy Joseph Kastor then found a note in the jury box, and as he inspected it, noticed that it was written by one of the suspects telling the others what to say to get their stories straight for trial.
And since the jig was obviously up, all three co-defendants decided to forego trial and changed their pleas to guilty.