 In the early Middle Ages , Glynrhondda was a commote of the cantref of Penychen in the kingdom of Morgannwg , a sparsely populated agricultural area . The spelling of the commote varied widely , and the Cardiff Records shows the various spellings : 
