A Queens teacher forced her fifth-graders to make holiday cards for a repulsive pen pal — a jailed boyfriend who has a taste for child porn and a conviction for gun possession.



Melissa Dean instructed the youngsters at Public School 143 in Corona to draw cards for her beau in December because she "thought it was a nice thing to do," investigators said.



But a guard at Groveland Correctional Facility in upstate Livingston County disagreed, intercepting the 27 letters for John Coccarelli and alerting Dean's principal.



"It was bad judgment," said the city's special commissioner of investigation, Richard Condon. "She certainly did not have permission."



City Schools Chancellor Dennis Walcott called Dean's actions "totally ridiculous, absurd . . . and we're not going to tolerate it.



"We're moving for that teacher's termination," Walcott said.



Dean, a teacher at the Corona school since 2004, told her students that they were sending the crayon-drawn notes to people who were lonely during the holidays.



Instead, they were sent to Coccarelli, who has been collared for possession of a loaded 9-mm. semiautomatic pistol and violating an order of protection.



Dean did not get permission from the school or kids' parents to send the cards — some of which contained the students' names and home addresses.



"If you write something nice to them, they will write back to us," Dean, 31, told the class, according to investigators.



One student wrote, "I hope you have a Merry Christmas," while another called Dean the "best teacher" because she didn't assign a lot of homework.



Dean even wrote one, signing it "from your Wifey Melissa."



Coccarelli, 33, has a disturbing criminal record. In 2008, he was busted in Nassau County for weapons possession and child porn after police found a disk and laptop with nearly 50 sexually explicit images of underage kids.



But in a deal, Coccarelli pleaded guilty only to the weapons charge, ensuring a longer prison sentence than a plea on the porn, according to the Nassau district attorney's office. The porn charge was dropped.



Then in 2010, he pleaded guilty to violating a restraining order. He isn't eligible for parole until May.



Coccarelli and Dean have been chummy since he's been behind bars, chatting on the phone at least 327 times.



Dean also visited Coccarelli 11 times, identifying herself as a "friend" in the prison guestbook.



Coccarelli's father insisted that his son didn't do anything to encourage Dean to send cards from her students.



"She was trying to be nice," said Coccarelli's father, John Coccarelli Sr. "She made a mistake. I understand that."



Shocked parents at PS 143 said that Dean endangered students and called for her job.



"She should be fired," fumed Maria Cabrera, 29, whose son is in fifth grade at PS 143.



Dean, who makes draws a yearly salary of $75,283, was put on desk duty as soon as officials were notified of Condon's report.



With Rachel Monahan



bchapman@nydailynews.com