//

var Cifri_mag = new Array(729)

var RRt = new Array (729)

var Azbuk_mag = new Array (729)

var C_mag = new Array (729)

var Azbuk_mag1 = new Array (729) // 1-

 

//

// 1-729

// 1-729,

 

var Cifri_mg1= new Array (14,379,42,407,70,435,98,463,126,491,154,519,182,547,210,575,238,603,266,631,294,659,322,687,350,715,378,405,41,406,69,434,97,462,125,490,153,518,181,546,209,574,237,602,265,630,293,658,321,686,349,714,377,13,40,432,68,433,96,461,124,489,152,517,180,545,208,573,236,601,264,629,292,657,320,685,348,713,376,12,404,431,67,459,95,460,123,488,151,516,179,544,207,572,235,600,263,628,291,656,319,684,347,712,375,11,403,39,66,458,94,486,122,487,150,515,178,543,206,571,234,599,262,627,290,655,318,683,346,711,374,10,402,38,430,457,93,485,121,513,149,514,177,542,205,570,233,598,261,626,289,654,317,682,345,710,373,9,401,37,429,65,92,484,120,512,148,540,176,541,204,569,232,597,260,625,288,653,316,681,344,709,372,8,400,36,428,64,456,483,119,511,147,539,175,567,203,568,231,596,259,624,287,652,315,680,343,708,371,7,399,35,427,63,455,91,118,510,146,538,174,566,202,594,230,595,258,623,286,651,314,679,342,707,370,6,398,34,426,62,454,90,482,509,145,537,173,565,201,593,229,621,257,622,285,650,313,678,341,706,369,5,397,33,425,61,453,89,481,117,144,536,172,564,200,592,228,620,256,648,284,649,312,677,340,705,368,4,396,32,424,60,452,88,480,116,508,535,171,563,199,591,227,619,255,647,283,675,311,676,339,704,367,3,395,31,423,59,451,87,479,115,507,143,170,562,198,590,226,618,254,646,282,674,310,702,338,703,366,2,394,30,422,58,450,86,478,114,506,142,534,561,197,589,225,617,253,645,281,673,309,701,337,729,365,1,393,29,421,57,449,85,477,113,505,141,533,169,196,28,224,56,252,84,280,112,308,140,336,168,364,27,392,588,420,616,448,644,476,672,504,700,532,728,560,223,55,251,83,279,111,307,139,335,167,363,195,391,26,54,587,419,615,447,643,475,671,503,699,531,727,559,222,82,250,110,278,138,306,166,334,194,362,25,390,53,418,81,446,614,474,642,502,670,530,698,558,726,586,249,109,277,137,305,165,333,193,361,221,389,24,52,417,80,445,108,473,613,501,641,529,669,557,697,585,725,248,136,276,164,304,192,332,220,360,23,388,51,416,79,444,472,107,500,135,528,640,556,668,584,696,612,724,163,275,191,303,219,331,247,359,22,387,50,415,78,443,106,471,134,499,162,527,639,555,667,583,695,611,723,274,190,302,218,330,246,358,21,386,49,414,77,442,105,470,133,498,161,526,189,554,666,582,694,610,722,638,217,301,245,329,273,357,20,385,48,413,76,441,104,469,132,497,160,525,188,553,216,581,665,609,693,637,721,300,244,328,272,356,19,384,47,412,75,440,103,468,131,496,159,524,187,552,215,580,243,608,692,636,720,664,271,327,299,355,18,383,46,411,74,439,102,467,130,495,158,523,186,551,214,579,242,607,270,635,691,663,719,326,298,354,17,382,45,410,73,438,101,466,129,494,157,522,185,550,213,578,241,606,269,634,297,662,718,690,325,353,16,381,44,409,72,437,100,465,128,493,156,521,184,549,212,577,240,605,268,633,296,661,324,689,717,352,15,380,43,408,71,436,99,464,127,492,155,520,183,548,211,576,239,604,267,632,295,660,323,688,351,716)

 

// 111-999

