From 15d96c1c3cfd113bd4d8beef5f763f986a626f70 Mon Sep 17 00:00:00 2001 From: carlosdelest Date: Wed, 7 Aug 2024 19:07:50 +0200 Subject: [PATCH] Change to field name pattern, trying to get UnresolvedAttribute from it --- .../esql/src/main/antlr/EsqlBaseParser.g4 | 4 ++-- .../xpack/esql/parser/EsqlBaseParser.interp | 2 +- .../xpack/esql/parser/EsqlBaseParser.java | 24 +++++++++++-------- .../xpack/esql/parser/LogicalPlanBuilder.java | 4 +++- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 index e9c81f808dab3..f42a05a3a1da7 100644 --- a/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 +++ b/x-pack/plugin/esql/src/main/antlr/EsqlBaseParser.g4 @@ -315,7 +315,7 @@ parsedMatchQuery ; queryStringFields - : fieldName=UNQUOTED_IDENTIFIER COLON queryStringNoFields + : fieldName=qualifiedNamePattern COLON queryStringNoFields ; queryStringNoFields @@ -329,5 +329,5 @@ fieldQueryStringExpression // TODO Define a lexer rule for query terms and fields - probably we can't tell each other apart queryStringTerm - : UNQUOTED_IDENTIFIER + : qualifiedNamePattern ; diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp index fa62710be9444..57e8352d35449 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.interp @@ -326,4 +326,4 @@ queryStringTerm atn: -[4, 1, 126, 617, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 142, 8, 1, 10, 1, 12, 1, 145, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 153, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 170, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 183, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 190, 8, 5, 10, 5, 12, 5, 193, 9, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 200, 8, 5, 1, 5, 1, 5, 3, 5, 204, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 212, 8, 5, 10, 5, 12, 5, 215, 9, 5, 1, 6, 1, 6, 3, 6, 219, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 226, 8, 6, 1, 6, 1, 6, 1, 6, 3, 6, 231, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 242, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 248, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 256, 8, 9, 10, 9, 12, 9, 259, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 269, 8, 10, 1, 10, 1, 10, 1, 10, 5, 10, 274, 8, 10, 10, 10, 12, 10, 277, 9, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 285, 8, 11, 10, 11, 12, 11, 288, 9, 11, 3, 11, 290, 8, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 5, 14, 302, 8, 14, 10, 14, 12, 14, 305, 9, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 312, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 318, 8, 16, 10, 16, 12, 16, 321, 9, 16, 1, 16, 3, 16, 324, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 331, 8, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 339, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 345, 8, 21, 10, 21, 12, 21, 348, 9, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 358, 8, 23, 10, 23, 12, 23, 361, 9, 23, 1, 23, 3, 23, 364, 8, 23, 1, 23, 1, 23, 3, 23, 368, 8, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 3, 25, 375, 8, 25, 1, 25, 1, 25, 3, 25, 379, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 385, 8, 26, 1, 27, 1, 27, 1, 27, 5, 27, 390, 8, 27, 10, 27, 12, 27, 393, 9, 27, 1, 28, 1, 28, 1, 28, 5, 28, 398, 8, 28, 10, 28, 12, 28, 401, 9, 28, 1, 29, 1, 29, 1, 29, 5, 29, 406, 8, 29, 10, 29, 12, 29, 409, 9, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 428, 8, 32, 10, 32, 12, 32, 431, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 439, 8, 32, 10, 32, 12, 32, 442, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 450, 8, 32, 10, 32, 12, 32, 453, 9, 32, 1, 32, 1, 32, 3, 32, 457, 8, 32, 1, 33, 1, 33, 3, 33, 461, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 5, 35, 470, 8, 35, 10, 35, 12, 35, 473, 9, 35, 1, 36, 1, 36, 3, 36, 477, 8, 36, 1, 36, 1, 36, 3, 36, 481, 8, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 493, 8, 39, 10, 39, 12, 39, 496, 9, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 506, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 5, 44, 518, 8, 44, 10, 44, 12, 44, 521, 9, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 3, 47, 531, 8, 47, 1, 48, 3, 48, 534, 8, 48, 1, 48, 1, 48, 1, 49, 3, 49, 539, 8, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 564, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 570, 8, 56, 10, 56, 12, 56, 573, 9, 56, 3, 56, 575, 8, 56, 1, 57, 1, 57, 1, 57, 3, 57, 580, 8, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 3, 59, 592, 8, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 4, 63, 607, 8, 63, 11, 63, 12, 63, 608, 3, 63, 611, 8, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 0, 4, 2, 10, 18, 20, 66, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 0, 8, 1, 0, 65, 66, 1, 0, 67, 69, 2, 0, 26, 26, 31, 31, 1, 0, 73, 74, 2, 0, 36, 36, 40, 40, 2, 0, 43, 43, 46, 46, 2, 0, 42, 42, 57, 57, 2, 0, 58, 58, 60, 64, 639, 0, 132, 1, 0, 0, 0, 2, 135, 1, 0, 0, 0, 4, 152, 1, 0, 0, 0, 6, 169, 1, 0, 0, 0, 8, 171, 1, 0, 0, 0, 10, 203, 1, 0, 0, 0, 12, 230, 1, 0, 0, 0, 14, 232, 1, 0, 0, 0, 16, 241, 1, 0, 0, 0, 18, 247, 1, 0, 0, 0, 20, 268, 1, 0, 0, 0, 22, 278, 1, 0, 0, 0, 24, 293, 1, 0, 0, 0, 26, 295, 1, 0, 0, 0, 28, 298, 1, 0, 0, 0, 30, 311, 1, 0, 0, 0, 32, 313, 1, 0, 0, 0, 34, 330, 1, 0, 0, 0, 36, 332, 1, 0, 0, 0, 38, 334, 1, 0, 0, 0, 40, 338, 1, 0, 0, 0, 42, 340, 1, 0, 0, 0, 44, 349, 1, 0, 0, 0, 46, 353, 1, 0, 0, 0, 48, 369, 1, 0, 0, 0, 50, 372, 1, 0, 0, 0, 52, 380, 1, 0, 0, 0, 54, 386, 1, 0, 0, 0, 56, 394, 1, 0, 0, 0, 58, 402, 1, 0, 0, 0, 60, 410, 1, 0, 0, 0, 62, 412, 1, 0, 0, 0, 64, 456, 1, 0, 0, 0, 66, 460, 1, 0, 0, 0, 68, 462, 1, 0, 0, 0, 70, 465, 1, 0, 0, 0, 72, 474, 1, 0, 0, 0, 74, 482, 1, 0, 0, 0, 76, 485, 1, 0, 0, 0, 78, 488, 1, 0, 0, 0, 80, 497, 1, 0, 0, 0, 82, 501, 1, 0, 0, 0, 84, 507, 1, 0, 0, 0, 86, 511, 1, 0, 0, 0, 88, 514, 1, 0, 0, 0, 90, 522, 1, 0, 0, 0, 92, 526, 1, 0, 0, 0, 94, 530, 1, 0, 0, 0, 96, 533, 1, 0, 0, 0, 98, 538, 1, 0, 0, 0, 100, 542, 1, 0, 0, 0, 102, 544, 1, 0, 0, 0, 104, 546, 1, 0, 0, 0, 106, 549, 1, 0, 0, 0, 108, 553, 1, 0, 0, 0, 110, 556, 1, 0, 0, 0, 112, 559, 1, 0, 0, 0, 114, 579, 1, 0, 0, 0, 116, 583, 1, 0, 0, 0, 118, 588, 1, 0, 0, 0, 120, 593, 1, 0, 0, 0, 122, 595, 1, 0, 0, 0, 124, 597, 1, 0, 0, 0, 126, 610, 1, 0, 0, 0, 128, 612, 1, 0, 0, 0, 130, 614, 1, 0, 0, 0, 132, 133, 3, 2, 1, 0, 133, 134, 5, 0, 0, 1, 134, 1, 1, 0, 0, 0, 135, 136, 6, 1, -1, 0, 136, 137, 3, 4, 2, 0, 137, 143, 1, 0, 0, 0, 138, 139, 10, 1, 0, 0, 139, 140, 5, 30, 0, 0, 140, 142, 3, 6, 3, 0, 141, 138, 1, 0, 0, 0, 142, 145, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 3, 1, 0, 0, 0, 145, 143, 1, 0, 0, 0, 146, 153, 3, 104, 52, 0, 147, 153, 3, 32, 16, 0, 148, 153, 3, 26, 13, 0, 149, 153, 3, 46, 23, 0, 150, 153, 3, 108, 54, 0, 151, 153, 3, 110, 55, 0, 152, 146, 1, 0, 0, 0, 152, 147, 1, 0, 0, 0, 152, 148, 1, 0, 0, 0, 152, 149, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 152, 151, 1, 0, 0, 0, 153, 5, 1, 0, 0, 0, 154, 170, 3, 48, 24, 0, 155, 170, 3, 52, 26, 0, 156, 170, 3, 68, 34, 0, 157, 170, 3, 116, 58, 0, 158, 170, 3, 74, 37, 0, 159, 170, 3, 70, 35, 0, 160, 170, 3, 50, 25, 0, 161, 170, 3, 8, 4, 0, 162, 170, 3, 76, 38, 0, 163, 170, 3, 78, 39, 0, 164, 170, 3, 82, 41, 0, 165, 170, 3, 84, 42, 0, 166, 170, 3, 112, 56, 0, 167, 170, 3, 86, 43, 0, 168, 170, 3, 118, 59, 0, 169, 154, 1, 0, 0, 0, 169, 155, 1, 0, 0, 0, 169, 156, 1, 0, 0, 0, 169, 157, 1, 0, 0, 0, 169, 158, 1, 0, 0, 0, 169, 159, 1, 0, 0, 0, 169, 160, 1, 0, 0, 0, 169, 161, 1, 0, 0, 0, 169, 162, 1, 0, 0, 0, 169, 163, 1, 0, 0, 0, 169, 164, 1, 0, 0, 0, 169, 165, 1, 0, 0, 0, 169, 166, 1, 0, 0, 0, 169, 167, 1, 0, 0, 0, 169, 168, 1, 0, 0, 0, 170, 7, 1, 0, 0, 0, 171, 172, 5, 20, 0, 0, 172, 173, 3, 10, 5, 0, 173, 9, 1, 0, 0, 0, 174, 175, 6, 5, -1, 0, 175, 176, 5, 50, 0, 0, 176, 204, 3, 10, 5, 8, 177, 204, 3, 16, 8, 0, 178, 204, 3, 12, 6, 0, 179, 204, 3, 14, 7, 0, 180, 182, 3, 16, 8, 0, 181, 183, 5, 50, 0, 0, 182, 181, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 5, 44, 0, 0, 185, 186, 5, 48, 0, 0, 186, 191, 3, 16, 8, 0, 187, 188, 5, 39, 0, 0, 188, 190, 3, 16, 8, 0, 189, 187, 1, 0, 0, 0, 190, 193, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 194, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 194, 195, 5, 56, 0, 0, 195, 204, 1, 0, 0, 0, 196, 197, 3, 16, 8, 0, 197, 199, 5, 45, 0, 0, 198, 200, 5, 50, 0, 0, 199, 198, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 51, 0, 0, 202, 204, 1, 0, 0, 0, 203, 174, 1, 0, 0, 0, 203, 177, 1, 0, 0, 0, 203, 178, 1, 0, 0, 0, 203, 179, 1, 0, 0, 0, 203, 180, 1, 0, 0, 0, 203, 196, 1, 0, 0, 0, 204, 213, 1, 0, 0, 0, 205, 206, 10, 4, 0, 0, 206, 207, 5, 35, 0, 0, 207, 212, 3, 10, 5, 5, 208, 209, 10, 3, 0, 0, 209, 210, 5, 53, 0, 0, 210, 212, 3, 10, 5, 4, 211, 205, 1, 0, 0, 0, 211, 208, 1, 0, 0, 0, 212, 215, 1, 0, 0, 0, 213, 211, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 11, 1, 0, 0, 0, 215, 213, 1, 0, 0, 0, 216, 218, 3, 16, 8, 0, 217, 219, 5, 50, 0, 0, 218, 217, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 221, 5, 47, 0, 0, 221, 222, 3, 100, 50, 0, 222, 231, 1, 0, 0, 0, 223, 225, 3, 16, 8, 0, 224, 226, 5, 50, 0, 0, 225, 224, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 228, 5, 55, 0, 0, 228, 229, 3, 100, 50, 0, 229, 231, 1, 0, 0, 0, 230, 216, 1, 0, 0, 0, 230, 223, 1, 0, 0, 0, 231, 13, 1, 0, 0, 0, 232, 233, 3, 54, 27, 0, 233, 234, 5, 49, 0, 0, 234, 235, 3, 100, 50, 0, 235, 15, 1, 0, 0, 0, 236, 242, 3, 18, 9, 0, 237, 238, 3, 18, 9, 0, 238, 239, 3, 102, 51, 0, 239, 240, 3, 18, 9, 0, 240, 242, 1, 0, 0, 0, 241, 236, 1, 0, 0, 0, 241, 237, 1, 0, 0, 0, 242, 17, 1, 0, 0, 0, 243, 244, 6, 9, -1, 0, 244, 248, 3, 20, 10, 0, 245, 246, 7, 0, 0, 0, 246, 248, 3, 18, 9, 3, 247, 243, 1, 0, 0, 0, 247, 245, 1, 0, 0, 0, 248, 257, 1, 0, 0, 0, 249, 250, 10, 2, 0, 0, 250, 251, 7, 1, 0, 0, 251, 256, 3, 18, 9, 3, 252, 253, 10, 1, 0, 0, 253, 254, 7, 0, 0, 0, 254, 256, 3, 18, 9, 2, 255, 249, 1, 0, 0, 0, 255, 252, 1, 0, 0, 0, 256, 259, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 19, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 260, 261, 6, 10, -1, 0, 261, 269, 3, 64, 32, 0, 262, 269, 3, 54, 27, 0, 263, 269, 3, 22, 11, 0, 264, 265, 5, 48, 0, 0, 265, 266, 3, 10, 5, 0, 266, 267, 5, 56, 0, 0, 267, 269, 1, 0, 0, 0, 268, 260, 1, 0, 0, 0, 268, 262, 1, 0, 0, 0, 268, 263, 1, 0, 0, 0, 268, 264, 1, 0, 0, 0, 269, 275, 1, 0, 0, 0, 270, 271, 10, 1, 0, 0, 271, 272, 5, 38, 0, 0, 272, 274, 3, 24, 12, 0, 273, 270, 1, 0, 0, 0, 274, 277, 1, 0, 0, 0, 275, 273, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 21, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 278, 279, 3, 60, 30, 0, 279, 289, 5, 48, 0, 0, 280, 290, 5, 67, 0, 0, 281, 286, 3, 10, 5, 0, 282, 283, 5, 39, 0, 0, 283, 285, 3, 10, 5, 0, 284, 282, 1, 0, 0, 0, 285, 288, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 290, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 289, 280, 1, 0, 0, 0, 289, 281, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 1, 0, 0, 0, 291, 292, 5, 56, 0, 0, 292, 23, 1, 0, 0, 0, 293, 294, 3, 60, 30, 0, 294, 25, 1, 0, 0, 0, 295, 296, 5, 16, 0, 0, 296, 297, 3, 28, 14, 0, 297, 27, 1, 0, 0, 0, 298, 303, 3, 30, 15, 0, 299, 300, 5, 39, 0, 0, 300, 302, 3, 30, 15, 0, 301, 299, 1, 0, 0, 0, 302, 305, 1, 0, 0, 0, 303, 301, 1, 0, 0, 0, 303, 304, 1, 0, 0, 0, 304, 29, 1, 0, 0, 0, 305, 303, 1, 0, 0, 0, 306, 312, 3, 10, 5, 0, 307, 308, 3, 54, 27, 0, 308, 309, 5, 37, 0, 0, 309, 310, 3, 10, 5, 0, 310, 312, 1, 0, 0, 0, 311, 306, 1, 0, 0, 0, 311, 307, 1, 0, 0, 0, 312, 31, 1, 0, 0, 0, 313, 314, 5, 6, 0, 0, 314, 319, 3, 34, 17, 0, 315, 316, 5, 39, 0, 0, 316, 318, 3, 34, 17, 0, 317, 315, 1, 0, 0, 0, 318, 321, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 323, 1, 0, 0, 0, 321, 319, 1, 0, 0, 0, 322, 324, 3, 40, 20, 0, 323, 322, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 33, 1, 0, 0, 0, 325, 326, 3, 36, 18, 0, 326, 327, 5, 116, 0, 0, 327, 328, 3, 38, 19, 0, 328, 331, 1, 0, 0, 0, 329, 331, 3, 38, 19, 0, 330, 325, 1, 0, 0, 0, 330, 329, 1, 0, 0, 0, 331, 35, 1, 0, 0, 0, 332, 333, 5, 26, 0, 0, 333, 37, 1, 0, 0, 0, 334, 335, 7, 2, 0, 0, 335, 39, 1, 0, 0, 0, 336, 339, 3, 42, 21, 0, 337, 339, 3, 44, 22, 0, 338, 336, 1, 0, 0, 0, 338, 337, 1, 0, 0, 0, 339, 41, 1, 0, 0, 0, 340, 341, 5, 78, 0, 0, 341, 346, 5, 26, 0, 0, 342, 343, 5, 39, 0, 0, 343, 345, 5, 26, 0, 0, 344, 342, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 43, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 350, 5, 71, 0, 0, 350, 351, 3, 42, 21, 0, 351, 352, 5, 72, 0, 0, 352, 45, 1, 0, 0, 0, 353, 354, 5, 13, 0, 0, 354, 359, 3, 34, 17, 0, 355, 356, 5, 39, 0, 0, 356, 358, 3, 34, 17, 0, 357, 355, 1, 0, 0, 0, 358, 361, 1, 0, 0, 0, 359, 357, 1, 0, 0, 0, 359, 360, 1, 0, 0, 0, 360, 363, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 362, 364, 3, 28, 14, 0, 363, 362, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 367, 1, 0, 0, 0, 365, 366, 5, 34, 0, 0, 366, 368, 3, 28, 14, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 47, 1, 0, 0, 0, 369, 370, 5, 4, 0, 0, 370, 371, 3, 28, 14, 0, 371, 49, 1, 0, 0, 0, 372, 374, 5, 19, 0, 0, 373, 375, 3, 28, 14, 0, 374, 373, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 378, 1, 0, 0, 0, 376, 377, 5, 34, 0, 0, 377, 379, 3, 28, 14, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 51, 1, 0, 0, 0, 380, 381, 5, 8, 0, 0, 381, 384, 3, 28, 14, 0, 382, 383, 5, 34, 0, 0, 383, 385, 3, 28, 14, 0, 384, 382, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 53, 1, 0, 0, 0, 386, 391, 3, 60, 30, 0, 387, 388, 5, 41, 0, 0, 388, 390, 3, 60, 30, 0, 389, 387, 1, 0, 0, 0, 390, 393, 1, 0, 0, 0, 391, 389, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 55, 1, 0, 0, 0, 393, 391, 1, 0, 0, 0, 394, 399, 3, 62, 31, 0, 395, 396, 5, 41, 0, 0, 396, 398, 3, 62, 31, 0, 397, 395, 1, 0, 0, 0, 398, 401, 1, 0, 0, 0, 399, 397, 1, 0, 0, 0, 399, 400, 1, 0, 0, 0, 400, 57, 1, 0, 0, 0, 401, 399, 1, 0, 0, 0, 402, 407, 3, 56, 28, 0, 403, 404, 5, 39, 0, 0, 404, 406, 3, 56, 28, 0, 405, 403, 1, 0, 0, 0, 406, 409, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 59, 1, 0, 0, 0, 409, 407, 1, 0, 0, 0, 410, 411, 7, 3, 0, 0, 411, 61, 1, 0, 0, 0, 412, 413, 5, 82, 0, 0, 413, 63, 1, 0, 0, 0, 414, 457, 5, 51, 0, 0, 415, 416, 3, 98, 49, 0, 416, 417, 5, 73, 0, 0, 417, 457, 1, 0, 0, 0, 418, 457, 3, 96, 48, 0, 419, 457, 3, 98, 49, 0, 420, 457, 3, 92, 46, 0, 421, 457, 3, 66, 33, 0, 422, 457, 3, 100, 50, 0, 423, 424, 5, 71, 0, 0, 424, 429, 3, 94, 47, 0, 425, 426, 5, 39, 0, 0, 426, 428, 3, 94, 47, 0, 427, 425, 1, 0, 0, 0, 428, 431, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 432, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 433, 5, 72, 0, 0, 433, 457, 1, 0, 0, 0, 434, 435, 5, 71, 0, 0, 435, 440, 3, 92, 46, 0, 436, 437, 5, 39, 0, 0, 437, 439, 3, 92, 46, 0, 438, 436, 1, 0, 0, 0, 439, 442, 1, 0, 0, 0, 440, 438, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 443, 1, 0, 0, 0, 442, 440, 1, 0, 0, 0, 443, 444, 5, 72, 0, 0, 444, 457, 1, 0, 0, 0, 445, 446, 5, 71, 0, 0, 446, 451, 3, 100, 50, 0, 447, 448, 5, 39, 0, 0, 448, 450, 3, 100, 50, 0, 449, 447, 1, 0, 0, 0, 450, 453, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 451, 452, 1, 0, 0, 0, 452, 454, 1, 0, 0, 0, 453, 451, 1, 0, 0, 0, 454, 455, 5, 72, 0, 0, 455, 457, 1, 0, 0, 0, 456, 414, 1, 0, 0, 0, 456, 415, 1, 0, 0, 0, 456, 418, 1, 0, 0, 0, 456, 419, 1, 0, 0, 0, 456, 420, 1, 0, 0, 0, 456, 421, 1, 0, 0, 0, 456, 422, 1, 0, 0, 0, 456, 423, 1, 0, 0, 0, 456, 434, 1, 0, 0, 0, 456, 445, 1, 0, 0, 0, 457, 65, 1, 0, 0, 0, 458, 461, 5, 54, 0, 0, 459, 461, 5, 70, 0, 0, 460, 458, 1, 0, 0, 0, 460, 459, 1, 0, 0, 0, 461, 67, 1, 0, 0, 0, 462, 463, 5, 10, 0, 0, 463, 464, 5, 32, 0, 0, 464, 69, 1, 0, 0, 0, 465, 466, 5, 18, 0, 0, 466, 471, 3, 72, 36, 0, 467, 468, 5, 39, 0, 0, 468, 470, 3, 72, 36, 0, 469, 467, 1, 0, 0, 0, 470, 473, 1, 0, 0, 0, 471, 469, 1, 0, 0, 0, 471, 472, 1, 0, 0, 0, 472, 71, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 474, 476, 3, 10, 5, 0, 475, 477, 7, 4, 0, 0, 476, 475, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, 477, 480, 1, 0, 0, 0, 478, 479, 5, 52, 0, 0, 479, 481, 7, 5, 0, 0, 480, 478, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 73, 1, 0, 0, 0, 482, 483, 5, 9, 0, 0, 483, 484, 3, 58, 29, 0, 484, 75, 1, 0, 0, 0, 485, 486, 5, 2, 0, 0, 486, 487, 3, 58, 29, 0, 487, 77, 1, 0, 0, 0, 488, 489, 5, 15, 0, 0, 489, 494, 3, 80, 40, 0, 490, 491, 5, 39, 0, 0, 491, 493, 3, 80, 40, 0, 492, 490, 1, 0, 0, 0, 493, 496, 1, 0, 0, 0, 494, 492, 1, 0, 0, 0, 494, 495, 1, 0, 0, 0, 495, 79, 1, 0, 0, 0, 496, 494, 1, 0, 0, 0, 497, 498, 3, 56, 28, 0, 498, 499, 5, 86, 0, 0, 499, 500, 3, 56, 28, 0, 500, 81, 1, 0, 0, 0, 501, 502, 5, 1, 0, 0, 502, 503, 3, 20, 10, 0, 503, 505, 3, 100, 50, 0, 504, 506, 3, 88, 44, 0, 505, 504, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, 83, 1, 0, 0, 0, 507, 508, 5, 7, 0, 0, 508, 509, 3, 20, 10, 0, 509, 510, 3, 100, 50, 0, 510, 85, 1, 0, 0, 0, 511, 512, 5, 14, 0, 0, 512, 513, 3, 54, 27, 0, 513, 87, 1, 0, 0, 0, 514, 519, 3, 90, 45, 0, 515, 516, 5, 39, 0, 0, 516, 518, 3, 90, 45, 0, 517, 515, 1, 0, 0, 0, 518, 521, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 0, 520, 89, 1, 0, 0, 0, 521, 519, 1, 0, 0, 0, 522, 523, 3, 60, 30, 0, 523, 524, 5, 37, 0, 0, 524, 525, 3, 64, 32, 0, 525, 91, 1, 0, 0, 0, 526, 527, 7, 6, 0, 0, 527, 93, 1, 0, 0, 0, 528, 531, 3, 96, 48, 0, 529, 531, 3, 98, 49, 0, 530, 528, 1, 0, 0, 0, 530, 529, 1, 0, 0, 0, 531, 95, 1, 0, 0, 0, 532, 534, 7, 0, 0, 0, 533, 532, 1, 0, 0, 0, 533, 534, 1, 0, 0, 0, 534, 535, 1, 0, 0, 0, 535, 536, 5, 33, 0, 0, 536, 97, 1, 0, 0, 0, 537, 539, 7, 0, 0, 0, 538, 537, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 540, 1, 0, 0, 0, 540, 541, 5, 32, 0, 0, 541, 99, 1, 0, 0, 0, 542, 543, 5, 31, 0, 0, 543, 101, 1, 0, 0, 0, 544, 545, 7, 7, 0, 0, 545, 103, 1, 0, 0, 0, 546, 547, 5, 5, 0, 0, 547, 548, 3, 106, 53, 0, 548, 105, 1, 0, 0, 0, 549, 550, 5, 71, 0, 0, 550, 551, 3, 2, 1, 0, 551, 552, 5, 72, 0, 0, 552, 107, 1, 0, 0, 0, 553, 554, 5, 17, 0, 0, 554, 555, 5, 108, 0, 0, 555, 109, 1, 0, 0, 0, 556, 557, 5, 12, 0, 0, 557, 558, 5, 112, 0, 0, 558, 111, 1, 0, 0, 0, 559, 560, 5, 3, 0, 0, 560, 563, 5, 92, 0, 0, 561, 562, 5, 90, 0, 0, 562, 564, 3, 56, 28, 0, 563, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 574, 1, 0, 0, 0, 565, 566, 5, 91, 0, 0, 566, 571, 3, 114, 57, 0, 567, 568, 5, 39, 0, 0, 568, 570, 3, 114, 57, 0, 569, 567, 1, 0, 0, 0, 570, 573, 1, 0, 0, 0, 571, 569, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 575, 1, 0, 0, 0, 573, 571, 1, 0, 0, 0, 574, 565, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 113, 1, 0, 0, 0, 576, 577, 3, 56, 28, 0, 577, 578, 5, 37, 0, 0, 578, 580, 1, 0, 0, 0, 579, 576, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 581, 1, 0, 0, 0, 581, 582, 3, 56, 28, 0, 582, 115, 1, 0, 0, 0, 583, 584, 5, 11, 0, 0, 584, 585, 3, 34, 17, 0, 585, 586, 5, 90, 0, 0, 586, 587, 3, 58, 29, 0, 587, 117, 1, 0, 0, 0, 588, 591, 5, 21, 0, 0, 589, 592, 3, 120, 60, 0, 590, 592, 3, 122, 61, 0, 591, 589, 1, 0, 0, 0, 591, 590, 1, 0, 0, 0, 592, 119, 1, 0, 0, 0, 593, 594, 5, 31, 0, 0, 594, 121, 1, 0, 0, 0, 595, 596, 3, 124, 62, 0, 596, 123, 1, 0, 0, 0, 597, 598, 5, 73, 0, 0, 598, 599, 5, 116, 0, 0, 599, 600, 3, 126, 63, 0, 600, 125, 1, 0, 0, 0, 601, 602, 5, 48, 0, 0, 602, 603, 3, 126, 63, 0, 603, 604, 5, 56, 0, 0, 604, 611, 1, 0, 0, 0, 605, 607, 3, 130, 65, 0, 606, 605, 1, 0, 0, 0, 607, 608, 1, 0, 0, 0, 608, 606, 1, 0, 0, 0, 608, 609, 1, 0, 0, 0, 609, 611, 1, 0, 0, 0, 610, 601, 1, 0, 0, 0, 610, 606, 1, 0, 0, 0, 611, 127, 1, 0, 0, 0, 612, 613, 3, 56, 28, 0, 613, 129, 1, 0, 0, 0, 614, 615, 5, 73, 0, 0, 615, 131, 1, 0, 0, 0, 57, 143, 152, 169, 182, 191, 199, 203, 211, 213, 218, 225, 230, 241, 247, 255, 257, 268, 275, 286, 289, 303, 311, 319, 323, 330, 338, 346, 359, 363, 367, 374, 378, 384, 391, 399, 407, 429, 440, 451, 456, 460, 471, 476, 480, 494, 505, 519, 530, 533, 538, 563, 571, 574, 579, 591, 608, 610] \ No newline at end of file +[4, 1, 126, 617, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 142, 8, 1, 10, 1, 12, 1, 145, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 153, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 170, 8, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 183, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 190, 8, 5, 10, 5, 12, 5, 193, 9, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 200, 8, 5, 1, 5, 1, 5, 3, 5, 204, 8, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 212, 8, 5, 10, 5, 12, 5, 215, 9, 5, 1, 6, 1, 6, 3, 6, 219, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 226, 8, 6, 1, 6, 1, 6, 1, 6, 3, 6, 231, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 242, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 248, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 256, 8, 9, 10, 9, 12, 9, 259, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 269, 8, 10, 1, 10, 1, 10, 1, 10, 5, 10, 274, 8, 10, 10, 10, 12, 10, 277, 9, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 285, 8, 11, 10, 11, 12, 11, 288, 9, 11, 3, 11, 290, 8, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 5, 14, 302, 8, 14, 10, 14, 12, 14, 305, 9, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 312, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 318, 8, 16, 10, 16, 12, 16, 321, 9, 16, 1, 16, 3, 16, 324, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 331, 8, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 339, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 345, 8, 21, 10, 21, 12, 21, 348, 9, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 358, 8, 23, 10, 23, 12, 23, 361, 9, 23, 1, 23, 3, 23, 364, 8, 23, 1, 23, 1, 23, 3, 23, 368, 8, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 3, 25, 375, 8, 25, 1, 25, 1, 25, 3, 25, 379, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 385, 8, 26, 1, 27, 1, 27, 1, 27, 5, 27, 390, 8, 27, 10, 27, 12, 27, 393, 9, 27, 1, 28, 1, 28, 1, 28, 5, 28, 398, 8, 28, 10, 28, 12, 28, 401, 9, 28, 1, 29, 1, 29, 1, 29, 5, 29, 406, 8, 29, 10, 29, 12, 29, 409, 9, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 428, 8, 32, 10, 32, 12, 32, 431, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 439, 8, 32, 10, 32, 12, 32, 442, 9, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 5, 32, 450, 8, 32, 10, 32, 12, 32, 453, 9, 32, 1, 32, 1, 32, 3, 32, 457, 8, 32, 1, 33, 1, 33, 3, 33, 461, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 5, 35, 470, 8, 35, 10, 35, 12, 35, 473, 9, 35, 1, 36, 1, 36, 3, 36, 477, 8, 36, 1, 36, 1, 36, 3, 36, 481, 8, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 493, 8, 39, 10, 39, 12, 39, 496, 9, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 506, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 5, 44, 518, 8, 44, 10, 44, 12, 44, 521, 9, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 3, 47, 531, 8, 47, 1, 48, 3, 48, 534, 8, 48, 1, 48, 1, 48, 1, 49, 3, 49, 539, 8, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 564, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 570, 8, 56, 10, 56, 12, 56, 573, 9, 56, 3, 56, 575, 8, 56, 1, 57, 1, 57, 1, 57, 3, 57, 580, 8, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 3, 59, 592, 8, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 4, 63, 607, 8, 63, 11, 63, 12, 63, 608, 3, 63, 611, 8, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 0, 4, 2, 10, 18, 20, 66, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 0, 8, 1, 0, 65, 66, 1, 0, 67, 69, 2, 0, 26, 26, 31, 31, 1, 0, 73, 74, 2, 0, 36, 36, 40, 40, 2, 0, 43, 43, 46, 46, 2, 0, 42, 42, 57, 57, 2, 0, 58, 58, 60, 64, 639, 0, 132, 1, 0, 0, 0, 2, 135, 1, 0, 0, 0, 4, 152, 1, 0, 0, 0, 6, 169, 1, 0, 0, 0, 8, 171, 1, 0, 0, 0, 10, 203, 1, 0, 0, 0, 12, 230, 1, 0, 0, 0, 14, 232, 1, 0, 0, 0, 16, 241, 1, 0, 0, 0, 18, 247, 1, 0, 0, 0, 20, 268, 1, 0, 0, 0, 22, 278, 1, 0, 0, 0, 24, 293, 1, 0, 0, 0, 26, 295, 1, 0, 0, 0, 28, 298, 1, 0, 0, 0, 30, 311, 1, 0, 0, 0, 32, 313, 1, 0, 0, 0, 34, 330, 1, 0, 0, 0, 36, 332, 1, 0, 0, 0, 38, 334, 1, 0, 0, 0, 40, 338, 1, 0, 0, 0, 42, 340, 1, 0, 0, 0, 44, 349, 1, 0, 0, 0, 46, 353, 1, 0, 0, 0, 48, 369, 1, 0, 0, 0, 50, 372, 1, 0, 0, 0, 52, 380, 1, 0, 0, 0, 54, 386, 1, 0, 0, 0, 56, 394, 1, 0, 0, 0, 58, 402, 1, 0, 0, 0, 60, 410, 1, 0, 0, 0, 62, 412, 1, 0, 0, 0, 64, 456, 1, 0, 0, 0, 66, 460, 1, 0, 0, 0, 68, 462, 1, 0, 0, 0, 70, 465, 1, 0, 0, 0, 72, 474, 1, 0, 0, 0, 74, 482, 1, 0, 0, 0, 76, 485, 1, 0, 0, 0, 78, 488, 1, 0, 0, 0, 80, 497, 1, 0, 0, 0, 82, 501, 1, 0, 0, 0, 84, 507, 1, 0, 0, 0, 86, 511, 1, 0, 0, 0, 88, 514, 1, 0, 0, 0, 90, 522, 1, 0, 0, 0, 92, 526, 1, 0, 0, 0, 94, 530, 1, 0, 0, 0, 96, 533, 1, 0, 0, 0, 98, 538, 1, 0, 0, 0, 100, 542, 1, 0, 0, 0, 102, 544, 1, 0, 0, 0, 104, 546, 1, 0, 0, 0, 106, 549, 1, 0, 0, 0, 108, 553, 1, 0, 0, 0, 110, 556, 1, 0, 0, 0, 112, 559, 1, 0, 0, 0, 114, 579, 1, 0, 0, 0, 116, 583, 1, 0, 0, 0, 118, 588, 1, 0, 0, 0, 120, 593, 1, 0, 0, 0, 122, 595, 1, 0, 0, 0, 124, 597, 1, 0, 0, 0, 126, 610, 1, 0, 0, 0, 128, 612, 1, 0, 0, 0, 130, 614, 1, 0, 0, 0, 132, 133, 3, 2, 1, 0, 133, 134, 5, 0, 0, 1, 134, 1, 1, 0, 0, 0, 135, 136, 6, 1, -1, 0, 136, 137, 3, 4, 2, 0, 137, 143, 1, 0, 0, 0, 138, 139, 10, 1, 0, 0, 139, 140, 5, 30, 0, 0, 140, 142, 3, 6, 3, 0, 141, 138, 1, 0, 0, 0, 142, 145, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 3, 1, 0, 0, 0, 145, 143, 1, 0, 0, 0, 146, 153, 3, 104, 52, 0, 147, 153, 3, 32, 16, 0, 148, 153, 3, 26, 13, 0, 149, 153, 3, 46, 23, 0, 150, 153, 3, 108, 54, 0, 151, 153, 3, 110, 55, 0, 152, 146, 1, 0, 0, 0, 152, 147, 1, 0, 0, 0, 152, 148, 1, 0, 0, 0, 152, 149, 1, 0, 0, 0, 152, 150, 1, 0, 0, 0, 152, 151, 1, 0, 0, 0, 153, 5, 1, 0, 0, 0, 154, 170, 3, 48, 24, 0, 155, 170, 3, 52, 26, 0, 156, 170, 3, 68, 34, 0, 157, 170, 3, 116, 58, 0, 158, 170, 3, 74, 37, 0, 159, 170, 3, 70, 35, 0, 160, 170, 3, 50, 25, 0, 161, 170, 3, 8, 4, 0, 162, 170, 3, 76, 38, 0, 163, 170, 3, 78, 39, 0, 164, 170, 3, 82, 41, 0, 165, 170, 3, 84, 42, 0, 166, 170, 3, 112, 56, 0, 167, 170, 3, 86, 43, 0, 168, 170, 3, 118, 59, 0, 169, 154, 1, 0, 0, 0, 169, 155, 1, 0, 0, 0, 169, 156, 1, 0, 0, 0, 169, 157, 1, 0, 0, 0, 169, 158, 1, 0, 0, 0, 169, 159, 1, 0, 0, 0, 169, 160, 1, 0, 0, 0, 169, 161, 1, 0, 0, 0, 169, 162, 1, 0, 0, 0, 169, 163, 1, 0, 0, 0, 169, 164, 1, 0, 0, 0, 169, 165, 1, 0, 0, 0, 169, 166, 1, 0, 0, 0, 169, 167, 1, 0, 0, 0, 169, 168, 1, 0, 0, 0, 170, 7, 1, 0, 0, 0, 171, 172, 5, 20, 0, 0, 172, 173, 3, 10, 5, 0, 173, 9, 1, 0, 0, 0, 174, 175, 6, 5, -1, 0, 175, 176, 5, 50, 0, 0, 176, 204, 3, 10, 5, 8, 177, 204, 3, 16, 8, 0, 178, 204, 3, 12, 6, 0, 179, 204, 3, 14, 7, 0, 180, 182, 3, 16, 8, 0, 181, 183, 5, 50, 0, 0, 182, 181, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 5, 44, 0, 0, 185, 186, 5, 48, 0, 0, 186, 191, 3, 16, 8, 0, 187, 188, 5, 39, 0, 0, 188, 190, 3, 16, 8, 0, 189, 187, 1, 0, 0, 0, 190, 193, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 194, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 194, 195, 5, 56, 0, 0, 195, 204, 1, 0, 0, 0, 196, 197, 3, 16, 8, 0, 197, 199, 5, 45, 0, 0, 198, 200, 5, 50, 0, 0, 199, 198, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 202, 5, 51, 0, 0, 202, 204, 1, 0, 0, 0, 203, 174, 1, 0, 0, 0, 203, 177, 1, 0, 0, 0, 203, 178, 1, 0, 0, 0, 203, 179, 1, 0, 0, 0, 203, 180, 1, 0, 0, 0, 203, 196, 1, 0, 0, 0, 204, 213, 1, 0, 0, 0, 205, 206, 10, 4, 0, 0, 206, 207, 5, 35, 0, 0, 207, 212, 3, 10, 5, 5, 208, 209, 10, 3, 0, 0, 209, 210, 5, 53, 0, 0, 210, 212, 3, 10, 5, 4, 211, 205, 1, 0, 0, 0, 211, 208, 1, 0, 0, 0, 212, 215, 1, 0, 0, 0, 213, 211, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 11, 1, 0, 0, 0, 215, 213, 1, 0, 0, 0, 216, 218, 3, 16, 8, 0, 217, 219, 5, 50, 0, 0, 218, 217, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 221, 5, 47, 0, 0, 221, 222, 3, 100, 50, 0, 222, 231, 1, 0, 0, 0, 223, 225, 3, 16, 8, 0, 224, 226, 5, 50, 0, 0, 225, 224, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 228, 5, 55, 0, 0, 228, 229, 3, 100, 50, 0, 229, 231, 1, 0, 0, 0, 230, 216, 1, 0, 0, 0, 230, 223, 1, 0, 0, 0, 231, 13, 1, 0, 0, 0, 232, 233, 3, 54, 27, 0, 233, 234, 5, 49, 0, 0, 234, 235, 3, 100, 50, 0, 235, 15, 1, 0, 0, 0, 236, 242, 3, 18, 9, 0, 237, 238, 3, 18, 9, 0, 238, 239, 3, 102, 51, 0, 239, 240, 3, 18, 9, 0, 240, 242, 1, 0, 0, 0, 241, 236, 1, 0, 0, 0, 241, 237, 1, 0, 0, 0, 242, 17, 1, 0, 0, 0, 243, 244, 6, 9, -1, 0, 244, 248, 3, 20, 10, 0, 245, 246, 7, 0, 0, 0, 246, 248, 3, 18, 9, 3, 247, 243, 1, 0, 0, 0, 247, 245, 1, 0, 0, 0, 248, 257, 1, 0, 0, 0, 249, 250, 10, 2, 0, 0, 250, 251, 7, 1, 0, 0, 251, 256, 3, 18, 9, 3, 252, 253, 10, 1, 0, 0, 253, 254, 7, 0, 0, 0, 254, 256, 3, 18, 9, 2, 255, 249, 1, 0, 0, 0, 255, 252, 1, 0, 0, 0, 256, 259, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 19, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 260, 261, 6, 10, -1, 0, 261, 269, 3, 64, 32, 0, 262, 269, 3, 54, 27, 0, 263, 269, 3, 22, 11, 0, 264, 265, 5, 48, 0, 0, 265, 266, 3, 10, 5, 0, 266, 267, 5, 56, 0, 0, 267, 269, 1, 0, 0, 0, 268, 260, 1, 0, 0, 0, 268, 262, 1, 0, 0, 0, 268, 263, 1, 0, 0, 0, 268, 264, 1, 0, 0, 0, 269, 275, 1, 0, 0, 0, 270, 271, 10, 1, 0, 0, 271, 272, 5, 38, 0, 0, 272, 274, 3, 24, 12, 0, 273, 270, 1, 0, 0, 0, 274, 277, 1, 0, 0, 0, 275, 273, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 21, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 278, 279, 3, 60, 30, 0, 279, 289, 5, 48, 0, 0, 280, 290, 5, 67, 0, 0, 281, 286, 3, 10, 5, 0, 282, 283, 5, 39, 0, 0, 283, 285, 3, 10, 5, 0, 284, 282, 1, 0, 0, 0, 285, 288, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 290, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 289, 280, 1, 0, 0, 0, 289, 281, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 291, 1, 0, 0, 0, 291, 292, 5, 56, 0, 0, 292, 23, 1, 0, 0, 0, 293, 294, 3, 60, 30, 0, 294, 25, 1, 0, 0, 0, 295, 296, 5, 16, 0, 0, 296, 297, 3, 28, 14, 0, 297, 27, 1, 0, 0, 0, 298, 303, 3, 30, 15, 0, 299, 300, 5, 39, 0, 0, 300, 302, 3, 30, 15, 0, 301, 299, 1, 0, 0, 0, 302, 305, 1, 0, 0, 0, 303, 301, 1, 0, 0, 0, 303, 304, 1, 0, 0, 0, 304, 29, 1, 0, 0, 0, 305, 303, 1, 0, 0, 0, 306, 312, 3, 10, 5, 0, 307, 308, 3, 54, 27, 0, 308, 309, 5, 37, 0, 0, 309, 310, 3, 10, 5, 0, 310, 312, 1, 0, 0, 0, 311, 306, 1, 0, 0, 0, 311, 307, 1, 0, 0, 0, 312, 31, 1, 0, 0, 0, 313, 314, 5, 6, 0, 0, 314, 319, 3, 34, 17, 0, 315, 316, 5, 39, 0, 0, 316, 318, 3, 34, 17, 0, 317, 315, 1, 0, 0, 0, 318, 321, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 323, 1, 0, 0, 0, 321, 319, 1, 0, 0, 0, 322, 324, 3, 40, 20, 0, 323, 322, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 33, 1, 0, 0, 0, 325, 326, 3, 36, 18, 0, 326, 327, 5, 116, 0, 0, 327, 328, 3, 38, 19, 0, 328, 331, 1, 0, 0, 0, 329, 331, 3, 38, 19, 0, 330, 325, 1, 0, 0, 0, 330, 329, 1, 0, 0, 0, 331, 35, 1, 0, 0, 0, 332, 333, 5, 26, 0, 0, 333, 37, 1, 0, 0, 0, 334, 335, 7, 2, 0, 0, 335, 39, 1, 0, 0, 0, 336, 339, 3, 42, 21, 0, 337, 339, 3, 44, 22, 0, 338, 336, 1, 0, 0, 0, 338, 337, 1, 0, 0, 0, 339, 41, 1, 0, 0, 0, 340, 341, 5, 78, 0, 0, 341, 346, 5, 26, 0, 0, 342, 343, 5, 39, 0, 0, 343, 345, 5, 26, 0, 0, 344, 342, 1, 0, 0, 0, 345, 348, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 43, 1, 0, 0, 0, 348, 346, 1, 0, 0, 0, 349, 350, 5, 71, 0, 0, 350, 351, 3, 42, 21, 0, 351, 352, 5, 72, 0, 0, 352, 45, 1, 0, 0, 0, 353, 354, 5, 13, 0, 0, 354, 359, 3, 34, 17, 0, 355, 356, 5, 39, 0, 0, 356, 358, 3, 34, 17, 0, 357, 355, 1, 0, 0, 0, 358, 361, 1, 0, 0, 0, 359, 357, 1, 0, 0, 0, 359, 360, 1, 0, 0, 0, 360, 363, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 362, 364, 3, 28, 14, 0, 363, 362, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 367, 1, 0, 0, 0, 365, 366, 5, 34, 0, 0, 366, 368, 3, 28, 14, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 47, 1, 0, 0, 0, 369, 370, 5, 4, 0, 0, 370, 371, 3, 28, 14, 0, 371, 49, 1, 0, 0, 0, 372, 374, 5, 19, 0, 0, 373, 375, 3, 28, 14, 0, 374, 373, 1, 0, 0, 0, 374, 375, 1, 0, 0, 0, 375, 378, 1, 0, 0, 0, 376, 377, 5, 34, 0, 0, 377, 379, 3, 28, 14, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 51, 1, 0, 0, 0, 380, 381, 5, 8, 0, 0, 381, 384, 3, 28, 14, 0, 382, 383, 5, 34, 0, 0, 383, 385, 3, 28, 14, 0, 384, 382, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 53, 1, 0, 0, 0, 386, 391, 3, 60, 30, 0, 387, 388, 5, 41, 0, 0, 388, 390, 3, 60, 30, 0, 389, 387, 1, 0, 0, 0, 390, 393, 1, 0, 0, 0, 391, 389, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 55, 1, 0, 0, 0, 393, 391, 1, 0, 0, 0, 394, 399, 3, 62, 31, 0, 395, 396, 5, 41, 0, 0, 396, 398, 3, 62, 31, 0, 397, 395, 1, 0, 0, 0, 398, 401, 1, 0, 0, 0, 399, 397, 1, 0, 0, 0, 399, 400, 1, 0, 0, 0, 400, 57, 1, 0, 0, 0, 401, 399, 1, 0, 0, 0, 402, 407, 3, 56, 28, 0, 403, 404, 5, 39, 0, 0, 404, 406, 3, 56, 28, 0, 405, 403, 1, 0, 0, 0, 406, 409, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 59, 1, 0, 0, 0, 409, 407, 1, 0, 0, 0, 410, 411, 7, 3, 0, 0, 411, 61, 1, 0, 0, 0, 412, 413, 5, 82, 0, 0, 413, 63, 1, 0, 0, 0, 414, 457, 5, 51, 0, 0, 415, 416, 3, 98, 49, 0, 416, 417, 5, 73, 0, 0, 417, 457, 1, 0, 0, 0, 418, 457, 3, 96, 48, 0, 419, 457, 3, 98, 49, 0, 420, 457, 3, 92, 46, 0, 421, 457, 3, 66, 33, 0, 422, 457, 3, 100, 50, 0, 423, 424, 5, 71, 0, 0, 424, 429, 3, 94, 47, 0, 425, 426, 5, 39, 0, 0, 426, 428, 3, 94, 47, 0, 427, 425, 1, 0, 0, 0, 428, 431, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 432, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 433, 5, 72, 0, 0, 433, 457, 1, 0, 0, 0, 434, 435, 5, 71, 0, 0, 435, 440, 3, 92, 46, 0, 436, 437, 5, 39, 0, 0, 437, 439, 3, 92, 46, 0, 438, 436, 1, 0, 0, 0, 439, 442, 1, 0, 0, 0, 440, 438, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 443, 1, 0, 0, 0, 442, 440, 1, 0, 0, 0, 443, 444, 5, 72, 0, 0, 444, 457, 1, 0, 0, 0, 445, 446, 5, 71, 0, 0, 446, 451, 3, 100, 50, 0, 447, 448, 5, 39, 0, 0, 448, 450, 3, 100, 50, 0, 449, 447, 1, 0, 0, 0, 450, 453, 1, 0, 0, 0, 451, 449, 1, 0, 0, 0, 451, 452, 1, 0, 0, 0, 452, 454, 1, 0, 0, 0, 453, 451, 1, 0, 0, 0, 454, 455, 5, 72, 0, 0, 455, 457, 1, 0, 0, 0, 456, 414, 1, 0, 0, 0, 456, 415, 1, 0, 0, 0, 456, 418, 1, 0, 0, 0, 456, 419, 1, 0, 0, 0, 456, 420, 1, 0, 0, 0, 456, 421, 1, 0, 0, 0, 456, 422, 1, 0, 0, 0, 456, 423, 1, 0, 0, 0, 456, 434, 1, 0, 0, 0, 456, 445, 1, 0, 0, 0, 457, 65, 1, 0, 0, 0, 458, 461, 5, 54, 0, 0, 459, 461, 5, 70, 0, 0, 460, 458, 1, 0, 0, 0, 460, 459, 1, 0, 0, 0, 461, 67, 1, 0, 0, 0, 462, 463, 5, 10, 0, 0, 463, 464, 5, 32, 0, 0, 464, 69, 1, 0, 0, 0, 465, 466, 5, 18, 0, 0, 466, 471, 3, 72, 36, 0, 467, 468, 5, 39, 0, 0, 468, 470, 3, 72, 36, 0, 469, 467, 1, 0, 0, 0, 470, 473, 1, 0, 0, 0, 471, 469, 1, 0, 0, 0, 471, 472, 1, 0, 0, 0, 472, 71, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 474, 476, 3, 10, 5, 0, 475, 477, 7, 4, 0, 0, 476, 475, 1, 0, 0, 0, 476, 477, 1, 0, 0, 0, 477, 480, 1, 0, 0, 0, 478, 479, 5, 52, 0, 0, 479, 481, 7, 5, 0, 0, 480, 478, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 73, 1, 0, 0, 0, 482, 483, 5, 9, 0, 0, 483, 484, 3, 58, 29, 0, 484, 75, 1, 0, 0, 0, 485, 486, 5, 2, 0, 0, 486, 487, 3, 58, 29, 0, 487, 77, 1, 0, 0, 0, 488, 489, 5, 15, 0, 0, 489, 494, 3, 80, 40, 0, 490, 491, 5, 39, 0, 0, 491, 493, 3, 80, 40, 0, 492, 490, 1, 0, 0, 0, 493, 496, 1, 0, 0, 0, 494, 492, 1, 0, 0, 0, 494, 495, 1, 0, 0, 0, 495, 79, 1, 0, 0, 0, 496, 494, 1, 0, 0, 0, 497, 498, 3, 56, 28, 0, 498, 499, 5, 86, 0, 0, 499, 500, 3, 56, 28, 0, 500, 81, 1, 0, 0, 0, 501, 502, 5, 1, 0, 0, 502, 503, 3, 20, 10, 0, 503, 505, 3, 100, 50, 0, 504, 506, 3, 88, 44, 0, 505, 504, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, 83, 1, 0, 0, 0, 507, 508, 5, 7, 0, 0, 508, 509, 3, 20, 10, 0, 509, 510, 3, 100, 50, 0, 510, 85, 1, 0, 0, 0, 511, 512, 5, 14, 0, 0, 512, 513, 3, 54, 27, 0, 513, 87, 1, 0, 0, 0, 514, 519, 3, 90, 45, 0, 515, 516, 5, 39, 0, 0, 516, 518, 3, 90, 45, 0, 517, 515, 1, 0, 0, 0, 518, 521, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 0, 520, 89, 1, 0, 0, 0, 521, 519, 1, 0, 0, 0, 522, 523, 3, 60, 30, 0, 523, 524, 5, 37, 0, 0, 524, 525, 3, 64, 32, 0, 525, 91, 1, 0, 0, 0, 526, 527, 7, 6, 0, 0, 527, 93, 1, 0, 0, 0, 528, 531, 3, 96, 48, 0, 529, 531, 3, 98, 49, 0, 530, 528, 1, 0, 0, 0, 530, 529, 1, 0, 0, 0, 531, 95, 1, 0, 0, 0, 532, 534, 7, 0, 0, 0, 533, 532, 1, 0, 0, 0, 533, 534, 1, 0, 0, 0, 534, 535, 1, 0, 0, 0, 535, 536, 5, 33, 0, 0, 536, 97, 1, 0, 0, 0, 537, 539, 7, 0, 0, 0, 538, 537, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 540, 1, 0, 0, 0, 540, 541, 5, 32, 0, 0, 541, 99, 1, 0, 0, 0, 542, 543, 5, 31, 0, 0, 543, 101, 1, 0, 0, 0, 544, 545, 7, 7, 0, 0, 545, 103, 1, 0, 0, 0, 546, 547, 5, 5, 0, 0, 547, 548, 3, 106, 53, 0, 548, 105, 1, 0, 0, 0, 549, 550, 5, 71, 0, 0, 550, 551, 3, 2, 1, 0, 551, 552, 5, 72, 0, 0, 552, 107, 1, 0, 0, 0, 553, 554, 5, 17, 0, 0, 554, 555, 5, 108, 0, 0, 555, 109, 1, 0, 0, 0, 556, 557, 5, 12, 0, 0, 557, 558, 5, 112, 0, 0, 558, 111, 1, 0, 0, 0, 559, 560, 5, 3, 0, 0, 560, 563, 5, 92, 0, 0, 561, 562, 5, 90, 0, 0, 562, 564, 3, 56, 28, 0, 563, 561, 1, 0, 0, 0, 563, 564, 1, 0, 0, 0, 564, 574, 1, 0, 0, 0, 565, 566, 5, 91, 0, 0, 566, 571, 3, 114, 57, 0, 567, 568, 5, 39, 0, 0, 568, 570, 3, 114, 57, 0, 569, 567, 1, 0, 0, 0, 570, 573, 1, 0, 0, 0, 571, 569, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 575, 1, 0, 0, 0, 573, 571, 1, 0, 0, 0, 574, 565, 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 113, 1, 0, 0, 0, 576, 577, 3, 56, 28, 0, 577, 578, 5, 37, 0, 0, 578, 580, 1, 0, 0, 0, 579, 576, 1, 0, 0, 0, 579, 580, 1, 0, 0, 0, 580, 581, 1, 0, 0, 0, 581, 582, 3, 56, 28, 0, 582, 115, 1, 0, 0, 0, 583, 584, 5, 11, 0, 0, 584, 585, 3, 34, 17, 0, 585, 586, 5, 90, 0, 0, 586, 587, 3, 58, 29, 0, 587, 117, 1, 0, 0, 0, 588, 591, 5, 21, 0, 0, 589, 592, 3, 120, 60, 0, 590, 592, 3, 122, 61, 0, 591, 589, 1, 0, 0, 0, 591, 590, 1, 0, 0, 0, 592, 119, 1, 0, 0, 0, 593, 594, 5, 31, 0, 0, 594, 121, 1, 0, 0, 0, 595, 596, 3, 124, 62, 0, 596, 123, 1, 0, 0, 0, 597, 598, 3, 56, 28, 0, 598, 599, 5, 116, 0, 0, 599, 600, 3, 126, 63, 0, 600, 125, 1, 0, 0, 0, 601, 602, 5, 48, 0, 0, 602, 603, 3, 126, 63, 0, 603, 604, 5, 56, 0, 0, 604, 611, 1, 0, 0, 0, 605, 607, 3, 130, 65, 0, 606, 605, 1, 0, 0, 0, 607, 608, 1, 0, 0, 0, 608, 606, 1, 0, 0, 0, 608, 609, 1, 0, 0, 0, 609, 611, 1, 0, 0, 0, 610, 601, 1, 0, 0, 0, 610, 606, 1, 0, 0, 0, 611, 127, 1, 0, 0, 0, 612, 613, 3, 56, 28, 0, 613, 129, 1, 0, 0, 0, 614, 615, 3, 56, 28, 0, 615, 131, 1, 0, 0, 0, 57, 143, 152, 169, 182, 191, 199, 203, 211, 213, 218, 225, 230, 241, 247, 255, 257, 268, 275, 286, 289, 303, 311, 319, 323, 330, 338, 346, 359, 363, 367, 374, 378, 384, 391, 399, 407, 429, 440, 451, 456, 460, 471, 476, 480, 494, 505, 519, 530, 533, 538, 563, 571, 574, 579, 591, 608, 610] \ No newline at end of file diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java index 50104cd67fbf9..ce3351b0261c5 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/EsqlBaseParser.java @@ -5273,7 +5273,7 @@ public final MatchCommandContext matchCommand() throws RecognitionException { unparsedMatchQuery(); } break; - case UNQUOTED_IDENTIFIER: + case ID_PATTERN: { setState(590); parsedMatchQuery(); @@ -5388,12 +5388,14 @@ public final ParsedMatchQueryContext parsedMatchQuery() throws RecognitionExcept @SuppressWarnings("CheckReturnValue") public static class QueryStringFieldsContext extends ParserRuleContext { - public Token fieldName; + public QualifiedNamePatternContext fieldName; public TerminalNode COLON() { return getToken(EsqlBaseParser.COLON, 0); } public QueryStringNoFieldsContext queryStringNoFields() { return getRuleContext(QueryStringNoFieldsContext.class,0); } - public TerminalNode UNQUOTED_IDENTIFIER() { return getToken(EsqlBaseParser.UNQUOTED_IDENTIFIER, 0); } + public QualifiedNamePatternContext qualifiedNamePattern() { + return getRuleContext(QualifiedNamePatternContext.class,0); + } @SuppressWarnings("this-escape") public QueryStringFieldsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); @@ -5421,7 +5423,7 @@ public final QueryStringFieldsContext queryStringFields() throws RecognitionExce enterOuterAlt(_localctx, 1); { setState(597); - ((QueryStringFieldsContext)_localctx).fieldName = match(UNQUOTED_IDENTIFIER); + ((QueryStringFieldsContext)_localctx).fieldName = qualifiedNamePattern(); setState(598); match(COLON); setState(599); @@ -5491,7 +5493,7 @@ public final QueryStringNoFieldsContext queryStringNoFields() throws Recognition match(RP); } break; - case UNQUOTED_IDENTIFIER: + case ID_PATTERN: enterOuterAlt(_localctx, 2); { setState(606); @@ -5580,7 +5582,9 @@ public final FieldQueryStringExpressionContext fieldQueryStringExpression() thro @SuppressWarnings("CheckReturnValue") public static class QueryStringTermContext extends ParserRuleContext { - public TerminalNode UNQUOTED_IDENTIFIER() { return getToken(EsqlBaseParser.UNQUOTED_IDENTIFIER, 0); } + public QualifiedNamePatternContext qualifiedNamePattern() { + return getRuleContext(QualifiedNamePatternContext.class,0); + } @SuppressWarnings("this-escape") public QueryStringTermContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); @@ -5608,7 +5612,7 @@ public final QueryStringTermContext queryStringTerm() throws RecognitionExceptio enterOuterAlt(_localctx, 1); { setState(614); - match(UNQUOTED_IDENTIFIER); + qualifiedNamePattern(); } } catch (RecognitionException re) { @@ -6040,8 +6044,8 @@ private boolean primaryExpression_sempred(PrimaryExpressionContext _localctx, in "\u0003x<\u0000\u024e\u0250\u0003z=\u0000\u024f\u024d\u0001\u0000\u0000"+ "\u0000\u024f\u024e\u0001\u0000\u0000\u0000\u0250w\u0001\u0000\u0000\u0000"+ "\u0251\u0252\u0005\u001f\u0000\u0000\u0252y\u0001\u0000\u0000\u0000\u0253"+ - "\u0254\u0003|>\u0000\u0254{\u0001\u0000\u0000\u0000\u0255\u0256\u0005"+ - "I\u0000\u0000\u0256\u0257\u0005t\u0000\u0000\u0257\u0258\u0003~?\u0000"+ + "\u0254\u0003|>\u0000\u0254{\u0001\u0000\u0000\u0000\u0255\u0256\u0003"+ + "8\u001c\u0000\u0256\u0257\u0005t\u0000\u0000\u0257\u0258\u0003~?\u0000"+ "\u0258}\u0001\u0000\u0000\u0000\u0259\u025a\u00050\u0000\u0000\u025a\u025b"+ "\u0003~?\u0000\u025b\u025c\u00058\u0000\u0000\u025c\u0263\u0001\u0000"+ "\u0000\u0000\u025d\u025f\u0003\u0082A\u0000\u025e\u025d\u0001\u0000\u0000"+ @@ -6049,7 +6053,7 @@ private boolean primaryExpression_sempred(PrimaryExpressionContext _localctx, in "\u0000\u0260\u0261\u0001\u0000\u0000\u0000\u0261\u0263\u0001\u0000\u0000"+ "\u0000\u0262\u0259\u0001\u0000\u0000\u0000\u0262\u025e\u0001\u0000\u0000"+ "\u0000\u0263\u007f\u0001\u0000\u0000\u0000\u0264\u0265\u00038\u001c\u0000"+ - "\u0265\u0081\u0001\u0000\u0000\u0000\u0266\u0267\u0005I\u0000\u0000\u0267"+ + "\u0265\u0081\u0001\u0000\u0000\u0000\u0266\u0267\u00038\u001c\u0000\u0267"+ "\u0083\u0001\u0000\u0000\u00009\u008f\u0098\u00a9\u00b6\u00bf\u00c7\u00cb"+ "\u00d3\u00d5\u00da\u00e1\u00e6\u00f1\u00f7\u00ff\u0101\u010c\u0113\u011e"+ "\u0121\u012f\u0137\u013f\u0143\u014a\u0152\u015a\u0167\u016b\u016f\u0176"+ diff --git a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java index f9de6552c6b52..faebfffcde7b0 100644 --- a/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java +++ b/x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/LogicalPlanBuilder.java @@ -11,6 +11,7 @@ import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.tree.ParseTree; import org.elasticsearch.Build; +import org.elasticsearch.common.Strings; import org.elasticsearch.core.Tuple; import org.elasticsearch.dissect.DissectException; import org.elasticsearch.dissect.DissectParser; @@ -378,7 +379,8 @@ public StringQueryPredicate visitUnparsedMatchQuery(EsqlBaseParser.UnparsedMatch @Override public StringQueryPredicate visitQueryStringFields(EsqlBaseParser.QueryStringFieldsContext ctx) { Source source = source(ctx); - String fieldName = ctx.fieldName.getText(); + // TODO HERE get qualified name and do something similar in Validator like MatchOperator + NamedExpression fieldName = visitQualifiedNamePattern(ctx.fieldName); return new StringQueryPredicate(source, ctx.queryStringNoFields().getText(), "fields=" + fieldName); }