Remove duplicates from File from specific location

How can i remove the duplicate lines from a file, for example

sample123456Sample
testing123456testing
XXXXX131323XXXXX
YYYYY423432YYYYY
fsdfdsf123456gsdfdsd

all the duplicates from column 6-12 , must be deleted. I want to consider the first row, if same comes in the given range i want to delete the line.
The output am expecting is
sample123456Sample
XXXXX131323XXXXX
YYYYY423432YYYYY

Thanks

awk 'NR==1{ get=substr($0,7,6);print $0 }
NR>1 && $0 !~ get{
   print $0
}' file