var Rb = new Array(111, 112, 113, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 136, 137, 138, 139, 141, 142, 143, 144, 145, 146, 147, 148, 149, 151, 152, 153, 154, 155, 156, 157, 158, 159, 161, 162, 163, 164, 165, 166, 167, 168, 169, 171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,191,192,193,194,195,196,197,198,199,211,212,213,214,215,216,217,218,219,221,222,223,224,225,226,227,228,229,231,232,233,234,235,236,237,238,239,241,242,243,244,245,246,247,248,249,251,252,253,254,255,256,257,258,259,261,262,263,264,265,266,267,268,269,271,272,273,274,275,276,277,278,279,281,282,283,284,285,286,287,288,289,291,292,293,294,295,296,297,298,299,311,312,313,314,315,316,317,318,319,321,322,323,324,325,326,327,328,329,331,332,333,334,335,336,337,338,339,341,342,343,344,345,346,347,348,349,351,352,353,354,355,356,357,358,359,361,362,363,364,365,366,367,368,369,371,372,373,374,375,376,377,378,379,381,382,383,384,385,386,387,388,389,391,392,393,394,395,396,397,398,399,411,412,413,414,415,416,417,418,419,421,422,423,424,425,426,427,428,429,431,432,433,434,435,436,437,438,439,441,442,443,444,445,446,447,448,449,451,452,453,454,455,456,457,458,459,461,462,463,464,465,466,467,468,469,471,472,473,474,475,476,477,478,479,481,482,483,484,485,486,487,488,489,491,492,493,494,495,496,497,498,499,511,512,513,514,515,516,517,518,519,521,522,523,524,525,526,527,528,529,531,532,533,534,535,536,537,538,539,541,542,543,544,545,546,547,548,549,551,552,553,554,555,556,557,558,559,561,562,563,564,565,566,567,568,569,571,572,573,574,575,576,577,578,579,581,582,583,584,585,586,587,588,589,591,592,593,594,595,596,597,598,599,611,612,613,614,615,616,617,618,619,621,622,623,624,625,626,627,628,629,631,632,633,634,635,636,637,638,639,641,642,643,644,645,646,647,648,649,651,652,653,654,655,656,657,658,659,661,662,663,664,665,666,667,668,669,671,672,673,674,675,676,677,678,679,681,682,683,684,685,686,687,688,689,691,692,693,694,695,696,697,698,699,711,712,713,714,715,716,717,718,719,721,722,723,724,725,726,727,728,729,731,732,733,734,735,736,737,738,739,741,742,743,744,745,746,747,748,749,751,752,753,754,755,756,757,758,759,761,762,763,764,765,766,767,768,769,771,772,773,774,775,776,777,778,779,781,782,783,784,785,786,787,788,789,791,792,793,794,795,796,797,798,799,811,812,813,814,815,816,817,818,819,821,822,823,824,825,826,827,828,829,831,832,833,834,835,836,837,838,839,841,842,843,844,845,846,847,848,849,851,852,853,854,855,856,857,858,859,861,862,863,864,865,866,867,868,869,871,872,873,874,875,876,877,878,879,881,882,883,884,885,886,887,888,889,891,892,893,894,895,896,897,898,899,911,912,913,914,915,916,917,918,919,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,941,942,943,944,945,946,947,948,949,951,952,953,954,955,956,957,958,959,961,962,963,964,965,966,967,968,969,971,972,973,974,975,976,977,978,979,981,982,983,984,985,986,987,988,989,991,992,993,994,995,996,997,998,999);

 

// 1-729 ()

