The court also imposed a fine of Rs 50 on each of them, Deputy Superintendent of Police K S Nanjundappa said.
31 Bangladeshi nationals, including women and children, were arrested at Renigunta railway station in Chittoor district of Andhra Pradesh in August this year as they were travelling without passports, the DSP said.
"Of the group, 19 persons, who were major, were arrested. They have already served four months in the prison," the DSP said.