List<String> () { List<String> list = new ArrayList<>(); for (int x = 0; x < 20; x++) { Integer i = x; long limit = i; for (String str = ""; ; str = "a" + str) { if (limit-- == 0) break; list.add(str); } } return list; }