var Cifri_mg2 = new Array(380, 409, 438, 467, 496, 525, 554, 583, 612, 641, 670, 699, 728, 1, 30, 59, 88, 117, 146, 175, 204, 233, 262, 291, 320, 349, 378,408, 437, 466, 495, 524, 553, 582, 611, 640, 669, 698, 727, 27, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290, 319, 348, 377, 379,436, 465, 494, 523, 552, 581, 610, 639, 668, 697, 726, 26, 28, 57, 86, 115, 144, 173, 202, 231, 260, 289, 318, 347, 376, 405, 407,464, 493, 522, 551, 580, 609, 638, 667, 696, 725, 25, 54, 56, 85, 114, 143, 172, 201, 230, 259, 288, 317, 346, 375, 404, 406, 435,492, 521, 550, 579, 608, 637, 666, 695, 724, 24, 53, 55, 84, 113, 142, 171, 200, 229, 258, 287, 316, 345, 374, 403, 432, 434, 463,520, 549, 578, 607, 636, 665, 694, 723, 23, 52, 81, 83, 112, 141, 170, 199, 228, 257, 286, 315, 344, 373, 402, 431, 433, 462, 491,548, 577, 606, 635, 664, 693, 722, 22, 51, 80, 82, 111, 140, 169, 198, 227, 256, 285, 314, 343, 372, 401, 430, 459, 461, 490, 519,576, 605, 634, 663, 692, 721, 21, 50, 79, 108, 110, 139, 168, 197, 226, 255, 284, 313, 342, 371, 400, 429, 458, 460, 489, 518, 547,604, 633, 662, 691, 720, 20, 49, 78, 107, 109, 138, 167, 196, 225, 254, 283, 312, 341, 370, 399, 428, 457, 486, 488, 517, 546, 575,632, 661, 690, 719, 19, 48, 77, 106, 135, 137, 166, 195, 224, 253, 282, 311, 340, 369, 398, 427, 456, 485, 487, 516, 545, 574, 603,660, 689, 718, 18, 47, 76, 105, 134, 136, 165, 194, 223, 252, 281, 310, 339, 368, 397, 426, 455, 484, 513, 515, 544, 573, 602, 631,688, 717, 17, 46, 75, 104, 133, 162, 164, 193, 222, 251, 280, 309, 338, 367, 396, 425, 454, 483, 512, 514, 543, 572, 601, 630, 659,716, 16, 45, 74, 103, 132, 161, 163, 192, 221, 250, 279, 308, 337, 366, 395, 424, 453, 482, 511, 540, 542, 571, 600, 629, 658, 687,15, 44, 73, 102, 131, 160, 189, 191, 220, 249, 278, 307, 336, 365, 394, 423, 452, 481, 510, 539, 541, 570, 599, 628, 657, 686, 715,43, 72, 101, 130, 159, 188, 190, 219, 248, 277, 306, 335, 364, 393, 422, 451, 480, 509, 538, 567, 569, 598, 627, 656, 685, 714, 14,71, 100, 129, 158, 187, 216, 218, 247, 276, 305, 334, 363, 392, 421, 450, 479, 508, 537, 566, 568, 597, 626, 655, 684, 713, 13, 42,99, 128, 157, 186, 215, 217, 246, 275, 304, 333, 362, 391, 420, 449, 478, 507, 536, 565, 594, 596, 625, 654, 683, 712, 12, 41, 70,127, 156, 185, 214, 243, 245, 274, 303, 332, 361, 390, 419, 448, 477, 506, 535, 564, 593, 595, 624, 653, 682, 711, 11, 40, 69, 98,155, 184, 213, 242, 244, 273, 302, 331, 360, 389, 418, 447, 476, 505, 534, 563, 592, 621, 623, 652, 681, 710, 10, 39, 68, 97, 126,183, 212, 241, 270, 272, 301, 330, 359, 388, 417, 446, 475, 504, 533, 562, 591, 620, 622, 651, 680, 709, 9, 38, 67, 96, 125, 154,211, 240, 269, 271, 300, 329, 358, 387, 416, 445, 474, 503, 532, 561, 590, 619, 648, 650, 679, 708, 8, 37, 66, 95, 124, 153, 182,239, 268, 297, 299, 328, 357, 386, 415, 444, 473, 502, 531, 560, 589, 618, 647, 649, 678, 707, 7, 36, 65, 94, 123, 152, 181, 210,267, 296, 298, 327, 356, 385, 414, 443, 472, 501, 530, 559, 588, 617, 646, 675, 677, 706, 6, 35, 64, 93, 122, 151, 180, 209, 238,295, 324, 326, 355, 384, 413, 442, 471, 500, 529, 558, 587, 616, 645, 674, 676, 705, 5, 34, 63, 92, 121, 150, 179, 208, 237, 266,323, 325, 354, 383, 412, 441, 470, 499, 528, 557, 586, 615, 644, 673, 702, 704, 4, 33, 62, 91, 120, 149, 178, 207, 236, 265, 294,351, 353, 382, 411, 440, 469, 498, 527, 556, 585, 614, 643, 672, 701, 703, 3, 32, 61, 90, 119, 148, 177, 206, 235, 264, 293, 322,352, 381, 410, 439, 468, 497, 526, 555, 584, 613, 642, 671, 700, 729, 2, 31, 60, 89, 118, 147, 176, 205, 234, 263, 292, 321, 350);

 

