-
Notifications
You must be signed in to change notification settings - Fork 1
/
zwordle.prog.abap
21643 lines (21457 loc) · 690 KB
/
zwordle.prog.abap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
report zwordle.
*
* Author: Hugo de Groot
*
* Version: 3.0
*
* To understand program flow, follow method LCL->MAIN().
* This method is invoked at the START-OF-SELECTION event.
*
*------------------------------------------------------------------------------
class lcl_wordle definition.
public section.
class-data:
god_mode type abap_bool,
letter1 type char26,
letter2 type char26,
letter3 type char26,
letter4 type char26,
letter5 type char26,
black_letters type char26,
orange_letters type char26.
class-methods:
remove_black_letters.
methods:
main.
private section.
types:
ty_word_score type p length 6 decimals 1,
begin of ty_matched_word,
word type char5,
vowel_count type i,
consonant_count type i,
contains_all_orange_letters type abap_bool,
word_score type ty_word_score,
end of ty_matched_word,
ty_matched_word_tab type standard table of ty_matched_word with default key,
ty_relative_frequency type p length 6 decimals 4,
begin of ty_letter_frequency,
first_letter type ty_relative_frequency,
other_letters type ty_relative_frequency,
end of ty_letter_frequency,
ty_letter_frequency_tab type standard table of ty_letter_frequency with default key,
begin of ty_god,
date type dats,
word type char5,
end of ty_god,
ty_god_tab type sorted table of ty_god with unique key date.
data:
word_tab type string_table,
letter_frequency_tab type ty_letter_frequency_tab,
god_tab type ty_god_tab,
regex_string type string,
matched_word_tab type ty_matched_word_tab.
methods:
build_word_tab, "List of 5-letter words. Source: https://www-cs-faculty.stanford.edu/~knuth/sgb-words.txt
build_word_tab_v2, "List of 5-letter words. Source: Collins Scrabble Words Dec 2021
build_letter_frequency_tab, "Letter Frequency for English Dictionary Words
build_god_tab,
build_regex_string,
get_matched_words,
display_output_alv,
get_vowel_count importing i_word type char5 returning value(r_count) type i,
contains_all_orange_letters importing i_word type char5 returning value(r_contains_all_orange_letters) type abap_bool,
get_word_score importing i_word type char5 returning value(r_word_score) type ty_word_score,
get_letter_frequency importing i_letter type char1 i_first type abap_bool returning value(r_frequency) type ty_relative_frequency.
endclass.
*------------------------------------------------------------------------------
selection-screen skip.
parameters:
pgmode as checkbox.
selection-screen skip.
selection-screen begin of line.
selection-screen comment 1(80) text-001.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(80) text-002.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 4(75) text-003.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 6(74) text-004.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 4(75) text-005.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(80) text-006.
selection-screen end of line.
selection-screen skip.
parameters:
pblack type char26.
selection-screen skip.
parameters:
pletter1 type char26,
pletter2 type char26,
pletter3 type char26,
pletter4 type char26,
pletter5 type char26.
selection-screen skip.
parameters:
porange type char26.
*------------------------------------------------------------------------------
initialization.
pletter1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
pletter2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
pletter3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
pletter4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
pletter5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.
*------------------------------------------------------------------------------
at selection-screen output.
"When user presses ENTER, remove the BLACK LETTERS from LETTER POSITION 1...5.
lcl_wordle=>remove_black_letters( ).
*------------------------------------------------------------------------------
start-of-selection.
data wordle_assistant type ref to lcl_wordle.
lcl_wordle=>god_mode = pgmode.
lcl_wordle=>letter1 = pletter1.
lcl_wordle=>letter2 = pletter2.
lcl_wordle=>letter3 = pletter3.
lcl_wordle=>letter4 = pletter4.
lcl_wordle=>letter5 = pletter5.
lcl_wordle=>black_letters = pblack.
lcl_wordle=>orange_letters = porange.
create object wordle_assistant.
wordle_assistant->main( ).
*------------------------------------------------------------------------------
class lcl_wordle implementation.
method main.
"build_word_tab( ).
build_word_tab_v2( ).
build_letter_frequency_tab( ).
build_god_tab( ).
build_regex_string( ).
get_matched_words( ).
display_output_alv( ).
endmethod.
method remove_black_letters.
data black_letters_regex type string.
if pblack is not initial.
if strlen( pblack ) = 1.
black_letters_regex = pblack+0(1).
else.
black_letters_regex = |[{ pblack }]|.
endif.
replace all occurrences of regex black_letters_regex in pletter1 with ''.
replace all occurrences of regex black_letters_regex in pletter2 with ''.
replace all occurrences of regex black_letters_regex in pletter3 with ''.
replace all occurrences of regex black_letters_regex in pletter4 with ''.
replace all occurrences of regex black_letters_regex in pletter5 with ''.
endif.
endmethod.
method build_regex_string.
data:
vletter1 type string,
vletter2 type string,
vletter3 type string,
vletter4 type string,
vletter5 type string.
if letter1 is initial.
vletter1 = '.'.
elseif strlen( letter1 ) = 1.
vletter1 = letter1.
else.
vletter1 = |[{ letter1 }]|.
endif.
if letter2 is initial.
vletter2 = '.'.
elseif strlen( letter2 ) = 1.
vletter2 = letter2.
else.
vletter2 = |[{ letter2 }]|.
endif.
if letter3 is initial.
vletter3 = '.'.
elseif strlen( letter3 ) = 1.
vletter3 = letter3.
else.
vletter3 = |[{ letter3 }]|.
endif.
if letter4 is initial.
vletter4 = '.'.
elseif strlen( letter4 ) = 1.
vletter4 = letter4.
else.
vletter4 = |[{ letter4 }]|.
endif.
if letter5 is initial.
vletter5 = '.'.
elseif strlen( letter5 ) = 1.
vletter5 = letter5.
else.
vletter5 = |[{ letter5 }]|.
endif.
regex_string = |^{ vletter1 }{ vletter2 }{ vletter3 }{ vletter4 }{ vletter5 }$|.
endmethod.
method get_matched_words.
data:
match_result_tab type match_result_tab,
match_result_wa like line of match_result_tab,
matched_word type ty_matched_word,
god_wa type ty_god.
if god_mode = abap_true.
read table god_tab into god_wa with key date = sy-datum binary search.
assert sy-subrc = 0.
matched_word-word = god_wa-word.
matched_word-vowel_count = get_vowel_count( god_wa-word ).
matched_word-consonant_count = 5 - matched_word-vowel_count.
matched_word-contains_all_orange_letters = contains_all_orange_letters( god_wa-word ).
matched_word-word_score = get_word_score( god_wa-word ).
append matched_word to matched_word_tab.
else.
find all occurrences of regex regex_string in table word_tab
results match_result_tab.
loop at match_result_tab into match_result_wa.
read table word_tab index match_result_wa-line into matched_word-word.
assert sy-subrc = 0.
matched_word-vowel_count = get_vowel_count( matched_word-word ).
matched_word-consonant_count = 5 - matched_word-vowel_count.
matched_word-contains_all_orange_letters = contains_all_orange_letters( matched_word-word ).
matched_word-word_score = get_word_score( matched_word-word ).
append matched_word to matched_word_tab.
endloop.
endif.
endmethod.
method display_output_alv.
data:
alv_grid type ref to cl_salv_table,
functions type ref to cl_salv_functions_list,
columns type ref to cl_salv_columns,
column type ref to cl_salv_column_table,
alv_header_grid type ref to cl_salv_form_layout_grid.
sort matched_word_tab by contains_all_orange_letters descending
word_score descending.
cl_salv_table=>factory(
importing
r_salv_table = alv_grid
changing
t_table = matched_word_tab ).
"Set ALV function buttons -------------------------------------------------
functions = alv_grid->get_functions( ).
functions->set_group_sort( 'X' ). "Sort Ascending / Sort Descending
functions->set_group_filter( 'X' ). "Filter
functions->set_export_spreadsheet( 'X' ). "Allow export (List->Export->Spreadsheet...)
"Set Column Labels etc. ---------------------------------------------------
columns = alv_grid->get_columns( ).
column ?= columns->get_column( 'WORD' ).
column->set_key( 'X' ).
column->set_long_text( 'Matching Words' ). "40
column->set_output_length( 16 ).
columns = alv_grid->get_columns( ).
column ?= columns->get_column( 'VOWEL_COUNT' ).
column->set_long_text( 'Vowel Count' ). "40
column->set_alignment( if_salv_c_alignment=>centered ).
column->set_output_length( 15 ).
columns = alv_grid->get_columns( ).
column ?= columns->get_column( 'CONSONANT_COUNT' ).
column->set_long_text( 'Consonant Count' ). "40
column->set_alignment( if_salv_c_alignment=>centered ).
column->set_output_length( 15 ).
columns = alv_grid->get_columns( ).
column ?= columns->get_column( 'CONTAINS_ALL_ORANGE_LETTERS' ).
column->set_long_text( 'Contains all Orange Letters' ). "40
column->set_alignment( if_salv_c_alignment=>centered ).
column->set_output_length( 25 ).
columns = alv_grid->get_columns( ).
column ?= columns->get_column( 'WORD_SCORE' ).
column->set_long_text( 'Word Score' ). "40
column->set_alignment( if_salv_c_alignment=>centered ).
"Define ALV Header --------------------------------------------------------
create object alv_header_grid.
alv_header_grid->create_label( row = 1 column = 1 text = 'Black Letters:' ).
alv_header_grid->create_text( row = 1 column = 2 text = black_letters ).
alv_header_grid->create_label( row = 2 column = 1 text = 'Orange Letters:' ).
alv_header_grid->create_text( row = 2 column = 2 text = orange_letters ).
alv_header_grid->create_label( row = 3 column = 1 text = 'Letter 1:' ).
alv_header_grid->create_label( row = 4 column = 1 text = 'Letter 2:' ).
alv_header_grid->create_label( row = 5 column = 1 text = 'Letter 3:' ).
alv_header_grid->create_label( row = 6 column = 1 text = 'Letter 4:' ).
alv_header_grid->create_label( row = 7 column = 1 text = 'Letter 5:' ).
alv_header_grid->create_text( row = 3 column = 2 text = letter1 ).
alv_header_grid->create_text( row = 4 column = 2 text = letter2 ).
alv_header_grid->create_text( row = 5 column = 2 text = letter3 ).
alv_header_grid->create_text( row = 6 column = 2 text = letter4 ).
alv_header_grid->create_text( row = 7 column = 2 text = letter5 ).
alv_header_grid->create_label( row = 8 column = 1 text = 'Regex:' ).
alv_header_grid->create_text( row = 8 column = 2 text = regex_string ).
alv_grid->set_top_of_list( alv_header_grid ).
"Finally, display the grid! -----------------------------------------------
alv_grid->display( ).
endmethod.
method get_vowel_count.
data:
vowels_regex type string value '[AEIOUY]'.
find all occurrences of regex vowels_regex in i_word
match count r_count.
endmethod.
method contains_all_orange_letters.
data:
word type char6,
orange1 type c,
orange2 type c,
orange3 type c,
orange4 type c,
orange5 type c,
contains_orange1 type abap_bool,
contains_orange2 type abap_bool,
contains_orange3 type abap_bool,
contains_orange4 type abap_bool,
contains_orange5 type abap_bool.
r_contains_all_orange_letters = abap_false.
if orange_letters is initial.
r_contains_all_orange_letters = abap_true.
else.
word = i_word.
orange1 = orange_letters+0(1).
orange2 = orange_letters+1(1).
orange3 = orange_letters+2(1).
orange4 = orange_letters+3(1).
orange5 = orange_letters+4(1).
if word ca orange1.
contains_orange1 = abap_true.
endif.
if word ca orange2.
contains_orange2 = abap_true.
endif.
if word ca orange3.
contains_orange3 = abap_true.
endif.
if word ca orange4.
contains_orange4 = abap_true.
endif.
if word ca orange5.
contains_orange5 = abap_true.
endif.
if contains_orange1 = abap_true and
contains_orange2 = abap_true and
contains_orange3 = abap_true and
contains_orange4 = abap_true and
contains_orange5 = abap_true .
r_contains_all_orange_letters = abap_true.
else.
r_contains_all_orange_letters = abap_false.
endif.
endif.
endmethod.
method get_word_score.
if strlen( letter1 ) > 1.
r_word_score = r_word_score + get_letter_frequency( i_letter = i_word+0(1) i_first = abap_true ).
endif.
if strlen( letter2 ) > 1.
r_word_score = r_word_score + get_letter_frequency( i_letter = i_word+1(1) i_first = abap_false ).
endif.
if strlen( letter3 ) > 1.
r_word_score = r_word_score + get_letter_frequency( i_letter = i_word+2(1) i_first = abap_false ).
endif.
if strlen( letter4 ) > 1.
r_word_score = r_word_score + get_letter_frequency( i_letter = i_word+3(1) i_first = abap_false ).
endif.
if strlen( letter5 ) > 1.
r_word_score = r_word_score + get_letter_frequency( i_letter = i_word+4(1) i_first = abap_false ).
endif.
endmethod.
method get_letter_frequency.
field-symbols <frequency> like line of letter_frequency_tab.
data v_index type i.
v_index = find( val = sy-abcde sub = i_letter ) + 1.
read table letter_frequency_tab assigning <frequency> index v_index.
assert sy-subrc = 0.
if i_first = abap_true.
r_frequency = <frequency>-first_letter.
else.
r_frequency = <frequency>-other_letters.
endif.
endmethod.
method build_letter_frequency_tab.
"
" Source of Letter Frequency for English Dictionary Words:
" https://en.wikipedia.org/wiki/Letter_frequency
"
data frequency like line of letter_frequency_tab.
frequency-first_letter = '5.7'.
frequency-other_letters = '7.8'. "A
insert frequency into table letter_frequency_tab.
frequency-first_letter = '6.0'.
frequency-other_letters = '2.0'. "B
insert frequency into table letter_frequency_tab.
frequency-first_letter = '9.4'.
frequency-other_letters = '4.0'. "C
insert frequency into table letter_frequency_tab.
frequency-first_letter = '6.1'.
frequency-other_letters = '3.8'. "D
insert frequency into table letter_frequency_tab.
frequency-first_letter = '3.9'.
frequency-other_letters = '11.0'. "E
insert frequency into table letter_frequency_tab.
frequency-first_letter = '4.1'.
frequency-other_letters = '1.4'. "F
insert frequency into table letter_frequency_tab.
frequency-first_letter = '3.3'.
frequency-other_letters = '3.0'. "G
insert frequency into table letter_frequency_tab.
frequency-first_letter = '3.7'.
frequency-other_letters = '2.3'. "H
insert frequency into table letter_frequency_tab.
frequency-first_letter = '3.9'.
frequency-other_letters = '8.2'. "I
insert frequency into table letter_frequency_tab.
frequency-first_letter = '1.1'.
frequency-other_letters = '0.21'. "J
insert frequency into table letter_frequency_tab.
frequency-first_letter = '1.0'.
frequency-other_letters = '2.5'. "K
insert frequency into table letter_frequency_tab.
frequency-first_letter = '3.1'.
frequency-other_letters = '5.3'. "L
insert frequency into table letter_frequency_tab.
frequency-first_letter = '5.6'.
frequency-other_letters = '2.7'. "M
insert frequency into table letter_frequency_tab.
frequency-first_letter = '2.2'.
frequency-other_letters = '7.2'. "N
insert frequency into table letter_frequency_tab.
frequency-first_letter = '2.5'.
frequency-other_letters = '6.1'. "O
insert frequency into table letter_frequency_tab.
frequency-first_letter = '7.7'.
frequency-other_letters = '2.8'. "P
insert frequency into table letter_frequency_tab.
frequency-first_letter = '0.49'.
frequency-other_letters = '0.24'. "Q
insert frequency into table letter_frequency_tab.
frequency-first_letter = '6.0'.
frequency-other_letters = '7.3'. "R
insert frequency into table letter_frequency_tab.
frequency-first_letter = '11.0'.
frequency-other_letters = '8.7'. "S
insert frequency into table letter_frequency_tab.
frequency-first_letter = '5.0'.
frequency-other_letters = '6.7'. "T
insert frequency into table letter_frequency_tab.
frequency-first_letter = '2.9'.
frequency-other_letters = '3.3'. "U
insert frequency into table letter_frequency_tab.
frequency-first_letter = '1.5'.
frequency-other_letters = '1.0'. "V
insert frequency into table letter_frequency_tab.
frequency-first_letter = '2.7'.
frequency-other_letters = '0.91'. "W
insert frequency into table letter_frequency_tab.
frequency-first_letter = '0.05'.
frequency-other_letters = '0.27'. "X
insert frequency into table letter_frequency_tab.
frequency-first_letter = '0.36'.
frequency-other_letters = '1.6'. "Y
insert frequency into table letter_frequency_tab.
frequency-first_letter = '0.24'.
frequency-other_letters = '0.44'. "Z
insert frequency into table letter_frequency_tab.
endmethod.
method build_word_tab.
"
" Source for 5-Letter Word List:
" https://www-cs-faculty.stanford.edu/~knuth/sgb-words.txt
"
append 'WHICH' to word_tab.
append 'THERE' to word_tab.
append 'THEIR' to word_tab.
append 'ABOUT' to word_tab.
append 'WOULD' to word_tab.
append 'THESE' to word_tab.
append 'OTHER' to word_tab.
append 'WORDS' to word_tab.
append 'COULD' to word_tab.
append 'WRITE' to word_tab.
append 'FIRST' to word_tab.
append 'WATER' to word_tab.
append 'AFTER' to word_tab.
append 'WHERE' to word_tab.
append 'RIGHT' to word_tab.
append 'THINK' to word_tab.
append 'THREE' to word_tab.
append 'YEARS' to word_tab.
append 'PLACE' to word_tab.
append 'SOUND' to word_tab.
append 'GREAT' to word_tab.
append 'AGAIN' to word_tab.
append 'STILL' to word_tab.
append 'EVERY' to word_tab.
append 'SMALL' to word_tab.
append 'FOUND' to word_tab.
append 'THOSE' to word_tab.
append 'NEVER' to word_tab.
append 'UNDER' to word_tab.
append 'MIGHT' to word_tab.
append 'WHILE' to word_tab.
append 'HOUSE' to word_tab.
append 'WORLD' to word_tab.
append 'BELOW' to word_tab.
append 'ASKED' to word_tab.
append 'GOING' to word_tab.
append 'LARGE' to word_tab.
append 'UNTIL' to word_tab.
append 'ALONG' to word_tab.
append 'SHALL' to word_tab.
append 'BEING' to word_tab.
append 'OFTEN' to word_tab.
append 'EARTH' to word_tab.
append 'BEGAN' to word_tab.
append 'SINCE' to word_tab.
append 'STUDY' to word_tab.
append 'NIGHT' to word_tab.
append 'LIGHT' to word_tab.
append 'ABOVE' to word_tab.
append 'PAPER' to word_tab.
append 'PARTS' to word_tab.
append 'YOUNG' to word_tab.
append 'STORY' to word_tab.
append 'POINT' to word_tab.
append 'TIMES' to word_tab.
append 'HEARD' to word_tab.
append 'WHOLE' to word_tab.
append 'WHITE' to word_tab.
append 'GIVEN' to word_tab.
append 'MEANS' to word_tab.
append 'MUSIC' to word_tab.
append 'MILES' to word_tab.
append 'THING' to word_tab.
append 'TODAY' to word_tab.
append 'LATER' to word_tab.
append 'USING' to word_tab.
append 'MONEY' to word_tab.
append 'LINES' to word_tab.
append 'ORDER' to word_tab.
append 'GROUP' to word_tab.
append 'AMONG' to word_tab.
append 'LEARN' to word_tab.
append 'KNOWN' to word_tab.
append 'SPACE' to word_tab.
append 'TABLE' to word_tab.
append 'EARLY' to word_tab.
append 'TREES' to word_tab.
append 'SHORT' to word_tab.
append 'HANDS' to word_tab.
append 'STATE' to word_tab.
append 'BLACK' to word_tab.
append 'SHOWN' to word_tab.
append 'STOOD' to word_tab.
append 'FRONT' to word_tab.
append 'VOICE' to word_tab.
append 'KINDS' to word_tab.
append 'MAKES' to word_tab.
append 'COMES' to word_tab.
append 'CLOSE' to word_tab.
append 'POWER' to word_tab.
append 'LIVED' to word_tab.
append 'VOWEL' to word_tab.
append 'TAKEN' to word_tab.
append 'BUILT' to word_tab.
append 'HEART' to word_tab.
append 'READY' to word_tab.
append 'QUITE' to word_tab.
append 'CLASS' to word_tab.
append 'BRING' to word_tab.
append 'ROUND' to word_tab.
append 'HORSE' to word_tab.
append 'SHOWS' to word_tab.
append 'PIECE' to word_tab.
append 'GREEN' to word_tab.
append 'STAND' to word_tab.
append 'BIRDS' to word_tab.
append 'START' to word_tab.
append 'RIVER' to word_tab.
append 'TRIED' to word_tab.
append 'LEAST' to word_tab.
append 'FIELD' to word_tab.
append 'WHOSE' to word_tab.
append 'GIRLS' to word_tab.
append 'LEAVE' to word_tab.
append 'ADDED' to word_tab.
append 'COLOR' to word_tab.
append 'THIRD' to word_tab.
append 'HOURS' to word_tab.
append 'MOVED' to word_tab.
append 'PLANT' to word_tab.
append 'DOING' to word_tab.
append 'NAMES' to word_tab.
append 'FORMS' to word_tab.
append 'HEAVY' to word_tab.
append 'IDEAS' to word_tab.
append 'CRIED' to word_tab.
append 'CHECK' to word_tab.
append 'FLOOR' to word_tab.
append 'BEGIN' to word_tab.
append 'WOMAN' to word_tab.
append 'ALONE' to word_tab.
append 'PLANE' to word_tab.
append 'SPELL' to word_tab.
append 'WATCH' to word_tab.
append 'CARRY' to word_tab.
append 'WROTE' to word_tab.
append 'CLEAR' to word_tab.
append 'NAMED' to word_tab.
append 'BOOKS' to word_tab.
append 'CHILD' to word_tab.
append 'GLASS' to word_tab.
append 'HUMAN' to word_tab.
append 'TAKES' to word_tab.
append 'PARTY' to word_tab.
append 'BUILD' to word_tab.
append 'SEEMS' to word_tab.
append 'BLOOD' to word_tab.
append 'SIDES' to word_tab.
append 'SEVEN' to word_tab.
append 'MOUTH' to word_tab.
append 'SOLVE' to word_tab.
append 'NORTH' to word_tab.
append 'VALUE' to word_tab.
append 'DEATH' to word_tab.
append 'MAYBE' to word_tab.
append 'HAPPY' to word_tab.
append 'TELLS' to word_tab.
append 'GIVES' to word_tab.
append 'LOOKS' to word_tab.
append 'SHAPE' to word_tab.
append 'LIVES' to word_tab.
append 'STEPS' to word_tab.
append 'AREAS' to word_tab.
append 'SENSE' to word_tab.
append 'SPEAK' to word_tab.
append 'FORCE' to word_tab.
append 'OCEAN' to word_tab.
append 'SPEED' to word_tab.
append 'WOMEN' to word_tab.
append 'METAL' to word_tab.
append 'SOUTH' to word_tab.
append 'GRASS' to word_tab.
append 'SCALE' to word_tab.
append 'CELLS' to word_tab.
append 'LOWER' to word_tab.
append 'SLEEP' to word_tab.
append 'WRONG' to word_tab.
append 'PAGES' to word_tab.
append 'SHIPS' to word_tab.
append 'NEEDS' to word_tab.
append 'ROCKS' to word_tab.
append 'EIGHT' to word_tab.
append 'MAJOR' to word_tab.
append 'LEVEL' to word_tab.
append 'TOTAL' to word_tab.
append 'AHEAD' to word_tab.
append 'REACH' to word_tab.
append 'STARS' to word_tab.
append 'STORE' to word_tab.
append 'SIGHT' to word_tab.
append 'TERMS' to word_tab.
append 'CATCH' to word_tab.
append 'WORKS' to word_tab.
append 'BOARD' to word_tab.
append 'COVER' to word_tab.
append 'SONGS' to word_tab.
append 'EQUAL' to word_tab.
append 'STONE' to word_tab.
append 'WAVES' to word_tab.
append 'GUESS' to word_tab.
append 'DANCE' to word_tab.
append 'SPOKE' to word_tab.
append 'BREAK' to word_tab.
append 'CAUSE' to word_tab.
append 'RADIO' to word_tab.
append 'WEEKS' to word_tab.
append 'LANDS' to word_tab.
append 'BASIC' to word_tab.
append 'LIKED' to word_tab.
append 'TRADE' to word_tab.
append 'FRESH' to word_tab.
append 'FINAL' to word_tab.
append 'FIGHT' to word_tab.
append 'MEANT' to word_tab.
append 'DRIVE' to word_tab.
append 'SPENT' to word_tab.
append 'LOCAL' to word_tab.
append 'WAXES' to word_tab.
append 'KNOWS' to word_tab.
append 'TRAIN' to word_tab.
append 'BREAD' to word_tab.
append 'HOMES' to word_tab.
append 'TEETH' to word_tab.
append 'COAST' to word_tab.
append 'THICK' to word_tab.
append 'BROWN' to word_tab.
append 'CLEAN' to word_tab.
append 'QUIET' to word_tab.
append 'SUGAR' to word_tab.
append 'FACTS' to word_tab.
append 'STEEL' to word_tab.
append 'FORTH' to word_tab.
append 'RULES' to word_tab.
append 'NOTES' to word_tab.
append 'UNITS' to word_tab.
append 'PEACE' to word_tab.
append 'MONTH' to word_tab.
append 'VERBS' to word_tab.
append 'SEEDS' to word_tab.
append 'HELPS' to word_tab.
append 'SHARP' to word_tab.
append 'VISIT' to word_tab.
append 'WOODS' to word_tab.
append 'CHIEF' to word_tab.
append 'WALLS' to word_tab.
append 'CROSS' to word_tab.
append 'WINGS' to word_tab.
append 'GROWN' to word_tab.
append 'CASES' to word_tab.
append 'FOODS' to word_tab.
append 'CROPS' to word_tab.
append 'FRUIT' to word_tab.
append 'STICK' to word_tab.
append 'WANTS' to word_tab.
append 'STAGE' to word_tab.
append 'SHEEP' to word_tab.
append 'NOUNS' to word_tab.
append 'PLAIN' to word_tab.
append 'DRINK' to word_tab.
append 'BONES' to word_tab.
append 'APART' to word_tab.
append 'TURNS' to word_tab.
append 'MOVES' to word_tab.
append 'TOUCH' to word_tab.
append 'ANGLE' to word_tab.
append 'BASED' to word_tab.
append 'RANGE' to word_tab.
append 'MARKS' to word_tab.
append 'TIRED' to word_tab.
append 'OLDER' to word_tab.
append 'FARMS' to word_tab.
append 'SPEND' to word_tab.
append 'SHOES' to word_tab.
append 'GOODS' to word_tab.
append 'CHAIR' to word_tab.
append 'TWICE' to word_tab.
append 'CENTS' to word_tab.
append 'EMPTY' to word_tab.
append 'ALIKE' to word_tab.
append 'STYLE' to word_tab.
append 'BROKE' to word_tab.
append 'PAIRS' to word_tab.
append 'COUNT' to word_tab.
append 'ENJOY' to word_tab.
append 'SCORE' to word_tab.
append 'SHORE' to word_tab.
append 'ROOTS' to word_tab.
append 'PAINT' to word_tab.
append 'HEADS' to word_tab.
append 'SHOOK' to word_tab.
append 'SERVE' to word_tab.
append 'ANGRY' to word_tab.
append 'CROWD' to word_tab.
append 'WHEEL' to word_tab.
append 'QUICK' to word_tab.
append 'DRESS' to word_tab.
append 'SHARE' to word_tab.
append 'ALIVE' to word_tab.
append 'NOISE' to word_tab.
append 'SOLID' to word_tab.
append 'CLOTH' to word_tab.
append 'SIGNS' to word_tab.
append 'HILLS' to word_tab.
append 'TYPES' to word_tab.
append 'DRAWN' to word_tab.
append 'WORTH' to word_tab.
append 'TRUCK' to word_tab.
append 'PIANO' to word_tab.
append 'UPPER' to word_tab.
append 'LOVED' to word_tab.
append 'USUAL' to word_tab.
append 'FACES' to word_tab.
append 'DROVE' to word_tab.
append 'CABIN' to word_tab.
append 'BOATS' to word_tab.
append 'TOWNS' to word_tab.
append 'PROUD' to word_tab.
append 'COURT' to word_tab.
append 'MODEL' to word_tab.
append 'PRIME' to word_tab.
append 'FIFTY' to word_tab.
append 'PLANS' to word_tab.
append 'YARDS' to word_tab.
append 'PROVE' to word_tab.
append 'TOOLS' to word_tab.
append 'PRICE' to word_tab.
append 'SHEET' to word_tab.
append 'SMELL' to word_tab.
append 'BOXES' to word_tab.
append 'RAISE' to word_tab.
append 'MATCH' to word_tab.
append 'TRUTH' to word_tab.
append 'ROADS' to word_tab.
append 'THREW' to word_tab.
append 'ENEMY' to word_tab.
append 'LUNCH' to word_tab.
append 'CHART' to word_tab.
append 'SCENE' to word_tab.
append 'GRAPH' to word_tab.
append 'DOUBT' to word_tab.
append 'GUIDE' to word_tab.
append 'WINDS' to word_tab.
append 'BLOCK' to word_tab.
append 'GRAIN' to word_tab.
append 'SMOKE' to word_tab.
append 'MIXED' to word_tab.
append 'GAMES' to word_tab.
append 'WAGON' to word_tab.
append 'SWEET' to word_tab.
append 'TOPIC' to word_tab.
append 'EXTRA' to word_tab.
append 'PLATE' to word_tab.
append 'TITLE' to word_tab.
append 'KNIFE' to word_tab.
append 'FENCE' to word_tab.
append 'FALLS' to word_tab.
append 'CLOUD' to word_tab.
append 'WHEAT' to word_tab.
append 'PLAYS' to word_tab.
append 'ENTER' to word_tab.