1 多態 1.1 多態性 Java 引用變數有兩個類型:一個是編譯時類型,一個是運行時類型。前者是代碼中聲明這個變數時的類型,後者是由實際對象的類型決定的。當編譯類型和運行類型不一樣時,產生多態。 這個例子中 nc 的編譯時類型是 BaseClass , 運行類型是 SubClass,在調用 nc ...
1 多態
1.1 多態性
Java 引用變數有兩個類型:一個是編譯時類型,一個是運行時類型。前者是代碼中聲明這個變數時的類型,後者是由實際對象的類型決定的。當編譯類型和運行類型不一樣時,產生多態。
1 class BaseClass{ 2 public int book = 6; 3 public void base(){ 4 System.out.println("Father loves you!"); 5 } 6 public void test(){ 7 System.out.println("Father's method is covered"); 8 } 9 } 10 public class SubClass extends BaseClass{ 11 public String book = "Marvel comic book"; 12 public void test(){ 13 System.out.println("Son's method covers Father's"); 14 } 15 public void sub(){ 16 System.out.println("Son"); 17 } 18 public static void main(String[] args){ 19 //多態 20 BaseClass nc = new SubClass(); 21 System.out.println(nc.book);//輸出6,對象的實例變數不具備多態性 22 nc.test();//輸出Son's method covers father's ,執行的是SubClass中重寫的方法 23 nc.base();//Father loves you,subclass繼承的方法 24 //nc.sub(); 會報錯,因為BaseClass 不具備sub方法 25 } 26 }
這個例子中 nc 的編譯時類型是 BaseClass , 運行類型是 SubClass,在調用 nc 的方法時,總是顯現除 SubClass 的行為特征。但是註意,實例變數不具有多態性。
可以這麼理解,子類對象建立時其實也創建了一個父類類型的對象,若編譯時類型是父類,運行時類型是子類,該變數運行子類和父類擁有的共同的方法依然保持子類的特征(依然使用子類重寫的方法),無法使用子類獨有的方法,而且只能使用父類的實例變數。
引用變數在編譯時,只能調用其編譯時類型所具有的方法,但運行時則執行它運行時類型所具有的方法;在訪問其包含的實例變數時,系統總是訪問它編譯時類型所定義的成員變數,而不是運行時類型。
1.2 強制轉換
引用類型的轉換隻能發生在具有繼承關係的兩個類型之間,如果試圖把一個父類的實例轉換成子類類型時,則這個對象必須實際上是子類實例才行(運行時類型是子類)。子類轉換成父類總是可以成功的。但父類轉換成子類不一定。
類型轉換之前,最好先通過 instanceof 運算符判斷。
1 if (obj1 instanceof Type2){ 2 Type2 obj2 = (Type2)obj1; 3 }
1.3 關於繼承和多態的個人理解
1.3.1 繼承
在學習繼承和多態的過程中,發現了一個現象,當子類聲明瞭一個和父類同名的變數時,子類的實例其實同時擁有了這兩個實例變數,只是預設情況下父類的那個變數會被隱藏,接下來用代碼測試展示。
1 class Father { 2 int i = 0; 3 4 public int getI() { 5 return i; 6 } 7 8 public void setI(int i) { 9 this.i = i; 10 } 11 12 public void print() { 13 System.out.println("i:" + i); 14 } 15 } 16 17 public class Son extends Father { 18 int i = 1; 19 20 public void print() { 21 System.out.println(i); 22 } 23 24 public static void main(String[] args) { 25 Son son = new Son(); 26 son.setI(2); 27 son.print(); 28 System.out.println(son.i); 29 System.out.println(son.getSuper()); 30 son.superPrint(); 31 } 32 33 public int getSuper() { 34 return super.i; 35 } 36 public void superPrint() { 37 super.print(); 38 } 39 }
在這個程式里,父類聲明 i 時賦值為 0,子類也聲明瞭一個 i 賦初值為1,子類重寫了父類的 print()方法,為表示區分,父類的print()方法加了字元串“i:”。
- main 方法中,新建了一個子類對象後,從子類對象調用繼承來的 setter 方法改變 i 的值為 2,接著調用子類重寫的 print()方法。列印的值依然為 “1”;
- 用常規的 println()方法列印 son.i 的值,也是“1”;
- 用子類的 getSuper() 方法獲得父類的 i 的值,並將其列印,列印的值為 “2”;
- 用子類的 superPrint()方法,調用父類的 print()方法,列印值為“i: 2”;
由我之前寫的一批文章中可知,當子類重寫了父類的方法後,父類的方法其實只是被覆蓋了,可以用 super 限定調用,其實實例變數也是一樣的。
另外值得提出的是,系統在執行方法時,查找某一變數的順序:
- 查找該方法中是否有名為 a 的局部變數;
- 查找當前類中是否包含名為 a 的成員變數;
- 查找 a 的直接父類中是否有名為 a 的成員變數,依次上溯到 a 的所有父類,這種查找只會往繼承樹的上方找。
所以我們可以解釋上述程式的現象了。當我們調用 setter 方法時,setter 在其當前類也就是父類中找到了成員變數 i ,於是改變其值為 2;調用 son 的 print()方法時,在其當前類也就是子類找到了 成員變數 i ,所以列印值為 1;用常規方法列印 son.i 時,父類的 i 已經被覆蓋,所以列印值也是 1;用 getSuper()方法獲得父類的 i 並將其列印發現,其值確實被修改成了 2;用 superPrint()方法調用父類的 print()方法,該方法在當前類找到了變數 i,於是將其列印,結果為:“i: 2”。
在繼承的學習中,我們知道,當我們創建一個子類實例時,系統會從繼承樹的頂端開始,依次往下初始化類,接著創建各個類的實例。根據上文的例子,我的理解是,與其說繼承後子類“擁有”了父類的屬性和方法,倒不如說是“借用”。當我們由子類實例調用父類的方法或訪問父類的成員變數(子類中沒有重寫的方法\沒有再次聲明的成員變數),系統在子類下沒有找到同名的方法或變數,於是由下往上在其父類中尋找並調用\訪問,這就造成了子類“擁有”了父類的成員變數及方法的假象。一旦子類中有同名的成員,父類成員就被覆蓋。
1.3.2 多態
利用上面繼承所說的“覆蓋”的特性,也可以解釋一些多態的現象。
1 class Father{ 2 int i = 1; 3 public void print(){ 4 System.out.println("Father"); 5 } 6 public void printNum(){ 7 System.out.println(i); 8 } 9 } 10 public class Son extends Father{ 11 int i = 2; 12 13 public void print(){ 14 System.out.println("Son"); 15 } 16 public void printNum(){ 17 System.out.println(i); 18 } 19 public static void main(String[] args) { 20 Father val = new Son(); 21 val.print(); 22 System.out.println(val.i); 23 val.printNum(); 24 } 25 }
程式的輸出是:
第一條和第二條我們由上文“多態性”中不難理解,總結一句話就是:“方法有多態性,實例變數沒有多態性”,尋找變數時系統總是由編譯時類型出發,而尋找方法時系統總是由運行時類型出發。而第三條輸出結果,我們就可以藉由上文所說的“隱藏”特性以及“多態性”一同理解:當 val 調用 printNum()方法時,系統由其運行時類型出發,找到了子類的重寫的 printNum()方法,該方法又由當前類(子類)出發尋找變數 i ,於是找到了被隱藏了的值為 2 的變數 i 。
2 LeetCode
38.報數
報數序列是一個整數序列,按照其中的整數的順序進行報數,得到下一個數。其前五項如下:
1. 1 2. 11 3. 21 4. 1211 5. 111221
1
被讀作 "one 1"
("一個一"
) , 即 11
。11
被讀作 "two 1s"
("兩個一"
), 即 21
。21
被讀作 "one 2"
, "one 1"
("一個二"
, "一個一"
) , 即 1211
。
給定一個正整數 n(1 ≤ n ≤ 30),輸出報數序列的第 n 項。
註意:整數順序將表示為一個字元串。
示例 1:
輸入: 1 輸出: "1"
示例 2:
輸入: 4 輸出: "1211"
題目比較晦澀難懂。。。(外國人的腦洞)反正就是數組第一項是1,之後每一項都是把前一項像報數一樣念出來,再將念出來的數變成數字序列。(好像我也沒說清楚。。)
我的回答是:
1 class Solution { 2 public String countAndSay(int n) { 3 String[] array = new String[n]; 4 array[0] = "1"; 5 StringBuilder tmp = new StringBuilder(); 6 int count = 1; 7 for(int i = 0; i < n - 1; i++){ 8 for(int j = 0; j < array[i].length(); j++){ 9 if(j < array[i].length() - 1 && array[i].charAt(j) == array[i].charAt(j + 1)){ 10 count++; 11 continue; 12 } 13 tmp.append(count); 14 tmp.append(array[i].charAt(j)); 15 count = 1; 16 } 17 array[i + 1] = tmp.toString(); 18 tmp.delete(0, tmp.length()); 19 } 20 return array[n-1]; 21 } 22 }
另附評論找到的最快方法(手動滑稽),其實是方便大家理解題意:
1 class Solution { 2 public String countAndSay(int n) { 3 switch(n){ 4 case 1: 5 return "1"; 6 case 2: 7 return "11"; 8 case 3: 9 return "21"; 10 case 4: 11 return "1211"; 12 case 5: 13 return "111221"; 14 case 6: 15 return "312211"; 16 case 7: 17 return "13112221"; 18 case 8: 19 return "1113213211"; 20 case 9: 21 return "31131211131221"; 22 case 10: 23 return "13211311123113112211"; 24 case 11: 25 return "11131221133112132113212221"; 26 case 12: 27 return "3113112221232112111312211312113211"; 28 case 13: 29 return "1321132132111213122112311311222113111221131221"; 30 case 14: 31 return "11131221131211131231121113112221121321132132211331222113112211"; 32 case 15: 33 return "311311222113111231131112132112311321322112111312211312111322212311322113212221"; 34 case 16: 35 return "132113213221133112132113311211131221121321131211132221123113112221131112311332111213211322211312113211"; 36 case 17: 37 return "11131221131211132221232112111312212321123113112221121113122113111231133221121321132132211331121321231231121113122113322113111221131221"; 38 case 18: 39 return "31131122211311123113321112131221123113112211121312211213211321322112311311222113311213212322211211131221131211132221232112111312111213111213211231131122212322211331222113112211"; 40 case 19: 41 return "1321132132211331121321231231121113112221121321132122311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213122112311311123112111331121113122112132113213211121332212311322113212221"; 42 case 20: 43 return "11131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113121113123112112322111213211322211312113211"; 44 case 21: 45 return "311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122211311122122111312211213211312111322211213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221131112311311121321122112132231121113122113322113111221131221"; 46 case 22: 47 return "132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113213221133122112231131122211211131221131112311332211211131221131211132221232112111312111213322112132113213221133112132113221321123113213221121113122123211211131221222112112322211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211"; 48 case 23: 49 return "111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122211331121321232221121113122113121113222123112221221321132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322212321121113122123211231131122113221123113221113122112132113213211121332212311322113212221"; 50 case 24: 51 return "3113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213213211221113122113121113222112132113213221232112111312111213322112132113213221133112132123123112111311222112132113311213211221121332211231131122211311123113321112131221123113112221132231131122211211131221131112311332211213211321223112111311222112132113212221132221222112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211132221121311121312211213211312111322211213211321322113311213212322211231131122211311123113321112131221123113112211121312211213211321222113222112132113223113112221121113122113121113123112112322111213211322211312113211"; 52 case 25: 53 return "132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113212231121113112221121321132132211231232112311321322112311311222113111231133221121113122113121113221112131221123113111231121123222112132113213221133112132123123112111312111312212231131122211311123113322112111312211312111322111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312212221121123222112132113213221133112132123123112111311222112132113213221132213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121132211332113221122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321231231121113112221121321132122311211131122211211131221131211322113322112111312211322132113213221123113112221131112311311121321122112132231121113122113322113111221131221"; 54 case 26: 55 return "1113122113121113222123211211131211121311121321123113213221121113122123211211131221121311121312211213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121113222112131112131221121321131211132221121321132132211331121321232221123113112221131112311322311211131122211213211331121321122112133221121113122113121113222123211211131211121311121321123113111231131122112213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122113221122112133221121113122113121113222123211211131211121311121321123113213221121113122113121113222113221113122113121113222112132113213221232112111312111213322112311311222113111221221113122112132113121113222112311311222113111221132221231221132221222112112322211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112211322212322211231131122211322111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211"; 56 case 27: 57 return "31131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321322123211211131211121332211231131122211311122122111312211213211312111322211231131122211311123113322112111331121113112221121113122113111231133221121113122113121113222123211211131211121332211213211321322113311213211322132112311321322112111312212321121113122122211211232221123113112221131112311332111213122112311311123112111331121113122112132113311213211321222122111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122211311123113322113223113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331221122311311222112111312211311123113322112132113213221133122211332111213112221133211322112211213322112111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122211331121321232221121113122113121122132112311321322112111312211312111322211213111213122112132113121113222112132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212311222122132113213221123113112221133112132123222112111312211312111322212321121113121112133221121311121312211213211312111322211213211321322123211211131211121332211213211321322113311213212312311211131122211213211331121321122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311222113111221221113122112132113121113222112132113213221133122211332111213322112132113213221132231131122211311123113322112111312211312111322212321121113122123211231131122113221123113221113122112132113213211121332212311322113212221"; 58 case 28: 59 return "13211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221232112111312211312113211223113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321322113311213212322211322132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212311222122132113213221123113112221133112132123222112111312211312111322212311322123123112111321322123122113222122211211232221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112311311222113111231133211121321321122111312211312111322211213211321322123211211131211121332211231131122211311123113321112131221123113111231121123222112111331121113112221121113122113111231133221121113122113121113221112131221123113111231121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113111231133221121321132132211331221122311311222112111312211311123113322112111312211312111322212311322123123112112322211211131221131211132221132213211321322113311213212322211231131122211311123113321112131221123113112211121312211213211321222113222112132113223113112221121113122113121113123112112322111213211322211312113211"; 60 case 29: 61 return "11131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211132221121311121312211213211312111322211213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211211131221131211132221231122212213211321322112311311222113311213212322211211131221131211132221232112111312111213322112131112131221121321131211132221121321132132212321121113121112133221121321132132211331121321231231121113112221121321133112132112211213322112311311222113111231133211121312211231131122211322311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122111213122112311311222113111221131221221321132132211331121321231231121113112221121321133112132112211213322112311311222113111231133211121312211231131122211322311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122111213122112311311222112111331121113112221121113122113121113222112132113213221232112111312111213322112311311222113111221221113122112132113121113222112311311222113111221132221231221132221222112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312111322212321121113121112133221132211131221131211132221232112111312111213322112132113213221133112132113221321123113213221121113122123211211131221222112112322211231131122211311123113321112132132112211131221131211132221121321132132212321121113121112133221123113112221131112311332111213211322111213111213211231131211132211121311222113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131211131221223113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331121321231231121113112221121321133112132112211213322112312321123113213221123113112221133112132123222112311311222113111231132231121113112221121321133112132112211213322112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122111213122112311311221132211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312111322212311222122132113213221123113112221133112132123222112311311222113111231133211121321132211121311121321122112133221123113112221131112311332211322111312211312111322212321121113121112133221121321132132211331121321231231121113112221121321132122311211131122211211131221131211322113322112111312211322132113213221123113112221131112311311121321122112132231121113122113322113111221131221"; 62 case 30: 63 return "3113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112311311222113111231133211121321321122111312211312111322211213211321322123211211131211121332211231131122211311123113321112131221123113111231121123222112111331121113112221121113122113111231133221121113122113121113221112131221123113111231121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321132132211322132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321223112111311222112132113213221133122211311221122111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321132132211322132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331222113321112131122211332113221122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213122112311311123112112322211322311311222113111231133211121312211231131112311211232221121113122113121113222123211211131221132211131221121321131211132221123113112211121312211231131122113221122112133221121321132132211331121321231231121113121113122122311311222113111231133221121113122113121113221112131221123113111231121123222112132113213221133112132123123112111312211322311211133112111312211213211311123113223112111321322123122113222122211211232221121113122113121113222123211211131211121311121321123113213221121113122123211211131221121311121312211213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121113222112131112131221121321131211132221121321132132211331121321232221123113112221131112311322311211131122211213211331121321122112133221121113122113121113222123112221221321132132211231131122211331121321232221121113122113121113222123211211131211121332211213111213122112132113121113222112132113213221232112111312111213322112132113213221133112132123123112111311222112132113311213211221121332211231131122211311123113321112131221123113112221132231131122211211131221131112311332211213211321223112111311222112132113212221132221222112112322211211131221131211132221232112111312111213111213211231131112311311221122132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121311121312211213211312111322211213211321322123211211131211121332211213211321322113311213211322132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113111231133221121321132122311211131122211213211321222113222122211211232221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213213211221113122113121113222112132113213221232112111312111213322112132113213221133112132123123112111312211322311211133112111312212221121123222112132113213221133112132123222113223113112221131112311332111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112211322212322211231131122211322111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211"; 64 } 65 } 66 }