// 111-999 ()

var Cifri_mag1 = new Array(125,571,156,612,187,643,228,674,259,715,291,746,332,777,363,818,394,849,435,881,466,922,497,953,538,984,569,599,155,611,186,642,227,673,258,714,289,745,331,776,362,817,393,848,434,879,465,921,496,952,537,983,568,124,154,639,185,641,226,672,257,713,288,744,329,775,361,816,392,847,433,878,464,919,495,951,536,982,567,123,598,638,184,669,225,671,256,712,287,743,328,774,359,815,391,846,432,877,463,918,494,949,535,981,566,122,597,153,183,668,224,699,255,711,286,742,327,773,358,814,389,845,431,876,462,917,493,948,534,979,565,121,596,152,637,667,223,698,254,739,285,741,326,772,357,813,388,844,429,875,461,916,492,947,533,978,564,119,595,151,636,182,222,697,253,738,284,769,325,771,356,812,387,843,428,874,459,915,491,946,532,977,563,118,594,149,635,181,666,696,252,737,283,768,324,799,355,811,386,842,427,873,458,914,489,945,531,976,562,117,593,148,634,179,665,221,251,736,282,767,323,798,354,839,385,841,426,872,457,913,488,944,529,975,561,116,592,147,633,178,664,219,695,735,281,766,322,797,353,838,384,869,425,871,456,912,487,943,528,974,559,115,591,146,632,177,663,218,694,249,279,765,321,796,352,837,383,868,424,899,455,911,486,942,527,973,558,114,589,145,631,176,662,217,693,248,734,764,319,795,351,836 ,382,867,423,898,454,939,485,941,526,972,557,113,588,144,629,175,661,216,692,247,733,278,318,794,349,835,381,866,422,897,453,938,484,969,525,971,556,112,587,143,628,174,659,215,691,246,732,277,763,793,348,834,379,865,421,896,452,937,483,968,524,999,555,111,586,142,627,173,658,214,689,245,731,276,762,317,347,833,378,864,419,895,451,936,482,967,523,998,554,139,585,141,626,172,657,213,688,244,729,275,761,316,792,832,377,863,418,894,449,935,481,966,522,997,553,138,584,169,625,171,656,212,687,243,728,274,759,315,791,346,376,862,417,893,448,934,479,965,521,996,552,137,583,168,624,199,655,211,686,242,727,273,758,314,789,345,831,861,416,892,447,933,478,964,519,995,551,136,582,167,623,198,654,239,685,241,726,272,757,313,788,344,829,375,415,891,446,932,477,963,518,994,549,135,581,166,622,197,653,238,684,269,725,271,756,312,787,343,828,374,859,889,445,931,476,962,517,993,548,134,579,165,621,196,652,237,683,268,724,299,755,311,786,342,827,373,858,414,444,929,475,961,516,992,547,133,578,164,619,195,651,236,682,267,723,298,754,339,785,341,826,372,857,413,888,928,474,959,515,991,546,132,577,163,618,194,649,235,681,266,722,297,753,338,784,369,825,371,856,412,887,443,473,958,514,989,545,131,576,162,617,193,648,234,679,265,721,296,752,337,783,368,824,399,855,411,886,442,927,957,513,988,544,129,575,161,616,192,647,233,678,264,719,295,751,336,782,367,823,398,854,439,885,441,926,472,512,987,543,128,574,159,615,191,646,232,677,263,718,294,749,335,781,366,822,397,853,438,884,469,925,471,956,986,542,127,573,158,614,189,645,231,676,262,717,293,748,334,779,365,821,396,852,437,883,468,924,499,955,511,541,126,572,157,613,188,644,229,675,261,716,292,747,333,778,364,819,395,851,436,882,467,923,498,954,539,985)

