Minn. inmate pens thank-you note to sheriff, corrections officers