private static String lineSeparator(String str) {
int p=0, i=0;
StringBuffer sb2 = new StringBuffer(str);
int size = 0;
while((p = str.indexOf(",",p+1))>-1) {
i++;
if(i%3==0) {
sb2.insert(p+size+1, System.lineSeparator());
size+=2;
}
}
return sb2.toString();
}