// 111-999 ()

var Cifri_mag2 = new Array(572,614,646,678,721,753,785,827,859,892,934,966,998,111,143,175,217,249,282,324,356,388,431,463,495,537,569,613,645,677,719,752,784,826,858,891,933,965,997,139,142,174,216,248,281,323,355,387,429,462,494,536,568,571,644,676,718,751,783,825,857,889,932,964,996,138,141,173,215,247,279,322,354,386,428,461,493,535,567,599,612,675,717,749,782,824,856,888,931,963,995,137,169,172,214,246,278,321,353,385,427,459,492,534,566,598,611,643,716,748,781,823,855,887,929,962,994,136,168,171,213,245,277,319,352,384,426,458,491,533,565,597,639,642,674,747,779,822,854,886,928,961,993,135,167,199,212,244,276,318,351,383,425,457,489,532,564,596,638,641,673,715,778,821,853,885,927,959,992,134,166,198,211,243,275,317,349,382,424,456,488,531,563,595,637,669,672,714,746,819,852,884,926,958,991,133,165,197,239,242,274,316,348,381,423,455,487,529,562,594,636,668,671,713,745,777,851,883,925,957,989,132,164,196,238,241,273,315,347,379,422,454,486,528,561,593,635,667,699,712,744,776,818,882,924,956,988,131,163,195,237,269,272,314,346,378,421,453,485,527,559,592,634,666,698,711,743,775,817,849,923,955,987,129,162,194,236,268,271,313,345,377,419,452,484,526,558,591,633,665,697,739,742,774,816,848,881,954,986,128,161,193,235,267,299,312,344,376,418,451,483,525,557,589,632,664,696,738,741,773,815,847,879,922,985,127,159,192,234,266,298,311,343,375,417,449,482,524,556,588,631,663,695,737,769,772,814,846,878,921,953,126,158,191,233,265,297,339,342,374,416,448,481,523,555,587,629,662,694,736,768,771,813,845,877,919,952,984,157,189,232,264,296,338,341,373,415,447,479,522,554,586,628,661,693,735,767,799,812,844,876,918,951,983,125,188,231,263,295,337,369,372,414,446,478,521,553,585,627,659,692,734,766,798,811,843,875,917,949,982,124,156,229,262,294,336,368,371,413,445,477,519,552,584,626,658,691,733,765,797,839,842,874,916,948,981,123,155,187,261,293,335,367,399,412,444,476,518,551,583,625,657,689,732,764,796,838,841,873,915,947,979,122,154,186,228,292,334,366,398,411,443,475,517,549,582,624,656,688,731,763,795,837,869,872,914,946,978,121,153,185,227,259,333,365,397,439,442,474,516,548,581,623,655,687,729,762,794,836,868,871,913,945,977,119,152,184,226,258,291,364,396,438,441,473,515,547,579,622,654,686,728,761,793,835,867,899,912,944,976,118,151,183,225,257,289,332,395,437,469,472,514,546,578,621,653,685,727,759,792,834,866,898,911,943,975,117,149,182,224,256,288,331,363,436,468,471,513,545,577,619,652,684,726,758,791,833,865,897,939,942,974,116,148,181,223,255,287,329,362,394,467,499,512,544,576,618,651,683,725,757,789,832,864,896,938,941,973,115,147,179,222,254,286,328,361,393,435,498,511,543,575,617,649,682,724,756,788,831,863,895,937,969,972,114,146,178,221,253,285,327,359,392,434,466,539,542,574,616,648,681,723,755,787,829,862,894,936,968,971,113,145,177,219,252,284,326,358,391,433,465,497,541,573,615,647,679,722,754,786,828,861,893,935,967,999,112,144,176,218,251,283,325,357,389,432,464,496,538)

 

//

 

// 0)

var Azbuk = new Array("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","")

 

// 1) 1-

var Azbuk_mag1 = new Array("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","")

 

//

 

// 2) 2-

var Azbuk_mag2 = new Array( "","","","","","","","","","","","","","","","","","","","","","","","","","","", "","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","")

 

 

 

// VbsMsg ("sv1=" + sv1);

 

//

 

/*

for ( var n=1; n <=729 ; n++ ) {

for ( var k = 0; k < 729 ; k++ ) {

var nj = Cifri_mg1[k]

if (n == nj) Azbuk_mag1[k] = Azbuk[n-1]

}

}

*/

 

n1 = Vector.LastNmb+1

 

//

var k=0; var xi=-13.5; var yj=-13.5;

for ( var j=0; j < 27 ; j++ ) {

var xi=-13.5;

for ( var i=0; i < 27 ; i++ ) {

var A = Vector.p(xi,-yj,0)

// Vector.Text.ss (A, Rb[k]) // 111-999

// Vector.Text.ss (A, Cifri_mg1[k]) // 1-729 1-

// Vector.Text.ss (A, Cifri_mg1[k]) // 1-729 2-

// Vector.Text.ss (A, Cifri_mag1[k]) // 111-999 1-

// Vector.Text.ss (A, Cifri_mag2[k]) // 111-999 2-

// Vector.Text.ss (A, Azbuk[k]) //

// Vector.Text.ss (A, Azbuk_mag1[k]) // . 1-

Vector.Text.ss (A, Azbuk_mag2[k]) // 2-

// Vector.Text.ss (A, Rb[k])

 

k=k+1

xi = xi+ 1;

}

yj = yj+1;

}

n2 = Vector.LastNmb+1

var gr;

Vector.MoveToGroup (n1, n2, "gr")

// Vector.obj.All = 1; //

//Vector.Obj.Translate (Vector.p(-13.5, -12.5, 0))

 

 

n3 = Vector.LastNmb+1

 

//

var P1 = Vector.p(-13.5,-13.5,0)

var P2 = Vector.p(13.5,-13.5,0)

var P3 = Vector.p(13.5,13.5,0)

var P4 = Vector.p(-13.5,13.5,0)

 

var yi=-13.5

for ( var i=0; i <=27 ; i++ ) {

Vector.Otrezok.ss (Vector.p(-13.5,yi,0),Vector.p(13.5,yi,0))

yi=yi+1

}

 

var xi=-13.5

for ( var i=0; i <= 27 ; i++ ) {

Vector.Otrezok.ss (Vector.p(xi,-13.5,0),Vector.p(xi,13.5,0))

xi=xi+1

}

n4 = Vector.LastNmb+1

 

var gr2;

Vector.MoveToGroup (n3, n4, "gr2")

 

Vector.obj.All = 1;

//Vector.Obj.Translate (Vector.p(-15, -15, 0))

Vector.obj.scale = 0.8

 

 

/*

var Azbuk_mag1 = new Array("","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","",

"","","","","","","","","","","","","","","","","","","","","","","","","","","")

*/

 

var Mas_1 = new Array (99);

var Mas_2 = new Array (99);

var Mas_3 = new Array (99);

var Mas_4 = new Array (99);

var Mas_5 = new Array (99);

var Mas_6 = new Array (99);

var Mas_7 = new Array (99);

var Mas_8 = new Array (99);

var Mas_9 = new Array (99);

var Mas_10 = new Array (99);

var Mas_11 = new Array (99);

var Mas_12 = new Array (99);

var Mas_13 = new Array (99);

var Mas_14 = new Array (99);

var Mas_15 = new Array (99);

var Mas_16 = new Array (99);

var Mas_17 = new Array (99);

var Mas_18 = new Array (99);

var Mas_19 = new Array (99);

var Mas_20 = new Array (99);

var Mas_21 = new Array (99);

var Mas_22 = new Array (99);

var Mas_23 = new Array (99);

var Mas_24 = new Array (99);

var Mas_25 = new Array (99);

var Mas_26 = new Array (99);

var Mas_27 = new Array (99);

var Mas_28 = new Array (99);

var Mas_29 = new Array (99);

var Mas_30 = new Array (99);

var Mas_31 = new Array (99);

var Mas_32 = new Array (99);

var Mas_33 = new Array (99);

 

var k1=0; var k2=0; var k3=0; var k4=0; var k5=0; var k6=0; var k7=0; var k8=0; var k9=0; var k10=0;

var k11=0; var k12=0; var k13=0; var k14=0; var k15=0; var k16=0; var k17=0; var k18=0; var k19=0; var k20=0;

var k21=0; var k22=0; var k23=0; var k24=0; var k25=0; var k26=0; var k27=0; var k28=0; var k29=0; var k30=0;

var k31=0; var k32=0; var k33=0;

 

for ( var n=0; n < 729 ; n++ ) {

var nj =Azbuk[n];

if (nj == "") { Mas_1[k1] = Rb[n]; k1=k1+1;}

if (nj == "") { Mas_2[k2] = Rb[n]; k2=k2+1;}

if (nj == "") { Mas_3[k3] = Rb[n]; k3=k3+1;}

if (nj == "") { Mas_4[k3] = Rb[n]; k4=k4+1;}

if (nj == "") { Mas_5[k3] = Rb[n]; k5=k5+1;}

if (nj == "") { Mas_6[k3] = Rb[n]; k6=k6+1;}

if (nj == "") { Mas_7[k3] = Rb[n]; k7=k7+1;}

if (nj == "") { Mas_8[k3] = Rb[n]; k8=k8+1;}

if (nj == "") { Mas_9[k3] = Rb[n]; k9=k9+1;}

if (nj == "") { Mas_10[k3] = Rb[n]; k10=k10+1;}

if (nj == "") { Mas_11[k3] = Rb[n]; k11=k11+1;}

if (nj == "") { Mas_12[k3] = Rb[n]; k12=k12+1;}

if (nj == "") { Mas_13[k3] = Rb[n]; k13=k13+1;}

if (nj == "") { Mas_14[k3] = Rb[n]; k14=k14+1;}

if (nj == "") { Mas_15[k3] = Rb[n]; k15=k15+1;}

if (nj == "") { Mas_16[k3] = Rb[n]; k16=k16+1;}

if (nj == "") { Mas_17[k3] = Rb[n]; k17=k17+1;}

if (nj == "") { Mas_18[k3] = Rb[n]; k18=k18+1;}

if (nj == "") { Mas_19[k3] = Rb[n]; k19=k19+1;}

if (nj == "") { Mas_20[k3] = Rb[n]; k20=k20+1;}

if (nj == "") { Mas_21[k3] = Rb[n]; k21=k21+1;}

if (nj == "") { Mas_22[k3] = Rb[n]; k22=k22+1;}

if (nj == "") { Mas_23[k3] = Rb[n]; k23=k23+1;}

if (nj == "") { Mas_24[k3] = Rb[n]; k24=k24+1;}

if (nj == "") { Mas_25[k3] = Rb[n]; k25=k25+1;}

if (nj == "") { Mas_26[k3] = Rb[n]; k26=k26+1;}

if (nj == "") { Mas_27[k3] = Rb[n]; k27=k27+1;}

if (nj == "") { Mas_28[k3] = Rb[n]; k28=k28+1;}

if (nj == "") { Mas_29[k3] = Rb[n]; k29=k29+1;}

if (nj == "") { Mas_30[k3] = Rb[n]; k30=k30+1;}

if (nj == "") { Mas_31[k3] = Rb[n]; k31=k31+1;}

if (nj == "") { Mas_32[k3] = Rb[n]; k32=k32+1;}

if (nj == "") { Mas_33[k3] = Rb[n]; k33=k33+1;}

}

 

 

 

//VbsMsg ("Mas_1[35]=" + Mas_1[35]);

/*

VbsMsg ("k1 =" + k1); // k1=36

VbsMsg ("k2 =" + k2); // k2=27

VbsMsg ("k3 =" + k3); // k3=27

VbsMsg ("k4 =" + k4); // k4=27

VbsMsg ("k5 =" + k5); // k5=27

VbsMsg ("k6 =" + k6); // k6=36

VbsMsg ("k7 =" + k7); // k7=18

VbsMsg ("k8 =" + k8); // k8=27

VbsMsg ("k9 =" + k9); // k9=27

VbsMsg ("k10 =" + k10); // k10=36

VbsMsg ("k11 =" + k11); // k11=9

VbsMsg ("k12 =" + k12); // k12=27

VbsMsg ("k13 =" + k13); // k13=27

VbsMsg ("k14 =" + k14); // k14=27

VbsMsg ("k15 =" + k15); // k15=27

VbsMsg ("k16 =" + k16); // k16=27

VbsMsg ("k17 =" + k17); // k17=18

VbsMsg ("k18 =" + k18); // k18=18

VbsMsg ("k19 =" + k19); // k19=27

VbsMsg ("k20 =" + k20); // k20=18

VbsMsg ("k21 =" + k21); // k21=27

VbsMsg ("k22 =" + k22); // k22=18

VbsMsg ("k23 =" + k23); // k23=18

VbsMsg ("k24 =" + k24); // k24=9

VbsMsg ("k25 =" + k25); // k25=18

VbsMsg ("k26 =" + k26); // k26=18

VbsMsg ("k27 =" + k27); // k27=18

VbsMsg ("k28 =" + k28); // k28=9

VbsMsg ("k29 =" + k29); // k29=18

VbsMsg ("k30 =" + k30); // k30=9

VbsMsg ("k31 =" + k31); // k31=18

VbsMsg ("k32 =" + k32); // k32=18

VbsMsg ("k33 =" + k33); // k33=18

*/

 

var z1 = randow_number(0, k1);

var z2 = randow_number(0, k2);

var z3 = randow_number(0, k3);

var z4 = randow_number(0, k4);

var z5 = randow_number(0, k5);

var z6 = randow_number(0, k6);

var z7 = randow_number(0, k7);

var z8 = randow_number(0, k8);

var z9 = randow_number(0, k9);

var z10 = randow_number(0, k10);

var z11 = randow_number(0, k11);

var z12 = randow_number(0, k12);

var z13 = randow_number(0, k13);

var z14 = randow_number(0, k14);

var z15 = randow_number(0, k15);

var z16 = randow_number(0, k16);

var z17 = randow_number(0, k17);

var z18 = randow_number(0, k18);

var z19 = randow_number(0, k19);

var z20 = randow_number(0, k20);

var z21 = randow_number(0, k21);

var z22 = randow_number(0, k22);

var z23 = randow_number(0, k23);

var z24 = randow_number(0, k24);

var z25 = randow_number(0, k25);

var z26 = randow_number(0, k26);

var z27 = randow_number(0, k27);

var z28 = randow_number(0, k28);

var z29 = randow_number(0, k29);

var z30 = randow_number(0, k30);

var z31 = randow_number(0, k31);

var z32 = randow_number(0, k32);

var z33 = randow_number(0, k33);

 

/*

VbsMsg ("z1 =" + z1);

VbsMsg ("Mas_1[z1]=" + Mas_1[z1]);

 

VbsMsg ("z10 =" + z10);

VbsMsg ("Mas_10[z10]=" + Mas_10[z10]);

*/

 

function randow_number(lower_bound, upper_bound){

var initial_random =(upper_bound - lower_bound +1)*Math.random() + lower_bound

return Math.floor(initial_random)

}