diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index 6cceaf0883e92..9f2797cca668a 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -19,7 +19,7 @@ jobs: remove-issue-stale-when-updated: true days-before-pr-stale: 7 days-before-pr-close: 7 - stale-pr-message: "This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the `stale` label – otherwise this will be closed in another week." + stale-pr-message: "This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the `stale` label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the `waiting` label." close-pr-message: "This PR was closed due to lack of activity. Feel free to reopen if it's still relevant." stale-pr-label: stale remove-pr-stale-when-updated: true diff --git a/bin/start-frontend-https b/bin/start-frontend-https deleted file mode 100755 index 771b2940c67a5..0000000000000 --- a/bin/start-frontend-https +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -e - -# pass first argument to WEBPACK_HOT_RELOAD_HOST -[ $# -ge 1 ] && export WEBPACK_HOT_RELOAD_HOST=$1 - -pnpm install -pnpm start-https diff --git a/bin/start-https b/bin/start-https deleted file mode 100755 index 5ebaa291f6dca..0000000000000 --- a/bin/start-https +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -e - -trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT - -export IS_BEHIND_PROXY=1 -export DISABLE_SECURE_SSL_REDIRECT=1 -./bin/start-worker & -./bin/start-backend & -./bin/start-frontend-https & - -wait diff --git a/ee/clickhouse/materialized_columns/columns.py b/ee/clickhouse/materialized_columns/columns.py index 3dc21ccde59f6..135f27b392190 100644 --- a/ee/clickhouse/materialized_columns/columns.py +++ b/ee/clickhouse/materialized_columns/columns.py @@ -44,6 +44,7 @@ def get_materialized_columns( WHERE database = %(database)s AND table = %(table)s AND comment LIKE '%%column_materializer::%%' + AND comment not LIKE '%%column_materializer::elements_chain::%%' """, {"database": CLICKHOUSE_DATABASE, "table": table}, ) diff --git a/frontend/__snapshots__/replay-player-failure--recent-recordings-404--dark.png b/frontend/__snapshots__/replay-player-failure--recent-recordings-404--dark.png index c6f7ea6c355c1..cc74b8c8cc166 100644 Binary files a/frontend/__snapshots__/replay-player-failure--recent-recordings-404--dark.png and b/frontend/__snapshots__/replay-player-failure--recent-recordings-404--dark.png differ diff --git a/frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png b/frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png index 4506520e43910..9692fb26aa097 100644 Binary files a/frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png and b/frontend/__snapshots__/replay-player-failure--recent-recordings-404--light.png differ diff --git a/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png b/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png index af464e4ed5ca9..ad0c127a33fac 100644 Binary files a/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png and b/frontend/__snapshots__/replay-player-success--recent-recordings--dark.png differ diff --git a/frontend/__snapshots__/replay-player-success--recent-recordings--light.png b/frontend/__snapshots__/replay-player-success--recent-recordings--light.png index 50cad86623416..b316da52833e9 100644 Binary files a/frontend/__snapshots__/replay-player-success--recent-recordings--light.png and b/frontend/__snapshots__/replay-player-success--recent-recordings--light.png differ diff --git a/frontend/__snapshots__/replay-player-success--second-recording-in-list--dark.png b/frontend/__snapshots__/replay-player-success--second-recording-in-list--dark.png index 2bf8d71403341..5b169f7d87354 100644 Binary files a/frontend/__snapshots__/replay-player-success--second-recording-in-list--dark.png and b/frontend/__snapshots__/replay-player-success--second-recording-in-list--dark.png differ diff --git a/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png b/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png index 7b64cab21e28d..f40b8da7ada3e 100644 Binary files a/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png and b/frontend/__snapshots__/replay-player-success--second-recording-in-list--light.png differ diff --git a/frontend/__snapshots__/scenes-app-dashboards--insight-legend--dark.png b/frontend/__snapshots__/scenes-app-dashboards--insight-legend--dark.png index 9d811913930ca..d7d9398cd00cc 100644 Binary files a/frontend/__snapshots__/scenes-app-dashboards--insight-legend--dark.png and b/frontend/__snapshots__/scenes-app-dashboards--insight-legend--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-dashboards--insight-legend--light.png b/frontend/__snapshots__/scenes-app-dashboards--insight-legend--light.png index 4cc1ac52455a8..c067fa7a5cd00 100644 Binary files a/frontend/__snapshots__/scenes-app-dashboards--insight-legend--light.png and b/frontend/__snapshots__/scenes-app-dashboards--insight-legend--light.png differ diff --git a/frontend/__snapshots__/scenes-app-errortracking--group-page--dark.png b/frontend/__snapshots__/scenes-app-errortracking--group-page--dark.png index 6ced54136d89e..7d78d779f063e 100644 Binary files a/frontend/__snapshots__/scenes-app-errortracking--group-page--dark.png and b/frontend/__snapshots__/scenes-app-errortracking--group-page--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-errortracking--group-page--light.png b/frontend/__snapshots__/scenes-app-errortracking--group-page--light.png index f84c4b3332880..904f485ef38ed 100644 Binary files a/frontend/__snapshots__/scenes-app-errortracking--group-page--light.png and b/frontend/__snapshots__/scenes-app-errortracking--group-page--light.png differ diff --git a/frontend/__snapshots__/scenes-app-errortracking--list-page--dark.png b/frontend/__snapshots__/scenes-app-errortracking--list-page--dark.png index fda158a90c73f..2b3fa4c87ab6f 100644 Binary files a/frontend/__snapshots__/scenes-app-errortracking--list-page--dark.png and b/frontend/__snapshots__/scenes-app-errortracking--list-page--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-errortracking--list-page--light.png b/frontend/__snapshots__/scenes-app-errortracking--list-page--light.png index 1070b31f74596..ba71e2e6f4519 100644 Binary files a/frontend/__snapshots__/scenes-app-errortracking--list-page--light.png and b/frontend/__snapshots__/scenes-app-errortracking--list-page--light.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark.png index 4d2ff3308afa8..207875a3704f8 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png index 2ea9fc2018537..f6cfa36a3526c 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--light.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--light.png index 01df2b71a3a80..f4f8599997533 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--light.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--light.png differ diff --git a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png index 06f44f2bd0944..08c1c1a2b7598 100644 Binary files a/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png and b/frontend/__snapshots__/scenes-app-insights--user-paths-edit--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--dark.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--dark.png index 51cbed5caed0a..17cbc47a38452 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--dark.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--light.png b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--light.png index 95bb5a40e7421..157ae9ad6515d 100644 Binary files a/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--light.png and b/frontend/__snapshots__/scenes-app-sidepanels--side-panel-docs--light.png differ diff --git a/frontend/__snapshots__/scenes-app-surveys--survey-templates--dark.png b/frontend/__snapshots__/scenes-app-surveys--survey-templates--dark.png index a9ed908bc49a8..1ad594dbbaea3 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--survey-templates--dark.png and b/frontend/__snapshots__/scenes-app-surveys--survey-templates--dark.png differ diff --git a/frontend/__snapshots__/scenes-app-surveys--survey-templates--light.png b/frontend/__snapshots__/scenes-app-surveys--survey-templates--light.png index 76daef42df8a9..de285329bedd0 100644 Binary files a/frontend/__snapshots__/scenes-app-surveys--survey-templates--light.png and b/frontend/__snapshots__/scenes-app-surveys--survey-templates--light.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-user--dark.png b/frontend/__snapshots__/scenes-other-settings--settings-user--dark.png index 77a75a8e22716..98a1bd1e8b7f4 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-user--dark.png and b/frontend/__snapshots__/scenes-other-settings--settings-user--dark.png differ diff --git a/frontend/__snapshots__/scenes-other-settings--settings-user--light.png b/frontend/__snapshots__/scenes-other-settings--settings-user--light.png index 4f9e944848ac5..14931e71ed8a8 100644 Binary files a/frontend/__snapshots__/scenes-other-settings--settings-user--light.png and b/frontend/__snapshots__/scenes-other-settings--settings-user--light.png differ diff --git a/frontend/public/transformations/semver-flattener.png b/frontend/public/transformations/semver-flattener.png new file mode 100644 index 0000000000000..fe9f1eb7acc57 Binary files /dev/null and b/frontend/public/transformations/semver-flattener.png differ diff --git a/frontend/src/layout/navigation-3000/sidebars/dataManagement.ts b/frontend/src/layout/navigation-3000/sidebars/dataManagement.ts index 1ce1403ba6ebf..210204936359e 100644 --- a/frontend/src/layout/navigation-3000/sidebars/dataManagement.ts +++ b/frontend/src/layout/navigation-3000/sidebars/dataManagement.ts @@ -10,7 +10,7 @@ import { Scene } from 'scenes/sceneTypes' import { urls } from 'scenes/urls' import { navigation3000Logic } from '~/layout/navigation-3000/navigationLogic' -import { ActionType, EventDefinition, PropertyDefinition, ReplayTabs } from '~/types' +import { ActionType, EventDefinition, FilterLogicalOperator, PropertyDefinition, ReplayTabs } from '~/types' import { BasicListItem, SidebarCategory } from '../types' import type { dataManagementSidebarLogicType } from './dataManagementType' @@ -118,14 +118,22 @@ export const dataManagementSidebarLogic = kea([ { label: 'View recordings', to: urls.replay(ReplayTabs.Recent, { - events: [ - { - id: eventDefinition.name, - type: 'events', - order: 0, - name: eventDefinition.name, - }, - ], + filter_group: { + type: FilterLogicalOperator.And, + values: [ + { + type: FilterLogicalOperator.And, + values: [ + { + id: eventDefinition.name, + type: 'events', + order: 0, + name: eventDefinition.name, + }, + ], + }, + ], + }, }), }, ], diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 6bb3b9159b040..6b0c6061310a4 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -673,6 +673,10 @@ class ApiRequest { return this.errorTracking(teamId).addPathComponent(fingerprint) } + public errorTrackingMerge(fingerprint: ErrorTrackingGroup['fingerprint']): ApiRequest { + return this.errorTrackingGroup(fingerprint).addPathComponent('merge') + } + // # Warehouse public dataWarehouseTables(teamId?: TeamType['id']): ApiRequest { return this.projectsDetail(teamId).addPathComponent('warehouse_tables') @@ -1626,8 +1630,8 @@ const api = { }, hogFunctions: { - async list(): Promise> { - return await new ApiRequest().hogFunctions().get() + async list(params?: { filters?: any }): Promise> { + return await new ApiRequest().hogFunctions().withQueryString(params).get() }, async get(id: HogFunctionType['id']): Promise { return await new ApiRequest().hogFunction(id).get() @@ -1720,6 +1724,15 @@ const api = { ): Promise { return await new ApiRequest().errorTrackingGroup(fingerprint).update({ data }) }, + + async merge( + primaryFingerprint: ErrorTrackingGroup['fingerprint'], + mergingFingerprints: ErrorTrackingGroup['fingerprint'][] + ): Promise<{ content: string }> { + return await new ApiRequest() + .errorTrackingMerge(primaryFingerprint) + .create({ data: { merging_fingerprints: mergingFingerprints } }) + }, }, recordings: { diff --git a/frontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts b/frontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts index 73c95b095ff80..1291b68844af2 100644 --- a/frontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts +++ b/frontend/src/lib/components/AddToDashboard/addToDashboardModalLogic.ts @@ -21,7 +21,7 @@ export const addToDashboardModalLogic = kea([ key(keyForInsightLogicProps('new')), path((key) => ['lib', 'components', 'AddToDashboard', 'saveToDashboardModalLogic', key]), connect((props: InsightLogicProps) => ({ - values: [insightLogic(props), ['queryBasedInsight', 'legacyInsight']], + values: [insightLogic(props), ['queryBasedInsight']], actions: [ insightLogic(props), ['updateInsight', 'updateInsightSuccess', 'updateInsightFailure'], @@ -101,7 +101,9 @@ export const addToDashboardModalLogic = kea([ // TODO be able to update not by patching `dashboards` against insight // either patch dashboard_tiles on the insight or add a dashboard_tiles API actions.updateInsight( - { ...values.legacyInsight, dashboards: [...(values.legacyInsight.dashboards || []), dashboardId] }, + { + dashboards: [...(values.queryBasedInsight.dashboards || []), dashboardId], + }, () => { actions.reportSavedInsightToDashboard() dashboardsModel.actions.tileAddedToDashboard(dashboardId) @@ -117,9 +119,8 @@ export const addToDashboardModalLogic = kea([ removeFromDashboard: async ({ dashboardId }): Promise => { actions.updateInsight( { - ...values.legacyInsight, - dashboards: (values.legacyInsight.dashboards || []).filter((d) => d !== dashboardId), - dashboard_tiles: (values.legacyInsight.dashboard_tiles || []).filter( + dashboards: (values.queryBasedInsight.dashboards || []).filter((d) => d !== dashboardId), + dashboard_tiles: (values.queryBasedInsight.dashboard_tiles || []).filter( (dt) => dt.dashboard_id !== dashboardId ), }, diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx index ac78461acfccc..5353b3b12e30e 100644 --- a/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx +++ b/frontend/src/lib/components/Cards/InsightCard/InsightCard.tsx @@ -82,6 +82,10 @@ const displayMap: Record< className: 'bar', element: ActionsHorizontalBar, }, + ActionsStackedBar: { + className: 'bar', + element: ActionsLineGraph, + }, ActionsTable: { className: 'table', element: DashboardInsightsTable, diff --git a/frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx b/frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx index 426f978577e43..ec3dd435687aa 100644 --- a/frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx +++ b/frontend/src/lib/components/Cards/TextCard/TextCard.stories.tsx @@ -27,8 +27,6 @@ const makeTextTile = (body: string, color: InsightColor | null = null): Dashboar layouts: {}, color, - last_refresh: null, - next_allowed_client_refresh: null, } } diff --git a/frontend/src/lib/components/TaxonomicFilter/InfiniteSelectResults.tsx b/frontend/src/lib/components/TaxonomicFilter/InfiniteSelectResults.tsx index e890d22154847..e2d060c36c76b 100644 --- a/frontend/src/lib/components/TaxonomicFilter/InfiniteSelectResults.tsx +++ b/frontend/src/lib/components/TaxonomicFilter/InfiniteSelectResults.tsx @@ -38,8 +38,8 @@ function CategoryPill({ type={isActive ? 'primary' : canInteract ? 'option' : 'muted'} data-attr={`taxonomic-tab-${groupType}`} onClick={canInteract ? onClick : undefined} - weight="normal" - aria-disabled + disabledReason={!canInteract ? 'No results' : null} + className="font-normal" > {group?.render ? ( group?.name diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx index 0fdbccfcb1435..b37fec634d7c4 100644 --- a/frontend/src/lib/constants.tsx +++ b/frontend/src/lib/constants.tsx @@ -6,6 +6,7 @@ import { ChartDisplayCategory, ChartDisplayType, Region, SSOProvider } from '../ export const DISPLAY_TYPES_TO_CATEGORIES: Record = { [ChartDisplayType.ActionsLineGraph]: ChartDisplayCategory.TimeSeries, [ChartDisplayType.ActionsBar]: ChartDisplayCategory.TimeSeries, + [ChartDisplayType.ActionsStackedBar]: ChartDisplayCategory.TimeSeries, [ChartDisplayType.ActionsAreaGraph]: ChartDisplayCategory.TimeSeries, [ChartDisplayType.ActionsLineGraphCumulative]: ChartDisplayCategory.CumulativeTimeSeries, [ChartDisplayType.BoldNumber]: ChartDisplayCategory.TotalValue, diff --git a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss index 26f1c66decfaa..ba819db9f35b0 100644 --- a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss +++ b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.scss @@ -55,7 +55,6 @@ --lemon-button-height: 2.3125rem; --lemon-button-gap: 0.5rem; --lemon-button-icon-opacity: 0.8; - --lemon-button-profile-picture-opacity: 0.9; // Profile pictures must be more prominent than icons --lemon-button-color: var(--text-3000); // column-gap: 4px; @@ -119,14 +118,9 @@ font-size: var(--lemon-button-icon-size); transition: color 200ms ease; - > * { + .LemonIcon { opacity: var(--lemon-button-icon-opacity); } - - > .ProfilePicture, - > .Lettermark { - opacity: var(--lemon-button-profile-picture-opacity); - } } } @@ -139,7 +133,6 @@ &:hover:not([aria-disabled='true']), &:not([aria-disabled='true']):active { --lemon-button-icon-opacity: 0.75; - --lemon-button-profile-picture-opacity: 1; } &.LemonButton--full-width { diff --git a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx index dd73779802c1c..11e44d7a5e4d8 100644 --- a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx +++ b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.tsx @@ -7,7 +7,7 @@ import React, { useContext } from 'react' import { LemonDropdown, LemonDropdownProps } from '../LemonDropdown' import { Link } from '../Link' -import { PopoverReferenceContext } from '../Popover' +import { PopoverOverlayContext, PopoverReferenceContext } from '../Popover' import { Spinner } from '../Spinner/Spinner' import { Tooltip, TooltipProps } from '../Tooltip' @@ -139,6 +139,7 @@ export const LemonButton: React.FunctionComponent { const [popoverVisibility, popoverPlacement] = useContext(PopoverReferenceContext) || [false, null] + const [, parentPopoverLevel] = useContext(PopoverOverlayContext) const within3000PageHeader = useContext(WithinPageHeaderContext) if (!active && popoverVisibility) { @@ -169,8 +170,8 @@ export const LemonButton: React.FunctionComponent disabled = true // Cannot interact with a loading button } - if (within3000PageHeader) { - size = 'small' + if (within3000PageHeader && parentPopoverLevel === -1) { + size = 'small' // Ensure that buttons in the page header are small (but NOT inside dropdowns!) } let tooltipContent: TooltipProps['title'] diff --git a/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx b/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx index e10db1d2d2d72..d24a66c01da7f 100644 --- a/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx +++ b/frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx @@ -299,7 +299,7 @@ export function LemonInputSelect({ onMouseEnter={() => setSelectedIndex(index)} > - {option.labelComponent ?? option.label} + {option.labelComponent ?? option.label} {isHighlighted ? ( {' '} diff --git a/frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.scss b/frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.scss index 306e3becbeca6..261f80b121bd1 100644 --- a/frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.scss +++ b/frontend/src/lib/lemon-ui/LemonSegmentedButton/LemonSegmentedButton.scss @@ -68,7 +68,6 @@ .LemonButton { --lemon-button-icon-opacity: 1; - --lemon-button-profile-picture-opacity: 1; } } diff --git a/frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx b/frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx index 356ba803323b3..5611f24ad6885 100644 --- a/frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx +++ b/frontend/src/lib/lemon-ui/LemonTag/LemonTag.tsx @@ -20,7 +20,7 @@ export type LemonTagType = | 'none' | 'breakdown' -export interface LemonTagProps extends React.HTMLAttributes { +export interface LemonTagProps { type?: LemonTagType children: React.ReactNode size?: 'small' | 'medium' @@ -28,12 +28,29 @@ export interface LemonTagProps extends React.HTMLAttributes { icon?: JSX.Element closable?: boolean onClose?: () => void + onClick?: (e: React.MouseEvent) => void popover?: LemonButtonDropdown + className?: string + disabledReason?: string | null + title?: string + 'data-attr'?: string } export const LemonTag: React.FunctionComponent> = forwardRef( function LemonTag( - { type = 'default', children, className, size = 'medium', weight, icon, closable, onClose, popover, ...props }, + { + type = 'default', + children, + className, + size = 'medium', + weight, + icon, + closable, + onClose, + popover, + disabledReason, + ...props + }, ref ): JSX.Element { return ( @@ -42,11 +59,14 @@ export const LemonTag: React.FunctionComponent {icon && {icon}} diff --git a/frontend/src/lib/monaco/CodeEditor.tsx b/frontend/src/lib/monaco/CodeEditor.tsx index 65159ada8ac50..c1ebef5fb1498 100644 --- a/frontend/src/lib/monaco/CodeEditor.tsx +++ b/frontend/src/lib/monaco/CodeEditor.tsx @@ -27,7 +27,7 @@ if (loader) { export interface CodeEditorProps extends Omit { queryKey?: string autocompleteContext?: string - onPressCmdEnter?: (value: string) => void + onPressCmdEnter?: (value: string, selectionType: 'selection' | 'full') => void autoFocus?: boolean sourceQuery?: AnyDataNode globals?: Record @@ -257,7 +257,17 @@ export function CodeEditor({ id: 'saveAndRunPostHog', label: 'Save and run query', keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter], - run: () => onPressCmdEnter(editor.getValue()), + run: () => { + const selection = editor.getSelection() + const model = editor.getModel() + if (selection && model) { + const highlightedText = model.getValueInRange(selection) + onPressCmdEnter(highlightedText, 'selection') + return + } + + onPressCmdEnter(editor.getValue(), 'full') + }, }) ) } diff --git a/frontend/src/lib/utils/eventUsageLogic.ts b/frontend/src/lib/utils/eventUsageLogic.ts index 2f042d3d89829..d84c8d04222b0 100644 --- a/frontend/src/lib/utils/eventUsageLogic.ts +++ b/frontend/src/lib/utils/eventUsageLogic.ts @@ -539,6 +539,7 @@ export const eventUsageLogic = kea([ reportTeamSettingChange: (name: string, value: any) => ({ name, value }), reportActivationSideBarTaskClicked: (key: string) => ({ key }), reportBillingUpgradeClicked: (plan: string) => ({ plan }), + reportBillingDowngradeClicked: (plan: string) => ({ plan }), reportRoleCreated: (role: string) => ({ role }), reportResourceAccessLevelUpdated: (resourceType: Resource, roleName: string, accessLevel: AccessLevel) => ({ resourceType, @@ -1179,6 +1180,11 @@ export const eventUsageLogic = kea([ plan, }) }, + reportBillingDowngradeClicked: ({ plan }) => { + posthog.capture('billing downgrade button clicked', { + plan, + }) + }, reportRoleCreated: ({ role }) => { posthog.capture('new role created', { role, diff --git a/frontend/src/models/dashboardsModel.tsx b/frontend/src/models/dashboardsModel.tsx index 96155776d941a..cf6b9b92c472c 100644 --- a/frontend/src/models/dashboardsModel.tsx +++ b/frontend/src/models/dashboardsModel.tsx @@ -31,26 +31,10 @@ export const dashboardsModel = kea([ // can provide extra dashboard ids if not all listeners will choose to respond to this action // not providing a dashboard id is a signal that only listeners in the item.dashboards array should respond // specifying `number` not `Pick because kea typegen couldn't figure out the import in `savedInsightsLogic` - // if an update is made against an insight it will hold last_refresh, color, and filters_hash in dashboard context - updateDashboardInsight: ( - insight: InsightModel, - extraDashboardIds?: number[], - updateTileOnDashboards?: [number] - ) => ({ + // if an update is made against an insight it will hold color in dashboard context + updateDashboardInsight: (insight: InsightModel, extraDashboardIds?: number[]) => ({ insight, extraDashboardIds, - updateTileOnDashboards, - }), - // a side effect on this action exists in dashboardLogic so that individual refresh statuses can be bubbled up - // to dashboard items in dashboards - updateDashboardRefreshStatus: ( - shortId: string | undefined | null, - refreshing: boolean | null, - last_refresh: string | null - ) => ({ - shortId, - refreshing, - last_refresh, }), pinDashboard: (id: number, source: DashboardEventSource) => ({ id, source }), unpinDashboard: (id: number, source: DashboardEventSource) => ({ id, source }), diff --git a/frontend/src/queries/nodes/DataTable/renderColumn.tsx b/frontend/src/queries/nodes/DataTable/renderColumn.tsx index d8c5da94857bc..162c777e68622 100644 --- a/frontend/src/queries/nodes/DataTable/renderColumn.tsx +++ b/frontend/src/queries/nodes/DataTable/renderColumn.tsx @@ -37,7 +37,7 @@ export function renderColumn( if (value === loadingColumn) { return } else if (value === errorColumn) { - return Error + return Error } else if (queryContextColumnName && queryContextColumn?.render) { const Component = queryContextColumn?.render return ( diff --git a/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx b/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx index f6ba6d41ce248..5b5eac7d1f7df 100644 --- a/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx +++ b/frontend/src/queries/nodes/DataVisualization/Components/Charts/LineGraph.tsx @@ -12,6 +12,7 @@ import { useValues } from 'kea' import { Chart, ChartItem, ChartOptions } from 'lib/Chart' import { getGraphColors, getSeriesColor } from 'lib/colors' import { InsightLabel } from 'lib/components/InsightLabel' +import { hexToRGBA } from 'lib/utils' import { useEffect, useRef } from 'react' import { ensureTooltip } from 'scenes/insights/views/LineGraph/LineGraph' @@ -31,7 +32,10 @@ export const LineGraph = (): JSX.Element => { // TODO: Extract this logic out of this component and inject values in // via props. Make this a purely presentational component const { xData, yData, presetChartHeight, visualizationType, showEditingUI } = useValues(dataVisualizationLogic) - const isBarChart = visualizationType === ChartDisplayType.ActionsBar + const isBarChart = + visualizationType === ChartDisplayType.ActionsBar || visualizationType === ChartDisplayType.ActionsStackedBar + const isStackedBarChart = visualizationType === ChartDisplayType.ActionsStackedBar + const isAreaChart = visualizationType === ChartDisplayType.ActionsAreaGraph const { goalLines } = useValues(displayLogic) @@ -44,11 +48,12 @@ export const LineGraph = (): JSX.Element => { labels: xData.data, datasets: yData.map(({ data }, index) => { const color = getSeriesColor(index) + const backgroundColor = isAreaChart ? hexToRGBA(color, 0.5) : color return { data, borderColor: color, - backgroundColor: color, + backgroundColor: backgroundColor, borderWidth: isBarChart ? 0 : 2, pointRadius: 0, hitRadius: 0, @@ -56,6 +61,7 @@ export const LineGraph = (): JSX.Element => { hoverBorderWidth: isBarChart ? 0 : 2, hoverBorderRadius: isBarChart ? 0 : 2, type: isBarChart ? GraphType.Bar : GraphType.Line, + fill: isAreaChart ? 'origin' : false, } as ChartData['datasets'][0] }), } @@ -239,6 +245,7 @@ export const LineGraph = (): JSX.Element => { x: { display: true, beginAtZero: true, + stacked: isStackedBarChart, ticks: tickOptions, grid: { ...gridOptions, @@ -249,7 +256,7 @@ export const LineGraph = (): JSX.Element => { y: { display: true, beginAtZero: true, - stacked: false, + stacked: isAreaChart || isStackedBarChart, ticks: { display: true, ...tickOptions, diff --git a/frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx b/frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx index 24cec158b2d82..e969ad004aeed 100644 --- a/frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx +++ b/frontend/src/queries/nodes/DataVisualization/Components/TableDisplay.tsx @@ -1,7 +1,7 @@ -import { IconGraph, IconTrends } from '@posthog/icons' +import { IconGraph, IconLifecycle, IconTrends } from '@posthog/icons' import { LemonSelect, LemonSelectOptions } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' -import { Icon123, IconTableChart } from 'lib/lemon-ui/icons' +import { Icon123, IconAreaChart, IconTableChart } from 'lib/lemon-ui/icons' import { ChartDisplayType } from '~/types' @@ -40,6 +40,16 @@ export const TableDisplay = (): JSX.Element => { icon: , label: 'Bar chart', }, + { + value: ChartDisplayType.ActionsStackedBar, + icon: , + label: 'Stacked bar chart', + }, + { + value: ChartDisplayType.ActionsAreaGraph, + icon: , + label: 'Area chart', + }, ], }, ] diff --git a/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx b/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx index 7c1fcc94e28da..d4d4e45d56065 100644 --- a/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx +++ b/frontend/src/queries/nodes/DataVisualization/DataVisualization.tsx @@ -107,7 +107,9 @@ function InternalDataTableVisualization(props: DataTableVisualizationProps): JSX ) } else if ( visualizationType === ChartDisplayType.ActionsLineGraph || - visualizationType === ChartDisplayType.ActionsBar + visualizationType === ChartDisplayType.ActionsBar || + visualizationType === ChartDisplayType.ActionsAreaGraph || + visualizationType === ChartDisplayType.ActionsStackedBar ) { component = } else if (visualizationType === ChartDisplayType.BoldNumber) { diff --git a/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx b/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx index 99ec8572c6552..43634ca9a2e15 100644 --- a/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx +++ b/frontend/src/queries/nodes/HogQLQuery/HogQLQueryEditor.tsx @@ -143,16 +143,15 @@ export function HogQLQueryEditor(props: HogQLQueryEditorProps): JSX.Element { onChange={(v) => setQueryInput(v ?? '')} height="100%" onMount={(editor, monaco) => { - monacoDisposables.current.push( - editor.addAction({ - id: 'saveAndRunPostHog', - label: 'Save and run query', - keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter], - run: () => saveQuery(), - }) - ) setMonacoAndEditor([monaco, editor]) }} + onPressCmdEnter={(value, selectionType) => { + if (value && selectionType === 'selection') { + saveQuery(value) + } else { + saveQuery() + } + }} options={{ minimap: { enabled: false, @@ -176,7 +175,7 @@ export function HogQLQueryEditor(props: HogQLQueryEditorProps): JSX.Element { <>
saveQuery()} type="primary" disabledReason={ !props.setQuery diff --git a/frontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx b/frontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx index c1e47f0db35c0..e5a80a7b67c95 100644 --- a/frontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx +++ b/frontend/src/queries/nodes/HogQLQuery/hogQLQueryEditorLogic.tsx @@ -35,6 +35,14 @@ export const hogQLQueryEditorLogic = kea([ props({} as HogQLQueryEditorLogicProps), key((props) => props.key), propsChanged(({ actions, props }, oldProps) => { + const selection = props.editor?.getSelection() + const model = props.editor?.getModel() + const highlightedQuery = selection && model ? model.getValueInRange(selection) : null + + if (highlightedQuery && props.query.query === highlightedQuery) { + return + } + if (props.query.query !== oldProps.query.query || props.editor !== oldProps.editor) { actions.setQueryInput(props.query.query) } @@ -43,7 +51,7 @@ export const hogQLQueryEditorLogic = kea([ actions: [dataWarehouseViewsLogic, ['createDataWarehouseSavedQuery'], dataWarehouseSceneLogic, ['updateView']], }), actions({ - saveQuery: true, + saveQuery: (queryOverride?: string) => ({ queryOverride }), setQueryInput: (queryInput: string) => ({ queryInput }), setPrompt: (prompt: string) => ({ prompt }), setPromptError: (error: string | null) => ({ error }), @@ -66,11 +74,12 @@ export const hogQLQueryEditorLogic = kea([ aiAvailable: [() => [preflightLogic.selectors.preflight], (preflight) => preflight?.openai_available], }), listeners(({ actions, props, values }) => ({ - saveQuery: () => { + saveQuery: ({ queryOverride }) => { const query = values.queryInput // TODO: Is below line necessary if the only way for queryInput to change is already through setQueryInput? actions.setQueryInput(query) - props.setQuery?.({ ...props.query, query }) + + props.setQuery?.({ ...props.query, query: queryOverride ?? query }) }, setQueryInput: async ({ queryInput }) => { props.onChange?.(queryInput) diff --git a/frontend/src/queries/nodes/HogQLX/render.tsx b/frontend/src/queries/nodes/HogQLX/render.tsx index 7e4e53a59e530..cf559762e7b9b 100644 --- a/frontend/src/queries/nodes/HogQLX/render.tsx +++ b/frontend/src/queries/nodes/HogQLX/render.tsx @@ -1,3 +1,4 @@ +import { Link } from '@posthog/lemon-ui' import { JSONViewer } from 'lib/components/JSONViewer' import { Sparkline } from 'lib/components/Sparkline' @@ -37,6 +38,29 @@ export function renderHogQLX(value: any): JSX.Element { ) + } else if (tag === 'a') { + const { href, source, target } = rest + return ( + + + {source ? renderHogQLX(source) : href} + + + ) + } else if (tag === 'strong') { + const { source } = rest + return ( + + {renderHogQLX(source)} + + ) + } else if (tag === 'em') { + const { source } = rest + return ( + + {renderHogQLX(source)} + + ) } return
Unknown tag: {String(tag)}
} diff --git a/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts b/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts index 9cb7ce95e339c..4922cc0b66a7b 100644 --- a/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts +++ b/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.test.ts @@ -409,6 +409,112 @@ describe('filtersToQueryNode', () => { } expect(result).toEqual(query) }) + + it('converts multiple breakdowns', () => { + const filters: Partial = { + insight: InsightType.TRENDS, + breakdowns: [ + { + type: 'event', + property: '$pathname', + normalize_url: true, + }, + { + type: 'group', + property: '$num', + group_type_index: 0, + histogram_bin_count: 10, + }, + ], + } + + const result = filtersToQueryNode(filters) + + const query: TrendsQuery = { + kind: NodeKind.TrendsQuery, + breakdownFilter: { + breakdowns: [ + { + type: 'event', + property: '$pathname', + normalize_url: true, + }, + { + type: 'group', + property: '$num', + group_type_index: 0, + histogram_bin_count: 10, + }, + ], + }, + series: [], + } + expect(result).toEqual(query) + }) + + it('converts legacy funnel breakdowns', () => { + const filters: Partial = { + insight: InsightType.TRENDS, + breakdowns: [ + { + type: 'event', + property: '$current_url', + }, + { + property: '$pathname', + } as any, + ], + } + + const result = filtersToQueryNode(filters) + + const query: TrendsQuery = { + kind: NodeKind.TrendsQuery, + breakdownFilter: { + breakdowns: [ + { + type: 'event', + property: '$current_url', + }, + { + type: 'event', + property: '$pathname', + }, + ], + }, + series: [], + } + expect(result).toEqual(query) + }) + + it('does not add breakdown_type for multiple breakdowns', () => { + const filters: Partial = { + insight: InsightType.TRENDS, + breakdowns: [ + { + type: 'person', + property: '$browser', + }, + ], + } + + const result = filtersToQueryNode(filters) + + const query: TrendsQuery = { + kind: NodeKind.TrendsQuery, + breakdownFilter: { + breakdowns: [ + { + type: 'person', + property: '$browser', + }, + ], + breakdown_type: undefined, + }, + series: [], + } + expect(result).toEqual(query) + }) }) describe('funnels filter', () => { diff --git a/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts b/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts index ea838920cc452..90c0c007c06b8 100644 --- a/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts +++ b/frontend/src/queries/nodes/InsightQuery/utils/filtersToQueryNode.ts @@ -296,22 +296,34 @@ export const filtersToQueryNode = (filters: Partial): InsightQueryNo // breakdown if (isInsightQueryWithBreakdown(query)) { - /* handle multi-breakdowns */ // not undefined or null if (filters.breakdowns != null) { - if (filters.breakdowns.length === 1) { - filters.breakdown_type = filters.breakdowns[0].type - filters.breakdown = filters.breakdowns[0].property as string - } else { - captureException( - 'Could not convert multi-breakdown property `breakdowns` - found more than one breakdown' - ) + /* handle multi-breakdowns for funnels */ + if (isFunnelsFilter(filters)) { + if (filters.breakdowns.length === 1) { + filters.breakdown_type = filters.breakdowns[0].type || 'event' + filters.breakdown = filters.breakdowns[0].property as string + } else { + captureException( + 'Could not convert multi-breakdown property `breakdowns` - found more than one breakdown' + ) + } } - } - /* handle missing breakdown_type */ - // check for undefined and null values - if (filters.breakdown != null && filters.breakdown_type == null) { + /* handle multi-breakdowns for trends */ + if (isTrendsFilter(filters)) { + filters.breakdowns = filters.breakdowns.map((b) => ({ + ...b, + // Compatibility with legacy funnel breakdowns when someone switches a view from funnels to trends + type: b.type || filters.breakdown_type || 'event', + })) + } + } else if ( + /* handle missing breakdown_type */ + // check for undefined and null values + filters.breakdown != null && + filters.breakdown_type == null + ) { filters.breakdown_type = 'event' } diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json index 20afa26306c9d..154b12f9d04df 100644 --- a/frontend/src/queries/schema.json +++ b/frontend/src/queries/schema.json @@ -2002,6 +2002,7 @@ "enum": [ "ActionsLineGraph", "ActionsBar", + "ActionsStackedBar", "ActionsAreaGraph", "ActionsLineGraphCumulative", "BoldNumber", @@ -3275,6 +3276,9 @@ }, "type": "array" }, + "exception_type": { + "type": ["string", "null"] + }, "fingerprint": { "type": "string" }, @@ -3309,6 +3313,7 @@ }, "required": [ "fingerprint", + "exception_type", "merged_fingerprints", "occurrences", "sessions", @@ -7668,6 +7673,7 @@ "type": "integer" }, "end_time": { + "description": "When did the query execution task finish (whether successfully or not).", "format": "date-time", "type": "string" }, @@ -7696,6 +7702,11 @@ }, "type": "array" }, + "pickup_time": { + "description": "When was the query execution task picked up by a worker.", + "format": "date-time", + "type": "string" + }, "query_async": { "const": true, "default": true, @@ -7707,6 +7718,7 @@ }, "results": {}, "start_time": { + "description": "When was query execution task enqueued.", "format": "date-time", "type": "string" }, diff --git a/frontend/src/queries/schema.ts b/frontend/src/queries/schema.ts index 924bc2bc0ee7e..a3e982f83fd58 100644 --- a/frontend/src/queries/schema.ts +++ b/frontend/src/queries/schema.ts @@ -1079,9 +1079,11 @@ export type QueryStatus = { /** @default null */ error_message: string | null results?: any - /** @format date-time */ + /** When was the query execution task picked up by a worker. @format date-time */ + pickup_time?: string + /** When was query execution task enqueued. @format date-time */ start_time?: string - /** @format date-time */ + /** When did the query execution task finish (whether successfully or not). @format date-time */ end_time?: string /** @format date-time */ expiration_time?: string @@ -1292,6 +1294,7 @@ export interface ErrorTrackingQuery extends DataNode export interface ErrorTrackingGroup { fingerprint: string + exception_type: string | null merged_fingerprints: string[] occurrences: number sessions: number diff --git a/frontend/src/scenes/actions/Action.stories.tsx b/frontend/src/scenes/actions/Action.stories.tsx index 9f1e4d9f2bf26..f3586f06350a7 100644 --- a/frontend/src/scenes/actions/Action.stories.tsx +++ b/frontend/src/scenes/actions/Action.stories.tsx @@ -75,7 +75,6 @@ const meta: Meta = { get: { '/api/projects/:team_id/actions/': toPaginatedResponse([MOCK_ACTION]), '/api/projects/:team_id/actions/1/': MOCK_ACTION, - '/api/projects/:team_id/actions/1/plugin_configs': toPaginatedResponse([]), }, }), ], diff --git a/frontend/src/scenes/actions/Action.tsx b/frontend/src/scenes/actions/Action.tsx index 5ff2bdc067eb0..a76ac93078850 100644 --- a/frontend/src/scenes/actions/Action.tsx +++ b/frontend/src/scenes/actions/Action.tsx @@ -11,6 +11,7 @@ import { NodeKind } from '~/queries/schema' import { ActionType } from '~/types' import { ActionEdit } from './ActionEdit' +import { ActionHogFunctions } from './ActionHogFunctions' export const scene: SceneExport = { logic: actionLogic, @@ -44,6 +45,7 @@ export function Action({ id }: { id?: ActionType['id'] } = {}): JSX.Element { return ( <> + {id && ( <> {isComplete ? ( diff --git a/frontend/src/scenes/actions/ActionEdit.tsx b/frontend/src/scenes/actions/ActionEdit.tsx index 09b38427e95b7..eeb4512f8a627 100644 --- a/frontend/src/scenes/actions/ActionEdit.tsx +++ b/frontend/src/scenes/actions/ActionEdit.tsx @@ -1,11 +1,12 @@ import { IconInfo, IconPlus, IconWarning } from '@posthog/icons' -import { LemonCheckbox, LemonTextArea } from '@posthog/lemon-ui' +import { LemonBanner, LemonCheckbox, LemonTextArea } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { Form } from 'kea-forms' -import { combineUrl, router } from 'kea-router' +import { router } from 'kea-router' import { EditableField } from 'lib/components/EditableField/EditableField' import { ObjectTags } from 'lib/components/ObjectTags/ObjectTags' import { PageHeader } from 'lib/components/PageHeader' +import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' import { IconPlayCircle } from 'lib/lemon-ui/icons' import { LemonButton } from 'lib/lemon-ui/LemonButton' import { LemonField } from 'lib/lemon-ui/LemonField' @@ -15,7 +16,7 @@ import { teamLogic } from 'scenes/teamLogic' import { urls } from 'scenes/urls' import { tagsModel } from '~/models/tagsModel' -import { ActionStepType } from '~/types' +import { ActionStepType, FilterLogicalOperator, ReplayTabs } from '~/types' import { actionEditLogic, ActionEditLogicProps, DEFAULT_ACTION_STEP } from './actionEditLogic' import { ActionStep } from './ActionStep' @@ -33,6 +34,8 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps): const slackEnabled = currentTeam?.slack_incoming_webhook + const hogFunctionsEnabled = useFeatureFlag('HOG_FUNCTIONS') + const deleteButton = (): JSX.Element => ( } data-attr="action-view-recordings" > @@ -203,70 +210,80 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps):
-
-

Webhook delivery

- - {({ value, onChange }) => ( -
- - Post to webhook when this action is triggered. - {action.bytecode_error ? ( - - ) : null} - - } - /> - - {slackEnabled ? 'Configure' : 'Enable'} webhooks in project settings. - -
+ {!hogFunctionsEnabled || action.post_to_slack ? ( +
+

Webhook delivery

+ + {hogFunctionsEnabled && ( + + The Webhook integration has been replaced with our new Pipeline Destinations + allowing for much greater customization and visibility into their execution. + )} - - {action.post_to_slack && ( - <> - {!action.bytecode_error && action.post_to_slack && ( - <> - - {({ value, onChange }) => ( + + + {({ value, onChange }) => ( +
+ - Slack message format - - - - See documentation on how to format webhook messages. - - + Post to webhook when this action is triggered. + {action.bytecode_error ? ( + + ) : null} - )} - - + } + /> + + {slackEnabled ? 'Configure' : 'Enable'} webhooks in project settings. + +
)} - - )} -
+
+ {action.post_to_slack && ( + <> + {!action.bytecode_error && action.post_to_slack && ( + <> + + {({ value, onChange }) => ( + <> + Slack message format + + + + See documentation on how to format webhook messages. + + + + )} + + + )} + + )} +
+ ) : undefined} ) diff --git a/frontend/src/scenes/actions/ActionHogFunctions.tsx b/frontend/src/scenes/actions/ActionHogFunctions.tsx new file mode 100644 index 0000000000000..781669d066d1b --- /dev/null +++ b/frontend/src/scenes/actions/ActionHogFunctions.tsx @@ -0,0 +1,59 @@ +import { LemonButton } from '@posthog/lemon-ui' +import { useValues } from 'kea' +import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' +import { actionLogic } from 'scenes/actions/actionLogic' +import { DestinationsTable } from 'scenes/pipeline/destinations/Destinations' +import { PipelineBackend } from 'scenes/pipeline/types' +import { urls } from 'scenes/urls' + +import { PipelineStage } from '~/types' + +export function ActionHogFunctions(): JSX.Element | null { + const { action } = useValues(actionLogic) + + const hogFunctionsEnabled = useFeatureFlag('HOG_FUNCTIONS') + + if (!action || !hogFunctionsEnabled) { + return null + } + + return ( +
+
+

Connected destinations

+ + + New destination + +
+

Actions can be used a filters for destinations such as Slack or Webhook delivery

+ + +
+ ) +} diff --git a/frontend/src/scenes/actions/actionLogic.ts b/frontend/src/scenes/actions/actionLogic.ts index c640029bca9c5..0273bae1af70a 100644 --- a/frontend/src/scenes/actions/actionLogic.ts +++ b/frontend/src/scenes/actions/actionLogic.ts @@ -5,7 +5,7 @@ import { DataManagementTab } from 'scenes/data-management/DataManagementScene' import { Scene } from 'scenes/sceneTypes' import { urls } from 'scenes/urls' -import { ActionType, Breadcrumb, PluginConfigWithPluginInfoNew } from '~/types' +import { ActionType, Breadcrumb, HogFunctionType } from '~/types' import { actionEditLogic } from './actionEditLogic' import type { actionLogicType } from './actionLogicType' @@ -35,11 +35,11 @@ export const actionLogic = kea([ }, }, ], - matchingPluginConfigs: [ - null as PluginConfigWithPluginInfoNew[] | null, + matchingHogFunctions: [ + null as HogFunctionType[] | null, { - loadMatchingPluginConfigs: async () => { - const res = await api.actions.listMatchingPluginConfigs(props.id!) + loadMatchingHogFunctions: async () => { + const res = await api.hogFunctions.list({ filters: { actions: [{ id: `${props.id}` }] } }) return res.results }, diff --git a/frontend/src/scenes/batch_exports/BatchExportEditForm.tsx b/frontend/src/scenes/batch_exports/BatchExportEditForm.tsx index 12906569aea9f..3ecec1e636dcf 100644 --- a/frontend/src/scenes/batch_exports/BatchExportEditForm.tsx +++ b/frontend/src/scenes/batch_exports/BatchExportEditForm.tsx @@ -107,16 +107,6 @@ export function BatchExportGeneralEditFields({ )} - {featureFlags[FEATURE_FLAGS.PERSON_BATCH_EXPORTS] && ( - - - - )}
- + - + @@ -388,11 +378,11 @@ export function BatchExportsEditFields({ ) : batchExportConfigForm.destination === 'Postgres' ? ( <> - + - + @@ -453,11 +443,11 @@ export function BatchExportsEditFields({ ) : batchExportConfigForm.destination === 'Redshift' ? ( <> - + - + diff --git a/frontend/src/scenes/billing/AllProductsPlanComparison.tsx b/frontend/src/scenes/billing/AllProductsPlanComparison.tsx index f18d1e7a54868..50cdccef61212 100644 --- a/frontend/src/scenes/billing/AllProductsPlanComparison.tsx +++ b/frontend/src/scenes/billing/AllProductsPlanComparison.tsx @@ -142,10 +142,14 @@ export const AllProductsPlanComparison = ({ } const { billing, redirectPath, timeRemainingInSeconds, timeTotalInSeconds } = useValues(billingLogic) const { ref: planComparisonRef } = useResizeObserver() - const { reportBillingUpgradeClicked } = useActions(eventUsageLogic) + const { reportBillingUpgradeClicked, reportBillingDowngradeClicked } = useActions(eventUsageLogic) const currentPlanIndex = plans.findIndex((plan) => plan.current_plan) - const { surveyID, comparisonModalHighlightedFeatureKey } = useValues(billingProductLogic({ product })) - const { reportSurveyShown, setSurveyResponse } = useActions(billingProductLogic({ product })) + const { surveyID, comparisonModalHighlightedFeatureKey, billingProductLoading } = useValues( + billingProductLogic({ product }) + ) + const { reportSurveyShown, setSurveyResponse, setBillingProductLoading } = useActions( + billingProductLogic({ product }) + ) const { featureFlags } = useValues(featureFlagLogic) const nonInclusionProducts = billing?.products.filter((p) => !p.inclusion_only) || [] @@ -164,6 +168,8 @@ export const AllProductsPlanComparison = ({ to={ plan.contact_support ? 'mailto:sales@posthog.com?subject=Enterprise%20plan%20request' + : i < currentPlanIndex + ? undefined // Downgrade action handled in onClick : getUpgradeProductLink({ product, redirectPath, @@ -190,14 +196,17 @@ export const AllProductsPlanComparison = ({ } onClick={() => { if (!plan.current_plan) { - // TODO: add current plan key and new plan key - reportBillingUpgradeClicked(product.type) - } - if (plan.included_if == 'has_subscription' && !plan.current_plan && i < currentPlanIndex) { - setSurveyResponse(product.type, '$survey_response_1') - reportSurveyShown(UNSUBSCRIBE_SURVEY_ID, product.type) + setBillingProductLoading(product.type) + if (i < currentPlanIndex) { + setSurveyResponse(product.type, '$survey_response_1') + reportSurveyShown(UNSUBSCRIBE_SURVEY_ID, product.type) + reportBillingDowngradeClicked(product.type) + } else { + reportBillingUpgradeClicked(product.type) + } } }} + loading={billingProductLoading === product.type && !plan.current_plan && !plan.contact_support} data-attr={`upgrade-${plan.name}`} > {plan.current_plan diff --git a/frontend/src/scenes/billing/PlanComparison.tsx b/frontend/src/scenes/billing/PlanComparison.tsx index 9900c9e9ff975..3177e0238277e 100644 --- a/frontend/src/scenes/billing/PlanComparison.tsx +++ b/frontend/src/scenes/billing/PlanComparison.tsx @@ -121,10 +121,14 @@ export const PlanComparison = ({ const fullyFeaturedPlan = plans[plans.length - 1] const { billing, redirectPath, timeRemainingInSeconds, timeTotalInSeconds } = useValues(billingLogic) const { width, ref: planComparisonRef } = useResizeObserver() - const { reportBillingUpgradeClicked } = useActions(eventUsageLogic) + const { reportBillingUpgradeClicked, reportBillingDowngradeClicked } = useActions(eventUsageLogic) const currentPlanIndex = plans.findIndex((plan) => plan.current_plan) - const { surveyID, comparisonModalHighlightedFeatureKey } = useValues(billingProductLogic({ product })) - const { reportSurveyShown, setSurveyResponse } = useActions(billingProductLogic({ product })) + const { surveyID, comparisonModalHighlightedFeatureKey, billingProductLoading } = useValues( + billingProductLogic({ product }) + ) + const { reportSurveyShown, setSurveyResponse, setBillingProductLoading } = useActions( + billingProductLogic({ product }) + ) const { featureFlags } = useValues(featureFlagLogic) const ctaAction = billing?.subscription_level === 'custom' ? 'Subscribe' : 'Upgrade' @@ -135,6 +139,8 @@ export const PlanComparison = ({ to={ plan.contact_support ? 'mailto:sales@posthog.com?subject=Enterprise%20plan%20request' + : i < currentPlanIndex + ? undefined // Downgrade action handled in onClick : getUpgradeProductLink({ product, redirectPath, @@ -161,14 +167,17 @@ export const PlanComparison = ({ } onClick={() => { if (!plan.current_plan) { - // TODO: add current plan key and new plan key - reportBillingUpgradeClicked(product.type) - } - if (plan.included_if == 'has_subscription' && !plan.current_plan && i < currentPlanIndex) { - setSurveyResponse(product.type, '$survey_response_1') - reportSurveyShown(UNSUBSCRIBE_SURVEY_ID, product.type) + setBillingProductLoading(product.type) + if (i < currentPlanIndex) { + setSurveyResponse(product.type, '$survey_response_1') + reportSurveyShown(UNSUBSCRIBE_SURVEY_ID, product.type) + reportBillingDowngradeClicked(product.type) + } else { + reportBillingUpgradeClicked(product.type) + } } }} + loading={billingProductLoading === product.type && !plan.current_plan && !plan.contact_support} data-attr={`upgrade-${plan.name}`} > {plan.current_plan diff --git a/frontend/src/scenes/billing/billingLogic.tsx b/frontend/src/scenes/billing/billingLogic.tsx index 964c00e3ee1c7..755aee2f161f9 100644 --- a/frontend/src/scenes/billing/billingLogic.tsx +++ b/frontend/src/scenes/billing/billingLogic.tsx @@ -198,6 +198,12 @@ export const billingLogic = kea([ }, deactivateProduct: async (key: string) => { + // clear upgrade params from URL + const currentURL = new URL(window.location.href) + currentURL.searchParams.delete('upgraded') + currentURL.searchParams.delete('products') + router.actions.push(currentURL.pathname + currentURL.search) + actions.resetUnsubscribeError() try { const response = await api.getResponse('api/billing/deactivate?products=' + key) diff --git a/frontend/src/scenes/billing/billingProductLogic.ts b/frontend/src/scenes/billing/billingProductLogic.ts index 2e03dda6c1d3c..79195ee289de0 100644 --- a/frontend/src/scenes/billing/billingProductLogic.ts +++ b/frontend/src/scenes/billing/billingProductLogic.ts @@ -277,13 +277,15 @@ export const billingProductLogic = kea([ }) actions.setSurveyID('') }, - deactivateProductSuccess: () => { + deactivateProductSuccess: async (_, breakpoint) => { if (!values.unsubscribeError) { const textAreaNotEmpty = values.surveyResponse['$survey_response']?.length > 0 textAreaNotEmpty ? actions.reportSurveySent(values.surveyID, values.surveyResponse) : actions.reportSurveyDismissed(values.surveyID) } + await breakpoint(200) + location.reload() }, setScrollToProductKey: ({ scrollToProductKey }) => { if (scrollToProductKey && scrollToProductKey === props.product.type) { diff --git a/frontend/src/scenes/dashboard/dashboardLogic.test.ts b/frontend/src/scenes/dashboard/dashboardLogic.test.ts index d8c37d8f7b205..4533c1b69dbcf 100644 --- a/frontend/src/scenes/dashboard/dashboardLogic.test.ts +++ b/frontend/src/scenes/dashboard/dashboardLogic.test.ts @@ -40,7 +40,12 @@ export function insightOnDashboard( if (!tile.insight) { throw new Error('tile has no insight') } - return { ...tile.insight, dashboards: dashboardsRelation, filters: { ...tile.insight.filters, ...insight.filters } } + return { + ...tile.insight, + dashboards: dashboardsRelation, + dashboard_tiles: dashboardsRelation.map((dashboardId) => ({ id: insight.id!, dashboard_id: dashboardId })), + filters: { ...tile.insight.filters, ...insight.filters }, + } } const TEXT_TILE: DashboardTile = { @@ -48,7 +53,6 @@ const TEXT_TILE: DashboardTile = { text: { body: 'I AM A TEXT', last_modified_at: '2021-01-01T00:00:00Z' }, layouts: {}, color: InsightColor.Blue, - last_refresh: '2021-01-01T00:00:00Z', } let tileId = 0 @@ -57,7 +61,6 @@ export const tileFromInsight = (insight: InsightModel, id: number = tileId++): D layouts: {}, color: null, insight: insight, - last_refresh: insight.last_refresh, }) export const dashboardResult = ( @@ -590,22 +593,17 @@ describe('dashboardLogic', () => { it('can respond to external update of an insight on the dashboard', async () => { const copiedInsight = insight800() - dashboardsModel.actions.updateDashboardInsight( - { - ...copiedInsight, - filters: { ...copiedInsight.filters, date_from: '-1d', interval: 'hour' }, - last_refresh: '2012-04-01T00:00:00Z', - }, - [], - [9] - ) + dashboardsModel.actions.updateDashboardInsight({ + ...copiedInsight, + filters: { ...copiedInsight.filters, date_from: '-1d', interval: 'hour' }, + last_refresh: '2012-04-01T00:00:00Z', + }) await expectLogic(logic).toFinishAllListeners() expect(logic.values.dashboard?.tiles).toHaveLength(2) expect(logic.values.insightTiles[0].insight!.filters.date_from).toEqual('-1d') expect(logic.values.insightTiles[0].insight!.filters.interval).toEqual('hour') expect(logic.values.textTiles[0].text!.body).toEqual('I AM A TEXT') - expect(logic.values.insightTiles[0].last_refresh).toEqual('2012-04-01T00:00:00Z') }) it('can respond to external insight rename', async () => { diff --git a/frontend/src/scenes/dashboard/dashboardLogic.tsx b/frontend/src/scenes/dashboard/dashboardLogic.tsx index bb6e815dc0a8c..3ef98a5315506 100644 --- a/frontend/src/scenes/dashboard/dashboardLogic.tsx +++ b/frontend/src/scenes/dashboard/dashboardLogic.tsx @@ -409,11 +409,10 @@ export const dashboardLogic = kea([ } return state }, - [dashboardsModel.actionTypes.updateDashboardInsight]: ( - state, - { insight, extraDashboardIds, updateTileOnDashboards } - ) => { - const targetDashboards = (insight.dashboards || []).concat(extraDashboardIds || []) + [dashboardsModel.actionTypes.updateDashboardInsight]: (state, { insight, extraDashboardIds }) => { + const targetDashboards = (insight.dashboard_tiles || []) + .map((tile) => tile.dashboard_id) + .concat(extraDashboardIds || []) if (!targetDashboards.includes(props.id)) { // this update is not for this dashboard return state @@ -427,11 +426,10 @@ export const dashboardLogic = kea([ const newTiles = state.tiles.slice() if (tileIndex >= 0) { - if (insight.dashboards?.includes(props.id) && updateTileOnDashboards?.includes(props.id)) { + if (insight.dashboards?.includes(props.id)) { newTiles[tileIndex] = { ...newTiles[tileIndex], insight: insight, - last_refresh: insight.last_refresh, } } else if (!insight.dashboards?.includes(props.id)) { newTiles.splice(tileIndex, 1) @@ -452,27 +450,6 @@ export const dashboardLogic = kea([ [dashboardsModel.actionTypes.updateDashboardSuccess]: (state, { dashboard }) => { return state && dashboard && state.id === dashboard.id ? dashboard : state }, - [dashboardsModel.actionTypes.updateDashboardRefreshStatus]: ( - state, - { shortId, refreshing, last_refresh } - ) => { - // If not a dashboard item, don't do anything. - if (!shortId) { - return state - } - return { - ...state, - items: state?.tiles.map((t) => - !t.insight || t.insight.short_id === shortId - ? { - ...t, - ...(refreshing != null ? { refreshing } : {}), - ...(last_refresh != null ? { last_refresh } : {}), - } - : t - ), - } as DashboardType - }, [insightsModel.actionTypes.renameInsightSuccess]: (state, { item }): DashboardType | null => { const tileIndex = state?.tiles.findIndex((t) => !!t.insight && t.insight.short_id === item.short_id) const tiles = state?.tiles.slice(0) @@ -686,7 +663,9 @@ export const dashboardLogic = kea([ return [] } - const validDates = insightTiles.map((i) => dayjs(i.last_refresh)).filter((date) => date.isValid()) + const validDates = insightTiles + .map((i) => dayjs(i.insight?.last_refresh)) + .filter((date) => date.isValid()) return sortDayJsDates(validDates) }, ], @@ -701,16 +680,6 @@ export const dashboardLogic = kea([ return sortedDates[sortedDates.length - 1] }, ], - oldestRefreshed: [ - (s) => [s.sortedDates], - (sortedDates): Dayjs | null => { - if (!sortedDates.length) { - return null - } - - return sortedDates[0] - }, - ], sortedClientRefreshAllowed: [ (s) => [s.insightTiles], (insightTiles): Dayjs[] => { @@ -914,7 +883,9 @@ export const dashboardLogic = kea([ } }, [dashboardsModel.actionTypes.updateDashboardInsight]: ({ insight, extraDashboardIds }) => { - const targetDashboards = (insight.dashboards || []).concat(extraDashboardIds || []) + const targetDashboards = (insight.dashboard_tiles || []) + .map((tile) => tile.dashboard_id) + .concat(extraDashboardIds || []) if (!targetDashboards.includes(props.id)) { // this update is not for this dashboard return @@ -1000,7 +971,7 @@ export const dashboardLogic = kea([ uuid(), 'force_async' ) - dashboardsModel.actions.updateDashboardInsight(refreshedInsight, [], props.id ? [props.id] : undefined) + dashboardsModel.actions.updateDashboardInsight(refreshedInsight) // Start polling for results tile.insight = refreshedInsight actions.refreshAllDashboardItems({ tiles: [tile], action: 'refresh' }) @@ -1063,11 +1034,7 @@ export const dashboardLogic = kea([ 'async', methodOptions ) - dashboardsModel.actions.updateDashboardInsight( - polledInsight, - [], - props.id ? [props.id] : undefined - ) + dashboardsModel.actions.updateDashboardInsight(polledInsight) actions.setRefreshStatus(insight.short_id) } } catch (e: any) { @@ -1165,7 +1132,7 @@ export const dashboardLogic = kea([ const dashboard = values.dashboard const { action, dashboardQueryId, startTime, responseBytes } = values.dashboardLoadTimerData - const lastRefresh = sortDates(dashboard.tiles.map((tile) => tile.last_refresh)) + const lastRefresh = sortDates(dashboard.tiles.map((tile) => tile.insight?.last_refresh || null)) const initialLoad = action === 'initial_load' const allLoaded = false // TODO: Check this diff --git a/frontend/src/scenes/data-management/actions/ActionsTable.tsx b/frontend/src/scenes/data-management/actions/ActionsTable.tsx index 74a19bb9aea6e..b1658cc94ed83 100644 --- a/frontend/src/scenes/data-management/actions/ActionsTable.tsx +++ b/frontend/src/scenes/data-management/actions/ActionsTable.tsx @@ -19,7 +19,15 @@ import { actionsLogic } from 'scenes/actions/actionsLogic' import { userLogic } from 'scenes/userLogic' import { actionsModel } from '~/models/actionsModel' -import { ActionType, AvailableFeature, ChartDisplayType, InsightType, ProductKey } from '~/types' +import { + ActionType, + AvailableFeature, + ChartDisplayType, + FilterLogicalOperator, + InsightType, + ProductKey, + ReplayTabs, +} from '~/types' import { NewActionButton } from '../../actions/NewActionButton' import { teamLogic } from '../../teamLogic' @@ -151,20 +159,24 @@ export function ActionsTable(): JSX.Element { Copy } fullWidth data-attr="action-table-view-recordings" diff --git a/frontend/src/scenes/data-management/definition/DefinitionView.tsx b/frontend/src/scenes/data-management/definition/DefinitionView.tsx index 8d0f0c6b7c698..534d638f1b95c 100644 --- a/frontend/src/scenes/data-management/definition/DefinitionView.tsx +++ b/frontend/src/scenes/data-management/definition/DefinitionView.tsx @@ -1,7 +1,6 @@ import { TZLabel } from '@posthog/apps-common' import { LemonDivider, LemonTag } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' -import { combineUrl } from 'kea-router/lib/utils' import { EditableField } from 'lib/components/EditableField/EditableField' import { NotFound } from 'lib/components/NotFound' import { ObjectTags } from 'lib/components/ObjectTags/ObjectTags' @@ -21,7 +20,7 @@ import { urls } from 'scenes/urls' import { defaultDataTableColumns } from '~/queries/nodes/DataTable/utils' import { Query } from '~/queries/Query/Query' import { NodeKind } from '~/queries/schema' -import { PropertyDefinition } from '~/types' +import { FilterLogicalOperator, PropertyDefinition, ReplayTabs } from '~/types' export const scene: SceneExport = { component: DefinitionView, @@ -53,20 +52,24 @@ export function DefinitionView(props: DefinitionLogicProps = {}): JSX.Element { {isEvent && ( } data-attr="event-definition-view-recordings" > diff --git a/frontend/src/scenes/data-management/events/EventDefinitionsTable.tsx b/frontend/src/scenes/data-management/events/EventDefinitionsTable.tsx index 304a95d4b89e3..b174429cc64b3 100644 --- a/frontend/src/scenes/data-management/events/EventDefinitionsTable.tsx +++ b/frontend/src/scenes/data-management/events/EventDefinitionsTable.tsx @@ -1,6 +1,5 @@ import { LemonButton, LemonInput, LemonSelect, LemonSelectOptions, Link } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' -import { combineUrl } from 'kea-router' import { ObjectTags } from 'lib/components/ObjectTags/ObjectTags' import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' import { TZLabel } from 'lib/components/TZLabel' @@ -15,7 +14,7 @@ import { eventDefinitionsTableLogic } from 'scenes/data-management/events/eventD import { organizationLogic } from 'scenes/organizationLogic' import { urls } from 'scenes/urls' -import { EventDefinition, EventDefinitionType } from '~/types' +import { EventDefinition, EventDefinitionType, FilterLogicalOperator, ReplayTabs } from '~/types' const eventTypeOptions: LemonSelectOptions = [ { value: EventDefinitionType.Event, label: 'All events', 'data-attr': 'event-type-option-event' }, @@ -88,20 +87,24 @@ export function EventDefinitionsTable(): JSX.Element { overlay={ <> } data-attr="event-definitions-table-view-recordings" diff --git a/frontend/src/scenes/data-warehouse/external/forms/PostgresSchemaForm.tsx b/frontend/src/scenes/data-warehouse/external/forms/SchemaForm.tsx similarity index 93% rename from frontend/src/scenes/data-warehouse/external/forms/PostgresSchemaForm.tsx rename to frontend/src/scenes/data-warehouse/external/forms/SchemaForm.tsx index 98125b15466d3..fd23f4a2674fc 100644 --- a/frontend/src/scenes/data-warehouse/external/forms/PostgresSchemaForm.tsx +++ b/frontend/src/scenes/data-warehouse/external/forms/SchemaForm.tsx @@ -4,7 +4,7 @@ import { useActions, useValues } from 'kea' import { sourceWizardLogic } from '../../new/sourceWizardLogic' import { SyncMethodForm } from './SyncMethodForm' -export default function PostgresSchemaForm(): JSX.Element { +export default function SchemaForm(): JSX.Element { const { toggleSchemaShouldSync, openSyncMethodModal } = useActions(sourceWizardLogic) const { databaseSchema } = useValues(sourceWizardLogic) @@ -26,6 +26,11 @@ export default function PostgresSchemaForm(): JSX.Element { onChange={(checked) => { toggleSchemaShouldSync(schema, checked) }} + disabledReason={ + schema.sync_type === null + ? 'Please set up a sync method first' + : undefined + } /> ) }, diff --git a/frontend/src/scenes/data-warehouse/new/NewSourceWizard.tsx b/frontend/src/scenes/data-warehouse/new/NewSourceWizard.tsx index 81c44222314dd..4f402724ff9b3 100644 --- a/frontend/src/scenes/data-warehouse/new/NewSourceWizard.tsx +++ b/frontend/src/scenes/data-warehouse/new/NewSourceWizard.tsx @@ -7,7 +7,7 @@ import { SceneExport } from 'scenes/sceneTypes' import { ManualLinkSourceType, SourceConfig } from '~/types' import { DataWarehouseInitialBillingLimitNotice } from '../DataWarehouseInitialBillingLimitNotice' -import PostgresSchemaForm from '../external/forms/PostgresSchemaForm' +import SchemaForm from '../external/forms/SchemaForm' import SourceForm from '../external/forms/SourceForm' import { SyncProgressStep } from '../external/forms/SyncProgressStep' import { DatawarehouseTableForm } from '../new/DataWarehouseTableForm' @@ -241,7 +241,7 @@ function SecondStep(): JSX.Element { function ThirdStep(): JSX.Element { return ( - + ) } diff --git a/frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts b/frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts index 7d80f3507867c..ee76fff2447a6 100644 --- a/frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts +++ b/frontend/src/scenes/data-warehouse/settings/dataWarehouseSettingsLogic.ts @@ -139,18 +139,9 @@ export const dataWarehouseSettingsLogic = kea([ }, ], }), - urlToAction(({ cache, actions }) => ({ - '/data-warehouse/managed-sources': () => { - clearTimeout(cache.refreshTimeout) - - cache.refreshTimeout = setTimeout(() => { - actions.loadSources(null) - }, REFRESH_INTERVAL) - }, - '*': () => { - if (cache.refreshTimeout && router.values.location.pathname !== '/data-warehouse/managed-sources') { - clearTimeout(cache.refreshTimeout) - } + urlToAction(({ actions }) => ({ + '/data-warehouse/*': () => { + actions.loadSources(null) }, })), listeners(({ actions, values, cache }) => ({ @@ -211,6 +202,24 @@ export const dataWarehouseSettingsLogic = kea([ updateSchema: (schema) => { posthog.capture('schema updated', { shouldSync: schema.should_sync, syncType: schema.sync_type }) }, + loadSourcesSuccess: () => { + clearTimeout(cache.refreshTimeout) + + if (router.values.location.pathname.includes('data-warehouse')) { + cache.refreshTimeout = setTimeout(() => { + actions.loadSources(null) + }, REFRESH_INTERVAL) + } + }, + loadSourcesFailure: () => { + clearTimeout(cache.refreshTimeout) + + if (router.values.location.pathname.includes('data-warehouse')) { + cache.refreshTimeout = setTimeout(() => { + actions.loadSources(null) + }, REFRESH_INTERVAL) + } + }, })), afterMount(({ actions }) => { actions.loadSources(null) diff --git a/frontend/src/scenes/data-warehouse/utils.ts b/frontend/src/scenes/data-warehouse/utils.ts index d3acf12a8089b..a1dfc3f32c889 100644 --- a/frontend/src/scenes/data-warehouse/utils.ts +++ b/frontend/src/scenes/data-warehouse/utils.ts @@ -1,9 +1,8 @@ -import { DatabaseSchemaField, DataTableNode, NodeKind } from '~/queries/schema' +import { DatabaseSchemaField, DataVisualizationNode, NodeKind } from '~/queries/schema' -export const defaultQuery = (table: string, columns: DatabaseSchemaField[]): DataTableNode => { +export const defaultQuery = (table: string, columns: DatabaseSchemaField[]): DataVisualizationNode => { return { - kind: NodeKind.DataTableNode, - full: true, + kind: NodeKind.DataVisualizationNode, source: { kind: NodeKind.HogQLQuery, // TODO: Use `hogql` tag? diff --git a/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx b/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx index 34f0fc91ff606..ea4efe8144c9e 100644 --- a/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx +++ b/frontend/src/scenes/early-access-features/EarlyAccessFeature.tsx @@ -20,10 +20,11 @@ import { EarlyAccessFeatureStage, EarlyAccessFeatureTabs, EarlyAccessFeatureType, - FilterType, + FilterLogicalOperator, PersonPropertyFilter, PropertyFilterType, PropertyOperator, + RecordingUniversalFilters, ReplayTabs, } from '~/types' @@ -343,29 +344,41 @@ interface PersonListProps { earlyAccessFeature: EarlyAccessFeatureType } -function featureFlagEnrolmentFilter(earlyAccessFeature: EarlyAccessFeatureType, optedIn: boolean): Partial { +function featureFlagEnrolmentFilter( + earlyAccessFeature: EarlyAccessFeatureType, + optedIn: boolean +): Partial { return { - events: [ - { - type: 'events', - order: 0, - name: '$feature_enrollment_update', - properties: [ - { - key: '$feature_enrollment', - value: [optedIn ? 'true' : 'false'], - operator: 'exact', - type: 'event', - }, - { - key: '$feature_flag', - value: [earlyAccessFeature.feature_flag.key], - operator: 'exact', - type: 'event', - }, - ], - }, - ], + filter_group: { + type: FilterLogicalOperator.And, + values: [ + { + type: FilterLogicalOperator.And, + values: [ + { + type: 'events', + order: 0, + id: '$feature_enrollment_update', + name: '$feature_enrollment_update', + properties: [ + { + key: '$feature_enrollment', + value: [optedIn ? 'true' : 'false'], + operator: PropertyOperator.Exact, + type: PropertyFilterType.Event, + }, + { + key: '$feature_flag', + value: [earlyAccessFeature.feature_flag.key], + operator: PropertyOperator.Exact, + type: PropertyFilterType.Event, + }, + ], + }, + ], + }, + ], + }, } } @@ -425,7 +438,7 @@ export function PersonList({ earlyAccessFeature }: PersonListProps): JSX.Element interface PersonsTableByFilterProps { properties: PersonPropertyFilter[] - recordingsFilters: Partial + recordingsFilters: Partial } function PersonsTableByFilter({ recordingsFilters, properties }: PersonsTableByFilterProps): JSX.Element { diff --git a/frontend/src/scenes/error-tracking/ErrorTrackingActions.tsx b/frontend/src/scenes/error-tracking/ErrorTrackingActions.tsx deleted file mode 100644 index d5bdbf4889d54..0000000000000 --- a/frontend/src/scenes/error-tracking/ErrorTrackingActions.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import { LemonSelect } from '@posthog/lemon-ui' -import { useActions, useValues } from 'kea' -import { DateFilter } from 'lib/components/DateFilter/DateFilter' - -import { errorTrackingLogic } from './errorTrackingLogic' -import { errorTrackingSceneLogic } from './errorTrackingSceneLogic' - -export const ErrorTrackingActions = ({ showOrder = true }: { showOrder?: boolean }): JSX.Element => { - const { dateRange } = useValues(errorTrackingLogic) - const { setDateRange } = useActions(errorTrackingLogic) - const { order } = useValues(errorTrackingSceneLogic) - const { setOrder } = useActions(errorTrackingSceneLogic) - - return ( -
-
- Date range: - { - setDateRange({ date_from: changedDateFrom, date_to: changedDateTo }) - }} - size="small" - /> -
- {showOrder && ( -
- Sort by: - -
- )} -
- ) -} diff --git a/frontend/src/scenes/error-tracking/ErrorTrackingFilters.tsx b/frontend/src/scenes/error-tracking/ErrorTrackingFilters.tsx index 37d5007133f28..2ea376d39cea6 100644 --- a/frontend/src/scenes/error-tracking/ErrorTrackingFilters.tsx +++ b/frontend/src/scenes/error-tracking/ErrorTrackingFilters.tsx @@ -1,4 +1,6 @@ +import { LemonSelect } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' +import { DateFilter } from 'lib/components/DateFilter/DateFilter' import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' import UniversalFilters from 'lib/components/UniversalFilters/UniversalFilters' import { universalFiltersLogic } from 'lib/components/UniversalFilters/universalFiltersLogic' @@ -7,8 +9,9 @@ import { useEffect, useState } from 'react' import { TestAccountFilter } from 'scenes/insights/filters/TestAccountFilter' import { errorTrackingLogic } from './errorTrackingLogic' +import { errorTrackingSceneLogic } from './errorTrackingSceneLogic' -export const ErrorTrackingFilters = (): JSX.Element => { +export const FilterGroup = (): JSX.Element => { const { filterGroup, filterTestAccounts } = useValues(errorTrackingLogic) const { setFilterGroup, setFilterTestAccounts } = useActions(errorTrackingLogic) @@ -66,3 +69,64 @@ const RecordingsUniversalFilterGroup = (): JSX.Element => { ) } + +export const Options = ({ showOrder = true }: { showOrder?: boolean }): JSX.Element => { + const { dateRange } = useValues(errorTrackingLogic) + const { setDateRange } = useActions(errorTrackingLogic) + const { order } = useValues(errorTrackingSceneLogic) + const { setOrder } = useActions(errorTrackingSceneLogic) + + return ( +
+
+ Date range: + { + setDateRange({ date_from: changedDateFrom, date_to: changedDateTo }) + }} + size="small" + /> +
+ {showOrder && ( +
+ Sort by: + +
+ )} +
+ ) +} + +export default { + FilterGroup, + Options, +} diff --git a/frontend/src/scenes/error-tracking/ErrorTrackingGroupScene.tsx b/frontend/src/scenes/error-tracking/ErrorTrackingGroupScene.tsx index 6009b8f03961e..917668336ece8 100644 --- a/frontend/src/scenes/error-tracking/ErrorTrackingGroupScene.tsx +++ b/frontend/src/scenes/error-tracking/ErrorTrackingGroupScene.tsx @@ -4,8 +4,7 @@ import { LemonDivider, LemonTabs } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { SceneExport } from 'scenes/sceneTypes' -import { ErrorTrackingActions } from './ErrorTrackingActions' -import { ErrorTrackingFilters } from './ErrorTrackingFilters' +import ErrorTrackingFilters from './ErrorTrackingFilters' import { ErrorGroupTab, errorTrackingGroupSceneLogic } from './errorTrackingGroupSceneLogic' import { BreakdownsTab } from './groups/BreakdownsTab' import { OverviewTab } from './groups/OverviewTab' @@ -23,10 +22,10 @@ export function ErrorTrackingGroupScene(): JSX.Element { const { setErrorGroupTab } = useActions(errorTrackingGroupSceneLogic) return ( -
- - - + <> + + + -
+ ) } diff --git a/frontend/src/scenes/error-tracking/ErrorTrackingScene.tsx b/frontend/src/scenes/error-tracking/ErrorTrackingScene.tsx index a6c57ce40a36e..be73a8270b2ac 100644 --- a/frontend/src/scenes/error-tracking/ErrorTrackingScene.tsx +++ b/frontend/src/scenes/error-tracking/ErrorTrackingScene.tsx @@ -1,6 +1,7 @@ import { TZLabel } from '@posthog/apps-common' import { IconPerson } from '@posthog/icons' -import { LemonButton, LemonDivider, LemonSegmentedButton, ProfilePicture } from '@posthog/lemon-ui' +import { LemonButton, LemonCheckbox, LemonDivider, LemonSegmentedButton, ProfilePicture } from '@posthog/lemon-ui' +import clsx from 'clsx' import { BindLogic, useActions, useValues } from 'kea' import { MemberSelect } from 'lib/components/MemberSelect' import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink' @@ -13,9 +14,8 @@ import { ErrorTrackingGroup } from '~/queries/schema' import { QueryContext, QueryContextColumnComponent, QueryContextColumnTitleComponent } from '~/queries/types' import { InsightLogicProps } from '~/types' -import { ErrorTrackingActions } from './ErrorTrackingActions' -import { errorTrackingDataLogic } from './errorTrackingDataLogic' -import { ErrorTrackingFilters } from './ErrorTrackingFilters' +import { errorTrackingDataNodeLogic } from './errorTrackingDataNodeLogic' +import ErrorTrackingFilters from './ErrorTrackingFilters' import { errorTrackingLogic } from './errorTrackingLogic' import { errorTrackingSceneLogic } from './errorTrackingSceneLogic' @@ -25,7 +25,7 @@ export const scene: SceneExport = { } export function ErrorTrackingScene(): JSX.Element { - const { query } = useValues(errorTrackingSceneLogic) + const { query, selectedRows } = useValues(errorTrackingSceneLogic) const insightProps: InsightLogicProps = { dashboardItemId: 'new-ErrorTrackingQuery', @@ -47,17 +47,41 @@ export function ErrorTrackingScene(): JSX.Element { } return ( - -
- - - - -
+ + + + {selectedRows.length === 0 ? : } + ) } +const ErrorTrackingActions = (): JSX.Element => { + const { selectedRows } = useValues(errorTrackingSceneLogic) + const { setSelectedRows } = useActions(errorTrackingSceneLogic) + const { mergeGroups } = useActions(errorTrackingDataNodeLogic) + + return ( +
+ setSelectedRows([])}> + Unselect all + + {selectedRows.length > 1 && ( + { + mergeGroups(selectedRows) + setSelectedRows([]) + }} + > + Merge + + )} +
+ ) +} + const CustomVolumeColumnHeader: QueryContextColumnTitleComponent = ({ columnName }) => { const { sparklineSelectedPeriod, sparklineOptions: options } = useValues(errorTrackingLogic) const { setSparklineSelectedPeriod } = useActions(errorTrackingLogic) @@ -80,12 +104,28 @@ const CustomVolumeColumnHeader: QueryContextColumnTitleComponent = ({ columnName } const CustomGroupTitleColumn: QueryContextColumnComponent = (props) => { + const { selectedRows } = useValues(errorTrackingSceneLogic) + const { setSelectedRows } = useActions(errorTrackingSceneLogic) + const record = props.record as ErrorTrackingGroup + const checked = selectedRows.includes(record.fingerprint) + return (
+ { + setSelectedRows( + checked + ? [...selectedRows, record.fingerprint] + : selectedRows.filter((r) => r != record.fingerprint) + ) + }} + />
{record.description}
@@ -104,7 +144,7 @@ const CustomGroupTitleColumn: QueryContextColumnComponent = (props) => { } const AssigneeColumn: QueryContextColumnComponent = (props) => { - const { assignGroup } = useActions(errorTrackingDataLogic) + const { assignGroup } = useActions(errorTrackingDataNodeLogic) const record = props.record as ErrorTrackingGroup diff --git a/frontend/src/scenes/error-tracking/__mocks__/error_tracking_query.ts b/frontend/src/scenes/error-tracking/__mocks__/error_tracking_query.ts index 1247854bf8251..b69d479cf1acb 100644 --- a/frontend/src/scenes/error-tracking/__mocks__/error_tracking_query.ts +++ b/frontend/src/scenes/error-tracking/__mocks__/error_tracking_query.ts @@ -147,7 +147,7 @@ const errorTrackingGroupQueryResponse = { person: { created_at: '2024-04-05T21:14:16.048000Z', distinct_id: 'BTQiT390vxwlLeDSwZAZpXC7r7bkNc3TQuhobit0oj7', - properties: JSON.stringify({ email: 'test@example.com' }), + properties: { email: 'test@example.com' }, uuid: 'person_uuid', }, })), diff --git a/frontend/src/scenes/error-tracking/errorTrackingDataLogic.tsx b/frontend/src/scenes/error-tracking/errorTrackingDataLogic.tsx index 5f7ad4ee30345..540590d01ffe8 100644 --- a/frontend/src/scenes/error-tracking/errorTrackingDataLogic.tsx +++ b/frontend/src/scenes/error-tracking/errorTrackingDataLogic.tsx @@ -5,6 +5,7 @@ import { dataNodeLogic, DataNodeLogicProps } from '~/queries/nodes/DataNode/data import { ErrorTrackingGroup } from '~/queries/schema' import type { errorTrackingDataLogicType } from './errorTrackingDataLogicType' +import { mergeGroups } from './utils' export interface ErrorTrackingDataLogicProps { query: DataNodeLogicProps['query'] @@ -21,6 +22,7 @@ export const errorTrackingDataLogic = kea([ })), actions({ + mergeGroups: (fingerprints: string[]) => ({ fingerprints }), assignGroup: (recordIndex: number, assigneeId: number | null) => ({ recordIndex, assigneeId, @@ -28,6 +30,30 @@ export const errorTrackingDataLogic = kea([ }), listeners(({ values, actions }) => ({ + mergeGroups: async ({ fingerprints }) => { + const results = values.response?.results as ErrorTrackingGroup[] + + const groups = results.filter((g) => fingerprints.includes(g.fingerprint)) + const primaryGroup = groups.shift() + + if (primaryGroup && groups.length > 0) { + const mergingFingerprints = groups.map((g) => g.fingerprint) + const mergedGroup = mergeGroups(primaryGroup, groups) + + // optimistically update local results + actions.setResponse({ + ...values.response, + results: results + // remove merged groups + .filter((group) => !mergingFingerprints.includes(group.fingerprint)) + .map((group) => + // replace primary group + mergedGroup.fingerprint === group.fingerprint ? mergedGroup : group + ), + }) + await api.errorTracking.merge(primaryGroup?.fingerprint, mergingFingerprints) + } + }, assignGroup: async ({ recordIndex, assigneeId }) => { const response = values.response if (response) { diff --git a/frontend/src/scenes/error-tracking/errorTrackingDataNodeLogic.tsx b/frontend/src/scenes/error-tracking/errorTrackingDataNodeLogic.tsx new file mode 100644 index 0000000000000..586b5bcf64e39 --- /dev/null +++ b/frontend/src/scenes/error-tracking/errorTrackingDataNodeLogic.tsx @@ -0,0 +1,70 @@ +import { actions, connect, kea, listeners, path, props } from 'kea' +import api from 'lib/api' + +import { dataNodeLogic, DataNodeLogicProps } from '~/queries/nodes/DataNode/dataNodeLogic' +import { ErrorTrackingGroup } from '~/queries/schema' + +import type { errorTrackingDataNodeLogicType } from './errorTrackingDataNodeLogicType' +import { mergeGroups } from './utils' + +export interface ErrorTrackingDataNodeLogicProps { + query: DataNodeLogicProps['query'] + key: DataNodeLogicProps['key'] +} + +export const errorTrackingDataNodeLogic = kea([ + path(['scenes', 'error-tracking', 'errorTrackingDataNodeLogic']), + props({} as ErrorTrackingDataNodeLogicProps), + + connect(({ key, query }: ErrorTrackingDataNodeLogicProps) => ({ + values: [dataNodeLogic({ key, query }), ['response']], + actions: [dataNodeLogic({ key, query }), ['setResponse']], + })), + + actions({ + mergeGroups: (fingerprints: string[]) => ({ fingerprints }), + assignGroup: (recordIndex: number, assigneeId: number | null) => ({ + recordIndex, + assigneeId, + }), + }), + + listeners(({ values, actions }) => ({ + mergeGroups: async ({ fingerprints }) => { + const results = values.response?.results as ErrorTrackingGroup[] + + const groups = results.filter((g) => fingerprints.includes(g.fingerprint)) + const primaryGroup = groups.shift() + + if (primaryGroup && groups.length > 0) { + const mergingFingerprints = groups.map((g) => g.fingerprint) + const mergedGroup = mergeGroups(primaryGroup, groups) + + // optimistically update local results + actions.setResponse({ + ...values.response, + results: results + // remove merged groups + .filter((group) => !mergingFingerprints.includes(group.fingerprint)) + .map((group) => + // replace primary group + mergedGroup.fingerprint === group.fingerprint ? mergedGroup : group + ), + }) + await api.errorTracking.merge(primaryGroup?.fingerprint, mergingFingerprints) + } + }, + assignGroup: async ({ recordIndex, assigneeId }) => { + const response = values.response + if (response) { + const params = { assignee: assigneeId } + const results = values.response?.results as ErrorTrackingGroup[] + const group = { ...results[recordIndex], ...params } + results.splice(recordIndex, 1, group) + // optimistically update local results + actions.setResponse({ ...response, results: results }) + await api.errorTracking.update(group.fingerprint, params) + } + }, + })), +]) diff --git a/frontend/src/scenes/error-tracking/errorTrackingGroupSceneLogic.ts b/frontend/src/scenes/error-tracking/errorTrackingGroupSceneLogic.ts index 8289707d37d1e..f070c24177e69 100644 --- a/frontend/src/scenes/error-tracking/errorTrackingGroupSceneLogic.ts +++ b/frontend/src/scenes/error-tracking/errorTrackingGroupSceneLogic.ts @@ -29,7 +29,7 @@ export type ErrorTrackingGroupEvent = { distinct_id: string uuid?: string created_at?: string - properties?: string + properties?: Record } } diff --git a/frontend/src/scenes/error-tracking/errorTrackingSceneLogic.ts b/frontend/src/scenes/error-tracking/errorTrackingSceneLogic.ts index 145c047d59648..2051eb2aa2566 100644 --- a/frontend/src/scenes/error-tracking/errorTrackingSceneLogic.ts +++ b/frontend/src/scenes/error-tracking/errorTrackingSceneLogic.ts @@ -1,4 +1,5 @@ import { actions, connect, kea, path, reducers, selectors } from 'kea' +import { subscriptions } from 'kea-subscriptions' import { DataTableNode, ErrorTrackingQuery } from '~/queries/schema' @@ -15,6 +16,7 @@ export const errorTrackingSceneLogic = kea([ actions({ setOrder: (order: ErrorTrackingQuery['order']) => ({ order }), + setSelectedRows: (selectedRows: string[]) => ({ selectedRows }), }), reducers({ order: [ @@ -24,6 +26,12 @@ export const errorTrackingSceneLogic = kea([ setOrder: (_, { order }) => order, }, ], + selectedRows: [ + [] as string[], + { + setSelectedRows: (_, { selectedRows }) => selectedRows, + }, + ], }), selectors({ @@ -39,4 +47,8 @@ export const errorTrackingSceneLogic = kea([ }), ], }), + + subscriptions(({ actions }) => ({ + query: () => actions.setSelectedRows([]), + })), ]) diff --git a/frontend/src/scenes/error-tracking/groups/OverviewTab.tsx b/frontend/src/scenes/error-tracking/groups/OverviewTab.tsx index a640f17ee14c8..62d04251edc55 100644 --- a/frontend/src/scenes/error-tracking/groups/OverviewTab.tsx +++ b/frontend/src/scenes/error-tracking/groups/OverviewTab.tsx @@ -71,13 +71,13 @@ const ListItemException = ({ }) .filter((property) => !!property.value) - const person = { ...event.person, properties: event.person.properties ? JSON.parse(event.person.properties) : {} } + // const person = { ...event.person, properties: event.person.properties ? JSON.parse(event.person.properties) : {} } return (
- +
diff --git a/frontend/src/scenes/error-tracking/utils.test.ts b/frontend/src/scenes/error-tracking/utils.test.ts new file mode 100644 index 0000000000000..432f72d474b8b --- /dev/null +++ b/frontend/src/scenes/error-tracking/utils.test.ts @@ -0,0 +1,162 @@ +import { ErrorTrackingGroup } from '~/queries/schema' + +import { mergeGroups } from './utils' + +describe('mergeGroups', () => { + it('arbitrary values', async () => { + const primaryGroup: ErrorTrackingGroup = { + assignee: 400, + description: 'This is the original description', + exception_type: 'TypeError', + fingerprint: 'Fingerprint', + first_seen: '2024-07-22T13:15:07.074000Z', + last_seen: '2024-07-20T13:15:50.186000Z', + merged_fingerprints: ['ExistingFingerprint'], + occurrences: 250, + sessions: 100, + status: 'active', + users: 50, + volume: [ + '__hx_tag', + 'Sparkline', + 'data', + [10, 5, 10, 20, 50], + 'labels', + [ + '25 Jun, 2024 00:00 (UTC)', + '26 Jun, 2024 00:00 (UTC)', + '27 Jun, 2024 00:00 (UTC)', + '28 Jun, 2024 00:00 (UTC)', + '29 Jun, 2024 00:00 (UTC)', + ], + ], + } + + const mergingGroups: ErrorTrackingGroup[] = [ + { + assignee: 100, + description: 'This is another description', + exception_type: 'SyntaxError', + fingerprint: 'Fingerprint2', + first_seen: '2024-07-21T13:15:07.074000Z', + last_seen: '2024-07-20T13:15:50.186000Z', + merged_fingerprints: ['NestedFingerprint'], + occurrences: 10, + sessions: 5, + status: 'active', + users: 1, + volume: [ + '__hx_tag', + 'Sparkline', + 'data', + [1, 1, 2, 1, 2], + 'labels', + [ + '25 Jun, 2024 00:00 (UTC)', + '26 Jun, 2024 00:00 (UTC)', + '27 Jun, 2024 00:00 (UTC)', + '28 Jun, 2024 00:00 (UTC)', + '29 Jun, 2024 00:00 (UTC)', + ], + ], + }, + { + assignee: 400, + description: 'This is another description', + exception_type: 'SyntaxError', + fingerprint: 'Fingerprint3', + first_seen: '2024-07-21T13:15:07.074000Z', + last_seen: '2024-07-22T13:15:50.186000Z', + merged_fingerprints: [], + occurrences: 1, + sessions: 1, + status: 'active', + users: 1, + volume: [ + '__hx_tag', + 'Sparkline', + 'data', + [5, 10, 2, 3, 5], + 'labels', + [ + '25 Jun, 2024 00:00 (UTC)', + '26 Jun, 2024 00:00 (UTC)', + '27 Jun, 2024 00:00 (UTC)', + '28 Jun, 2024 00:00 (UTC)', + '29 Jun, 2024 00:00 (UTC)', + ], + ], + }, + { + assignee: null, + description: 'This is another description', + exception_type: 'SyntaxError', + fingerprint: 'Fingerprint4', + first_seen: '2023-07-22T13:15:07.074000Z', + last_seen: '2024-07-22T13:15:50.186000Z', + merged_fingerprints: [], + occurrences: 1000, + sessions: 500, + status: 'active', + users: 50, + volume: [ + '__hx_tag', + 'Sparkline', + 'data', + [10, 100, 200, 300, 700], + 'labels', + [ + '25 Jun, 2024 00:00 (UTC)', + '26 Jun, 2024 00:00 (UTC)', + '27 Jun, 2024 00:00 (UTC)', + '28 Jun, 2024 00:00 (UTC)', + '29 Jun, 2024 00:00 (UTC)', + ], + ], + }, + ] + + const mergedGroup = mergeGroups(primaryGroup, mergingGroups) + + expect(mergedGroup).toEqual({ + // retains values from primary group + assignee: 400, + description: 'This is the original description', + exception_type: 'TypeError', + fingerprint: 'Fingerprint', + status: 'active', + // earliest first_seen + first_seen: '2023-07-22T13:15:07.074Z', + // latest last_seen + last_seen: '2024-07-22T13:15:50.186Z', + // retains previously merged_fingerprints + // adds new fingerprints AND their nested fingerprints + merged_fingerprints: [ + 'ExistingFingerprint', + 'Fingerprint2', + 'NestedFingerprint', + 'Fingerprint3', + 'Fingerprint4', + ], + // sums counts + occurrences: 1261, + sessions: 606, + users: 102, + // sums volumes + volume: [ + '__hx_tag', + 'Sparkline', + 'data', + [26, 116, 214, 324, 757], + 'labels', + [ + '25 Jun, 2024 00:00 (UTC)', + '26 Jun, 2024 00:00 (UTC)', + '27 Jun, 2024 00:00 (UTC)', + '28 Jun, 2024 00:00 (UTC)', + '29 Jun, 2024 00:00 (UTC)', + ], + ], + }) + }) +}) diff --git a/frontend/src/scenes/error-tracking/utils.ts b/frontend/src/scenes/error-tracking/utils.ts new file mode 100644 index 0000000000000..e776429e86ebe --- /dev/null +++ b/frontend/src/scenes/error-tracking/utils.ts @@ -0,0 +1,48 @@ +import { dayjs } from 'lib/dayjs' + +import { ErrorTrackingGroup } from '~/queries/schema' + +export const mergeGroups = ( + primaryGroup: ErrorTrackingGroup, + mergingGroups: ErrorTrackingGroup[] +): ErrorTrackingGroup => { + const mergingFingerprints = mergingGroups.flatMap((g) => [g.fingerprint, ...g.merged_fingerprints]) + + const mergedFingerprints = [...primaryGroup.merged_fingerprints] + mergedFingerprints.push(...mergingFingerprints) + + const sum = (value: 'occurrences' | 'users' | 'sessions'): number => { + return mergingGroups.reduce((sum, g) => sum + g[value], primaryGroup[value]) + } + + const [firstSeen, lastSeen] = mergingGroups.reduce( + (res, g) => { + const firstSeen = dayjs(g.first_seen) + const lastSeen = dayjs(g.last_seen) + return [res[0].isAfter(firstSeen) ? firstSeen : res[0], res[1].isBefore(lastSeen) ? lastSeen : res[1]] + }, + [dayjs(primaryGroup.first_seen), dayjs(primaryGroup.last_seen)] + ) + + const volume = primaryGroup.volume + + if (volume) { + const dataIndex = 3 + const data = mergingGroups.reduce( + (sum: number[], g) => g.volume[dataIndex].map((num: number, idx: number) => num + sum[idx]), + primaryGroup.volume[dataIndex] + ) + volume.splice(dataIndex, 1, data) + } + + return { + ...primaryGroup, + merged_fingerprints: mergedFingerprints, + occurrences: sum('occurrences'), + sessions: sum('sessions'), + users: sum('users'), + first_seen: firstSeen.toISOString(), + last_seen: lastSeen.toISOString(), + volume: volume, + } +} diff --git a/frontend/src/scenes/feature-flags/featureFlagLogic.ts b/frontend/src/scenes/feature-flags/featureFlagLogic.ts index 0be1c2d349e82..31b86f96ccf7e 100644 --- a/frontend/src/scenes/feature-flags/featureFlagLogic.ts +++ b/frontend/src/scenes/feature-flags/featureFlagLogic.ts @@ -30,6 +30,7 @@ import { FeatureFlagGroupType, FeatureFlagRollbackConditions, FeatureFlagType, + FilterLogicalOperator, FilterType, InsightModel, InsightType, @@ -39,6 +40,7 @@ import { OrganizationFeatureFlag, PropertyFilterType, PropertyOperator, + RecordingUniversalFilters, RolloutConditionType, ScheduledChangeOperationType, ScheduledChangeType, @@ -820,58 +822,64 @@ export const featureFlagLogic = kea([ ], recordingFilterForFlag: [ (s) => [s.featureFlag], - (featureFlag) => { + (featureFlag): Partial => { const flagKey = featureFlag?.key if (!flagKey) { return {} } - const defaultEntityFilterOnFlag: Partial = { - events: [ - { - id: '$feature_flag_called', - name: '$feature_flag_called', - type: 'events', - properties: [ - { - key: '$feature/' + flagKey, - type: PropertyFilterType.Event, - value: ['false'], - operator: PropertyOperator.IsNot, - }, - { - key: '$feature/' + flagKey, - type: PropertyFilterType.Event, - value: 'is_set', - operator: PropertyOperator.IsSet, - }, - { - key: '$feature_flag', - type: PropertyFilterType.Event, - value: flagKey, - operator: PropertyOperator.Exact, - }, - ], - }, - ], - } - - if (featureFlag.has_enriched_analytics) { - return { - events: [ + return { + filter_group: { + type: FilterLogicalOperator.And, + values: [ { - id: '$feature_interaction', - type: 'events', - order: 0, - name: '$feature_interaction', - properties: [ - { key: 'feature_flag', value: [flagKey], operator: 'exact', type: 'event' }, + type: FilterLogicalOperator.And, + values: [ + featureFlag.has_enriched_analytics + ? { + id: '$feature_interaction', + type: 'events', + order: 0, + name: '$feature_interaction', + properties: [ + { + key: 'feature_flag', + value: [flagKey], + operator: PropertyOperator.Exact, + type: PropertyFilterType.Event, + }, + ], + } + : { + id: '$feature_flag_called', + name: '$feature_flag_called', + type: 'events', + properties: [ + { + key: '$feature/' + flagKey, + type: PropertyFilterType.Event, + value: ['false'], + operator: PropertyOperator.IsNot, + }, + { + key: '$feature/' + flagKey, + type: PropertyFilterType.Event, + value: 'is_set', + operator: PropertyOperator.IsSet, + }, + { + key: '$feature_flag', + type: PropertyFilterType.Event, + value: flagKey, + operator: PropertyOperator.Exact, + }, + ], + }, ], }, ], - } + }, } - return defaultEntityFilterOnFlag }, ], hasEarlyAccessFeatures: [ diff --git a/frontend/src/scenes/insights/InsightNav/insightNavLogic.test.ts b/frontend/src/scenes/insights/InsightNav/insightNavLogic.test.ts index 04203684479ba..cefd6499bf052 100644 --- a/frontend/src/scenes/insights/InsightNav/insightNavLogic.test.ts +++ b/frontend/src/scenes/insights/InsightNav/insightNavLogic.test.ts @@ -5,7 +5,7 @@ import { insightNavLogic } from 'scenes/insights/InsightNav/insightNavLogic' import { useMocks } from '~/mocks/jest' import { nodeKindToDefaultQuery } from '~/queries/nodes/InsightQuery/defaults' -import { InsightVizNode, Node, NodeKind, TrendsQuery } from '~/queries/schema' +import { FunnelsQuery, InsightVizNode, Node, NodeKind, TrendsQuery } from '~/queries/schema' import { initKeaTests } from '~/test/init' import { FunnelVizType, InsightLogicProps, InsightShortId, InsightType, StepOrderValue } from '~/types' @@ -286,6 +286,144 @@ describe('insightNavLogic', () => { } as Node), ]) }) + + it('gets rid of multiple breakdowns when switching from trends to funnels', async () => { + trendsQuery.source = { + ...trendsQuery.source, + breakdownFilter: { + breakdowns: [ + { property: 'num', type: 'person', histogram_bin_count: 10 }, + { property: '$device_type', type: 'event' }, + ], + }, + } as TrendsQuery + + await expectLogic(logic, () => { + builtInsightDataLogic.actions.setQuery(trendsQuery) + }) + + await expectLogic(builtInsightDataLogic, () => { + logic.actions.setActiveView(InsightType.FUNNELS) + }).toDispatchActions([ + builtInsightDataLogic.actionCreators.setQuery({ + kind: 'InsightVizNode', + source: { + kind: 'FunnelsQuery', + series: [{ kind: 'EventsNode', name: '$pageview', event: '$pageview' }], + funnelsFilter: { funnelVizType: 'steps' }, + filterTestAccounts: true, + interval: 'hour', + breakdownFilter: { + breakdowns: undefined, + breakdown: 'num', + breakdown_type: 'person', + breakdown_histogram_bin_count: 10, + breakdown_group_type_index: undefined, + breakdown_normalize_url: undefined, + }, + }, + } as Node), + ]) + }) + + it('keeps multiple breakdowns when switching from funnels to trends', async () => { + funnelsQuery.source = { + ...funnelsQuery.source, + breakdownFilter: { + breakdowns: [ + { property: 'num', type: 'person' }, + { property: '$device_type', type: 'event' }, + ], + }, + } as FunnelsQuery + + await expectLogic(logic, () => { + builtInsightDataLogic.actions.setQuery(funnelsQuery) + }) + + await expectLogic(builtInsightDataLogic, () => { + logic.actions.setActiveView(InsightType.TRENDS) + }).toDispatchActions([ + builtInsightDataLogic.actionCreators.setQuery({ + kind: 'InsightVizNode', + source: { + kind: 'TrendsQuery', + series: [ + { kind: 'EventsNode', name: '$pageview', event: '$pageview', math: 'total' }, + { kind: 'EventsNode', name: '$pageleave', event: '$pageleave', math: 'total' }, + ], + trendsFilter: {}, + filterTestAccounts: true, + breakdownFilter: { + breakdowns: [ + { property: 'num', type: 'person' }, + { property: '$device_type', type: 'event' }, + ], + }, + }, + } as Node), + ]) + }) + + it('keeps breakdowns when switching between trends and funnels', async () => { + trendsQuery.source = { + ...trendsQuery.source, + breakdownFilter: { + breakdowns: [ + { property: '$pathname', type: 'group', normalize_url: true, group_type_index: 0 }, + { property: '$device_type', type: 'event' }, + ], + }, + } as TrendsQuery + + await expectLogic(logic, () => { + builtInsightDataLogic.actions.setQuery(trendsQuery) + }) + + await expectLogic(builtInsightDataLogic, () => { + logic.actions.setActiveView(InsightType.FUNNELS) + }).toDispatchActions([ + builtInsightDataLogic.actionCreators.setQuery({ + kind: 'InsightVizNode', + source: { + kind: 'FunnelsQuery', + series: [{ kind: 'EventsNode', name: '$pageview', event: '$pageview' }], + funnelsFilter: { funnelVizType: 'steps' }, + filterTestAccounts: true, + interval: 'hour', + breakdownFilter: { + breakdowns: undefined, + breakdown: '$pathname', + breakdown_type: 'group', + breakdown_group_type_index: 0, + breakdown_normalize_url: true, + }, + }, + } as Node), + ]) + + await expectLogic(builtInsightDataLogic, () => { + logic.actions.setActiveView(InsightType.TRENDS) + }).toDispatchActions([ + builtInsightDataLogic.actionCreators.setQuery({ + kind: 'InsightVizNode', + source: { + kind: 'TrendsQuery', + series: [{ kind: 'EventsNode', name: '$pageview', event: '$pageview', math: 'total' }], + trendsFilter: { showValuesOnSeries: true }, + filterTestAccounts: true, + interval: 'hour', + breakdownFilter: { + breakdowns: undefined, + breakdown: '$pathname', + breakdown_type: 'group', + breakdown_group_type_index: 0, + breakdown_normalize_url: true, + }, + }, + } as Node), + ]) + }) }) }) }) diff --git a/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx b/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx index d3df8da9f7c8c..c4ac869a1ec34 100644 --- a/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx +++ b/frontend/src/scenes/insights/InsightNav/insightNavLogic.tsx @@ -36,6 +36,7 @@ import { getDisplay, getShowPercentStackView, getShowValuesOnSeries, + isFunnelsQuery, isHogQuery, isInsightQueryWithBreakdown, isInsightQueryWithSeries, @@ -375,6 +376,27 @@ const mergeCachedProperties = (query: InsightQueryNode, cache: QueryPropertyCach // breakdown filter if (isInsightQueryWithBreakdown(mergedQuery) && cache.breakdownFilter) { mergedQuery.breakdownFilter = cache.breakdownFilter + + // If we've changed the query kind, convert multiple breakdowns to a single breakdown + if (isTrendsQuery(cache) && isFunnelsQuery(query)) { + if (cache.breakdownFilter.breakdowns?.length) { + const firstBreakdown = cache.breakdownFilter?.breakdowns?.[0] + mergedQuery.breakdownFilter = { + ...cache.breakdownFilter, + breakdowns: undefined, + breakdown: firstBreakdown?.property, + breakdown_type: firstBreakdown?.type, + breakdown_histogram_bin_count: firstBreakdown?.histogram_bin_count, + breakdown_group_type_index: firstBreakdown?.group_type_index, + breakdown_normalize_url: firstBreakdown?.normalize_url, + } + } else { + mergedQuery.breakdownFilter = { + ...cache.breakdownFilter, + breakdowns: undefined, + } + } + } } // funnel paths filter diff --git a/frontend/src/scenes/insights/insightLogic.test.ts b/frontend/src/scenes/insights/insightLogic.test.ts index c94ea390e505f..1c8595b2d264c 100644 --- a/frontend/src/scenes/insights/insightLogic.test.ts +++ b/frontend/src/scenes/insights/insightLogic.test.ts @@ -9,7 +9,6 @@ import { savedInsightsLogic } from 'scenes/saved-insights/savedInsightsLogic' import { teamLogic } from 'scenes/teamLogic' import { urls } from 'scenes/urls' -import { resumeKeaLoadersErrors, silenceKeaLoadersErrors } from '~/initKea' import { useMocks } from '~/mocks/jest' import { dashboardsModel } from '~/models/dashboardsModel' import { insightsModel } from '~/models/insightsModel' @@ -528,7 +527,7 @@ describe('insightLogic', () => { logic.actions.saveInsight() await expectLogic(logic).toDispatchActions([savedInsightsLogic.actionTypes.addInsight]) - logic.actions.updateInsight({ filters: { insight: InsightType.FUNNELS } }) + logic.actions.updateInsight({ name: 'my new name' }) await expectLogic(logic).toDispatchActions([savedInsightsLogic.actionTypes.setInsight]) }) @@ -552,6 +551,9 @@ describe('insightLogic', () => { savedInsightsLogic.mount() logic = insightLogic({ dashboardItemId: Insight43, + cachedInsight: { + id: 3, + }, }) logic.mount() @@ -591,42 +593,6 @@ describe('insightLogic', () => { }) }) - describe('emptyFilters', () => { - let theEmptyFiltersLogic: ReturnType - beforeEach(() => { - const insight = { - result: ['result from api'], - } - theEmptyFiltersLogic = insightLogic({ - dashboardItemId: undefined, - cachedInsight: insight, - }) - theEmptyFiltersLogic.mount() - silenceKeaLoadersErrors() - }) - afterEach(resumeKeaLoadersErrors) - - it('does not call the api on update when empty filters and no query', async () => { - await expectLogic(theEmptyFiltersLogic, () => { - theEmptyFiltersLogic.actions.updateInsight({ - name: 'name', - filters: {}, - query: undefined, - }) - }).toNotHaveDispatchedActions(['updateInsightSuccess']) - }) - - it('does call the api on update when empty filters but query is present', async () => { - await expectLogic(theEmptyFiltersLogic, () => { - theEmptyFiltersLogic.actions.updateInsight({ - name: 'name', - filters: {}, - query: { kind: NodeKind.DataTableNode } as DataTableNode, - }) - }).toDispatchActions(['updateInsightSuccess']) - }) - }) - describe('reacts to external changes', () => { beforeEach(async () => { logic = insightLogic({ diff --git a/frontend/src/scenes/insights/insightLogic.ts b/frontend/src/scenes/insights/insightLogic.ts index 036b501f42f91..383bee462f721 100644 --- a/frontend/src/scenes/insights/insightLogic.ts +++ b/frontend/src/scenes/insights/insightLogic.ts @@ -1,4 +1,3 @@ -import { captureException } from '@sentry/react' import { actions, connect, events, kea, key, listeners, path, props, reducers, selectors } from 'kea' import { loaders } from 'kea-loaders' import { router } from 'kea-router' @@ -39,16 +38,10 @@ import { import { teamLogic } from '../teamLogic' import type { insightLogicType } from './insightLogicType' import { getInsightId } from './utils' +import { insightsApi } from './utils/api' export const UNSAVED_INSIGHT_MIN_REFRESH_INTERVAL_MINUTES = 3 -function emptyFilters(filters: Partial | undefined): boolean { - return ( - !filters || - (Object.keys(filters).length < 2 && JSON.stringify(cleanFilters(filters)) === JSON.stringify(cleanFilters({}))) - ) -} - export const createEmptyInsight = ( insightId: InsightShortId | `new-${string}` | 'new', filterTestAccounts: boolean @@ -102,11 +95,15 @@ export const insightLogic = kea([ loadInsight: (shortId: InsightShortId) => ({ shortId, }), - updateInsight: (insight: Partial, callback?: (insight: Partial) => void) => ({ - insight, + updateInsight: (insightUpdate: Partial, callback?: () => void) => ({ + insightUpdate, callback, }), - setInsightMetadata: (metadata: Partial) => ({ metadata }), + setInsightMetadata: ( + metadataUpdate: Partial> + ) => ({ + metadataUpdate, + }), highlightSeries: (seriesIndex: number | null) => ({ seriesIndex }), }), loaders(({ actions, values, props }) => ({ @@ -126,75 +123,51 @@ export const insightLogic = kea([ } throw new Error(`Insight "${shortId}" not found`) }, - updateInsight: async ({ insight, callback }, breakpoint) => { - if (!Object.entries(insight).length) { + updateInsight: async ({ insightUpdate, callback }, breakpoint) => { + if (!Object.entries(insightUpdate).length) { return values.legacyInsight } - if ('filters' in insight && !insight.query && emptyFilters(insight.filters)) { - const error = new Error('Will not override empty filters in updateInsight.') - captureException(error, { - extra: { - filters: JSON.stringify(insight.filters), - insight: JSON.stringify(insight), - valuesInsight: JSON.stringify(values.legacyInsight), - }, - }) - throw error - } - - const response = await api.update( - `api/projects/${teamLogic.values.currentTeamId}/insights/${values.legacyInsight.id}`, - insight - ) + const response = await insightsApi.update(values.queryBasedInsight.id, insightUpdate, { + writeAsQuery: values.queryBasedInsightSaving, + readAsQuery: false, + }) breakpoint() const updatedInsight: InsightModel = { ...response, result: response.result || values.legacyInsight.result, } - callback?.(updatedInsight) + callback?.() - const removedDashboards = (values.legacyInsight.dashboards || []).filter( + const removedDashboards = (values.queryBasedInsight.dashboards || []).filter( (d) => !updatedInsight.dashboards?.includes(d) ) dashboardsModel.actions.updateDashboardInsight(updatedInsight, removedDashboards) return updatedInsight }, - setInsightMetadata: async ({ metadata }, breakpoint) => { + setInsightMetadata: async ({ metadataUpdate }, breakpoint) => { const editMode = insightSceneLogic.isMounted() && - insightSceneLogic.values.legacyInsight === values.legacyInsight && + insightSceneLogic.values.queryBasedInsight === values.queryBasedInsight && insightSceneLogic.values.insightMode === ItemMode.Edit if (editMode) { - return { ...values.legacyInsight, ...metadata } - } - - if (metadata.filters || metadata.query) { - const error = new Error(`Will not override filters or query in setInsightMetadata`) - captureException(error) - throw error + return { ...values.legacyInsight, ...metadataUpdate } } const beforeUpdates = {} - for (const key of Object.keys(metadata)) { + for (const key of Object.keys(metadataUpdate)) { beforeUpdates[key] = values.savedInsight[key] } - const response = await api.update( - `api/projects/${teamLogic.values.currentTeamId}/insights/${values.legacyInsight.id}`, - metadata - ) + const response = await insightsApi.update(values.queryBasedInsight.id, metadataUpdate, { + writeAsQuery: values.queryBasedInsightSaving, + readAsQuery: false, + }) breakpoint() - // only update the fields that we changed - const updatedInsight = { ...values.legacyInsight } as InsightModel - for (const key of Object.keys(metadata)) { - updatedInsight[key] = response[key] - } - savedInsightsLogic.findMounted()?.actions.loadInsights() - dashboardsModel.actions.updateDashboardInsight(updatedInsight) + dashboardsModel.actions.updateDashboardInsight(response) actions.loadTags() lemonToast.success(`Updated insight`, { @@ -202,23 +175,18 @@ export const insightLogic = kea([ label: 'Undo', dataAttr: 'edit-insight-undo', action: async () => { - const response = await api.update( - `api/projects/${teamLogic.values.currentTeamId}/insights/${values.queryBasedInsight.id}`, - beforeUpdates - ) - // only update the fields that we changed - const revertedInsight = { ...values.legacyInsight } as InsightModel - for (const key of Object.keys(beforeUpdates)) { - revertedInsight[key] = response[key] - } + const response = await insightsApi.update(values.queryBasedInsight.id, beforeUpdates, { + writeAsQuery: values.queryBasedInsightSaving, + readAsQuery: false, + }) savedInsightsLogic.findMounted()?.actions.loadInsights() - dashboardsModel.actions.updateDashboardInsight(revertedInsight) - actions.setInsight(revertedInsight, { overrideFilter: false, fromPersistentApi: true }) + dashboardsModel.actions.updateDashboardInsight(response) + actions.setInsight(response, { overrideFilter: false, fromPersistentApi: true }) lemonToast.success('Insight change reverted') }, }, }) - return updatedInsight + return response }, }, ], @@ -250,7 +218,7 @@ export const insightLogic = kea([ query: clearInsightQuery ? undefined : state.query, } }, - setInsightMetadata: (state, { metadata }) => ({ ...state, ...metadata }), + setInsightMetadata: (state, { metadataUpdate }) => ({ ...state, ...metadataUpdate }), [dashboardsModel.actionTypes.updateDashboardInsight]: (state, { item, extraDashboardIds }) => { const targetDashboards = (item?.dashboards || []).concat(extraDashboardIds || []) const updateIsForThisDashboard = diff --git a/frontend/src/scenes/insights/sharedUtils.ts b/frontend/src/scenes/insights/sharedUtils.ts index b9d4f13348c65..2c984bf3aef08 100644 --- a/frontend/src/scenes/insights/sharedUtils.ts +++ b/frontend/src/scenes/insights/sharedUtils.ts @@ -63,11 +63,7 @@ export function isLifecycleFilter(filters?: Partial): filters is Par export function isPathsFilter(filters?: Partial): filters is Partial { return filters?.insight === InsightType.PATHS } -export function isFilterWithHiddenLegendKeys( - filters: Partial -): filters is Partial | Partial | Partial { - return isTrendsFilter(filters) || isFunnelsFilter(filters) || isStickinessFilter(filters) -} + export function isFilterWithDisplay( filters: Partial ): filters is Partial | Partial { diff --git a/frontend/src/scenes/insights/utils.test.ts b/frontend/src/scenes/insights/utils.test.ts index bf6b56a205b56..d23a499e5fb0a 100644 --- a/frontend/src/scenes/insights/utils.test.ts +++ b/frontend/src/scenes/insights/utils.test.ts @@ -417,6 +417,38 @@ describe('formatBreakdownLabel()', () => { } expect(formatBreakdownLabel('661', breakdownFilter2, undefined, formatter, 0)).toEqual('661s') }) + + it('handles group breakdowns', () => { + const formatter = jest.fn((_, v) => v) + + const breakdownFilter1: BreakdownFilter = { + breakdown: 'name', + breakdown_group_type_index: 0, + breakdown_type: 'group', + } + expect(formatBreakdownLabel('661', breakdownFilter1, undefined, formatter)).toEqual('661') + expect(formatter).toHaveBeenCalledWith('name', 661, 'group', 0) + + formatter.mockClear() + + const breakdownFilter2: BreakdownFilter = { + breakdowns: [{ property: 'name', type: 'group', group_type_index: 0 }], + } + expect(formatBreakdownLabel(['661'], breakdownFilter2, undefined, formatter, 0)).toEqual('661') + expect(formatter).toHaveBeenCalledWith('name', 661, 'group', 0) + + formatter.mockClear() + + const breakdownFilter3: BreakdownFilter = { + breakdowns: [ + { property: 'name', type: 'group', group_type_index: 0 }, + { property: 'test', type: 'group', group_type_index: 1 }, + ], + } + expect(formatBreakdownLabel(['661', '662'], breakdownFilter3, undefined, formatter, 0)).toEqual('661::662') + expect(formatter).toHaveBeenNthCalledWith(1, 'name', 661, 'group', 0) + expect(formatter).toHaveBeenNthCalledWith(2, 'test', 662, 'group', 1) + }) }) describe('formatBreakdownType()', () => { diff --git a/frontend/src/scenes/insights/utils.tsx b/frontend/src/scenes/insights/utils.tsx index b0bb7446125ed..f413e548c6805 100644 --- a/frontend/src/scenes/insights/utils.tsx +++ b/frontend/src/scenes/insights/utils.tsx @@ -20,6 +20,7 @@ import { EntityFilter, EntityTypes, EventType, + GroupTypeIndex, InsightShortId, InsightType, PathType, @@ -240,11 +241,16 @@ function formatNumericBreakdownLabel( ? breakdownFilter?.breakdowns?.[multipleBreakdownIndex] : undefined + const groupIndex = (nestedBreakdown?.group_type_index ?? breakdownFilter?.breakdown_group_type_index) as + | GroupTypeIndex + | undefined + return ( formatPropertyValueForDisplay( nestedBreakdown?.property ?? breakdownFilter?.breakdown, breakdown_value, - propertyFilterTypeToPropertyDefinitionType(nestedBreakdown?.type ?? breakdownFilter?.breakdown_type) + propertyFilterTypeToPropertyDefinitionType(nestedBreakdown?.type ?? breakdownFilter?.breakdown_type), + groupIndex )?.toString() ?? 'None' ) } diff --git a/frontend/src/scenes/insights/utils/compareInsightQuery.ts b/frontend/src/scenes/insights/utils/compareInsightQuery.ts index 11b2ca9dce33c..f753d609c2be3 100644 --- a/frontend/src/scenes/insights/utils/compareInsightQuery.ts +++ b/frontend/src/scenes/insights/utils/compareInsightQuery.ts @@ -15,6 +15,7 @@ const groupedChartDisplayTypes: Record = { [ChartDisplayType.ActionsLineGraph]: ChartDisplayType.ActionsLineGraph, [ChartDisplayType.ActionsBar]: ChartDisplayType.ActionsLineGraph, [ChartDisplayType.ActionsAreaGraph]: ChartDisplayType.ActionsLineGraph, + [ChartDisplayType.ActionsStackedBar]: ChartDisplayType.ActionsLineGraph, // cumulative time series [ChartDisplayType.ActionsLineGraphCumulative]: ChartDisplayType.ActionsLineGraphCumulative, diff --git a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx index 0917ebf802747..730ad17b66cda 100644 --- a/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx +++ b/frontend/src/scenes/insights/views/InsightsTable/InsightsTable.tsx @@ -23,7 +23,8 @@ import { SeriesColumnItem } from './columns/SeriesColumn' import { ValueColumnItem, ValueColumnTitle } from './columns/ValueColumn' import { WorldMapColumnItem, WorldMapColumnTitle } from './columns/WorldMapColumn' import { AggregationType, insightsTableDataLogic } from './insightsTableDataLogic' -import { CalcColumnState } from './insightsTableLogic' + +export type CalcColumnState = 'total' | 'average' | 'median' export interface InsightsTableProps { /** Whether this is just a legend instead of standalone insight viz. Default: false. */ @@ -166,9 +167,7 @@ export function InsightsTable({ }, }) } - } - - if (breakdownFilter?.breakdowns) { + } else if (breakdownFilter?.breakdowns) { breakdownFilter.breakdowns.forEach((breakdown, index) => { const formatItemBreakdownLabel = (item: IndexedTrendResult): string => formatBreakdownLabel( diff --git a/frontend/src/scenes/insights/views/InsightsTable/columns/AggregationColumn.tsx b/frontend/src/scenes/insights/views/InsightsTable/columns/AggregationColumn.tsx index 38c034f78810b..0e7e0c057028c 100644 --- a/frontend/src/scenes/insights/views/InsightsTable/columns/AggregationColumn.tsx +++ b/frontend/src/scenes/insights/views/InsightsTable/columns/AggregationColumn.tsx @@ -13,7 +13,7 @@ import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel' import { TrendsFilter } from '~/queries/schema' import { TrendsFilterType } from '~/types' -import { CalcColumnState } from '../insightsTableLogic' +import { CalcColumnState } from '../InsightsTable' const CALC_COLUMN_LABELS: Record = { total: 'Total Sum', diff --git a/frontend/src/scenes/insights/views/InsightsTable/insightsTableLogic.ts b/frontend/src/scenes/insights/views/InsightsTable/insightsTableLogic.ts deleted file mode 100644 index 04d17c2c5a031..0000000000000 --- a/frontend/src/scenes/insights/views/InsightsTable/insightsTableLogic.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { actions, kea, path, props, reducers, selectors } from 'kea' -import { isTrendsFilter } from 'scenes/insights/sharedUtils' - -import { ChartDisplayType, FilterType } from '~/types' - -import type { insightsTableLogicType } from './insightsTableLogicType' - -export type CalcColumnState = 'total' | 'average' | 'median' - -export const insightsTableLogic = kea([ - props( - {} as { - hasMathUniqueFilter: boolean - filters: Partial - } - ), - path(['scenes', 'insights', 'InsightsTable', 'insightsTableLogic']), - actions({ - setCalcColumnState: (state: CalcColumnState) => ({ state }), - }), - reducers(({ props }) => ({ - calcColumnState: [ - (props.hasMathUniqueFilter ? 'average' : 'total') as CalcColumnState, - { - setCalcColumnState: (_, { state }) => state, - }, - ], - })), - selectors(() => ({ - // Only allow table aggregation options when the math is total volume otherwise double counting will happen when the math is set to uniques - // Except when view type is Table - showTotalCount: [ - (_, p) => [p.filters], - (filters: Partial) => { - if (isTrendsFilter(filters) && filters.display == ChartDisplayType.ActionsTable) { - return true - } - return ( - filters.actions?.every( - (entity) => entity.math === 'total' || entity.math === 'sum' || !entity.math - ) && - filters.events?.every((entity) => entity.math === 'total' || entity.math === 'sum' || !entity.math) - ) - }, - ], - })), -]) diff --git a/frontend/src/scenes/instance/SystemStatus/RenderMetricValue.tsx b/frontend/src/scenes/instance/SystemStatus/RenderMetricValue.tsx index d44706edfa2e4..150d92202bda6 100644 --- a/frontend/src/scenes/instance/SystemStatus/RenderMetricValue.tsx +++ b/frontend/src/scenes/instance/SystemStatus/RenderMetricValue.tsx @@ -21,9 +21,8 @@ export function RenderMetricValue( if (value && isSecret) { return ( : undefined} + className="uppercase text-muted bg-mark" + icon={isSecret ? : undefined} > Secret @@ -46,11 +45,7 @@ export function RenderMetricValue( } if (value === null || value === undefined || value === '') { - return ( - - {emptyNullLabel ?? 'Unknown'} - - ) + return {emptyNullLabel ?? 'Unknown'} } if (value_type === 'int' || typeof value === 'number') { diff --git a/frontend/src/scenes/onboarding/Onboarding.tsx b/frontend/src/scenes/onboarding/Onboarding.tsx index 0c5d05b3699a8..d11307ab74f15 100644 --- a/frontend/src/scenes/onboarding/Onboarding.tsx +++ b/frontend/src/scenes/onboarding/Onboarding.tsx @@ -1,3 +1,4 @@ +import { Spinner } from '@posthog/lemon-ui' import { useActions, useValues } from 'kea' import { FEATURE_FLAGS, SESSION_REPLAY_MINIMUM_DURATION_OPTIONS } from 'lib/constants' import { featureFlagLogic } from 'lib/logic/featureFlagLogic' @@ -87,7 +88,15 @@ const OnboardingWrapper = ({ children }: { children: React.ReactNode }): JSX.Ele setAllSteps(steps) } - return (currentOnboardingStep as JSX.Element) || <> + if (!currentOnboardingStep) { + return ( +
+ +
+ ) + } + + return currentOnboardingStep || <> } const ProductAnalyticsOnboarding = (): JSX.Element => { diff --git a/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx b/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx index 45aff241aba92..f5c951a67d6ec 100644 --- a/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx +++ b/frontend/src/scenes/onboarding/OnboardingBillingStep.tsx @@ -24,7 +24,7 @@ export const OnboardingBillingStep = ({ product: BillingProductV2Type stepKey?: OnboardingStepKey }): JSX.Element => { - const { billing, redirectPath } = useValues(billingLogic) + const { billing, redirectPath, billingLoading } = useValues(billingLogic) const { productKey } = useValues(onboardingLogic) const { reportBillingUpgradeClicked } = useActions(eventUsageLogic) @@ -37,7 +37,7 @@ export const OnboardingBillingStep = ({ showSkip={!product.subscribed} stepKey={stepKey} continueOverride={ - product?.subscribed ? undefined : ( + product?.subscribed && !billingLoading ? undefined : ( { reportBillingUpgradeClicked(product.type) @@ -59,7 +60,7 @@ export const OnboardingBillingStep = ({ ) } > - {billing?.products && productKey && product ? ( + {billing?.products && productKey && product && !billingLoading ? (
{product.subscribed && (
@@ -97,7 +98,9 @@ export const OnboardingBillingStep = ({ )}
) : ( - +
+ +
)} ) diff --git a/frontend/src/scenes/onboarding/sdks/allSDKs.tsx b/frontend/src/scenes/onboarding/sdks/allSDKs.tsx index c9a6a88c5b3cc..099383964ce4d 100644 --- a/frontend/src/scenes/onboarding/sdks/allSDKs.tsx +++ b/frontend/src/scenes/onboarding/sdks/allSDKs.tsx @@ -100,6 +100,13 @@ export const allSDKs: SDK[] = [ image: require('./logos/go.svg'), docsLink: 'https://posthog.com/docs/libraries/go', }, + { + name: 'Helicone', + key: SDKKey.HELICONE, + tags: [SDKTag.LLM], + image: require('./logos/helicone.svg'), + docsLink: 'https://posthog.com/docs/ai-engineering/helicone-posthog', + }, { name: 'iOS', key: SDKKey.IOS, @@ -114,6 +121,13 @@ export const allSDKs: SDK[] = [ image: require('./logos/java.svg'), docsLink: 'https://posthog.com/docs/libraries/java', }, + { + name: 'Langfuse', + key: SDKKey.LANGFUSE, + tags: [SDKTag.LLM], + image: require('./logos/langfuse.svg'), + docsLink: 'https://posthog.com/docs/ai-engineering/langfuse-posthog', + }, { name: 'Laravel', key: SDKKey.LARAVEL, @@ -201,6 +215,13 @@ export const allSDKs: SDK[] = [ image: require('./logos/svelte.svg'), docsLink: 'https://posthog.com/docs/libraries/svelte', }, + { + name: 'Traceloop', + key: SDKKey.TRACELOOP, + tags: [SDKTag.LLM], + image: require('./logos/traceloop.svg'), + docsLink: 'https://posthog.com/docs/ai-engineering/traceloop-posthog', + }, { name: 'Vue.js', key: SDKKey.VUE_JS, diff --git a/frontend/src/scenes/onboarding/sdks/logos/helicone.svg b/frontend/src/scenes/onboarding/sdks/logos/helicone.svg new file mode 100644 index 0000000000000..c2f5f19dd7487 --- /dev/null +++ b/frontend/src/scenes/onboarding/sdks/logos/helicone.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/frontend/src/scenes/onboarding/sdks/logos/langfuse.svg b/frontend/src/scenes/onboarding/sdks/logos/langfuse.svg new file mode 100644 index 0000000000000..eb38976cf6975 --- /dev/null +++ b/frontend/src/scenes/onboarding/sdks/logos/langfuse.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/frontend/src/scenes/onboarding/sdks/logos/traceloop.svg b/frontend/src/scenes/onboarding/sdks/logos/traceloop.svg new file mode 100644 index 0000000000000..8059c33709a0d --- /dev/null +++ b/frontend/src/scenes/onboarding/sdks/logos/traceloop.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/frontend/src/scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx b/frontend/src/scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx index d435dc8bfa3ad..84bcb31a88446 100644 --- a/frontend/src/scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx +++ b/frontend/src/scenes/onboarding/sdks/product-analytics/ProductAnalyticsSDKInstructions.tsx @@ -13,7 +13,9 @@ import { ProductAnalyticsFlutterInstructions, ProductAnalyticsFramerInstructions, ProductAnalyticsGoInstructions, + ProductAnalyticsHeliconeInstructions, ProductAnalyticsIOSInstructions, + ProductAnalyticsLangfuseInstructions, ProductAnalyticsLaravelInstructions, ProductAnalyticsNextJSInstructions, ProductAnalyticsNodeInstructions, @@ -24,6 +26,7 @@ import { ProductAnalyticsRNInstructions, ProductAnalyticsRubyInstructions, ProductAnalyticsSvelteJSInstructions, + ProductAnalyticsTraceloopInstructions, ProductAnalyticsVueInstructions, ProductAnalyticsWebflowInstructions, } from '.' @@ -40,8 +43,10 @@ export const ProductAnalyticsSDKInstructions: SDKInstructionsMap = { [SDKKey.FLUTTER]: ProductAnalyticsFlutterInstructions, [SDKKey.FRAMER]: ProductAnalyticsFramerInstructions, [SDKKey.GO]: ProductAnalyticsGoInstructions, + [SDKKey.HELICONE]: ProductAnalyticsHeliconeInstructions, [SDKKey.HTML_SNIPPET]: HTMLSnippetInstructions, [SDKKey.IOS]: ProductAnalyticsIOSInstructions, + [SDKKey.LANGFUSE]: ProductAnalyticsLangfuseInstructions, [SDKKey.LARAVEL]: ProductAnalyticsLaravelInstructions, [SDKKey.NEXT_JS]: ProductAnalyticsNextJSInstructions, [SDKKey.NODE_JS]: ProductAnalyticsNodeInstructions, @@ -52,6 +57,7 @@ export const ProductAnalyticsSDKInstructions: SDKInstructionsMap = { [SDKKey.REMIX]: ProductAnalyticsRemixJSInstructions, [SDKKey.RUBY]: ProductAnalyticsRubyInstructions, [SDKKey.SVELTE]: ProductAnalyticsSvelteJSInstructions, + [SDKKey.TRACELOOP]: ProductAnalyticsTraceloopInstructions, [SDKKey.VUE_JS]: ProductAnalyticsVueInstructions, [SDKKey.WEBFLOW]: ProductAnalyticsWebflowInstructions, } diff --git a/frontend/src/scenes/onboarding/sdks/product-analytics/helicone.tsx b/frontend/src/scenes/onboarding/sdks/product-analytics/helicone.tsx new file mode 100644 index 0000000000000..5f09774f3d562 --- /dev/null +++ b/frontend/src/scenes/onboarding/sdks/product-analytics/helicone.tsx @@ -0,0 +1,58 @@ +import { Link } from '@posthog/lemon-ui' +import { useValues } from 'kea' +import { CodeSnippet, Language } from 'lib/components/CodeSnippet' +import { apiHostOrigin } from 'lib/utils/apiHost' +import { teamLogic } from 'scenes/teamLogic' + +export function ProductAnalyticsHeliconeInstructions(): JSX.Element { + const { currentTeam } = useValues(teamLogic) + + return ( + <> +

Install

+

+ + Helicone + {' '} + supports most popular LLM models and you can bring your Helicone data into PostHog for analysis. To get + started: +

+
    +
  1. + Sign up to{' '} + + Helicone + {' '} + and add it to your LLM app. +
  2. +
  3. + Similar to how you add a{' '} + + Helicone-Auth header + {' '} + when installing Helicone, add two new headers + Helicone-Posthog-Key and Helicone-Posthog-Host with your PostHog + details: + + {`# Example for adding it to OpenAI in Python + +client = OpenAI( +api_key="your-api-key-here", # Replace with your OpenAI API key +base_url="https://oai.hconeai.com/v1", # Set the API endpoint +default_headers= { + "Helicone-Auth": f"Bearer {HELICONE_API_KEY}", + "Helicone-Posthog-Key": "${currentTeam?.api_token}}", + "Helicone-Posthog-Host": "${apiHostOrigin()}", + } +) + `} + +
  4. +
+

Helicone events will now be exported into PostHog as soon as they're available.

+ + ) +} diff --git a/frontend/src/scenes/onboarding/sdks/product-analytics/index.tsx b/frontend/src/scenes/onboarding/sdks/product-analytics/index.tsx index bf5c8678d04a1..5f05ae88b0ee7 100644 --- a/frontend/src/scenes/onboarding/sdks/product-analytics/index.tsx +++ b/frontend/src/scenes/onboarding/sdks/product-analytics/index.tsx @@ -8,9 +8,11 @@ export * from './elixir' export * from './flutter' export * from './framer' export * from './go' +export * from './helicone' export * from './html-snippet' export * from './ios' export * from './js-web' +export * from './langfuse' export * from './laravel' export * from './next-js' export * from './nodejs' @@ -21,5 +23,6 @@ export * from './react-native' export * from './remix' export * from './ruby' export * from './svelte' +export * from './traceloop' export * from './vue' export * from './webflow' diff --git a/frontend/src/scenes/onboarding/sdks/product-analytics/langfuse.tsx b/frontend/src/scenes/onboarding/sdks/product-analytics/langfuse.tsx new file mode 100644 index 0000000000000..bf137f99af131 --- /dev/null +++ b/frontend/src/scenes/onboarding/sdks/product-analytics/langfuse.tsx @@ -0,0 +1,54 @@ +import { Link } from '@posthog/lemon-ui' +import { useValues } from 'kea' +import { CodeSnippet, Language } from 'lib/components/CodeSnippet' +import { apiHostOrigin } from 'lib/utils/apiHost' +import { teamLogic } from 'scenes/teamLogic' + +export function ProductAnalyticsLangfuseInstructions(): JSX.Element { + const { currentTeam } = useValues(teamLogic) + + return ( + <> +

Install

+

+ + Langfuse + {' '} + supports most popular LLM models and you can bring your Langfuse data into PostHog for analysis. To get + started: +

+
    +
  1. + First add{' '} + + Langfuse Tracing + {' '} + to your LLM app. +
  2. +
  3. + In your{' '} + + Langfuse dashboard + + , click on Settings and scroll down to the Integrations section to + find the PostHog integration. +
  4. +
  5. + Click Configure and paste in your PostHog project API key: + {currentTeam?.api_token} +
  6. +
  7. + Paste in your PostHog host: + {apiHostOrigin()} +
  8. +
  9. + Click Enable and then Save. +
  10. +
+

+ Langfuse will now begin exporting your data into PostHog. Note that Langfuse batch exports your data + into PostHog once a day, so it can take up to 24 hours for your Langfuse data to appear in PostHog. +

+ + ) +} diff --git a/frontend/src/scenes/onboarding/sdks/product-analytics/traceloop.tsx b/frontend/src/scenes/onboarding/sdks/product-analytics/traceloop.tsx new file mode 100644 index 0000000000000..9d4498d460ff4 --- /dev/null +++ b/frontend/src/scenes/onboarding/sdks/product-analytics/traceloop.tsx @@ -0,0 +1,43 @@ +import { Link } from '@posthog/lemon-ui' +import { useValues } from 'kea' +import { CodeSnippet, Language } from 'lib/components/CodeSnippet' +import { apiHostOrigin } from 'lib/utils/apiHost' +import { teamLogic } from 'scenes/teamLogic' + +export function ProductAnalyticsTraceloopInstructions(): JSX.Element { + const { currentTeam } = useValues(teamLogic) + + return ( + <> +

Install

+

+ + Traceloop + {' '} + supports most popular LLM models and you can bring your Traceloop data into PostHog for analysis. To get + started: +

+
    +
  1. + Go to the{' '} + + integrations page + {' '} + in your Traceloop dashboard and click on the PostHog card. +
  2. +
  3. + Paste in your PostHog project API key: + {currentTeam?.api_token} +
  4. +
  5. + Paste in your PostHog host: + {apiHostOrigin()} +
  6. +
  7. + Select the environment you want to connect to PostHog and click Enable +
  8. +
+

Traceloop events will now be exported into PostHog as soon as they're available.

+ + ) +} diff --git a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/html-snippet.tsx b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/html-snippet.tsx index b816f27be392c..8e50d7fc8269e 100644 --- a/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/html-snippet.tsx +++ b/frontend/src/scenes/onboarding/sdks/sdk-install-instructions/html-snippet.tsx @@ -5,8 +5,8 @@ export function SDKHtmlSnippetInstructions(): JSX.Element { <>

Install

- Just add this snippet to your website within the <head> tag and you'll be ready to - start using PostHog. This can also be used in services like Google Tag Manager. + Add this snippet to your website within the <head> tag and you'll be ready to start + using PostHog. This can also be used in services like Google Tag Manager.

diff --git a/frontend/src/scenes/persons/PersonDisplay.tsx b/frontend/src/scenes/persons/PersonDisplay.tsx index 5271d7c7899c7..30faf9300ac64 100644 --- a/frontend/src/scenes/persons/PersonDisplay.tsx +++ b/frontend/src/scenes/persons/PersonDisplay.tsx @@ -8,8 +8,6 @@ import { ProfilePicture, ProfilePictureProps } from 'lib/lemon-ui/ProfilePicture import { useMemo, useState } from 'react' import { useNotebookNode } from 'scenes/notebooks/Nodes/NotebookNodeContext' -import { NotebookNodeType } from '~/types' - import { asDisplay, asLink } from './person-utils' import { PersonPreview } from './PersonPreview' @@ -83,19 +81,6 @@ export function PersonDisplay({ router.actions.push(href) } else { setVisible(true) - - if (notebookNode && person) { - notebookNode.actions.updateAttributes({ - children: [ - { - type: NotebookNodeType.Person, - attrs: { - id: person.distinct_id || person.distinct_ids?.[0], - }, - }, - ], - }) - } } } : undefined @@ -107,7 +92,7 @@ export function PersonDisplay({ { - if (!noPopover) { + if (!noPopover && !notebookNode) { e.preventDefault() return } diff --git a/frontend/src/scenes/pipeline/destinations/Destinations.tsx b/frontend/src/scenes/pipeline/destinations/Destinations.tsx index 0dc46d76e3d2c..6d2ea2b019c72 100644 --- a/frontend/src/scenes/pipeline/destinations/Destinations.tsx +++ b/frontend/src/scenes/pipeline/destinations/Destinations.tsx @@ -54,7 +54,7 @@ export function Destinations(): JSX.Element { ) } -export function DestinationsTable(props: PipelineDestinationsLogicProps): JSX.Element { +export function DestinationsTable({ ...props }: PipelineDestinationsLogicProps): JSX.Element { const { loading, filteredDestinations, filters, destinations } = useValues(pipelineDestinationsLogic(props)) const { setFilters, resetFilters } = useActions(pipelineDestinationsLogic(props)) @@ -63,36 +63,42 @@ export function DestinationsTable(props: PipelineDestinationsLogicProps): JSX.El return ( <>
- setFilters({ search: e })} - /> + {!props.forceFilters?.search && ( + setFilters({ search: e })} + /> + )}
- setFilters({ onlyActive: e ?? undefined })} - /> - setFilters({ kind: e ?? undefined })} - /> + {typeof props.forceFilters?.onlyActive !== 'boolean' && ( + setFilters({ onlyActive: e ?? undefined })} + /> + )} + {!props.forceFilters?.kind && ( + setFilters({ kind: e ?? undefined })} + /> + )}
@@ -216,7 +222,7 @@ export function DestinationsTable(props: PipelineDestinationsLogicProps): JSX.El } const DestinationMoreOverlay = ({ destination }: { destination: Destination }): JSX.Element => { - const { canConfigurePlugins, canEnableNewDestinations } = useValues(pipelineAccessLogic) + const { canConfigurePlugins, canEnableDestination } = useValues(pipelineAccessLogic) const { toggleNode, deleteNode } = useActions(pipelineDestinationsLogic) return ( @@ -227,7 +233,7 @@ const DestinationMoreOverlay = ({ destination }: { destination: Destination }): onClick: () => toggleNode(destination, !destination.enabled), disabledReason: !canConfigurePlugins ? 'You do not have permission to toggle destinations.' - : !canEnableNewDestinations && !destination.enabled + : !canEnableDestination(destination) && !destination.enabled ? 'Data pipelines add-on is required for enabling new destinations' : undefined, }, diff --git a/frontend/src/scenes/pipeline/destinations/NewDestinations.tsx b/frontend/src/scenes/pipeline/destinations/NewDestinations.tsx index ad91ad46e5c95..c862242200a5c 100644 --- a/frontend/src/scenes/pipeline/destinations/NewDestinations.tsx +++ b/frontend/src/scenes/pipeline/destinations/NewDestinations.tsx @@ -17,7 +17,7 @@ export function DestinationOptionsTable(): JSX.Element { const hogFunctionsEnabled = !!useFeatureFlag('HOG_FUNCTIONS') const { loading, filteredDestinations, filters } = useValues(newDestinationsLogic) const { setFilters, openFeedbackDialog } = useActions(newDestinationsLogic) - const { canEnableNewDestinations } = useValues(pipelineAccessLogic) + const { canEnableDestination } = useValues(pipelineAccessLogic) return (
@@ -71,7 +71,7 @@ export function DestinationOptionsTable(): JSX.Element { render: function RenderName(_, target) { return ( {target.name} @@ -98,7 +98,7 @@ export function DestinationOptionsTable(): JSX.Element { width: 100, align: 'right', render: function RenderActions(_, target) { - return canEnableNewDestinations || target.status === 'free' ? ( + return canEnableDestination(target) ? ( } export type PipelineDestinationsLogicProps = { defaultFilters?: DestinationFilters + forceFilters?: DestinationFilters syncFiltersWithUrl?: boolean } @@ -55,7 +57,7 @@ export const pipelineDestinationsLogic = kea([ userLogic, ['user', 'hasAvailableFeature'], pipelineAccessLogic, - ['canEnableNewDestinations'], + ['canEnableDestination'], ], }), actions({ @@ -73,13 +75,16 @@ export const pipelineDestinationsLogic = kea([ }), reducers(({ props }) => ({ filters: [ - props.defaultFilters as DestinationFilters, + { ...(props.defaultFilters || {}), ...(props.forceFilters || {}) } as DestinationFilters, { setFilters: (state, { filters }) => ({ ...state, ...filters, + ...(props.forceFilters || {}), + }), + resetFilters: () => ({ + ...(props.forceFilters || {}), }), - resetFilters: () => ({}), }, ], })), @@ -188,7 +193,11 @@ export const pipelineDestinationsLogic = kea([ { loadHogFunctions: async () => { // TODO: Support pagination? - return (await api.hogFunctions.list()).results + return ( + await api.hogFunctions.list({ + filters: values.filters?.filters, + }) + ).results }, deleteNodeHogFunction: async ({ destination }) => { @@ -286,7 +295,7 @@ export const pipelineDestinationsLogic = kea([ }), listeners(({ values, actions }) => ({ toggleNode: ({ destination, enabled }) => { - if (enabled && !values.canEnableNewDestinations) { + if (enabled && !values.canEnableDestination(destination)) { lemonToast.error('Data pipelines add-on is required for enabling new destinations.') return } diff --git a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx index a3122378587c3..15674256224b8 100644 --- a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx +++ b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx @@ -9,6 +9,7 @@ import { LemonSwitch, LemonTextArea, Link, + Spinner, SpinnerOverlay, } from '@posthog/lemon-ui' import { BindLogic, useActions, useValues } from 'kea' @@ -16,6 +17,7 @@ import { Form } from 'kea-forms' import { NotFound } from 'lib/components/NotFound' import { PageHeader } from 'lib/components/PageHeader' import { PayGateMini } from 'lib/components/PayGateMini/PayGateMini' +import { Sparkline } from 'lib/components/Sparkline' import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types' import { TestAccountFilterSwitch } from 'lib/components/TestAccountFiltersSwitch' import { useFeatureFlag } from 'lib/hooks/useFeatureFlag' @@ -34,6 +36,8 @@ import { HogFunctionInputs } from './HogFunctionInputs' import { HogFunctionStatusIndicator } from './HogFunctionStatusIndicator' import { HogFunctionTest, HogFunctionTestPlaceholder } from './HogFunctionTest' +const EVENT_THRESHOLD_ALERT_LEVEL = 8000 + export function HogFunctionConfiguration({ templateId, id }: { templateId?: string; id?: string }): JSX.Element { const logicProps = { templateId, id } const logic = hogFunctionConfigurationLogic(logicProps) @@ -49,6 +53,8 @@ export function HogFunctionConfiguration({ templateId, id }: { templateId?: stri exampleInvocationGlobalsWithInputs, showPaygate, hasAddon, + sparkline, + sparklineLoading, } = useValues(logic) const { submitConfiguration, @@ -164,7 +170,6 @@ export function HogFunctionConfiguration({ templateId, id }: { templateId?: stri {({ value, onChange }) => ( onChange(val)} /> @@ -294,6 +299,44 @@ export function HogFunctionConfiguration({ templateId, id }: { templateId?: stri This destination will be triggered if any of the above filters match.

+
+ Expected volume + {sparkline ? ( + <> + {sparkline.count > EVENT_THRESHOLD_ALERT_LEVEL ? ( + + Warning: This destination would have triggered{' '} + + {sparkline.count ?? 0} time{sparkline.count !== 1 ? 's' : ''} + {' '} + in the last 7 days. Consider the impact of this function on your + destination. + + ) : ( +

+ This destination would have triggered{' '} + + {sparkline.count ?? 0} time{sparkline.count !== 1 ? 's' : ''} + {' '} + in the last 7 days. +

+ )} +
+ {sparklineLoading ? : null} + +
+ + ) : sparklineLoading ? ( +
+ +
+ ) : null} +
diff --git a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionIcon.tsx b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionIcon.tsx index f99ee30ef52bb..49b0e094862bb 100644 --- a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionIcon.tsx +++ b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionIcon.tsx @@ -2,6 +2,7 @@ import { LemonButton, LemonFileInput, LemonInput, LemonSkeleton, lemonToast, Pop import clsx from 'clsx' import { useActions, useValues } from 'kea' import { IconUploadFile } from 'lib/lemon-ui/icons' +import { useState } from 'react' import { hogFunctionIconLogic, HogFunctionIconLogicProps } from './hogFunctionIconLogic' @@ -47,15 +48,7 @@ export function HogFunctionIconEditable({ const { setShowPopover, setSearchTerm } = useActions(hogFunctionIconLogic(props)) const content = ( - setShowPopover(!showPopover)} - > - {possibleIconsLoading ? : null} + setShowPopover(!showPopover)}> ) @@ -105,18 +98,14 @@ export function HogFunctionIconEditable({ {possibleIcons?.map((icon) => ( { const nonTempUrl = icon.url.replace('&temp=true', '') props.onChange?.(nonTempUrl) setShowPopover(false) }} > - + )) ?? (possibleIconsLoading ? ( @@ -142,15 +131,31 @@ export function HogFunctionIcon({ src?: string size?: 'small' | 'medium' | 'large' }): JSX.Element { + const [loaded, setLoaded] = useState(false) + return ( - {src ? : 🦔} + {src ? ( + <> + setLoaded(true)} + /> + {!loaded && } + + ) : ( + 🦔 + )} ) } diff --git a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx index 70d39a02e3e01..39d7e2f63e8b8 100644 --- a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx +++ b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx @@ -1,4 +1,5 @@ import { lemonToast } from '@posthog/lemon-ui' +import equal from 'fast-deep-equal' import { actions, afterMount, connect, kea, key, listeners, path, props, reducers, selectors } from 'kea' import { forms } from 'kea-forms' import { loaders } from 'kea-loaders' @@ -14,8 +15,15 @@ import { urls } from 'scenes/urls' import { userLogic } from 'scenes/userLogic' import { groupsModel } from '~/models/groupsModel' +import { performQuery } from '~/queries/query' +import { EventsNode, NodeKind, TrendsQuery } from '~/queries/schema' +import { hogql } from '~/queries/utils' import { + AnyPropertyFilter, AvailableFeature, + BaseMathType, + ChartDisplayType, + FilterLogicalOperator, FilterType, HogFunctionConfigurationType, HogFunctionInputType, @@ -27,6 +35,8 @@ import { PipelineTab, PluginConfigFilters, PluginConfigTypeNew, + PropertyFilterType, + PropertyGroupFilter, } from '~/types' import type { hogFunctionConfigurationLogicType } from './hogFunctionConfigurationLogicType' @@ -135,6 +145,7 @@ export const hogFunctionConfigurationLogic = kea ({ sparklineQuery } as { sparklineQuery: TrendsQuery }), }), reducers({ showSource: [ @@ -144,7 +155,7 @@ export const hogFunctionConfigurationLogic = kea ({ + loaders(({ props, values }) => ({ template: [ null as HogFunctionTemplateType | null, { @@ -197,6 +208,25 @@ export const hogFunctionConfigurationLogic = kea { + if (values.sparkline === null) { + await breakpoint(100) + } else { + await breakpoint(1000) + } + const result = await performQuery(sparklineQuery) + breakpoint() + const data = result?.results?.[0]?.data + const count = result?.results?.[0]?.count + const labels = result?.results?.[0]?.labels + return { data, count, labels } + }, + }, + ], })), forms(({ values, props, asyncActions }) => ({ configuration: { @@ -376,6 +406,69 @@ export const hogFunctionConfigurationLogic = kea [s.configuration], + (configuration): TrendsQuery => { + const properties: PropertyGroupFilter = { + type: FilterLogicalOperator.Or, + values: [], + } + for (const event of configuration.filters?.events ?? []) { + const eventProperties: AnyPropertyFilter[] = [...(event.properties ?? [])] + if (event.id) { + eventProperties.push({ + type: PropertyFilterType.HogQL, + key: hogql`event = ${event.id}`, + }) + } + if (eventProperties.length === 0) { + eventProperties.push({ + type: PropertyFilterType.HogQL, + key: 'true', + }) + } + properties.values.push({ + type: FilterLogicalOperator.And, + values: eventProperties, + }) + } + for (const action of configuration.filters?.actions ?? []) { + const actionProperties: AnyPropertyFilter[] = [...(action.properties ?? [])] + if (action.id) { + actionProperties.push({ + type: PropertyFilterType.HogQL, + key: hogql`matchesAction(${action.id})`, + }) + } + properties.values.push({ + type: FilterLogicalOperator.And, + values: actionProperties, + }) + } + + return { + kind: NodeKind.TrendsQuery, + filterTestAccounts: configuration.filters?.filter_test_accounts, + series: [ + { + kind: NodeKind.EventsNode, + event: null, + name: 'All Events', + math: BaseMathType.TotalCount, + } satisfies EventsNode, + ], + properties, + interval: 'day', + dateRange: { + date_from: '-7d', + }, + trendsFilter: { + display: ChartDisplayType.ActionsBar, + }, + } + }, + { resultEqualityCheck: equal }, + ], })), listeners(({ actions, values, cache }) => ({ @@ -523,7 +616,7 @@ export const hogFunctionConfigurationLogic = kea ({ + subscriptions(({ props, cache, actions }) => ({ configuration: (configuration) => { if (!Object.keys(configuration).length) { return @@ -546,5 +639,9 @@ export const hogFunctionConfigurationLogic = kea { + actions.sparklineQueryChanged(sparklineQuery) + }, })), ]) diff --git a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionIconLogic.ts b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionIconLogic.ts index 2f92423b57a00..28c3076c3cbed 100644 --- a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionIconLogic.ts +++ b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionIconLogic.ts @@ -1,4 +1,4 @@ -import { actions, kea, key, listeners, path, props, propsChanged, reducers } from 'kea' +import { actions, kea, key, listeners, path, props, reducers } from 'kea' import { loaders } from 'kea-loaders' import api from 'lib/api' @@ -8,7 +8,6 @@ import type { hogFunctionIconLogicType } from './hogFunctionIconLogicType' export interface HogFunctionIconLogicProps { logicKey: string - search: string src?: string onChange?: (src: string) => void } @@ -41,12 +40,12 @@ export const hogFunctionIconLogic = kea([ ], }), - loaders(({ props, values }) => ({ + loaders(({ values }) => ({ possibleIcons: [ null as HogFunctionIconResponse[] | null, { loadPossibleIcons: async (_, breakpoint) => { - const search = values.searchTerm ?? props.search + const search = values.searchTerm if (!search) { return [] @@ -63,18 +62,7 @@ export const hogFunctionIconLogic = kea([ ], })), - listeners(({ actions, values, props }) => ({ - loadPossibleIconsSuccess: async () => { - const autoChange = props.onChange && (!props.src || props.src.includes('temp=true')) - if (!autoChange) { - return - } - const firstValue = values.possibleIcons?.[0] - if (firstValue) { - props.onChange?.(firstValue.url) - } - }, - + listeners(({ actions }) => ({ setShowPopover: ({ show }) => { if (show) { actions.loadPossibleIcons() @@ -85,13 +73,4 @@ export const hogFunctionIconLogic = kea([ actions.loadPossibleIcons() }, })), - - propsChanged(({ props, actions }, oldProps) => { - if (!props.onChange) { - return - } - if (!props.src || (props.search !== oldProps.search && props.src.includes('temp=true'))) { - actions.loadPossibleIcons() - } - }), ]) diff --git a/frontend/src/scenes/pipeline/pipelineAccessLogic.tsx b/frontend/src/scenes/pipeline/pipelineAccessLogic.tsx index d738434e8aed4..5a997a8a33bac 100644 --- a/frontend/src/scenes/pipeline/pipelineAccessLogic.tsx +++ b/frontend/src/scenes/pipeline/pipelineAccessLogic.tsx @@ -5,6 +5,7 @@ import { userLogic } from 'scenes/userLogic' import { AvailableFeature } from '~/types' import type { pipelineAccessLogicType } from './pipelineAccessLogicType' +import { Destination, NewDestinationItemType, PipelineBackend } from './types' export const pipelineAccessLogic = kea([ path(['scenes', 'pipeline', 'pipelineAccessLogic']), @@ -22,5 +23,18 @@ export const pipelineAccessLogic = kea([ user?.is_impersonated || (canConfigurePlugins(user?.organization) && hasAvailableFeature(AvailableFeature.DATA_PIPELINES)), ], + + canEnableDestination: [ + (s) => [s.canEnableNewDestinations], + (canEnableNewDestinations): ((destination: Destination | NewDestinationItemType) => boolean) => { + return (destination: Destination | NewDestinationItemType) => { + return destination.backend === PipelineBackend.HogFunction + ? ('hog_function' in destination + ? destination.hog_function.template?.status === 'free' + : destination.status === 'free') || canEnableNewDestinations + : canEnableNewDestinations + } + }, + ], }), ]) diff --git a/frontend/src/scenes/pipeline/pipelineBatchExportConfigurationLogic.tsx b/frontend/src/scenes/pipeline/pipelineBatchExportConfigurationLogic.tsx index e66534326f964..f596d8c158d42 100644 --- a/frontend/src/scenes/pipeline/pipelineBatchExportConfigurationLogic.tsx +++ b/frontend/src/scenes/pipeline/pipelineBatchExportConfigurationLogic.tsx @@ -332,14 +332,14 @@ export const pipelineBatchExportConfigurationLogic = kea [p.id], (id): boolean => !id], requiredFields: [ - (s) => [s.service], - (service): string[] => { + (s) => [s.service, s.isNew], + (service, isNew): string[] => { const generalRequiredFields = ['interval', 'name', 'model'] if (service === 'Postgres') { return [ ...generalRequiredFields, - 'user', - 'password', + ...(isNew ? ['user'] : []), + ...(isNew ? ['password'] : []), 'host', 'port', 'database', @@ -349,8 +349,8 @@ export const pipelineBatchExportConfigurationLogic = kea } > - {plugin.url ? ( + {plugin.url && plugin.plugin_type !== 'inline' ? ( diff --git a/frontend/src/scenes/plugins/edit/interface-jobs/PluginJobOptions.tsx b/frontend/src/scenes/plugins/edit/interface-jobs/PluginJobOptions.tsx index 85b9fce6a0b50..bde5ac64047b2 100644 --- a/frontend/src/scenes/plugins/edit/interface-jobs/PluginJobOptions.tsx +++ b/frontend/src/scenes/plugins/edit/interface-jobs/PluginJobOptions.tsx @@ -52,7 +52,7 @@ export function PluginJobOptions({ <>

Jobs - + BETA

diff --git a/frontend/src/scenes/plugins/plugin/PluginImage.tsx b/frontend/src/scenes/plugins/plugin/PluginImage.tsx index 610a9d64a46b7..dc6fc298377bd 100644 --- a/frontend/src/scenes/plugins/plugin/PluginImage.tsx +++ b/frontend/src/scenes/plugins/plugin/PluginImage.tsx @@ -1,10 +1,15 @@ import { IconTerminal } from '@posthog/icons' import { parseGithubRepoURL } from 'lib/utils' import imgPluginDefault from 'public/plugin-default.svg' +import IconTransformationSemverFlattener from 'public/transformations/semver-flattener.png' import { useEffect, useState } from 'react' import { PluginType } from '~/types' +const pluginImageOverrides: Record = { + 'inline://semver-flattener': IconTransformationSemverFlattener, +} + export type PluginImageSize = 'small' | 'medium' | 'large' export function PluginImage({ @@ -23,7 +28,10 @@ export function PluginImage({ }[size] useEffect(() => { - if (icon) { + const imageOverride = pluginImageOverrides[url ?? ''] + if (imageOverride) { + setState((state) => ({ ...state, image: imageOverride })) + } else if (icon) { setState((state) => ({ ...state, image: icon })) } else if (url?.includes('github.com')) { const { user, repo, path } = parseGithubRepoURL(url) diff --git a/frontend/src/scenes/saved-insights/SavedInsights.tsx b/frontend/src/scenes/saved-insights/SavedInsights.tsx index 267a99865d418..7f6a0a26fd1a0 100644 --- a/frontend/src/scenes/saved-insights/SavedInsights.tsx +++ b/frontend/src/scenes/saved-insights/SavedInsights.tsx @@ -330,7 +330,7 @@ export const INSIGHT_TYPE_OPTIONS: LemonSelectOptions = [ ...Object.entries(INSIGHT_TYPES_METADATA).map(([value, meta]) => ({ value, label: meta.name, - icon: meta.icon ? : undefined, + icon: meta.icon ? : undefined, })), ] diff --git a/frontend/src/scenes/saved-insights/newInsightsMenu.tsx b/frontend/src/scenes/saved-insights/newInsightsMenu.tsx index 128fb98ed1813..7d68889330759 100644 --- a/frontend/src/scenes/saved-insights/newInsightsMenu.tsx +++ b/frontend/src/scenes/saved-insights/newInsightsMenu.tsx @@ -2,28 +2,21 @@ import { LemonButton } from 'lib/lemon-ui/LemonButton' import { eventUsageLogic } from 'lib/utils/eventUsageLogic' import { ReactNode } from 'react' import { insightTypeURL } from 'scenes/insights/utils' -import { INSIGHT_TYPES_METADATA, InsightTypeMetadata } from 'scenes/saved-insights/SavedInsights' +import { INSIGHT_TYPES_METADATA } from 'scenes/saved-insights/SavedInsights' import { InsightType } from '~/types' -function insightTypesForMenu(): [string, InsightTypeMetadata][] { - // never show JSON InsightType in the menu - return Object.entries(INSIGHT_TYPES_METADATA).filter(([insightType]) => insightType !== InsightType.JSON) -} - export function overlayForNewInsightMenu(dataAttr: string): ReactNode[] { - const menuEntries = insightTypesForMenu() + const menuEntries = Object.entries(INSIGHT_TYPES_METADATA).filter( + ([insightType]) => insightType !== InsightType.JSON + ) return menuEntries.map( ([listedInsightType, listedInsightTypeMetadata]) => listedInsightTypeMetadata.inMenu && ( - ) - } + icon={listedInsightTypeMetadata.icon && } to={insightTypeURL[listedInsightType as InsightType]} data-attr={dataAttr} data-attr-insight-type={listedInsightType} @@ -32,9 +25,9 @@ export function overlayForNewInsightMenu(dataAttr: string): ReactNode[] { }} fullWidth > -
+
{listedInsightTypeMetadata.name} - {listedInsightTypeMetadata.description} + {listedInsightTypeMetadata.description}
) diff --git a/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFilters.tsx b/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFilters.tsx index f491b310b9a71..8bcdb6e62e1ef 100644 --- a/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFilters.tsx +++ b/frontend/src/scenes/session-recordings/filters/RecordingsUniversalFilters.tsx @@ -33,6 +33,30 @@ export const RecordingsUniversalFilters = ({
+
+ { + let values = filters.filter_group.values + + // set the type on the nested child when only using a single filter group + const hasSingleGroup = values.length === 1 + if (hasSingleGroup) { + const group = values[0] as UniversalFiltersGroup + values = [{ ...group, type }] + } + + setFilters({ + filter_group: { + type: type, + values: values, + }, + }) + }} + topLevelFilter={true} + suffix={['filter', 'filters']} + /> +
-
- - setFilters({ filter_test_accounts: testFilters.filter_test_accounts }) - } - /> -
-
- { - let values = filters.filter_group.values - - // set the type on the nested child when only using a single filter group - const hasSingleGroup = values.length === 1 - if (hasSingleGroup) { - const group = values[0] as UniversalFiltersGroup - values = [{ ...group, type }] - } - - setFilters({ - filter_group: { - type: type, - values: values, - }, - }) - }} - topLevelFilter={true} - suffix={['filter', 'filters']} +
+ + setFilters({ filter_test_accounts: testFilters.filter_test_accounts }) + } />
diff --git a/frontend/src/scenes/session-recordings/player/rrweb/canvas/canvas-plugin.ts b/frontend/src/scenes/session-recordings/player/rrweb/canvas/canvas-plugin.ts index 6b6d58a1e2f4b..b11d928f51c22 100644 --- a/frontend/src/scenes/session-recordings/player/rrweb/canvas/canvas-plugin.ts +++ b/frontend/src/scenes/session-recordings/player/rrweb/canvas/canvas-plugin.ts @@ -165,7 +165,7 @@ export const CanvasReplayerPlugin = (events: eventWithTime[]): ReplayPlugin => { }, // ensures transparency is possible 'image/webp', - 0.5 + 0.4 ) } } diff --git a/frontend/src/scenes/settings/project/WebhookIntegration.tsx b/frontend/src/scenes/settings/project/WebhookIntegration.tsx index 6a01dd2e113ce..a14ee599902b0 100644 --- a/frontend/src/scenes/settings/project/WebhookIntegration.tsx +++ b/frontend/src/scenes/settings/project/WebhookIntegration.tsx @@ -5,6 +5,9 @@ import { FEATURE_FLAGS } from 'lib/constants' import { featureFlagLogic } from 'lib/logic/featureFlagLogic' import { useEffect, useState } from 'react' import { teamLogic } from 'scenes/teamLogic' +import { urls } from 'scenes/urls' + +import { PipelineTab } from '~/types' import { webhookIntegrationLogic } from './webhookIntegrationLogic' @@ -22,6 +25,8 @@ export function WebhookIntegration(): JSX.Element { } }, [currentTeam]) + const hogFunctionsEnabled = featureFlags[FEATURE_FLAGS.HOG_FUNCTIONS] + const webhooks_disallowed = featureFlags[FEATURE_FLAGS.WEBHOOKS_DENYLIST] if (webhooks_disallowed) { return ( @@ -36,6 +41,18 @@ export function WebhookIntegration(): JSX.Element { ) } + if (hogFunctionsEnabled && !currentTeam?.slack_incoming_webhook) { + return ( + <> +

+ The Webhook integration has been replaced with our new{' '} + Pipeline Destinations allowing you to + create multiple, highly customizable webhook triggers based off of Actions or Events. +

+ + ) + } + return (

diff --git a/frontend/src/scenes/surveys/SurveyCustomization.tsx b/frontend/src/scenes/surveys/SurveyCustomization.tsx index 20e29c274c19c..2e08e265f6e28 100644 --- a/frontend/src/scenes/surveys/SurveyCustomization.tsx +++ b/frontend/src/scenes/surveys/SurveyCustomization.tsx @@ -66,7 +66,7 @@ export function Customization({ appearance, surveyQuestionItem, onAppearanceChan disabledReason={ surveysStylingAvailable ? null - : 'Subscribe to surveys to customize survey position.' + : 'Upgrade your plan to customize survey position.' } > {position} diff --git a/frontend/src/scenes/surveys/SurveyEdit.tsx b/frontend/src/scenes/surveys/SurveyEdit.tsx index 9630f33788531..741ffdde4f7dd 100644 --- a/frontend/src/scenes/surveys/SurveyEdit.tsx +++ b/frontend/src/scenes/surveys/SurveyEdit.tsx @@ -82,7 +82,7 @@ export default function SurveyEdit(): JSX.Element { const { thankYouMessageDescriptionContentType = null } = survey.appearance ?? {} const surveysRecurringScheduleDisabledReason = surveysRecurringScheduleAvailable ? undefined - : 'Subscribe to surveys for repeating surveys over a duration of time' + : 'Upgrade your plan to use repeating surveys' if (survey.iteration_count && survey.iteration_count > 0) { setSchedule('recurring') @@ -427,7 +427,7 @@ export default function SurveyEdit(): JSX.Element { disabledReason={ surveysMultipleQuestionsAvailable ? null - : 'Subscribe to surveys for multiple questions' + : 'Upgrade your plan to get multiple questions' } onClick={() => { setSurveyValue('questions', [ @@ -441,7 +441,7 @@ export default function SurveyEdit(): JSX.Element { {!surveysMultipleQuestionsAvailable && ( - Subscribe + Upgrade )}

diff --git a/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx b/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx index e0e711b9f4e40..6e5f520fbfd87 100644 --- a/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx +++ b/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx @@ -247,7 +247,10 @@ export function SurveyEditQuestionGroup({ index, question }: { index: number; qu value: 5, }, ...(question.display === 'number' - ? [{ label: '0 - 10 (Net Promoter Score)', value: 10 }] + ? [ + { label: '1 - 7 (7 Point Likert Scale)', value: 7 }, + { label: '0 - 10 (Net Promoter Score)', value: 10 }, + ] : []), ]} onChange={(val) => { diff --git a/frontend/src/scenes/surveys/Surveys.tsx b/frontend/src/scenes/surveys/Surveys.tsx index ca71fcb5cb890..d51374fcaf180 100644 --- a/frontend/src/scenes/surveys/Surveys.tsx +++ b/frontend/src/scenes/surveys/Surveys.tsx @@ -492,7 +492,7 @@ export function StatusTag({ survey }: { survey: Survey }): JSX.Element { } as Record const status = getSurveyStatus(survey) return ( - + {status.toUpperCase()} ) diff --git a/frontend/src/scenes/surveys/constants.tsx b/frontend/src/scenes/surveys/constants.tsx index c869e94d68dd9..a158ad413bdca 100644 --- a/frontend/src/scenes/surveys/constants.tsx +++ b/frontend/src/scenes/surveys/constants.tsx @@ -272,14 +272,13 @@ export const defaultSurveyTemplates = [ question: 'How easy was it to use our product?', description: '', descriptionContentType: 'text' as SurveyQuestionDescriptionContentType, - display: 'emoji', - scale: 5, + display: 'number', + scale: 7, lowerBoundLabel: 'Very difficult', upperBoundLabel: 'Very easy', }, ], description: 'Works well with churn surveys.', - appearance: { ratingButtonColor: '#939393' }, }, { type: SurveyType.Popover, diff --git a/frontend/src/scenes/urls.ts b/frontend/src/scenes/urls.ts index a855c9075c7de..5e9ad00a577eb 100644 --- a/frontend/src/scenes/urls.ts +++ b/frontend/src/scenes/urls.ts @@ -12,12 +12,12 @@ import { AppMetricsUrlParams, DashboardType, DataWarehouseTab, - FilterType, InsightShortId, PipelineNodeTab, PipelineStage, PipelineTab, ProductKey, + RecordingUniversalFilters, ReplayTabs, SDKKey, } from '~/types' @@ -108,13 +108,11 @@ export const urls = { savedInsights: (tab?: string): string => `/insights${tab ? `?tab=${tab}` : ''}`, webAnalytics: (): string => `/web`, - replay: (tab?: ReplayTabs, filters?: Partial): string => + replay: (tab?: ReplayTabs, filters?: Partial): string => combineUrl(tab ? `/replay/${tab}` : '/replay/recent', filters ? { filters } : {}).url, - replayPlaylist: (id: string, filters?: Partial): string => - combineUrl(`/replay/playlists/${id}`, filters ? { filters } : {}).url, - replaySingle: (id: string, filters?: Partial): string => - combineUrl(`/replay/${id}`, filters ? { filters } : {}).url, - replayFilePlayback: (): string => combineUrl('/replay/file-playback').url, + replayPlaylist: (id: string): string => `/replay/playlists/${id}`, + replaySingle: (id: string): string => `/replay/${id}`, + replayFilePlayback: (): string => '/replay/file-playback', personByDistinctId: (id: string, encode: boolean = true): string => encode ? `/person/${encodeURIComponent(id)}` : `/person/${id}`, diff --git a/frontend/src/scenes/web-analytics/WebDashboard.tsx b/frontend/src/scenes/web-analytics/WebDashboard.tsx index d2bd1958c810c..1ad977cfa7193 100644 --- a/frontend/src/scenes/web-analytics/WebDashboard.tsx +++ b/frontend/src/scenes/web-analytics/WebDashboard.tsx @@ -40,12 +40,10 @@ const Filters = (): JSX.Element => { return (
diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 31a685da19cbe..620ea900d7b25 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -1658,7 +1658,7 @@ export interface Tileable { color: InsightColor | null } -export interface DashboardTile extends Tileable, Cacheable { +export interface DashboardTile extends Tileable { id: number insight?: InsightModel text?: TextModel @@ -2013,6 +2013,7 @@ export interface DatedAnnotationType extends Omit export enum ChartDisplayType { ActionsLineGraph = 'ActionsLineGraph', ActionsBar = 'ActionsBar', + ActionsStackedBar = 'ActionsStackedBar', ActionsAreaGraph = 'ActionsAreaGraph', ActionsLineGraphCumulative = 'ActionsLineGraphCumulative', BoldNumber = 'BoldNumber', @@ -4102,11 +4103,13 @@ export enum SDKKey { GATSBY = 'gatsby', GO = 'go', GOOGLE_TAG_MANAGER = 'google_tag_manager', + HELICONE = 'helicone', HTML_SNIPPET = 'html', IOS = 'ios', JAVA = 'java', JS_WEB = 'javascript_web', LARAVEL = 'laravel', + LANGFUSE = 'langfuse', NEXT_JS = 'nextjs', NODE_JS = 'nodejs', NUXT_JS = 'nuxtjs', @@ -4123,6 +4126,7 @@ export enum SDKKey { SENTRY = 'sentry', SHOPIFY = 'shopify', SVELTE = 'svelte', + TRACELOOP = 'traceloop', VUE_JS = 'vuejs', WEBFLOW = 'webflow', WORDPRESS = 'wordpress', @@ -4134,6 +4138,7 @@ export enum SDKTag { SERVER = 'Server', INTEGRATION = 'Integration', RECOMMENDED = 'Recommended', + LLM = 'LLM', OTHER = 'Other', } diff --git a/hogql_parser/HogQLLexer.cpp b/hogql_parser/HogQLLexer.cpp index 08985f5634857..f5583b7fa4ac8 100644 --- a/hogql_parser/HogQLLexer.cpp +++ b/hogql_parser/HogQLLexer.cpp @@ -58,32 +58,32 @@ void hogqllexerLexerInitialize() { auto staticData = std::make_unique( std::vector{ "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", "ASOF", "BETWEEN", - "BOTH", "BY", "CASE", "CAST", "COHORT", "COLLATE", "CROSS", "CUBE", - "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", "ELSE", - "END", "EXTRACT", "FINAL", "FIRST", "FN", "FOLLOWING", "FOR", "FROM", - "FULL", "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", "IN", "INF", - "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", "LEFT", - "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", "NAN_SQL", "NOT", "NULL_SQL", - "NULLS", "OFFSET", "ON", "OR", "ORDER", "OUTER", "OVER", "PARTITION", - "PRECEDING", "PREWHERE", "QUARTER", "RANGE", "RETURN", "RIGHT", "ROLLUP", - "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT", "SEMI", "SETTINGS", "SUBSTRING", - "THEN", "TIES", "TIMESTAMP", "TO", "TOP", "TOTALS", "TRAILING", "TRIM", - "TRUNCATE", "UNBOUNDED", "UNION", "USING", "WEEK", "WHEN", "WHERE", - "WHILE", "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", - "FLOATING_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", - "STRING_LITERAL", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", - "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", - "Y", "Z", "LETTER", "OCT_DIGIT", "DEC_DIGIT", "HEX_DIGIT", "ARROW", - "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", "CONCAT", - "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT", - "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", - "LT_EQ", "LT", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", - "NULLISH", "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", - "QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", - "RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", - "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT", - "STRING_ESCAPE_TRIGGER", "STRING_QUOTE_SINGLE", "FULL_STRING_TEXT", - "FULL_STRING_ESCAPE_TRIGGER" + "BOTH", "BY", "CASE", "CAST", "CATCH", "COHORT", "COLLATE", "CROSS", + "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", + "ELSE", "END", "EXTRACT", "FINAL", "FINALLY", "FIRST", "FN", "FOLLOWING", + "FOR", "FROM", "FULL", "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", + "IN", "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", + "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", "NAN_SQL", "NOT", + "NULL_SQL", "NULLS", "OFFSET", "ON", "OR", "ORDER", "OUTER", "OVER", + "PARTITION", "PRECEDING", "PREWHERE", "QUARTER", "RANGE", "RETURN", + "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT", "SEMI", + "SETTINGS", "SUBSTRING", "THEN", "THROW", "TIES", "TIMESTAMP", "TO", + "TOP", "TOTALS", "TRAILING", "TRIM", "TRUNCATE", "TRY", "UNBOUNDED", + "UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH", + "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", + "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", "A", "B", + "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", + "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "LETTER", "OCT_DIGIT", + "DEC_DIGIT", "HEX_DIGIT", "ARROW", "ASTERISK", "BACKQUOTE", "BACKSLASH", + "COLON", "COMMA", "CONCAT", "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", + "EQ_SINGLE", "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", + "LBRACE", "LBRACKET", "LPAREN", "LT_EQ", "LT", "NOT_EQ", "NOT_IREGEX", + "NOT_REGEX", "NULL_PROPERTY", "NULLISH", "PERCENT", "PLUS", "QUERY", + "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", "QUOTE_SINGLE_TEMPLATE_FULL", + "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", "RBRACE", "RBRACKET", + "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", "MULTI_LINE_COMMENT", + "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", + "STRING_QUOTE_SINGLE", "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" }, std::vector{ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" @@ -98,42 +98,42 @@ void hogqllexerLexerInitialize() { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "'->'", "'*'", "'`'", "'\\'", "':'", "','", "'||'", - "'-'", "'$'", "'.'", "'=='", "'='", "'>='", "'>'", "'#'", "'~*'", - "'=~*'", "'{'", "'['", "'('", "'<='", "'<'", "", "'!~*'", "'!~'", - "'\\u003F.'", "'\\u003F\\u003F'", "'%'", "'+'", "'\\u003F'", "'\"'", - "'f''", "'F''", "'''", "'~'", "'=~'", "'}'", "']'", "')'", "';'", - "'/'", "'_'" + "", "", "", "", "", "", "", "", "", "'->'", "'*'", "'`'", "'\\'", + "':'", "','", "'||'", "'-'", "'$'", "'.'", "'=='", "'='", "'>='", + "'>'", "'#'", "'~*'", "'=~*'", "'{'", "'['", "'('", "'<='", "'<'", + "", "'!~*'", "'!~'", "'\\u003F.'", "'\\u003F\\u003F'", "'%'", "'+'", + "'\\u003F'", "'\"'", "'f''", "'F''", "'''", "'~'", "'=~'", "'}'", + "']'", "')'", "';'", "'/'", "'_'" }, std::vector{ "", "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", "ASOF", - "BETWEEN", "BOTH", "BY", "CASE", "CAST", "COHORT", "COLLATE", "CROSS", - "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", - "ELSE", "END", "EXTRACT", "FINAL", "FIRST", "FN", "FOLLOWING", "FOR", - "FROM", "FULL", "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", "IN", - "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", + "BETWEEN", "BOTH", "BY", "CASE", "CAST", "CATCH", "COHORT", "COLLATE", + "CROSS", "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", + "ELSE", "END", "EXTRACT", "FINAL", "FINALLY", "FIRST", "FN", "FOLLOWING", + "FOR", "FROM", "FULL", "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", + "IN", "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", "NAN_SQL", "NOT", "NULL_SQL", "NULLS", "OFFSET", "ON", "OR", "ORDER", "OUTER", "OVER", "PARTITION", "PRECEDING", "PREWHERE", "QUARTER", "RANGE", "RETURN", "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT", "SEMI", - "SETTINGS", "SUBSTRING", "THEN", "TIES", "TIMESTAMP", "TO", "TOP", - "TOTALS", "TRAILING", "TRIM", "TRUNCATE", "UNBOUNDED", "UNION", "USING", - "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", - "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", - "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW", "ASTERISK", "BACKQUOTE", - "BACKSLASH", "COLON", "COMMA", "CONCAT", "DASH", "DOLLAR", "DOT", - "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", - "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", "LT_EQ", "LT", "NOT_EQ", - "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", "NULLISH", "PERCENT", - "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", "QUOTE_SINGLE_TEMPLATE_FULL", - "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", "RBRACE", "RBRACKET", - "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", "MULTI_LINE_COMMENT", - "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", - "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" + "SETTINGS", "SUBSTRING", "THEN", "THROW", "TIES", "TIMESTAMP", "TO", + "TOP", "TOTALS", "TRAILING", "TRIM", "TRUNCATE", "TRY", "UNBOUNDED", + "UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH", + "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", + "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW", + "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", "CONCAT", + "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT", + "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", + "LT_EQ", "LT", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", + "NULLISH", "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", + "QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", + "RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", + "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT", + "STRING_ESCAPE_TRIGGER", "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" } ); static const int32_t serializedATNSegment[] = { - 4,0,155,1417,6,-1,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2, + 4,0,159,1449,6,-1,6,-1,6,-1,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, @@ -161,494 +161,507 @@ void hogqllexerLexerInitialize() { 7,163,2,164,7,164,2,165,7,165,2,166,7,166,2,167,7,167,2,168,7,168,2,169, 7,169,2,170,7,170,2,171,7,171,2,172,7,172,2,173,7,173,2,174,7,174,2,175, 7,175,2,176,7,176,2,177,7,177,2,178,7,178,2,179,7,179,2,180,7,180,2,181, - 7,181,2,182,7,182,2,183,7,183,2,184,7,184,2,185,7,185,1,0,1,0,1,0,1,0, - 1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1, - 4,1,4,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6, - 1,6,3,6,416,8,6,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1, - 9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1, - 12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1, - 14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1, - 16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1, - 19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1, - 21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1, - 22,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1, - 25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1, - 27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1, - 32,1,33,1,33,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1, - 35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,38,1, - 38,1,38,1,38,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1, - 40,1,40,1,40,1,40,1,40,3,40,619,8,40,1,41,1,41,1,41,1,41,1,41,1,41,1, - 42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,44,1,44,1, - 44,1,44,1,44,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1, - 47,1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1, - 49,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1, - 52,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1, - 54,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1, - 57,1,57,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,60,1,60,1, - 60,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,62,1,63,1, - 63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,1, - 65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,1, - 66,1,66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1, - 68,1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1, - 70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1, - 72,1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,75,1, - 75,1,75,1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,77,1, - 77,1,77,1,77,1,77,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1, - 79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80,1,80,1, - 81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1,82,1, - 82,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1,85,1,85,1, - 85,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1, - 87,1,88,1,88,1,88,1,88,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1, - 89,1,89,1,89,1,89,1,89,1,89,1,90,1,90,1,90,1,90,1,90,1,90,1,91,1,91,1, - 91,1,91,1,91,1,91,1,92,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,93,1, - 94,1,94,1,94,1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,95,1,95,1,96,1,96,1, - 96,1,96,1,96,1,96,1,96,1,97,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1, - 98,1,98,1,98,1,98,1,98,1,98,3,98,983,8,98,1,99,1,99,1,99,1,99,1,99,1, - 99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1, - 99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,3,99,1012,8,99,1,100,1,100,1,100, - 3,100,1017,8,100,1,100,1,100,1,100,1,100,5,100,1023,8,100,10,100,12,100, - 1026,9,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,5,100, - 1037,8,100,10,100,12,100,1040,9,100,1,100,1,100,1,100,1,100,1,100,1,100, - 1,100,1,100,1,100,1,100,1,100,5,100,1053,8,100,10,100,12,100,1056,9,100, - 1,100,1,100,3,100,1060,8,100,1,101,1,101,1,101,5,101,1065,8,101,10,101, - 12,101,1068,9,101,1,101,1,101,3,101,1072,8,101,1,101,1,101,3,101,1076, - 8,101,1,101,4,101,1079,8,101,11,101,12,101,1080,1,101,1,101,1,101,3,101, - 1086,8,101,1,101,1,101,3,101,1090,8,101,1,101,4,101,1093,8,101,11,101, - 12,101,1094,1,101,1,101,1,101,5,101,1100,8,101,10,101,12,101,1103,9,101, - 1,101,1,101,1,101,3,101,1108,8,101,1,101,4,101,1111,8,101,11,101,12,101, - 1112,1,101,1,101,1,101,1,101,1,101,3,101,1120,8,101,1,101,4,101,1123, - 8,101,11,101,12,101,1124,1,101,1,101,1,101,1,101,3,101,1131,8,101,1,101, - 4,101,1134,8,101,11,101,12,101,1135,3,101,1138,8,101,1,102,1,102,4,102, - 1142,8,102,11,102,12,102,1143,1,103,4,103,1147,8,103,11,103,12,103,1148, - 1,104,1,104,1,104,4,104,1154,8,104,11,104,12,104,1155,1,105,1,105,1,105, - 1,105,1,105,1,105,1,105,1,105,1,105,5,105,1167,8,105,10,105,12,105,1170, - 9,105,1,105,1,105,1,106,1,106,1,107,1,107,1,108,1,108,1,109,1,109,1,110, - 1,110,1,111,1,111,1,112,1,112,1,113,1,113,1,114,1,114,1,115,1,115,1,116, - 1,116,1,117,1,117,1,118,1,118,1,119,1,119,1,120,1,120,1,121,1,121,1,122, - 1,122,1,123,1,123,1,124,1,124,1,125,1,125,1,126,1,126,1,127,1,127,1,128, - 1,128,1,129,1,129,1,130,1,130,1,131,1,131,1,132,1,132,1,133,1,133,1,134, - 1,134,1,135,1,135,1,136,1,136,1,136,1,137,1,137,1,138,1,138,1,139,1,139, - 1,140,1,140,1,141,1,141,1,142,1,142,1,142,1,143,1,143,1,144,1,144,1,145, - 1,145,1,146,1,146,1,146,1,147,1,147,1,148,1,148,1,148,1,149,1,149,1,150, - 1,150,1,151,1,151,1,151,1,152,1,152,1,152,1,152,1,153,1,153,1,153,1,153, - 1,154,1,154,1,155,1,155,1,156,1,156,1,156,1,157,1,157,1,158,1,158,1,158, - 1,158,3,158,1292,8,158,1,159,1,159,1,159,1,159,1,160,1,160,1,160,1,161, - 1,161,1,161,1,162,1,162,1,162,1,163,1,163,1,164,1,164,1,165,1,165,1,166, - 1,166,1,167,1,167,1,167,1,167,1,167,1,168,1,168,1,168,1,168,1,168,1,169, - 1,169,1,170,1,170,1,171,1,171,1,171,1,172,1,172,1,172,1,172,1,173,1,173, - 1,174,1,174,1,175,1,175,1,176,1,176,1,177,1,177,1,178,1,178,1,178,1,178, - 5,178,1350,8,178,10,178,12,178,1353,9,178,1,178,1,178,1,178,1,178,1,178, - 1,179,1,179,1,179,1,179,3,179,1364,8,179,1,179,5,179,1367,8,179,10,179, - 12,179,1370,9,179,1,179,3,179,1373,8,179,1,179,1,179,1,180,1,180,1,180, - 1,180,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181, - 4,181,1392,8,181,11,181,12,181,1393,1,182,1,182,1,182,1,182,1,183,1,183, - 1,183,1,183,1,183,1,184,1,184,1,184,1,184,1,184,4,184,1410,8,184,11,184, - 12,184,1411,1,185,1,185,1,185,1,185,1,1351,0,186,3,1,5,2,7,3,9,4,11,5, - 13,6,15,7,17,8,19,9,21,10,23,11,25,12,27,13,29,14,31,15,33,16,35,17,37, - 18,39,19,41,20,43,21,45,22,47,23,49,24,51,25,53,26,55,27,57,28,59,29, - 61,30,63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38,79,39,81,40,83, - 41,85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,101,50,103,51,105, - 52,107,53,109,54,111,55,113,56,115,57,117,58,119,59,121,60,123,61,125, - 62,127,63,129,64,131,65,133,66,135,67,137,68,139,69,141,70,143,71,145, - 72,147,73,149,74,151,75,153,76,155,77,157,78,159,79,161,80,163,81,165, - 82,167,83,169,84,171,85,173,86,175,87,177,88,179,89,181,90,183,91,185, - 92,187,93,189,94,191,95,193,96,195,97,197,98,199,99,201,100,203,101,205, - 102,207,103,209,104,211,105,213,106,215,0,217,0,219,0,221,0,223,0,225, - 0,227,0,229,0,231,0,233,0,235,0,237,0,239,0,241,0,243,0,245,0,247,0,249, - 0,251,0,253,0,255,0,257,0,259,0,261,0,263,0,265,0,267,0,269,0,271,0,273, - 0,275,107,277,108,279,109,281,110,283,111,285,112,287,113,289,114,291, - 115,293,116,295,117,297,118,299,119,301,120,303,121,305,122,307,123,309, - 124,311,125,313,126,315,127,317,128,319,129,321,130,323,131,325,132,327, - 133,329,134,331,135,333,136,335,137,337,138,339,139,341,140,343,141,345, - 142,347,143,349,144,351,145,353,146,355,147,357,148,359,149,361,150,363, - 151,365,152,367,153,369,0,371,154,373,155,3,0,1,2,38,2,0,92,92,96,96, - 2,0,34,34,92,92,2,0,39,39,92,92,2,0,65,65,97,97,2,0,66,66,98,98,2,0,67, - 67,99,99,2,0,68,68,100,100,2,0,69,69,101,101,2,0,70,70,102,102,2,0,71, - 71,103,103,2,0,72,72,104,104,2,0,73,73,105,105,2,0,74,74,106,106,2,0, - 75,75,107,107,2,0,76,76,108,108,2,0,77,77,109,109,2,0,78,78,110,110,2, - 0,79,79,111,111,2,0,80,80,112,112,2,0,81,81,113,113,2,0,82,82,114,114, - 2,0,83,83,115,115,2,0,84,84,116,116,2,0,85,85,117,117,2,0,86,86,118,118, - 2,0,87,87,119,119,2,0,88,88,120,120,2,0,89,89,121,121,2,0,90,90,122,122, - 2,0,65,90,97,122,1,0,48,55,1,0,48,57,3,0,48,57,65,70,97,102,2,0,10,10, - 13,13,2,1,10,10,13,13,2,0,9,13,32,32,3,0,39,39,92,92,123,123,1,0,123, - 123,1453,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0, - 0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23, - 1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0, - 0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0, - 0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55, - 1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0, - 0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0, - 0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87, - 1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0, - 0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0, - 0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0, - 0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0, - 0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0, - 0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0, - 0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0, - 0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0, - 0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0, - 0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0,0,0,0,185,1,0,0,0,0,187,1,0, - 0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193,1,0,0,0,0,195,1,0,0,0,0,197,1,0, - 0,0,0,199,1,0,0,0,0,201,1,0,0,0,0,203,1,0,0,0,0,205,1,0,0,0,0,207,1,0, - 0,0,0,209,1,0,0,0,0,211,1,0,0,0,0,213,1,0,0,0,0,275,1,0,0,0,0,277,1,0, - 0,0,0,279,1,0,0,0,0,281,1,0,0,0,0,283,1,0,0,0,0,285,1,0,0,0,0,287,1,0, - 0,0,0,289,1,0,0,0,0,291,1,0,0,0,0,293,1,0,0,0,0,295,1,0,0,0,0,297,1,0, - 0,0,0,299,1,0,0,0,0,301,1,0,0,0,0,303,1,0,0,0,0,305,1,0,0,0,0,307,1,0, - 0,0,0,309,1,0,0,0,0,311,1,0,0,0,0,313,1,0,0,0,0,315,1,0,0,0,0,317,1,0, - 0,0,0,319,1,0,0,0,0,321,1,0,0,0,0,323,1,0,0,0,0,325,1,0,0,0,0,327,1,0, - 0,0,0,329,1,0,0,0,0,331,1,0,0,0,0,333,1,0,0,0,0,335,1,0,0,0,0,337,1,0, - 0,0,0,339,1,0,0,0,0,341,1,0,0,0,0,343,1,0,0,0,0,345,1,0,0,0,0,347,1,0, - 0,0,0,349,1,0,0,0,0,351,1,0,0,0,0,353,1,0,0,0,0,355,1,0,0,0,0,357,1,0, - 0,0,0,359,1,0,0,0,0,361,1,0,0,0,0,363,1,0,0,0,1,365,1,0,0,0,1,367,1,0, - 0,0,1,369,1,0,0,0,2,371,1,0,0,0,2,373,1,0,0,0,3,375,1,0,0,0,5,379,1,0, - 0,0,7,383,1,0,0,0,9,388,1,0,0,0,11,392,1,0,0,0,13,398,1,0,0,0,15,415, - 1,0,0,0,17,417,1,0,0,0,19,422,1,0,0,0,21,430,1,0,0,0,23,435,1,0,0,0,25, - 438,1,0,0,0,27,443,1,0,0,0,29,448,1,0,0,0,31,455,1,0,0,0,33,463,1,0,0, - 0,35,469,1,0,0,0,37,474,1,0,0,0,39,482,1,0,0,0,41,487,1,0,0,0,43,491, - 1,0,0,0,45,496,1,0,0,0,47,507,1,0,0,0,49,516,1,0,0,0,51,521,1,0,0,0,53, - 525,1,0,0,0,55,533,1,0,0,0,57,539,1,0,0,0,59,545,1,0,0,0,61,548,1,0,0, - 0,63,558,1,0,0,0,65,562,1,0,0,0,67,567,1,0,0,0,69,572,1,0,0,0,71,578, - 1,0,0,0,73,585,1,0,0,0,75,590,1,0,0,0,77,593,1,0,0,0,79,596,1,0,0,0,81, - 602,1,0,0,0,83,618,1,0,0,0,85,620,1,0,0,0,87,626,1,0,0,0,89,635,1,0,0, - 0,91,638,1,0,0,0,93,643,1,0,0,0,95,647,1,0,0,0,97,652,1,0,0,0,99,660, - 1,0,0,0,101,665,1,0,0,0,103,669,1,0,0,0,105,674,1,0,0,0,107,680,1,0,0, - 0,109,687,1,0,0,0,111,693,1,0,0,0,113,697,1,0,0,0,115,701,1,0,0,0,117, - 706,1,0,0,0,119,712,1,0,0,0,121,719,1,0,0,0,123,722,1,0,0,0,125,725,1, - 0,0,0,127,731,1,0,0,0,129,737,1,0,0,0,131,742,1,0,0,0,133,752,1,0,0,0, - 135,762,1,0,0,0,137,771,1,0,0,0,139,779,1,0,0,0,141,785,1,0,0,0,143,792, - 1,0,0,0,145,798,1,0,0,0,147,805,1,0,0,0,149,809,1,0,0,0,151,814,1,0,0, - 0,153,821,1,0,0,0,155,828,1,0,0,0,157,835,1,0,0,0,159,840,1,0,0,0,161, - 849,1,0,0,0,163,859,1,0,0,0,165,864,1,0,0,0,167,869,1,0,0,0,169,879,1, - 0,0,0,171,882,1,0,0,0,173,886,1,0,0,0,175,893,1,0,0,0,177,902,1,0,0,0, - 179,907,1,0,0,0,181,916,1,0,0,0,183,926,1,0,0,0,185,932,1,0,0,0,187,938, - 1,0,0,0,189,943,1,0,0,0,191,948,1,0,0,0,193,954,1,0,0,0,195,960,1,0,0, - 0,197,967,1,0,0,0,199,982,1,0,0,0,201,1011,1,0,0,0,203,1059,1,0,0,0,205, - 1137,1,0,0,0,207,1139,1,0,0,0,209,1146,1,0,0,0,211,1150,1,0,0,0,213,1157, - 1,0,0,0,215,1173,1,0,0,0,217,1175,1,0,0,0,219,1177,1,0,0,0,221,1179,1, - 0,0,0,223,1181,1,0,0,0,225,1183,1,0,0,0,227,1185,1,0,0,0,229,1187,1,0, - 0,0,231,1189,1,0,0,0,233,1191,1,0,0,0,235,1193,1,0,0,0,237,1195,1,0,0, - 0,239,1197,1,0,0,0,241,1199,1,0,0,0,243,1201,1,0,0,0,245,1203,1,0,0,0, - 247,1205,1,0,0,0,249,1207,1,0,0,0,251,1209,1,0,0,0,253,1211,1,0,0,0,255, - 1213,1,0,0,0,257,1215,1,0,0,0,259,1217,1,0,0,0,261,1219,1,0,0,0,263,1221, - 1,0,0,0,265,1223,1,0,0,0,267,1225,1,0,0,0,269,1227,1,0,0,0,271,1229,1, - 0,0,0,273,1231,1,0,0,0,275,1233,1,0,0,0,277,1236,1,0,0,0,279,1238,1,0, - 0,0,281,1240,1,0,0,0,283,1242,1,0,0,0,285,1244,1,0,0,0,287,1246,1,0,0, - 0,289,1249,1,0,0,0,291,1251,1,0,0,0,293,1253,1,0,0,0,295,1255,1,0,0,0, - 297,1258,1,0,0,0,299,1260,1,0,0,0,301,1263,1,0,0,0,303,1265,1,0,0,0,305, - 1267,1,0,0,0,307,1270,1,0,0,0,309,1274,1,0,0,0,311,1278,1,0,0,0,313,1280, - 1,0,0,0,315,1282,1,0,0,0,317,1285,1,0,0,0,319,1291,1,0,0,0,321,1293,1, - 0,0,0,323,1297,1,0,0,0,325,1300,1,0,0,0,327,1303,1,0,0,0,329,1306,1,0, - 0,0,331,1308,1,0,0,0,333,1310,1,0,0,0,335,1312,1,0,0,0,337,1314,1,0,0, - 0,339,1319,1,0,0,0,341,1324,1,0,0,0,343,1326,1,0,0,0,345,1328,1,0,0,0, - 347,1331,1,0,0,0,349,1335,1,0,0,0,351,1337,1,0,0,0,353,1339,1,0,0,0,355, - 1341,1,0,0,0,357,1343,1,0,0,0,359,1345,1,0,0,0,361,1363,1,0,0,0,363,1376, - 1,0,0,0,365,1391,1,0,0,0,367,1395,1,0,0,0,369,1399,1,0,0,0,371,1409,1, - 0,0,0,373,1413,1,0,0,0,375,376,3,215,106,0,376,377,3,237,117,0,377,378, - 3,237,117,0,378,4,1,0,0,0,379,380,3,215,106,0,380,381,3,241,119,0,381, - 382,3,221,109,0,382,6,1,0,0,0,383,384,3,215,106,0,384,385,3,241,119,0, - 385,386,3,253,125,0,386,387,3,231,114,0,387,8,1,0,0,0,388,389,3,215,106, - 0,389,390,3,241,119,0,390,391,3,263,130,0,391,10,1,0,0,0,392,393,3,215, - 106,0,393,394,3,249,123,0,394,395,3,249,123,0,395,396,3,215,106,0,396, - 397,3,263,130,0,397,12,1,0,0,0,398,399,3,215,106,0,399,400,3,251,124, - 0,400,14,1,0,0,0,401,402,3,215,106,0,402,403,3,251,124,0,403,404,3,219, - 108,0,404,416,1,0,0,0,405,406,3,215,106,0,406,407,3,251,124,0,407,408, - 3,219,108,0,408,409,3,223,110,0,409,410,3,241,119,0,410,411,3,221,109, - 0,411,412,3,231,114,0,412,413,3,241,119,0,413,414,3,227,112,0,414,416, - 1,0,0,0,415,401,1,0,0,0,415,405,1,0,0,0,416,16,1,0,0,0,417,418,3,215, - 106,0,418,419,3,251,124,0,419,420,3,243,120,0,420,421,3,225,111,0,421, - 18,1,0,0,0,422,423,3,217,107,0,423,424,3,223,110,0,424,425,3,253,125, - 0,425,426,3,259,128,0,426,427,3,223,110,0,427,428,3,223,110,0,428,429, - 3,241,119,0,429,20,1,0,0,0,430,431,3,217,107,0,431,432,3,243,120,0,432, - 433,3,253,125,0,433,434,3,229,113,0,434,22,1,0,0,0,435,436,3,217,107, - 0,436,437,3,263,130,0,437,24,1,0,0,0,438,439,3,219,108,0,439,440,3,215, - 106,0,440,441,3,251,124,0,441,442,3,223,110,0,442,26,1,0,0,0,443,444, - 3,219,108,0,444,445,3,215,106,0,445,446,3,251,124,0,446,447,3,253,125, - 0,447,28,1,0,0,0,448,449,3,219,108,0,449,450,3,243,120,0,450,451,3,229, - 113,0,451,452,3,243,120,0,452,453,3,249,123,0,453,454,3,253,125,0,454, - 30,1,0,0,0,455,456,3,219,108,0,456,457,3,243,120,0,457,458,3,237,117, - 0,458,459,3,237,117,0,459,460,3,215,106,0,460,461,3,253,125,0,461,462, - 3,223,110,0,462,32,1,0,0,0,463,464,3,219,108,0,464,465,3,249,123,0,465, - 466,3,243,120,0,466,467,3,251,124,0,467,468,3,251,124,0,468,34,1,0,0, - 0,469,470,3,219,108,0,470,471,3,255,126,0,471,472,3,217,107,0,472,473, - 3,223,110,0,473,36,1,0,0,0,474,475,3,219,108,0,475,476,3,255,126,0,476, - 477,3,249,123,0,477,478,3,249,123,0,478,479,3,223,110,0,479,480,3,241, - 119,0,480,481,3,253,125,0,481,38,1,0,0,0,482,483,3,221,109,0,483,484, - 3,215,106,0,484,485,3,253,125,0,485,486,3,223,110,0,486,40,1,0,0,0,487, - 488,3,221,109,0,488,489,3,215,106,0,489,490,3,263,130,0,490,42,1,0,0, - 0,491,492,3,221,109,0,492,493,3,223,110,0,493,494,3,251,124,0,494,495, - 3,219,108,0,495,44,1,0,0,0,496,497,3,221,109,0,497,498,3,223,110,0,498, - 499,3,251,124,0,499,500,3,219,108,0,500,501,3,223,110,0,501,502,3,241, - 119,0,502,503,3,221,109,0,503,504,3,231,114,0,504,505,3,241,119,0,505, - 506,3,227,112,0,506,46,1,0,0,0,507,508,3,221,109,0,508,509,3,231,114, - 0,509,510,3,251,124,0,510,511,3,253,125,0,511,512,3,231,114,0,512,513, - 3,241,119,0,513,514,3,219,108,0,514,515,3,253,125,0,515,48,1,0,0,0,516, - 517,3,223,110,0,517,518,3,237,117,0,518,519,3,251,124,0,519,520,3,223, - 110,0,520,50,1,0,0,0,521,522,3,223,110,0,522,523,3,241,119,0,523,524, - 3,221,109,0,524,52,1,0,0,0,525,526,3,223,110,0,526,527,3,261,129,0,527, - 528,3,253,125,0,528,529,3,249,123,0,529,530,3,215,106,0,530,531,3,219, - 108,0,531,532,3,253,125,0,532,54,1,0,0,0,533,534,3,225,111,0,534,535, - 3,231,114,0,535,536,3,241,119,0,536,537,3,215,106,0,537,538,3,237,117, - 0,538,56,1,0,0,0,539,540,3,225,111,0,540,541,3,231,114,0,541,542,3,249, - 123,0,542,543,3,251,124,0,543,544,3,253,125,0,544,58,1,0,0,0,545,546, - 3,225,111,0,546,547,3,241,119,0,547,60,1,0,0,0,548,549,3,225,111,0,549, - 550,3,243,120,0,550,551,3,237,117,0,551,552,3,237,117,0,552,553,3,243, - 120,0,553,554,3,259,128,0,554,555,3,231,114,0,555,556,3,241,119,0,556, - 557,3,227,112,0,557,62,1,0,0,0,558,559,3,225,111,0,559,560,3,243,120, - 0,560,561,3,249,123,0,561,64,1,0,0,0,562,563,3,225,111,0,563,564,3,249, - 123,0,564,565,3,243,120,0,565,566,3,239,118,0,566,66,1,0,0,0,567,568, - 3,225,111,0,568,569,3,255,126,0,569,570,3,237,117,0,570,571,3,237,117, - 0,571,68,1,0,0,0,572,573,3,227,112,0,573,574,3,249,123,0,574,575,3,243, - 120,0,575,576,3,255,126,0,576,577,3,245,121,0,577,70,1,0,0,0,578,579, - 3,229,113,0,579,580,3,215,106,0,580,581,3,257,127,0,581,582,3,231,114, - 0,582,583,3,241,119,0,583,584,3,227,112,0,584,72,1,0,0,0,585,586,3,229, - 113,0,586,587,3,243,120,0,587,588,3,255,126,0,588,589,3,249,123,0,589, - 74,1,0,0,0,590,591,3,231,114,0,591,592,3,221,109,0,592,76,1,0,0,0,593, - 594,3,231,114,0,594,595,3,225,111,0,595,78,1,0,0,0,596,597,3,231,114, - 0,597,598,3,237,117,0,598,599,3,231,114,0,599,600,3,235,116,0,600,601, - 3,223,110,0,601,80,1,0,0,0,602,603,3,231,114,0,603,604,3,241,119,0,604, - 82,1,0,0,0,605,606,3,231,114,0,606,607,3,241,119,0,607,608,3,225,111, - 0,608,619,1,0,0,0,609,610,3,231,114,0,610,611,3,241,119,0,611,612,3,225, - 111,0,612,613,3,231,114,0,613,614,3,241,119,0,614,615,3,231,114,0,615, - 616,3,253,125,0,616,617,3,263,130,0,617,619,1,0,0,0,618,605,1,0,0,0,618, - 609,1,0,0,0,619,84,1,0,0,0,620,621,3,231,114,0,621,622,3,241,119,0,622, - 623,3,241,119,0,623,624,3,223,110,0,624,625,3,249,123,0,625,86,1,0,0, - 0,626,627,3,231,114,0,627,628,3,241,119,0,628,629,3,253,125,0,629,630, - 3,223,110,0,630,631,3,249,123,0,631,632,3,257,127,0,632,633,3,215,106, - 0,633,634,3,237,117,0,634,88,1,0,0,0,635,636,3,231,114,0,636,637,3,251, - 124,0,637,90,1,0,0,0,638,639,3,233,115,0,639,640,3,243,120,0,640,641, - 3,231,114,0,641,642,3,241,119,0,642,92,1,0,0,0,643,644,3,235,116,0,644, - 645,3,223,110,0,645,646,3,263,130,0,646,94,1,0,0,0,647,648,3,237,117, - 0,648,649,3,215,106,0,649,650,3,251,124,0,650,651,3,253,125,0,651,96, - 1,0,0,0,652,653,3,237,117,0,653,654,3,223,110,0,654,655,3,215,106,0,655, - 656,3,221,109,0,656,657,3,231,114,0,657,658,3,241,119,0,658,659,3,227, - 112,0,659,98,1,0,0,0,660,661,3,237,117,0,661,662,3,223,110,0,662,663, - 3,225,111,0,663,664,3,253,125,0,664,100,1,0,0,0,665,666,3,237,117,0,666, - 667,3,223,110,0,667,668,3,253,125,0,668,102,1,0,0,0,669,670,3,237,117, - 0,670,671,3,231,114,0,671,672,3,235,116,0,672,673,3,223,110,0,673,104, - 1,0,0,0,674,675,3,237,117,0,675,676,3,231,114,0,676,677,3,239,118,0,677, - 678,3,231,114,0,678,679,3,253,125,0,679,106,1,0,0,0,680,681,3,239,118, - 0,681,682,3,231,114,0,682,683,3,241,119,0,683,684,3,255,126,0,684,685, - 3,253,125,0,685,686,3,223,110,0,686,108,1,0,0,0,687,688,3,239,118,0,688, - 689,3,243,120,0,689,690,3,241,119,0,690,691,3,253,125,0,691,692,3,229, - 113,0,692,110,1,0,0,0,693,694,3,241,119,0,694,695,3,215,106,0,695,696, - 3,241,119,0,696,112,1,0,0,0,697,698,3,241,119,0,698,699,3,243,120,0,699, - 700,3,253,125,0,700,114,1,0,0,0,701,702,3,241,119,0,702,703,3,255,126, - 0,703,704,3,237,117,0,704,705,3,237,117,0,705,116,1,0,0,0,706,707,3,241, - 119,0,707,708,3,255,126,0,708,709,3,237,117,0,709,710,3,237,117,0,710, - 711,3,251,124,0,711,118,1,0,0,0,712,713,3,243,120,0,713,714,3,225,111, - 0,714,715,3,225,111,0,715,716,3,251,124,0,716,717,3,223,110,0,717,718, - 3,253,125,0,718,120,1,0,0,0,719,720,3,243,120,0,720,721,3,241,119,0,721, - 122,1,0,0,0,722,723,3,243,120,0,723,724,3,249,123,0,724,124,1,0,0,0,725, - 726,3,243,120,0,726,727,3,249,123,0,727,728,3,221,109,0,728,729,3,223, - 110,0,729,730,3,249,123,0,730,126,1,0,0,0,731,732,3,243,120,0,732,733, - 3,255,126,0,733,734,3,253,125,0,734,735,3,223,110,0,735,736,3,249,123, - 0,736,128,1,0,0,0,737,738,3,243,120,0,738,739,3,257,127,0,739,740,3,223, - 110,0,740,741,3,249,123,0,741,130,1,0,0,0,742,743,3,245,121,0,743,744, - 3,215,106,0,744,745,3,249,123,0,745,746,3,253,125,0,746,747,3,231,114, - 0,747,748,3,253,125,0,748,749,3,231,114,0,749,750,3,243,120,0,750,751, - 3,241,119,0,751,132,1,0,0,0,752,753,3,245,121,0,753,754,3,249,123,0,754, - 755,3,223,110,0,755,756,3,219,108,0,756,757,3,223,110,0,757,758,3,221, - 109,0,758,759,3,231,114,0,759,760,3,241,119,0,760,761,3,227,112,0,761, - 134,1,0,0,0,762,763,3,245,121,0,763,764,3,249,123,0,764,765,3,223,110, - 0,765,766,3,259,128,0,766,767,3,229,113,0,767,768,3,223,110,0,768,769, - 3,249,123,0,769,770,3,223,110,0,770,136,1,0,0,0,771,772,3,247,122,0,772, - 773,3,255,126,0,773,774,3,215,106,0,774,775,3,249,123,0,775,776,3,253, - 125,0,776,777,3,223,110,0,777,778,3,249,123,0,778,138,1,0,0,0,779,780, - 3,249,123,0,780,781,3,215,106,0,781,782,3,241,119,0,782,783,3,227,112, - 0,783,784,3,223,110,0,784,140,1,0,0,0,785,786,3,249,123,0,786,787,3,223, - 110,0,787,788,3,253,125,0,788,789,3,255,126,0,789,790,3,249,123,0,790, - 791,3,241,119,0,791,142,1,0,0,0,792,793,3,249,123,0,793,794,3,231,114, - 0,794,795,3,227,112,0,795,796,3,229,113,0,796,797,3,253,125,0,797,144, - 1,0,0,0,798,799,3,249,123,0,799,800,3,243,120,0,800,801,3,237,117,0,801, - 802,3,237,117,0,802,803,3,255,126,0,803,804,3,245,121,0,804,146,1,0,0, - 0,805,806,3,249,123,0,806,807,3,243,120,0,807,808,3,259,128,0,808,148, - 1,0,0,0,809,810,3,249,123,0,810,811,3,243,120,0,811,812,3,259,128,0,812, - 813,3,251,124,0,813,150,1,0,0,0,814,815,3,251,124,0,815,816,3,215,106, - 0,816,817,3,239,118,0,817,818,3,245,121,0,818,819,3,237,117,0,819,820, - 3,223,110,0,820,152,1,0,0,0,821,822,3,251,124,0,822,823,3,223,110,0,823, - 824,3,219,108,0,824,825,3,243,120,0,825,826,3,241,119,0,826,827,3,221, - 109,0,827,154,1,0,0,0,828,829,3,251,124,0,829,830,3,223,110,0,830,831, - 3,237,117,0,831,832,3,223,110,0,832,833,3,219,108,0,833,834,3,253,125, - 0,834,156,1,0,0,0,835,836,3,251,124,0,836,837,3,223,110,0,837,838,3,239, - 118,0,838,839,3,231,114,0,839,158,1,0,0,0,840,841,3,251,124,0,841,842, - 3,223,110,0,842,843,3,253,125,0,843,844,3,253,125,0,844,845,3,231,114, - 0,845,846,3,241,119,0,846,847,3,227,112,0,847,848,3,251,124,0,848,160, - 1,0,0,0,849,850,3,251,124,0,850,851,3,255,126,0,851,852,3,217,107,0,852, - 853,3,251,124,0,853,854,3,253,125,0,854,855,3,249,123,0,855,856,3,231, - 114,0,856,857,3,241,119,0,857,858,3,227,112,0,858,162,1,0,0,0,859,860, - 3,253,125,0,860,861,3,229,113,0,861,862,3,223,110,0,862,863,3,241,119, - 0,863,164,1,0,0,0,864,865,3,253,125,0,865,866,3,231,114,0,866,867,3,223, - 110,0,867,868,3,251,124,0,868,166,1,0,0,0,869,870,3,253,125,0,870,871, - 3,231,114,0,871,872,3,239,118,0,872,873,3,223,110,0,873,874,3,251,124, - 0,874,875,3,253,125,0,875,876,3,215,106,0,876,877,3,239,118,0,877,878, - 3,245,121,0,878,168,1,0,0,0,879,880,3,253,125,0,880,881,3,243,120,0,881, - 170,1,0,0,0,882,883,3,253,125,0,883,884,3,243,120,0,884,885,3,245,121, - 0,885,172,1,0,0,0,886,887,3,253,125,0,887,888,3,243,120,0,888,889,3,253, - 125,0,889,890,3,215,106,0,890,891,3,237,117,0,891,892,3,251,124,0,892, - 174,1,0,0,0,893,894,3,253,125,0,894,895,3,249,123,0,895,896,3,215,106, - 0,896,897,3,231,114,0,897,898,3,237,117,0,898,899,3,231,114,0,899,900, - 3,241,119,0,900,901,3,227,112,0,901,176,1,0,0,0,902,903,3,253,125,0,903, - 904,3,249,123,0,904,905,3,231,114,0,905,906,3,239,118,0,906,178,1,0,0, - 0,907,908,3,253,125,0,908,909,3,249,123,0,909,910,3,255,126,0,910,911, - 3,241,119,0,911,912,3,219,108,0,912,913,3,215,106,0,913,914,3,253,125, - 0,914,915,3,223,110,0,915,180,1,0,0,0,916,917,3,255,126,0,917,918,3,241, - 119,0,918,919,3,217,107,0,919,920,3,243,120,0,920,921,3,255,126,0,921, - 922,3,241,119,0,922,923,3,221,109,0,923,924,3,223,110,0,924,925,3,221, - 109,0,925,182,1,0,0,0,926,927,3,255,126,0,927,928,3,241,119,0,928,929, - 3,231,114,0,929,930,3,243,120,0,930,931,3,241,119,0,931,184,1,0,0,0,932, - 933,3,255,126,0,933,934,3,251,124,0,934,935,3,231,114,0,935,936,3,241, - 119,0,936,937,3,227,112,0,937,186,1,0,0,0,938,939,3,259,128,0,939,940, - 3,223,110,0,940,941,3,223,110,0,941,942,3,235,116,0,942,188,1,0,0,0,943, - 944,3,259,128,0,944,945,3,229,113,0,945,946,3,223,110,0,946,947,3,241, - 119,0,947,190,1,0,0,0,948,949,3,259,128,0,949,950,3,229,113,0,950,951, - 3,223,110,0,951,952,3,249,123,0,952,953,3,223,110,0,953,192,1,0,0,0,954, - 955,3,259,128,0,955,956,3,229,113,0,956,957,3,231,114,0,957,958,3,237, - 117,0,958,959,3,223,110,0,959,194,1,0,0,0,960,961,3,259,128,0,961,962, - 3,231,114,0,962,963,3,241,119,0,963,964,3,221,109,0,964,965,3,243,120, - 0,965,966,3,259,128,0,966,196,1,0,0,0,967,968,3,259,128,0,968,969,3,231, - 114,0,969,970,3,253,125,0,970,971,3,229,113,0,971,198,1,0,0,0,972,973, - 3,263,130,0,973,974,3,223,110,0,974,975,3,215,106,0,975,976,3,249,123, - 0,976,983,1,0,0,0,977,978,3,263,130,0,978,979,3,263,130,0,979,980,3,263, - 130,0,980,981,3,263,130,0,981,983,1,0,0,0,982,972,1,0,0,0,982,977,1,0, - 0,0,983,200,1,0,0,0,984,985,3,281,139,0,985,986,3,217,107,0,986,1012, - 1,0,0,0,987,988,3,281,139,0,988,989,3,225,111,0,989,1012,1,0,0,0,990, - 991,3,281,139,0,991,992,3,249,123,0,992,1012,1,0,0,0,993,994,3,281,139, - 0,994,995,3,241,119,0,995,1012,1,0,0,0,996,997,3,281,139,0,997,998,3, - 253,125,0,998,1012,1,0,0,0,999,1000,3,281,139,0,1000,1001,5,48,0,0,1001, - 1012,1,0,0,0,1002,1003,3,281,139,0,1003,1004,3,215,106,0,1004,1012,1, - 0,0,0,1005,1006,3,281,139,0,1006,1007,3,257,127,0,1007,1012,1,0,0,0,1008, - 1009,3,281,139,0,1009,1010,3,281,139,0,1010,1012,1,0,0,0,1011,984,1,0, - 0,0,1011,987,1,0,0,0,1011,990,1,0,0,0,1011,993,1,0,0,0,1011,996,1,0,0, - 0,1011,999,1,0,0,0,1011,1002,1,0,0,0,1011,1005,1,0,0,0,1011,1008,1,0, - 0,0,1012,202,1,0,0,0,1013,1017,3,267,132,0,1014,1017,3,357,177,0,1015, - 1017,3,291,144,0,1016,1013,1,0,0,0,1016,1014,1,0,0,0,1016,1015,1,0,0, - 0,1017,1024,1,0,0,0,1018,1023,3,267,132,0,1019,1023,3,357,177,0,1020, - 1023,3,271,134,0,1021,1023,3,291,144,0,1022,1018,1,0,0,0,1022,1019,1, - 0,0,0,1022,1020,1,0,0,0,1022,1021,1,0,0,0,1023,1026,1,0,0,0,1024,1022, - 1,0,0,0,1024,1025,1,0,0,0,1025,1060,1,0,0,0,1026,1024,1,0,0,0,1027,1038, - 3,279,138,0,1028,1037,8,0,0,0,1029,1037,3,201,99,0,1030,1031,3,281,139, - 0,1031,1032,3,341,169,0,1032,1037,1,0,0,0,1033,1034,3,279,138,0,1034, - 1035,3,279,138,0,1035,1037,1,0,0,0,1036,1028,1,0,0,0,1036,1029,1,0,0, - 0,1036,1030,1,0,0,0,1036,1033,1,0,0,0,1037,1040,1,0,0,0,1038,1036,1,0, - 0,0,1038,1039,1,0,0,0,1039,1041,1,0,0,0,1040,1038,1,0,0,0,1041,1042,3, - 279,138,0,1042,1060,1,0,0,0,1043,1054,3,335,166,0,1044,1053,8,1,0,0,1045, - 1053,3,201,99,0,1046,1047,3,281,139,0,1047,1048,3,335,166,0,1048,1053, - 1,0,0,0,1049,1050,3,335,166,0,1050,1051,3,335,166,0,1051,1053,1,0,0,0, - 1052,1044,1,0,0,0,1052,1045,1,0,0,0,1052,1046,1,0,0,0,1052,1049,1,0,0, - 0,1053,1056,1,0,0,0,1054,1052,1,0,0,0,1054,1055,1,0,0,0,1055,1057,1,0, - 0,0,1056,1054,1,0,0,0,1057,1058,3,335,166,0,1058,1060,1,0,0,0,1059,1016, - 1,0,0,0,1059,1027,1,0,0,0,1059,1043,1,0,0,0,1060,204,1,0,0,0,1061,1062, - 3,211,104,0,1062,1066,3,293,145,0,1063,1065,3,273,135,0,1064,1063,1,0, - 0,0,1065,1068,1,0,0,0,1066,1064,1,0,0,0,1066,1067,1,0,0,0,1067,1071,1, - 0,0,0,1068,1066,1,0,0,0,1069,1072,3,245,121,0,1070,1072,3,223,110,0,1071, - 1069,1,0,0,0,1071,1070,1,0,0,0,1072,1075,1,0,0,0,1073,1076,3,331,164, - 0,1074,1076,3,289,143,0,1075,1073,1,0,0,0,1075,1074,1,0,0,0,1075,1076, - 1,0,0,0,1076,1078,1,0,0,0,1077,1079,3,271,134,0,1078,1077,1,0,0,0,1079, - 1080,1,0,0,0,1080,1078,1,0,0,0,1080,1081,1,0,0,0,1081,1138,1,0,0,0,1082, - 1085,3,211,104,0,1083,1086,3,245,121,0,1084,1086,3,223,110,0,1085,1083, - 1,0,0,0,1085,1084,1,0,0,0,1086,1089,1,0,0,0,1087,1090,3,331,164,0,1088, - 1090,3,289,143,0,1089,1087,1,0,0,0,1089,1088,1,0,0,0,1089,1090,1,0,0, - 0,1090,1092,1,0,0,0,1091,1093,3,271,134,0,1092,1091,1,0,0,0,1093,1094, - 1,0,0,0,1094,1092,1,0,0,0,1094,1095,1,0,0,0,1095,1138,1,0,0,0,1096,1097, - 3,209,103,0,1097,1101,3,293,145,0,1098,1100,3,271,134,0,1099,1098,1,0, - 0,0,1100,1103,1,0,0,0,1101,1099,1,0,0,0,1101,1102,1,0,0,0,1102,1104,1, - 0,0,0,1103,1101,1,0,0,0,1104,1107,3,223,110,0,1105,1108,3,331,164,0,1106, - 1108,3,289,143,0,1107,1105,1,0,0,0,1107,1106,1,0,0,0,1107,1108,1,0,0, - 0,1108,1110,1,0,0,0,1109,1111,3,271,134,0,1110,1109,1,0,0,0,1111,1112, - 1,0,0,0,1112,1110,1,0,0,0,1112,1113,1,0,0,0,1113,1138,1,0,0,0,1114,1115, - 3,293,145,0,1115,1116,3,209,103,0,1116,1119,3,223,110,0,1117,1120,3,331, - 164,0,1118,1120,3,289,143,0,1119,1117,1,0,0,0,1119,1118,1,0,0,0,1119, - 1120,1,0,0,0,1120,1122,1,0,0,0,1121,1123,3,271,134,0,1122,1121,1,0,0, - 0,1123,1124,1,0,0,0,1124,1122,1,0,0,0,1124,1125,1,0,0,0,1125,1138,1,0, - 0,0,1126,1127,3,209,103,0,1127,1130,3,223,110,0,1128,1131,3,331,164,0, - 1129,1131,3,289,143,0,1130,1128,1,0,0,0,1130,1129,1,0,0,0,1130,1131,1, - 0,0,0,1131,1133,1,0,0,0,1132,1134,3,271,134,0,1133,1132,1,0,0,0,1134, - 1135,1,0,0,0,1135,1133,1,0,0,0,1135,1136,1,0,0,0,1136,1138,1,0,0,0,1137, - 1061,1,0,0,0,1137,1082,1,0,0,0,1137,1096,1,0,0,0,1137,1114,1,0,0,0,1137, - 1126,1,0,0,0,1138,206,1,0,0,0,1139,1141,5,48,0,0,1140,1142,3,269,133, - 0,1141,1140,1,0,0,0,1142,1143,1,0,0,0,1143,1141,1,0,0,0,1143,1144,1,0, - 0,0,1144,208,1,0,0,0,1145,1147,3,271,134,0,1146,1145,1,0,0,0,1147,1148, - 1,0,0,0,1148,1146,1,0,0,0,1148,1149,1,0,0,0,1149,210,1,0,0,0,1150,1151, - 5,48,0,0,1151,1153,3,261,129,0,1152,1154,3,273,135,0,1153,1152,1,0,0, - 0,1154,1155,1,0,0,0,1155,1153,1,0,0,0,1155,1156,1,0,0,0,1156,212,1,0, - 0,0,1157,1168,3,341,169,0,1158,1167,8,2,0,0,1159,1167,3,201,99,0,1160, - 1161,3,281,139,0,1161,1162,3,341,169,0,1162,1167,1,0,0,0,1163,1164,3, - 341,169,0,1164,1165,3,341,169,0,1165,1167,1,0,0,0,1166,1158,1,0,0,0,1166, - 1159,1,0,0,0,1166,1160,1,0,0,0,1166,1163,1,0,0,0,1167,1170,1,0,0,0,1168, - 1166,1,0,0,0,1168,1169,1,0,0,0,1169,1171,1,0,0,0,1170,1168,1,0,0,0,1171, - 1172,3,341,169,0,1172,214,1,0,0,0,1173,1174,7,3,0,0,1174,216,1,0,0,0, - 1175,1176,7,4,0,0,1176,218,1,0,0,0,1177,1178,7,5,0,0,1178,220,1,0,0,0, - 1179,1180,7,6,0,0,1180,222,1,0,0,0,1181,1182,7,7,0,0,1182,224,1,0,0,0, - 1183,1184,7,8,0,0,1184,226,1,0,0,0,1185,1186,7,9,0,0,1186,228,1,0,0,0, - 1187,1188,7,10,0,0,1188,230,1,0,0,0,1189,1190,7,11,0,0,1190,232,1,0,0, - 0,1191,1192,7,12,0,0,1192,234,1,0,0,0,1193,1194,7,13,0,0,1194,236,1,0, - 0,0,1195,1196,7,14,0,0,1196,238,1,0,0,0,1197,1198,7,15,0,0,1198,240,1, - 0,0,0,1199,1200,7,16,0,0,1200,242,1,0,0,0,1201,1202,7,17,0,0,1202,244, - 1,0,0,0,1203,1204,7,18,0,0,1204,246,1,0,0,0,1205,1206,7,19,0,0,1206,248, - 1,0,0,0,1207,1208,7,20,0,0,1208,250,1,0,0,0,1209,1210,7,21,0,0,1210,252, - 1,0,0,0,1211,1212,7,22,0,0,1212,254,1,0,0,0,1213,1214,7,23,0,0,1214,256, - 1,0,0,0,1215,1216,7,24,0,0,1216,258,1,0,0,0,1217,1218,7,25,0,0,1218,260, - 1,0,0,0,1219,1220,7,26,0,0,1220,262,1,0,0,0,1221,1222,7,27,0,0,1222,264, - 1,0,0,0,1223,1224,7,28,0,0,1224,266,1,0,0,0,1225,1226,7,29,0,0,1226,268, - 1,0,0,0,1227,1228,7,30,0,0,1228,270,1,0,0,0,1229,1230,7,31,0,0,1230,272, - 1,0,0,0,1231,1232,7,32,0,0,1232,274,1,0,0,0,1233,1234,5,45,0,0,1234,1235, - 5,62,0,0,1235,276,1,0,0,0,1236,1237,5,42,0,0,1237,278,1,0,0,0,1238,1239, - 5,96,0,0,1239,280,1,0,0,0,1240,1241,5,92,0,0,1241,282,1,0,0,0,1242,1243, - 5,58,0,0,1243,284,1,0,0,0,1244,1245,5,44,0,0,1245,286,1,0,0,0,1246,1247, - 5,124,0,0,1247,1248,5,124,0,0,1248,288,1,0,0,0,1249,1250,5,45,0,0,1250, - 290,1,0,0,0,1251,1252,5,36,0,0,1252,292,1,0,0,0,1253,1254,5,46,0,0,1254, - 294,1,0,0,0,1255,1256,5,61,0,0,1256,1257,5,61,0,0,1257,296,1,0,0,0,1258, - 1259,5,61,0,0,1259,298,1,0,0,0,1260,1261,5,62,0,0,1261,1262,5,61,0,0, - 1262,300,1,0,0,0,1263,1264,5,62,0,0,1264,302,1,0,0,0,1265,1266,5,35,0, - 0,1266,304,1,0,0,0,1267,1268,5,126,0,0,1268,1269,5,42,0,0,1269,306,1, - 0,0,0,1270,1271,5,61,0,0,1271,1272,5,126,0,0,1272,1273,5,42,0,0,1273, - 308,1,0,0,0,1274,1275,5,123,0,0,1275,1276,1,0,0,0,1276,1277,6,153,0,0, - 1277,310,1,0,0,0,1278,1279,5,91,0,0,1279,312,1,0,0,0,1280,1281,5,40,0, - 0,1281,314,1,0,0,0,1282,1283,5,60,0,0,1283,1284,5,61,0,0,1284,316,1,0, - 0,0,1285,1286,5,60,0,0,1286,318,1,0,0,0,1287,1288,5,33,0,0,1288,1292, - 5,61,0,0,1289,1290,5,60,0,0,1290,1292,5,62,0,0,1291,1287,1,0,0,0,1291, - 1289,1,0,0,0,1292,320,1,0,0,0,1293,1294,5,33,0,0,1294,1295,5,126,0,0, - 1295,1296,5,42,0,0,1296,322,1,0,0,0,1297,1298,5,33,0,0,1298,1299,5,126, - 0,0,1299,324,1,0,0,0,1300,1301,5,63,0,0,1301,1302,5,46,0,0,1302,326,1, - 0,0,0,1303,1304,5,63,0,0,1304,1305,5,63,0,0,1305,328,1,0,0,0,1306,1307, - 5,37,0,0,1307,330,1,0,0,0,1308,1309,5,43,0,0,1309,332,1,0,0,0,1310,1311, - 5,63,0,0,1311,334,1,0,0,0,1312,1313,5,34,0,0,1313,336,1,0,0,0,1314,1315, - 5,102,0,0,1315,1316,5,39,0,0,1316,1317,1,0,0,0,1317,1318,6,167,1,0,1318, - 338,1,0,0,0,1319,1320,5,70,0,0,1320,1321,5,39,0,0,1321,1322,1,0,0,0,1322, - 1323,6,168,2,0,1323,340,1,0,0,0,1324,1325,5,39,0,0,1325,342,1,0,0,0,1326, - 1327,5,126,0,0,1327,344,1,0,0,0,1328,1329,5,61,0,0,1329,1330,5,126,0, - 0,1330,346,1,0,0,0,1331,1332,5,125,0,0,1332,1333,1,0,0,0,1333,1334,6, - 172,3,0,1334,348,1,0,0,0,1335,1336,5,93,0,0,1336,350,1,0,0,0,1337,1338, - 5,41,0,0,1338,352,1,0,0,0,1339,1340,5,59,0,0,1340,354,1,0,0,0,1341,1342, - 5,47,0,0,1342,356,1,0,0,0,1343,1344,5,95,0,0,1344,358,1,0,0,0,1345,1346, - 5,47,0,0,1346,1347,5,42,0,0,1347,1351,1,0,0,0,1348,1350,9,0,0,0,1349, - 1348,1,0,0,0,1350,1353,1,0,0,0,1351,1352,1,0,0,0,1351,1349,1,0,0,0,1352, - 1354,1,0,0,0,1353,1351,1,0,0,0,1354,1355,5,42,0,0,1355,1356,5,47,0,0, - 1356,1357,1,0,0,0,1357,1358,6,178,4,0,1358,360,1,0,0,0,1359,1360,5,45, - 0,0,1360,1364,5,45,0,0,1361,1362,5,47,0,0,1362,1364,5,47,0,0,1363,1359, - 1,0,0,0,1363,1361,1,0,0,0,1364,1368,1,0,0,0,1365,1367,8,33,0,0,1366,1365, - 1,0,0,0,1367,1370,1,0,0,0,1368,1366,1,0,0,0,1368,1369,1,0,0,0,1369,1372, - 1,0,0,0,1370,1368,1,0,0,0,1371,1373,7,34,0,0,1372,1371,1,0,0,0,1373,1374, - 1,0,0,0,1374,1375,6,179,4,0,1375,362,1,0,0,0,1376,1377,7,35,0,0,1377, - 1378,1,0,0,0,1378,1379,6,180,5,0,1379,364,1,0,0,0,1380,1392,8,36,0,0, - 1381,1392,3,201,99,0,1382,1383,3,281,139,0,1383,1384,3,341,169,0,1384, - 1392,1,0,0,0,1385,1386,3,281,139,0,1386,1387,3,309,153,0,1387,1392,1, - 0,0,0,1388,1389,3,341,169,0,1389,1390,3,341,169,0,1390,1392,1,0,0,0,1391, - 1380,1,0,0,0,1391,1381,1,0,0,0,1391,1382,1,0,0,0,1391,1385,1,0,0,0,1391, - 1388,1,0,0,0,1392,1393,1,0,0,0,1393,1391,1,0,0,0,1393,1394,1,0,0,0,1394, - 366,1,0,0,0,1395,1396,3,309,153,0,1396,1397,1,0,0,0,1397,1398,6,182,0, - 0,1398,368,1,0,0,0,1399,1400,3,341,169,0,1400,1401,1,0,0,0,1401,1402, - 6,183,6,0,1402,1403,6,183,3,0,1403,370,1,0,0,0,1404,1410,8,37,0,0,1405, - 1410,3,201,99,0,1406,1407,3,281,139,0,1407,1408,3,309,153,0,1408,1410, - 1,0,0,0,1409,1404,1,0,0,0,1409,1405,1,0,0,0,1409,1406,1,0,0,0,1410,1411, - 1,0,0,0,1411,1409,1,0,0,0,1411,1412,1,0,0,0,1412,372,1,0,0,0,1413,1414, - 3,309,153,0,1414,1415,1,0,0,0,1415,1416,6,185,0,0,1416,374,1,0,0,0,44, - 0,1,2,415,618,982,1011,1016,1022,1024,1036,1038,1052,1054,1059,1066,1071, - 1075,1080,1085,1089,1094,1101,1107,1112,1119,1124,1130,1135,1137,1143, - 1148,1155,1166,1168,1291,1351,1363,1368,1372,1391,1393,1409,1411,7,5, - 0,0,5,1,0,5,2,0,4,0,0,6,0,0,0,1,0,7,140,0 + 7,181,2,182,7,182,2,183,7,183,2,184,7,184,2,185,7,185,2,186,7,186,2,187, + 7,187,2,188,7,188,2,189,7,189,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2, + 1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,6,1, + 6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,424,8,6,1,7,1,7, + 1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,10, + 1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13, + 1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15, + 1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17, + 1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19, + 1,19,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22, + 1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23, + 1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,26,1,26,1,26, + 1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28, + 1,28,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30, + 1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32, + 1,33,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35, + 1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37, + 1,38,1,38,1,38,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,41,1,41, + 1,41,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42, + 3,42,641,8,42,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44, + 1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47, + 1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49, + 1,49,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,52, + 1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54, + 1,55,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57, + 1,58,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,59,1,60,1,60,1,60, + 1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,62,1,62,1,62,1,63,1,63,1,63,1,63, + 1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,66, + 1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67, + 1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68, + 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70, + 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,73, + 1,73,1,73,1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75, + 1,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77, + 1,77,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,80, + 1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81,1,81,1,81, + 1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83, + 1,83,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1,85,1,85,1,85,1,85, + 1,85,1,85,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1,88,1,88, + 1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,90,1,90,1,90, + 1,90,1,90,1,91,1,91,1,91,1,91,1,91,1,91,1,91,1,91,1,91,1,92,1,92,1,92, + 1,92,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,94,1,94,1,94, + 1,94,1,94,1,94,1,95,1,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,96, + 1,97,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1,98,1,98,1,99,1,99,1,99, + 1,99,1,99,1,99,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,101,1,101, + 1,101,1,101,1,101,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102, + 1,102,3,102,1015,8,102,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103, + 1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103, + 1,103,1,103,1,103,1,103,1,103,1,103,1,103,3,103,1044,8,103,1,104,1,104, + 1,104,3,104,1049,8,104,1,104,1,104,1,104,1,104,5,104,1055,8,104,10,104, + 12,104,1058,9,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104, + 5,104,1069,8,104,10,104,12,104,1072,9,104,1,104,1,104,1,104,1,104,1,104, + 1,104,1,104,1,104,1,104,1,104,1,104,5,104,1085,8,104,10,104,12,104,1088, + 9,104,1,104,1,104,3,104,1092,8,104,1,105,1,105,1,105,5,105,1097,8,105, + 10,105,12,105,1100,9,105,1,105,1,105,3,105,1104,8,105,1,105,1,105,3,105, + 1108,8,105,1,105,4,105,1111,8,105,11,105,12,105,1112,1,105,1,105,1,105, + 3,105,1118,8,105,1,105,1,105,3,105,1122,8,105,1,105,4,105,1125,8,105, + 11,105,12,105,1126,1,105,1,105,1,105,5,105,1132,8,105,10,105,12,105,1135, + 9,105,1,105,1,105,1,105,3,105,1140,8,105,1,105,4,105,1143,8,105,11,105, + 12,105,1144,1,105,1,105,1,105,1,105,1,105,3,105,1152,8,105,1,105,4,105, + 1155,8,105,11,105,12,105,1156,1,105,1,105,1,105,1,105,3,105,1163,8,105, + 1,105,4,105,1166,8,105,11,105,12,105,1167,3,105,1170,8,105,1,106,1,106, + 4,106,1174,8,106,11,106,12,106,1175,1,107,4,107,1179,8,107,11,107,12, + 107,1180,1,108,1,108,1,108,4,108,1186,8,108,11,108,12,108,1187,1,109, + 1,109,1,109,1,109,1,109,1,109,1,109,1,109,1,109,5,109,1199,8,109,10,109, + 12,109,1202,9,109,1,109,1,109,1,110,1,110,1,111,1,111,1,112,1,112,1,113, + 1,113,1,114,1,114,1,115,1,115,1,116,1,116,1,117,1,117,1,118,1,118,1,119, + 1,119,1,120,1,120,1,121,1,121,1,122,1,122,1,123,1,123,1,124,1,124,1,125, + 1,125,1,126,1,126,1,127,1,127,1,128,1,128,1,129,1,129,1,130,1,130,1,131, + 1,131,1,132,1,132,1,133,1,133,1,134,1,134,1,135,1,135,1,136,1,136,1,137, + 1,137,1,138,1,138,1,139,1,139,1,140,1,140,1,140,1,141,1,141,1,142,1,142, + 1,143,1,143,1,144,1,144,1,145,1,145,1,146,1,146,1,146,1,147,1,147,1,148, + 1,148,1,149,1,149,1,150,1,150,1,150,1,151,1,151,1,152,1,152,1,152,1,153, + 1,153,1,154,1,154,1,155,1,155,1,155,1,156,1,156,1,156,1,156,1,157,1,157, + 1,157,1,157,1,158,1,158,1,159,1,159,1,160,1,160,1,160,1,161,1,161,1,162, + 1,162,1,162,1,162,3,162,1324,8,162,1,163,1,163,1,163,1,163,1,164,1,164, + 1,164,1,165,1,165,1,165,1,166,1,166,1,166,1,167,1,167,1,168,1,168,1,169, + 1,169,1,170,1,170,1,171,1,171,1,171,1,171,1,171,1,172,1,172,1,172,1,172, + 1,172,1,173,1,173,1,174,1,174,1,175,1,175,1,175,1,176,1,176,1,176,1,176, + 1,177,1,177,1,178,1,178,1,179,1,179,1,180,1,180,1,181,1,181,1,182,1,182, + 1,182,1,182,5,182,1382,8,182,10,182,12,182,1385,9,182,1,182,1,182,1,182, + 1,182,1,182,1,183,1,183,1,183,1,183,3,183,1396,8,183,1,183,5,183,1399, + 8,183,10,183,12,183,1402,9,183,1,183,3,183,1405,8,183,1,183,1,183,1,184, + 1,184,1,184,1,184,1,185,1,185,1,185,1,185,1,185,1,185,1,185,1,185,1,185, + 1,185,1,185,4,185,1424,8,185,11,185,12,185,1425,1,186,1,186,1,186,1,186, + 1,187,1,187,1,187,1,187,1,187,1,188,1,188,1,188,1,188,1,188,4,188,1442, + 8,188,11,188,12,188,1443,1,189,1,189,1,189,1,189,1,1383,0,190,3,1,5,2, + 7,3,9,4,11,5,13,6,15,7,17,8,19,9,21,10,23,11,25,12,27,13,29,14,31,15, + 33,16,35,17,37,18,39,19,41,20,43,21,45,22,47,23,49,24,51,25,53,26,55, + 27,57,28,59,29,61,30,63,31,65,32,67,33,69,34,71,35,73,36,75,37,77,38, + 79,39,81,40,83,41,85,42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,101, + 50,103,51,105,52,107,53,109,54,111,55,113,56,115,57,117,58,119,59,121, + 60,123,61,125,62,127,63,129,64,131,65,133,66,135,67,137,68,139,69,141, + 70,143,71,145,72,147,73,149,74,151,75,153,76,155,77,157,78,159,79,161, + 80,163,81,165,82,167,83,169,84,171,85,173,86,175,87,177,88,179,89,181, + 90,183,91,185,92,187,93,189,94,191,95,193,96,195,97,197,98,199,99,201, + 100,203,101,205,102,207,103,209,104,211,105,213,106,215,107,217,108,219, + 109,221,110,223,0,225,0,227,0,229,0,231,0,233,0,235,0,237,0,239,0,241, + 0,243,0,245,0,247,0,249,0,251,0,253,0,255,0,257,0,259,0,261,0,263,0,265, + 0,267,0,269,0,271,0,273,0,275,0,277,0,279,0,281,0,283,111,285,112,287, + 113,289,114,291,115,293,116,295,117,297,118,299,119,301,120,303,121,305, + 122,307,123,309,124,311,125,313,126,315,127,317,128,319,129,321,130,323, + 131,325,132,327,133,329,134,331,135,333,136,335,137,337,138,339,139,341, + 140,343,141,345,142,347,143,349,144,351,145,353,146,355,147,357,148,359, + 149,361,150,363,151,365,152,367,153,369,154,371,155,373,156,375,157,377, + 0,379,158,381,159,3,0,1,2,38,2,0,92,92,96,96,2,0,34,34,92,92,2,0,39,39, + 92,92,2,0,65,65,97,97,2,0,66,66,98,98,2,0,67,67,99,99,2,0,68,68,100,100, + 2,0,69,69,101,101,2,0,70,70,102,102,2,0,71,71,103,103,2,0,72,72,104,104, + 2,0,73,73,105,105,2,0,74,74,106,106,2,0,75,75,107,107,2,0,76,76,108,108, + 2,0,77,77,109,109,2,0,78,78,110,110,2,0,79,79,111,111,2,0,80,80,112,112, + 2,0,81,81,113,113,2,0,82,82,114,114,2,0,83,83,115,115,2,0,84,84,116,116, + 2,0,85,85,117,117,2,0,86,86,118,118,2,0,87,87,119,119,2,0,88,88,120,120, + 2,0,89,89,121,121,2,0,90,90,122,122,2,0,65,90,97,122,1,0,48,55,1,0,48, + 57,3,0,48,57,65,70,97,102,2,0,10,10,13,13,2,1,10,10,13,13,2,0,9,13,32, + 32,3,0,39,39,92,92,123,123,1,0,123,123,1485,0,3,1,0,0,0,0,5,1,0,0,0,0, + 7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0, + 0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0, + 0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39, + 1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0, + 0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0, + 0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71, + 1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0, + 0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0, + 0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103, + 1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113, + 1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123, + 1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133, + 1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143, + 1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153, + 1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0,0,163, + 1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173, + 1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183, + 1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193, + 1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0,0,0,0,203, + 1,0,0,0,0,205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0,0,0,0,213, + 1,0,0,0,0,215,1,0,0,0,0,217,1,0,0,0,0,219,1,0,0,0,0,221,1,0,0,0,0,283, + 1,0,0,0,0,285,1,0,0,0,0,287,1,0,0,0,0,289,1,0,0,0,0,291,1,0,0,0,0,293, + 1,0,0,0,0,295,1,0,0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301,1,0,0,0,0,303, + 1,0,0,0,0,305,1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0,311,1,0,0,0,0,313, + 1,0,0,0,0,315,1,0,0,0,0,317,1,0,0,0,0,319,1,0,0,0,0,321,1,0,0,0,0,323, + 1,0,0,0,0,325,1,0,0,0,0,327,1,0,0,0,0,329,1,0,0,0,0,331,1,0,0,0,0,333, + 1,0,0,0,0,335,1,0,0,0,0,337,1,0,0,0,0,339,1,0,0,0,0,341,1,0,0,0,0,343, + 1,0,0,0,0,345,1,0,0,0,0,347,1,0,0,0,0,349,1,0,0,0,0,351,1,0,0,0,0,353, + 1,0,0,0,0,355,1,0,0,0,0,357,1,0,0,0,0,359,1,0,0,0,0,361,1,0,0,0,0,363, + 1,0,0,0,0,365,1,0,0,0,0,367,1,0,0,0,0,369,1,0,0,0,0,371,1,0,0,0,1,373, + 1,0,0,0,1,375,1,0,0,0,1,377,1,0,0,0,2,379,1,0,0,0,2,381,1,0,0,0,3,383, + 1,0,0,0,5,387,1,0,0,0,7,391,1,0,0,0,9,396,1,0,0,0,11,400,1,0,0,0,13,406, + 1,0,0,0,15,423,1,0,0,0,17,425,1,0,0,0,19,430,1,0,0,0,21,438,1,0,0,0,23, + 443,1,0,0,0,25,446,1,0,0,0,27,451,1,0,0,0,29,456,1,0,0,0,31,462,1,0,0, + 0,33,469,1,0,0,0,35,477,1,0,0,0,37,483,1,0,0,0,39,488,1,0,0,0,41,496, + 1,0,0,0,43,501,1,0,0,0,45,505,1,0,0,0,47,510,1,0,0,0,49,521,1,0,0,0,51, + 530,1,0,0,0,53,535,1,0,0,0,55,539,1,0,0,0,57,547,1,0,0,0,59,553,1,0,0, + 0,61,561,1,0,0,0,63,567,1,0,0,0,65,570,1,0,0,0,67,580,1,0,0,0,69,584, + 1,0,0,0,71,589,1,0,0,0,73,594,1,0,0,0,75,600,1,0,0,0,77,607,1,0,0,0,79, + 612,1,0,0,0,81,615,1,0,0,0,83,618,1,0,0,0,85,624,1,0,0,0,87,640,1,0,0, + 0,89,642,1,0,0,0,91,648,1,0,0,0,93,657,1,0,0,0,95,660,1,0,0,0,97,665, + 1,0,0,0,99,669,1,0,0,0,101,674,1,0,0,0,103,682,1,0,0,0,105,687,1,0,0, + 0,107,691,1,0,0,0,109,696,1,0,0,0,111,702,1,0,0,0,113,709,1,0,0,0,115, + 715,1,0,0,0,117,719,1,0,0,0,119,723,1,0,0,0,121,728,1,0,0,0,123,734,1, + 0,0,0,125,741,1,0,0,0,127,744,1,0,0,0,129,747,1,0,0,0,131,753,1,0,0,0, + 133,759,1,0,0,0,135,764,1,0,0,0,137,774,1,0,0,0,139,784,1,0,0,0,141,793, + 1,0,0,0,143,801,1,0,0,0,145,807,1,0,0,0,147,814,1,0,0,0,149,820,1,0,0, + 0,151,827,1,0,0,0,153,831,1,0,0,0,155,836,1,0,0,0,157,843,1,0,0,0,159, + 850,1,0,0,0,161,857,1,0,0,0,163,862,1,0,0,0,165,871,1,0,0,0,167,881,1, + 0,0,0,169,886,1,0,0,0,171,892,1,0,0,0,173,897,1,0,0,0,175,907,1,0,0,0, + 177,910,1,0,0,0,179,914,1,0,0,0,181,921,1,0,0,0,183,930,1,0,0,0,185,935, + 1,0,0,0,187,944,1,0,0,0,189,948,1,0,0,0,191,958,1,0,0,0,193,964,1,0,0, + 0,195,970,1,0,0,0,197,975,1,0,0,0,199,980,1,0,0,0,201,986,1,0,0,0,203, + 992,1,0,0,0,205,999,1,0,0,0,207,1014,1,0,0,0,209,1043,1,0,0,0,211,1091, + 1,0,0,0,213,1169,1,0,0,0,215,1171,1,0,0,0,217,1178,1,0,0,0,219,1182,1, + 0,0,0,221,1189,1,0,0,0,223,1205,1,0,0,0,225,1207,1,0,0,0,227,1209,1,0, + 0,0,229,1211,1,0,0,0,231,1213,1,0,0,0,233,1215,1,0,0,0,235,1217,1,0,0, + 0,237,1219,1,0,0,0,239,1221,1,0,0,0,241,1223,1,0,0,0,243,1225,1,0,0,0, + 245,1227,1,0,0,0,247,1229,1,0,0,0,249,1231,1,0,0,0,251,1233,1,0,0,0,253, + 1235,1,0,0,0,255,1237,1,0,0,0,257,1239,1,0,0,0,259,1241,1,0,0,0,261,1243, + 1,0,0,0,263,1245,1,0,0,0,265,1247,1,0,0,0,267,1249,1,0,0,0,269,1251,1, + 0,0,0,271,1253,1,0,0,0,273,1255,1,0,0,0,275,1257,1,0,0,0,277,1259,1,0, + 0,0,279,1261,1,0,0,0,281,1263,1,0,0,0,283,1265,1,0,0,0,285,1268,1,0,0, + 0,287,1270,1,0,0,0,289,1272,1,0,0,0,291,1274,1,0,0,0,293,1276,1,0,0,0, + 295,1278,1,0,0,0,297,1281,1,0,0,0,299,1283,1,0,0,0,301,1285,1,0,0,0,303, + 1287,1,0,0,0,305,1290,1,0,0,0,307,1292,1,0,0,0,309,1295,1,0,0,0,311,1297, + 1,0,0,0,313,1299,1,0,0,0,315,1302,1,0,0,0,317,1306,1,0,0,0,319,1310,1, + 0,0,0,321,1312,1,0,0,0,323,1314,1,0,0,0,325,1317,1,0,0,0,327,1323,1,0, + 0,0,329,1325,1,0,0,0,331,1329,1,0,0,0,333,1332,1,0,0,0,335,1335,1,0,0, + 0,337,1338,1,0,0,0,339,1340,1,0,0,0,341,1342,1,0,0,0,343,1344,1,0,0,0, + 345,1346,1,0,0,0,347,1351,1,0,0,0,349,1356,1,0,0,0,351,1358,1,0,0,0,353, + 1360,1,0,0,0,355,1363,1,0,0,0,357,1367,1,0,0,0,359,1369,1,0,0,0,361,1371, + 1,0,0,0,363,1373,1,0,0,0,365,1375,1,0,0,0,367,1377,1,0,0,0,369,1395,1, + 0,0,0,371,1408,1,0,0,0,373,1423,1,0,0,0,375,1427,1,0,0,0,377,1431,1,0, + 0,0,379,1441,1,0,0,0,381,1445,1,0,0,0,383,384,3,223,110,0,384,385,3,245, + 121,0,385,386,3,245,121,0,386,4,1,0,0,0,387,388,3,223,110,0,388,389,3, + 249,123,0,389,390,3,229,113,0,390,6,1,0,0,0,391,392,3,223,110,0,392,393, + 3,249,123,0,393,394,3,261,129,0,394,395,3,239,118,0,395,8,1,0,0,0,396, + 397,3,223,110,0,397,398,3,249,123,0,398,399,3,271,134,0,399,10,1,0,0, + 0,400,401,3,223,110,0,401,402,3,257,127,0,402,403,3,257,127,0,403,404, + 3,223,110,0,404,405,3,271,134,0,405,12,1,0,0,0,406,407,3,223,110,0,407, + 408,3,259,128,0,408,14,1,0,0,0,409,410,3,223,110,0,410,411,3,259,128, + 0,411,412,3,227,112,0,412,424,1,0,0,0,413,414,3,223,110,0,414,415,3,259, + 128,0,415,416,3,227,112,0,416,417,3,231,114,0,417,418,3,249,123,0,418, + 419,3,229,113,0,419,420,3,239,118,0,420,421,3,249,123,0,421,422,3,235, + 116,0,422,424,1,0,0,0,423,409,1,0,0,0,423,413,1,0,0,0,424,16,1,0,0,0, + 425,426,3,223,110,0,426,427,3,259,128,0,427,428,3,251,124,0,428,429,3, + 233,115,0,429,18,1,0,0,0,430,431,3,225,111,0,431,432,3,231,114,0,432, + 433,3,261,129,0,433,434,3,267,132,0,434,435,3,231,114,0,435,436,3,231, + 114,0,436,437,3,249,123,0,437,20,1,0,0,0,438,439,3,225,111,0,439,440, + 3,251,124,0,440,441,3,261,129,0,441,442,3,237,117,0,442,22,1,0,0,0,443, + 444,3,225,111,0,444,445,3,271,134,0,445,24,1,0,0,0,446,447,3,227,112, + 0,447,448,3,223,110,0,448,449,3,259,128,0,449,450,3,231,114,0,450,26, + 1,0,0,0,451,452,3,227,112,0,452,453,3,223,110,0,453,454,3,259,128,0,454, + 455,3,261,129,0,455,28,1,0,0,0,456,457,3,227,112,0,457,458,3,223,110, + 0,458,459,3,261,129,0,459,460,3,227,112,0,460,461,3,237,117,0,461,30, + 1,0,0,0,462,463,3,227,112,0,463,464,3,251,124,0,464,465,3,237,117,0,465, + 466,3,251,124,0,466,467,3,257,127,0,467,468,3,261,129,0,468,32,1,0,0, + 0,469,470,3,227,112,0,470,471,3,251,124,0,471,472,3,245,121,0,472,473, + 3,245,121,0,473,474,3,223,110,0,474,475,3,261,129,0,475,476,3,231,114, + 0,476,34,1,0,0,0,477,478,3,227,112,0,478,479,3,257,127,0,479,480,3,251, + 124,0,480,481,3,259,128,0,481,482,3,259,128,0,482,36,1,0,0,0,483,484, + 3,227,112,0,484,485,3,263,130,0,485,486,3,225,111,0,486,487,3,231,114, + 0,487,38,1,0,0,0,488,489,3,227,112,0,489,490,3,263,130,0,490,491,3,257, + 127,0,491,492,3,257,127,0,492,493,3,231,114,0,493,494,3,249,123,0,494, + 495,3,261,129,0,495,40,1,0,0,0,496,497,3,229,113,0,497,498,3,223,110, + 0,498,499,3,261,129,0,499,500,3,231,114,0,500,42,1,0,0,0,501,502,3,229, + 113,0,502,503,3,223,110,0,503,504,3,271,134,0,504,44,1,0,0,0,505,506, + 3,229,113,0,506,507,3,231,114,0,507,508,3,259,128,0,508,509,3,227,112, + 0,509,46,1,0,0,0,510,511,3,229,113,0,511,512,3,231,114,0,512,513,3,259, + 128,0,513,514,3,227,112,0,514,515,3,231,114,0,515,516,3,249,123,0,516, + 517,3,229,113,0,517,518,3,239,118,0,518,519,3,249,123,0,519,520,3,235, + 116,0,520,48,1,0,0,0,521,522,3,229,113,0,522,523,3,239,118,0,523,524, + 3,259,128,0,524,525,3,261,129,0,525,526,3,239,118,0,526,527,3,249,123, + 0,527,528,3,227,112,0,528,529,3,261,129,0,529,50,1,0,0,0,530,531,3,231, + 114,0,531,532,3,245,121,0,532,533,3,259,128,0,533,534,3,231,114,0,534, + 52,1,0,0,0,535,536,3,231,114,0,536,537,3,249,123,0,537,538,3,229,113, + 0,538,54,1,0,0,0,539,540,3,231,114,0,540,541,3,269,133,0,541,542,3,261, + 129,0,542,543,3,257,127,0,543,544,3,223,110,0,544,545,3,227,112,0,545, + 546,3,261,129,0,546,56,1,0,0,0,547,548,3,233,115,0,548,549,3,239,118, + 0,549,550,3,249,123,0,550,551,3,223,110,0,551,552,3,245,121,0,552,58, + 1,0,0,0,553,554,3,233,115,0,554,555,3,239,118,0,555,556,3,249,123,0,556, + 557,3,223,110,0,557,558,3,245,121,0,558,559,3,245,121,0,559,560,3,271, + 134,0,560,60,1,0,0,0,561,562,3,233,115,0,562,563,3,239,118,0,563,564, + 3,257,127,0,564,565,3,259,128,0,565,566,3,261,129,0,566,62,1,0,0,0,567, + 568,3,233,115,0,568,569,3,249,123,0,569,64,1,0,0,0,570,571,3,233,115, + 0,571,572,3,251,124,0,572,573,3,245,121,0,573,574,3,245,121,0,574,575, + 3,251,124,0,575,576,3,267,132,0,576,577,3,239,118,0,577,578,3,249,123, + 0,578,579,3,235,116,0,579,66,1,0,0,0,580,581,3,233,115,0,581,582,3,251, + 124,0,582,583,3,257,127,0,583,68,1,0,0,0,584,585,3,233,115,0,585,586, + 3,257,127,0,586,587,3,251,124,0,587,588,3,247,122,0,588,70,1,0,0,0,589, + 590,3,233,115,0,590,591,3,263,130,0,591,592,3,245,121,0,592,593,3,245, + 121,0,593,72,1,0,0,0,594,595,3,235,116,0,595,596,3,257,127,0,596,597, + 3,251,124,0,597,598,3,263,130,0,598,599,3,253,125,0,599,74,1,0,0,0,600, + 601,3,237,117,0,601,602,3,223,110,0,602,603,3,265,131,0,603,604,3,239, + 118,0,604,605,3,249,123,0,605,606,3,235,116,0,606,76,1,0,0,0,607,608, + 3,237,117,0,608,609,3,251,124,0,609,610,3,263,130,0,610,611,3,257,127, + 0,611,78,1,0,0,0,612,613,3,239,118,0,613,614,3,229,113,0,614,80,1,0,0, + 0,615,616,3,239,118,0,616,617,3,233,115,0,617,82,1,0,0,0,618,619,3,239, + 118,0,619,620,3,245,121,0,620,621,3,239,118,0,621,622,3,243,120,0,622, + 623,3,231,114,0,623,84,1,0,0,0,624,625,3,239,118,0,625,626,3,249,123, + 0,626,86,1,0,0,0,627,628,3,239,118,0,628,629,3,249,123,0,629,630,3,233, + 115,0,630,641,1,0,0,0,631,632,3,239,118,0,632,633,3,249,123,0,633,634, + 3,233,115,0,634,635,3,239,118,0,635,636,3,249,123,0,636,637,3,239,118, + 0,637,638,3,261,129,0,638,639,3,271,134,0,639,641,1,0,0,0,640,627,1,0, + 0,0,640,631,1,0,0,0,641,88,1,0,0,0,642,643,3,239,118,0,643,644,3,249, + 123,0,644,645,3,249,123,0,645,646,3,231,114,0,646,647,3,257,127,0,647, + 90,1,0,0,0,648,649,3,239,118,0,649,650,3,249,123,0,650,651,3,261,129, + 0,651,652,3,231,114,0,652,653,3,257,127,0,653,654,3,265,131,0,654,655, + 3,223,110,0,655,656,3,245,121,0,656,92,1,0,0,0,657,658,3,239,118,0,658, + 659,3,259,128,0,659,94,1,0,0,0,660,661,3,241,119,0,661,662,3,251,124, + 0,662,663,3,239,118,0,663,664,3,249,123,0,664,96,1,0,0,0,665,666,3,243, + 120,0,666,667,3,231,114,0,667,668,3,271,134,0,668,98,1,0,0,0,669,670, + 3,245,121,0,670,671,3,223,110,0,671,672,3,259,128,0,672,673,3,261,129, + 0,673,100,1,0,0,0,674,675,3,245,121,0,675,676,3,231,114,0,676,677,3,223, + 110,0,677,678,3,229,113,0,678,679,3,239,118,0,679,680,3,249,123,0,680, + 681,3,235,116,0,681,102,1,0,0,0,682,683,3,245,121,0,683,684,3,231,114, + 0,684,685,3,233,115,0,685,686,3,261,129,0,686,104,1,0,0,0,687,688,3,245, + 121,0,688,689,3,231,114,0,689,690,3,261,129,0,690,106,1,0,0,0,691,692, + 3,245,121,0,692,693,3,239,118,0,693,694,3,243,120,0,694,695,3,231,114, + 0,695,108,1,0,0,0,696,697,3,245,121,0,697,698,3,239,118,0,698,699,3,247, + 122,0,699,700,3,239,118,0,700,701,3,261,129,0,701,110,1,0,0,0,702,703, + 3,247,122,0,703,704,3,239,118,0,704,705,3,249,123,0,705,706,3,263,130, + 0,706,707,3,261,129,0,707,708,3,231,114,0,708,112,1,0,0,0,709,710,3,247, + 122,0,710,711,3,251,124,0,711,712,3,249,123,0,712,713,3,261,129,0,713, + 714,3,237,117,0,714,114,1,0,0,0,715,716,3,249,123,0,716,717,3,223,110, + 0,717,718,3,249,123,0,718,116,1,0,0,0,719,720,3,249,123,0,720,721,3,251, + 124,0,721,722,3,261,129,0,722,118,1,0,0,0,723,724,3,249,123,0,724,725, + 3,263,130,0,725,726,3,245,121,0,726,727,3,245,121,0,727,120,1,0,0,0,728, + 729,3,249,123,0,729,730,3,263,130,0,730,731,3,245,121,0,731,732,3,245, + 121,0,732,733,3,259,128,0,733,122,1,0,0,0,734,735,3,251,124,0,735,736, + 3,233,115,0,736,737,3,233,115,0,737,738,3,259,128,0,738,739,3,231,114, + 0,739,740,3,261,129,0,740,124,1,0,0,0,741,742,3,251,124,0,742,743,3,249, + 123,0,743,126,1,0,0,0,744,745,3,251,124,0,745,746,3,257,127,0,746,128, + 1,0,0,0,747,748,3,251,124,0,748,749,3,257,127,0,749,750,3,229,113,0,750, + 751,3,231,114,0,751,752,3,257,127,0,752,130,1,0,0,0,753,754,3,251,124, + 0,754,755,3,263,130,0,755,756,3,261,129,0,756,757,3,231,114,0,757,758, + 3,257,127,0,758,132,1,0,0,0,759,760,3,251,124,0,760,761,3,265,131,0,761, + 762,3,231,114,0,762,763,3,257,127,0,763,134,1,0,0,0,764,765,3,253,125, + 0,765,766,3,223,110,0,766,767,3,257,127,0,767,768,3,261,129,0,768,769, + 3,239,118,0,769,770,3,261,129,0,770,771,3,239,118,0,771,772,3,251,124, + 0,772,773,3,249,123,0,773,136,1,0,0,0,774,775,3,253,125,0,775,776,3,257, + 127,0,776,777,3,231,114,0,777,778,3,227,112,0,778,779,3,231,114,0,779, + 780,3,229,113,0,780,781,3,239,118,0,781,782,3,249,123,0,782,783,3,235, + 116,0,783,138,1,0,0,0,784,785,3,253,125,0,785,786,3,257,127,0,786,787, + 3,231,114,0,787,788,3,267,132,0,788,789,3,237,117,0,789,790,3,231,114, + 0,790,791,3,257,127,0,791,792,3,231,114,0,792,140,1,0,0,0,793,794,3,255, + 126,0,794,795,3,263,130,0,795,796,3,223,110,0,796,797,3,257,127,0,797, + 798,3,261,129,0,798,799,3,231,114,0,799,800,3,257,127,0,800,142,1,0,0, + 0,801,802,3,257,127,0,802,803,3,223,110,0,803,804,3,249,123,0,804,805, + 3,235,116,0,805,806,3,231,114,0,806,144,1,0,0,0,807,808,3,257,127,0,808, + 809,3,231,114,0,809,810,3,261,129,0,810,811,3,263,130,0,811,812,3,257, + 127,0,812,813,3,249,123,0,813,146,1,0,0,0,814,815,3,257,127,0,815,816, + 3,239,118,0,816,817,3,235,116,0,817,818,3,237,117,0,818,819,3,261,129, + 0,819,148,1,0,0,0,820,821,3,257,127,0,821,822,3,251,124,0,822,823,3,245, + 121,0,823,824,3,245,121,0,824,825,3,263,130,0,825,826,3,253,125,0,826, + 150,1,0,0,0,827,828,3,257,127,0,828,829,3,251,124,0,829,830,3,267,132, + 0,830,152,1,0,0,0,831,832,3,257,127,0,832,833,3,251,124,0,833,834,3,267, + 132,0,834,835,3,259,128,0,835,154,1,0,0,0,836,837,3,259,128,0,837,838, + 3,223,110,0,838,839,3,247,122,0,839,840,3,253,125,0,840,841,3,245,121, + 0,841,842,3,231,114,0,842,156,1,0,0,0,843,844,3,259,128,0,844,845,3,231, + 114,0,845,846,3,227,112,0,846,847,3,251,124,0,847,848,3,249,123,0,848, + 849,3,229,113,0,849,158,1,0,0,0,850,851,3,259,128,0,851,852,3,231,114, + 0,852,853,3,245,121,0,853,854,3,231,114,0,854,855,3,227,112,0,855,856, + 3,261,129,0,856,160,1,0,0,0,857,858,3,259,128,0,858,859,3,231,114,0,859, + 860,3,247,122,0,860,861,3,239,118,0,861,162,1,0,0,0,862,863,3,259,128, + 0,863,864,3,231,114,0,864,865,3,261,129,0,865,866,3,261,129,0,866,867, + 3,239,118,0,867,868,3,249,123,0,868,869,3,235,116,0,869,870,3,259,128, + 0,870,164,1,0,0,0,871,872,3,259,128,0,872,873,3,263,130,0,873,874,3,225, + 111,0,874,875,3,259,128,0,875,876,3,261,129,0,876,877,3,257,127,0,877, + 878,3,239,118,0,878,879,3,249,123,0,879,880,3,235,116,0,880,166,1,0,0, + 0,881,882,3,261,129,0,882,883,3,237,117,0,883,884,3,231,114,0,884,885, + 3,249,123,0,885,168,1,0,0,0,886,887,3,261,129,0,887,888,3,237,117,0,888, + 889,3,257,127,0,889,890,3,251,124,0,890,891,3,267,132,0,891,170,1,0,0, + 0,892,893,3,261,129,0,893,894,3,239,118,0,894,895,3,231,114,0,895,896, + 3,259,128,0,896,172,1,0,0,0,897,898,3,261,129,0,898,899,3,239,118,0,899, + 900,3,247,122,0,900,901,3,231,114,0,901,902,3,259,128,0,902,903,3,261, + 129,0,903,904,3,223,110,0,904,905,3,247,122,0,905,906,3,253,125,0,906, + 174,1,0,0,0,907,908,3,261,129,0,908,909,3,251,124,0,909,176,1,0,0,0,910, + 911,3,261,129,0,911,912,3,251,124,0,912,913,3,253,125,0,913,178,1,0,0, + 0,914,915,3,261,129,0,915,916,3,251,124,0,916,917,3,261,129,0,917,918, + 3,223,110,0,918,919,3,245,121,0,919,920,3,259,128,0,920,180,1,0,0,0,921, + 922,3,261,129,0,922,923,3,257,127,0,923,924,3,223,110,0,924,925,3,239, + 118,0,925,926,3,245,121,0,926,927,3,239,118,0,927,928,3,249,123,0,928, + 929,3,235,116,0,929,182,1,0,0,0,930,931,3,261,129,0,931,932,3,257,127, + 0,932,933,3,239,118,0,933,934,3,247,122,0,934,184,1,0,0,0,935,936,3,261, + 129,0,936,937,3,257,127,0,937,938,3,263,130,0,938,939,3,249,123,0,939, + 940,3,227,112,0,940,941,3,223,110,0,941,942,3,261,129,0,942,943,3,231, + 114,0,943,186,1,0,0,0,944,945,3,261,129,0,945,946,3,257,127,0,946,947, + 3,271,134,0,947,188,1,0,0,0,948,949,3,263,130,0,949,950,3,249,123,0,950, + 951,3,225,111,0,951,952,3,251,124,0,952,953,3,263,130,0,953,954,3,249, + 123,0,954,955,3,229,113,0,955,956,3,231,114,0,956,957,3,229,113,0,957, + 190,1,0,0,0,958,959,3,263,130,0,959,960,3,249,123,0,960,961,3,239,118, + 0,961,962,3,251,124,0,962,963,3,249,123,0,963,192,1,0,0,0,964,965,3,263, + 130,0,965,966,3,259,128,0,966,967,3,239,118,0,967,968,3,249,123,0,968, + 969,3,235,116,0,969,194,1,0,0,0,970,971,3,267,132,0,971,972,3,231,114, + 0,972,973,3,231,114,0,973,974,3,243,120,0,974,196,1,0,0,0,975,976,3,267, + 132,0,976,977,3,237,117,0,977,978,3,231,114,0,978,979,3,249,123,0,979, + 198,1,0,0,0,980,981,3,267,132,0,981,982,3,237,117,0,982,983,3,231,114, + 0,983,984,3,257,127,0,984,985,3,231,114,0,985,200,1,0,0,0,986,987,3,267, + 132,0,987,988,3,237,117,0,988,989,3,239,118,0,989,990,3,245,121,0,990, + 991,3,231,114,0,991,202,1,0,0,0,992,993,3,267,132,0,993,994,3,239,118, + 0,994,995,3,249,123,0,995,996,3,229,113,0,996,997,3,251,124,0,997,998, + 3,267,132,0,998,204,1,0,0,0,999,1000,3,267,132,0,1000,1001,3,239,118, + 0,1001,1002,3,261,129,0,1002,1003,3,237,117,0,1003,206,1,0,0,0,1004,1005, + 3,271,134,0,1005,1006,3,231,114,0,1006,1007,3,223,110,0,1007,1008,3,257, + 127,0,1008,1015,1,0,0,0,1009,1010,3,271,134,0,1010,1011,3,271,134,0,1011, + 1012,3,271,134,0,1012,1013,3,271,134,0,1013,1015,1,0,0,0,1014,1004,1, + 0,0,0,1014,1009,1,0,0,0,1015,208,1,0,0,0,1016,1017,3,289,143,0,1017,1018, + 3,225,111,0,1018,1044,1,0,0,0,1019,1020,3,289,143,0,1020,1021,3,233,115, + 0,1021,1044,1,0,0,0,1022,1023,3,289,143,0,1023,1024,3,257,127,0,1024, + 1044,1,0,0,0,1025,1026,3,289,143,0,1026,1027,3,249,123,0,1027,1044,1, + 0,0,0,1028,1029,3,289,143,0,1029,1030,3,261,129,0,1030,1044,1,0,0,0,1031, + 1032,3,289,143,0,1032,1033,5,48,0,0,1033,1044,1,0,0,0,1034,1035,3,289, + 143,0,1035,1036,3,223,110,0,1036,1044,1,0,0,0,1037,1038,3,289,143,0,1038, + 1039,3,265,131,0,1039,1044,1,0,0,0,1040,1041,3,289,143,0,1041,1042,3, + 289,143,0,1042,1044,1,0,0,0,1043,1016,1,0,0,0,1043,1019,1,0,0,0,1043, + 1022,1,0,0,0,1043,1025,1,0,0,0,1043,1028,1,0,0,0,1043,1031,1,0,0,0,1043, + 1034,1,0,0,0,1043,1037,1,0,0,0,1043,1040,1,0,0,0,1044,210,1,0,0,0,1045, + 1049,3,275,136,0,1046,1049,3,365,181,0,1047,1049,3,299,148,0,1048,1045, + 1,0,0,0,1048,1046,1,0,0,0,1048,1047,1,0,0,0,1049,1056,1,0,0,0,1050,1055, + 3,275,136,0,1051,1055,3,365,181,0,1052,1055,3,279,138,0,1053,1055,3,299, + 148,0,1054,1050,1,0,0,0,1054,1051,1,0,0,0,1054,1052,1,0,0,0,1054,1053, + 1,0,0,0,1055,1058,1,0,0,0,1056,1054,1,0,0,0,1056,1057,1,0,0,0,1057,1092, + 1,0,0,0,1058,1056,1,0,0,0,1059,1070,3,287,142,0,1060,1069,8,0,0,0,1061, + 1069,3,209,103,0,1062,1063,3,289,143,0,1063,1064,3,349,173,0,1064,1069, + 1,0,0,0,1065,1066,3,287,142,0,1066,1067,3,287,142,0,1067,1069,1,0,0,0, + 1068,1060,1,0,0,0,1068,1061,1,0,0,0,1068,1062,1,0,0,0,1068,1065,1,0,0, + 0,1069,1072,1,0,0,0,1070,1068,1,0,0,0,1070,1071,1,0,0,0,1071,1073,1,0, + 0,0,1072,1070,1,0,0,0,1073,1074,3,287,142,0,1074,1092,1,0,0,0,1075,1086, + 3,343,170,0,1076,1085,8,1,0,0,1077,1085,3,209,103,0,1078,1079,3,289,143, + 0,1079,1080,3,343,170,0,1080,1085,1,0,0,0,1081,1082,3,343,170,0,1082, + 1083,3,343,170,0,1083,1085,1,0,0,0,1084,1076,1,0,0,0,1084,1077,1,0,0, + 0,1084,1078,1,0,0,0,1084,1081,1,0,0,0,1085,1088,1,0,0,0,1086,1084,1,0, + 0,0,1086,1087,1,0,0,0,1087,1089,1,0,0,0,1088,1086,1,0,0,0,1089,1090,3, + 343,170,0,1090,1092,1,0,0,0,1091,1048,1,0,0,0,1091,1059,1,0,0,0,1091, + 1075,1,0,0,0,1092,212,1,0,0,0,1093,1094,3,219,108,0,1094,1098,3,301,149, + 0,1095,1097,3,281,139,0,1096,1095,1,0,0,0,1097,1100,1,0,0,0,1098,1096, + 1,0,0,0,1098,1099,1,0,0,0,1099,1103,1,0,0,0,1100,1098,1,0,0,0,1101,1104, + 3,253,125,0,1102,1104,3,231,114,0,1103,1101,1,0,0,0,1103,1102,1,0,0,0, + 1104,1107,1,0,0,0,1105,1108,3,339,168,0,1106,1108,3,297,147,0,1107,1105, + 1,0,0,0,1107,1106,1,0,0,0,1107,1108,1,0,0,0,1108,1110,1,0,0,0,1109,1111, + 3,279,138,0,1110,1109,1,0,0,0,1111,1112,1,0,0,0,1112,1110,1,0,0,0,1112, + 1113,1,0,0,0,1113,1170,1,0,0,0,1114,1117,3,219,108,0,1115,1118,3,253, + 125,0,1116,1118,3,231,114,0,1117,1115,1,0,0,0,1117,1116,1,0,0,0,1118, + 1121,1,0,0,0,1119,1122,3,339,168,0,1120,1122,3,297,147,0,1121,1119,1, + 0,0,0,1121,1120,1,0,0,0,1121,1122,1,0,0,0,1122,1124,1,0,0,0,1123,1125, + 3,279,138,0,1124,1123,1,0,0,0,1125,1126,1,0,0,0,1126,1124,1,0,0,0,1126, + 1127,1,0,0,0,1127,1170,1,0,0,0,1128,1129,3,217,107,0,1129,1133,3,301, + 149,0,1130,1132,3,279,138,0,1131,1130,1,0,0,0,1132,1135,1,0,0,0,1133, + 1131,1,0,0,0,1133,1134,1,0,0,0,1134,1136,1,0,0,0,1135,1133,1,0,0,0,1136, + 1139,3,231,114,0,1137,1140,3,339,168,0,1138,1140,3,297,147,0,1139,1137, + 1,0,0,0,1139,1138,1,0,0,0,1139,1140,1,0,0,0,1140,1142,1,0,0,0,1141,1143, + 3,279,138,0,1142,1141,1,0,0,0,1143,1144,1,0,0,0,1144,1142,1,0,0,0,1144, + 1145,1,0,0,0,1145,1170,1,0,0,0,1146,1147,3,301,149,0,1147,1148,3,217, + 107,0,1148,1151,3,231,114,0,1149,1152,3,339,168,0,1150,1152,3,297,147, + 0,1151,1149,1,0,0,0,1151,1150,1,0,0,0,1151,1152,1,0,0,0,1152,1154,1,0, + 0,0,1153,1155,3,279,138,0,1154,1153,1,0,0,0,1155,1156,1,0,0,0,1156,1154, + 1,0,0,0,1156,1157,1,0,0,0,1157,1170,1,0,0,0,1158,1159,3,217,107,0,1159, + 1162,3,231,114,0,1160,1163,3,339,168,0,1161,1163,3,297,147,0,1162,1160, + 1,0,0,0,1162,1161,1,0,0,0,1162,1163,1,0,0,0,1163,1165,1,0,0,0,1164,1166, + 3,279,138,0,1165,1164,1,0,0,0,1166,1167,1,0,0,0,1167,1165,1,0,0,0,1167, + 1168,1,0,0,0,1168,1170,1,0,0,0,1169,1093,1,0,0,0,1169,1114,1,0,0,0,1169, + 1128,1,0,0,0,1169,1146,1,0,0,0,1169,1158,1,0,0,0,1170,214,1,0,0,0,1171, + 1173,5,48,0,0,1172,1174,3,277,137,0,1173,1172,1,0,0,0,1174,1175,1,0,0, + 0,1175,1173,1,0,0,0,1175,1176,1,0,0,0,1176,216,1,0,0,0,1177,1179,3,279, + 138,0,1178,1177,1,0,0,0,1179,1180,1,0,0,0,1180,1178,1,0,0,0,1180,1181, + 1,0,0,0,1181,218,1,0,0,0,1182,1183,5,48,0,0,1183,1185,3,269,133,0,1184, + 1186,3,281,139,0,1185,1184,1,0,0,0,1186,1187,1,0,0,0,1187,1185,1,0,0, + 0,1187,1188,1,0,0,0,1188,220,1,0,0,0,1189,1200,3,349,173,0,1190,1199, + 8,2,0,0,1191,1199,3,209,103,0,1192,1193,3,289,143,0,1193,1194,3,349,173, + 0,1194,1199,1,0,0,0,1195,1196,3,349,173,0,1196,1197,3,349,173,0,1197, + 1199,1,0,0,0,1198,1190,1,0,0,0,1198,1191,1,0,0,0,1198,1192,1,0,0,0,1198, + 1195,1,0,0,0,1199,1202,1,0,0,0,1200,1198,1,0,0,0,1200,1201,1,0,0,0,1201, + 1203,1,0,0,0,1202,1200,1,0,0,0,1203,1204,3,349,173,0,1204,222,1,0,0,0, + 1205,1206,7,3,0,0,1206,224,1,0,0,0,1207,1208,7,4,0,0,1208,226,1,0,0,0, + 1209,1210,7,5,0,0,1210,228,1,0,0,0,1211,1212,7,6,0,0,1212,230,1,0,0,0, + 1213,1214,7,7,0,0,1214,232,1,0,0,0,1215,1216,7,8,0,0,1216,234,1,0,0,0, + 1217,1218,7,9,0,0,1218,236,1,0,0,0,1219,1220,7,10,0,0,1220,238,1,0,0, + 0,1221,1222,7,11,0,0,1222,240,1,0,0,0,1223,1224,7,12,0,0,1224,242,1,0, + 0,0,1225,1226,7,13,0,0,1226,244,1,0,0,0,1227,1228,7,14,0,0,1228,246,1, + 0,0,0,1229,1230,7,15,0,0,1230,248,1,0,0,0,1231,1232,7,16,0,0,1232,250, + 1,0,0,0,1233,1234,7,17,0,0,1234,252,1,0,0,0,1235,1236,7,18,0,0,1236,254, + 1,0,0,0,1237,1238,7,19,0,0,1238,256,1,0,0,0,1239,1240,7,20,0,0,1240,258, + 1,0,0,0,1241,1242,7,21,0,0,1242,260,1,0,0,0,1243,1244,7,22,0,0,1244,262, + 1,0,0,0,1245,1246,7,23,0,0,1246,264,1,0,0,0,1247,1248,7,24,0,0,1248,266, + 1,0,0,0,1249,1250,7,25,0,0,1250,268,1,0,0,0,1251,1252,7,26,0,0,1252,270, + 1,0,0,0,1253,1254,7,27,0,0,1254,272,1,0,0,0,1255,1256,7,28,0,0,1256,274, + 1,0,0,0,1257,1258,7,29,0,0,1258,276,1,0,0,0,1259,1260,7,30,0,0,1260,278, + 1,0,0,0,1261,1262,7,31,0,0,1262,280,1,0,0,0,1263,1264,7,32,0,0,1264,282, + 1,0,0,0,1265,1266,5,45,0,0,1266,1267,5,62,0,0,1267,284,1,0,0,0,1268,1269, + 5,42,0,0,1269,286,1,0,0,0,1270,1271,5,96,0,0,1271,288,1,0,0,0,1272,1273, + 5,92,0,0,1273,290,1,0,0,0,1274,1275,5,58,0,0,1275,292,1,0,0,0,1276,1277, + 5,44,0,0,1277,294,1,0,0,0,1278,1279,5,124,0,0,1279,1280,5,124,0,0,1280, + 296,1,0,0,0,1281,1282,5,45,0,0,1282,298,1,0,0,0,1283,1284,5,36,0,0,1284, + 300,1,0,0,0,1285,1286,5,46,0,0,1286,302,1,0,0,0,1287,1288,5,61,0,0,1288, + 1289,5,61,0,0,1289,304,1,0,0,0,1290,1291,5,61,0,0,1291,306,1,0,0,0,1292, + 1293,5,62,0,0,1293,1294,5,61,0,0,1294,308,1,0,0,0,1295,1296,5,62,0,0, + 1296,310,1,0,0,0,1297,1298,5,35,0,0,1298,312,1,0,0,0,1299,1300,5,126, + 0,0,1300,1301,5,42,0,0,1301,314,1,0,0,0,1302,1303,5,61,0,0,1303,1304, + 5,126,0,0,1304,1305,5,42,0,0,1305,316,1,0,0,0,1306,1307,5,123,0,0,1307, + 1308,1,0,0,0,1308,1309,6,157,0,0,1309,318,1,0,0,0,1310,1311,5,91,0,0, + 1311,320,1,0,0,0,1312,1313,5,40,0,0,1313,322,1,0,0,0,1314,1315,5,60,0, + 0,1315,1316,5,61,0,0,1316,324,1,0,0,0,1317,1318,5,60,0,0,1318,326,1,0, + 0,0,1319,1320,5,33,0,0,1320,1324,5,61,0,0,1321,1322,5,60,0,0,1322,1324, + 5,62,0,0,1323,1319,1,0,0,0,1323,1321,1,0,0,0,1324,328,1,0,0,0,1325,1326, + 5,33,0,0,1326,1327,5,126,0,0,1327,1328,5,42,0,0,1328,330,1,0,0,0,1329, + 1330,5,33,0,0,1330,1331,5,126,0,0,1331,332,1,0,0,0,1332,1333,5,63,0,0, + 1333,1334,5,46,0,0,1334,334,1,0,0,0,1335,1336,5,63,0,0,1336,1337,5,63, + 0,0,1337,336,1,0,0,0,1338,1339,5,37,0,0,1339,338,1,0,0,0,1340,1341,5, + 43,0,0,1341,340,1,0,0,0,1342,1343,5,63,0,0,1343,342,1,0,0,0,1344,1345, + 5,34,0,0,1345,344,1,0,0,0,1346,1347,5,102,0,0,1347,1348,5,39,0,0,1348, + 1349,1,0,0,0,1349,1350,6,171,1,0,1350,346,1,0,0,0,1351,1352,5,70,0,0, + 1352,1353,5,39,0,0,1353,1354,1,0,0,0,1354,1355,6,172,2,0,1355,348,1,0, + 0,0,1356,1357,5,39,0,0,1357,350,1,0,0,0,1358,1359,5,126,0,0,1359,352, + 1,0,0,0,1360,1361,5,61,0,0,1361,1362,5,126,0,0,1362,354,1,0,0,0,1363, + 1364,5,125,0,0,1364,1365,1,0,0,0,1365,1366,6,176,3,0,1366,356,1,0,0,0, + 1367,1368,5,93,0,0,1368,358,1,0,0,0,1369,1370,5,41,0,0,1370,360,1,0,0, + 0,1371,1372,5,59,0,0,1372,362,1,0,0,0,1373,1374,5,47,0,0,1374,364,1,0, + 0,0,1375,1376,5,95,0,0,1376,366,1,0,0,0,1377,1378,5,47,0,0,1378,1379, + 5,42,0,0,1379,1383,1,0,0,0,1380,1382,9,0,0,0,1381,1380,1,0,0,0,1382,1385, + 1,0,0,0,1383,1384,1,0,0,0,1383,1381,1,0,0,0,1384,1386,1,0,0,0,1385,1383, + 1,0,0,0,1386,1387,5,42,0,0,1387,1388,5,47,0,0,1388,1389,1,0,0,0,1389, + 1390,6,182,4,0,1390,368,1,0,0,0,1391,1392,5,45,0,0,1392,1396,5,45,0,0, + 1393,1394,5,47,0,0,1394,1396,5,47,0,0,1395,1391,1,0,0,0,1395,1393,1,0, + 0,0,1396,1400,1,0,0,0,1397,1399,8,33,0,0,1398,1397,1,0,0,0,1399,1402, + 1,0,0,0,1400,1398,1,0,0,0,1400,1401,1,0,0,0,1401,1404,1,0,0,0,1402,1400, + 1,0,0,0,1403,1405,7,34,0,0,1404,1403,1,0,0,0,1405,1406,1,0,0,0,1406,1407, + 6,183,4,0,1407,370,1,0,0,0,1408,1409,7,35,0,0,1409,1410,1,0,0,0,1410, + 1411,6,184,5,0,1411,372,1,0,0,0,1412,1424,8,36,0,0,1413,1424,3,209,103, + 0,1414,1415,3,289,143,0,1415,1416,3,349,173,0,1416,1424,1,0,0,0,1417, + 1418,3,289,143,0,1418,1419,3,317,157,0,1419,1424,1,0,0,0,1420,1421,3, + 349,173,0,1421,1422,3,349,173,0,1422,1424,1,0,0,0,1423,1412,1,0,0,0,1423, + 1413,1,0,0,0,1423,1414,1,0,0,0,1423,1417,1,0,0,0,1423,1420,1,0,0,0,1424, + 1425,1,0,0,0,1425,1423,1,0,0,0,1425,1426,1,0,0,0,1426,374,1,0,0,0,1427, + 1428,3,317,157,0,1428,1429,1,0,0,0,1429,1430,6,186,0,0,1430,376,1,0,0, + 0,1431,1432,3,349,173,0,1432,1433,1,0,0,0,1433,1434,6,187,6,0,1434,1435, + 6,187,3,0,1435,378,1,0,0,0,1436,1442,8,37,0,0,1437,1442,3,209,103,0,1438, + 1439,3,289,143,0,1439,1440,3,317,157,0,1440,1442,1,0,0,0,1441,1436,1, + 0,0,0,1441,1437,1,0,0,0,1441,1438,1,0,0,0,1442,1443,1,0,0,0,1443,1441, + 1,0,0,0,1443,1444,1,0,0,0,1444,380,1,0,0,0,1445,1446,3,317,157,0,1446, + 1447,1,0,0,0,1447,1448,6,189,0,0,1448,382,1,0,0,0,44,0,1,2,423,640,1014, + 1043,1048,1054,1056,1068,1070,1084,1086,1091,1098,1103,1107,1112,1117, + 1121,1126,1133,1139,1144,1151,1156,1162,1167,1169,1175,1180,1187,1198, + 1200,1323,1383,1395,1400,1404,1423,1425,1441,1443,7,5,0,0,5,1,0,5,2,0, + 4,0,0,6,0,0,0,1,0,7,144,0 }; staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); diff --git a/hogql_parser/HogQLLexer.h b/hogql_parser/HogQLLexer.h index bc7cd06196e41..b54914ebc913e 100644 --- a/hogql_parser/HogQLLexer.h +++ b/hogql_parser/HogQLLexer.h @@ -13,34 +13,35 @@ class HogQLLexer : public antlr4::Lexer { public: enum { ALL = 1, AND = 2, ANTI = 3, ANY = 4, ARRAY = 5, AS = 6, ASCENDING = 7, - ASOF = 8, BETWEEN = 9, BOTH = 10, BY = 11, CASE = 12, CAST = 13, COHORT = 14, - COLLATE = 15, CROSS = 16, CUBE = 17, CURRENT = 18, DATE = 19, DAY = 20, - DESC = 21, DESCENDING = 22, DISTINCT = 23, ELSE = 24, END = 25, EXTRACT = 26, - FINAL = 27, FIRST = 28, FN = 29, FOLLOWING = 30, FOR = 31, FROM = 32, - FULL = 33, GROUP = 34, HAVING = 35, HOUR = 36, ID = 37, IF = 38, ILIKE = 39, - IN = 40, INF = 41, INNER = 42, INTERVAL = 43, IS = 44, JOIN = 45, KEY = 46, - LAST = 47, LEADING = 48, LEFT = 49, LET = 50, LIKE = 51, LIMIT = 52, - MINUTE = 53, MONTH = 54, NAN_SQL = 55, NOT = 56, NULL_SQL = 57, NULLS = 58, - OFFSET = 59, ON = 60, OR = 61, ORDER = 62, OUTER = 63, OVER = 64, PARTITION = 65, - PRECEDING = 66, PREWHERE = 67, QUARTER = 68, RANGE = 69, RETURN = 70, - RIGHT = 71, ROLLUP = 72, ROW = 73, ROWS = 74, SAMPLE = 75, SECOND = 76, - SELECT = 77, SEMI = 78, SETTINGS = 79, SUBSTRING = 80, THEN = 81, TIES = 82, - TIMESTAMP = 83, TO = 84, TOP = 85, TOTALS = 86, TRAILING = 87, TRIM = 88, - TRUNCATE = 89, UNBOUNDED = 90, UNION = 91, USING = 92, WEEK = 93, WHEN = 94, - WHERE = 95, WHILE = 96, WINDOW = 97, WITH = 98, YEAR = 99, ESCAPE_CHAR_COMMON = 100, - IDENTIFIER = 101, FLOATING_LITERAL = 102, OCTAL_LITERAL = 103, DECIMAL_LITERAL = 104, - HEXADECIMAL_LITERAL = 105, STRING_LITERAL = 106, ARROW = 107, ASTERISK = 108, - BACKQUOTE = 109, BACKSLASH = 110, COLON = 111, COMMA = 112, CONCAT = 113, - DASH = 114, DOLLAR = 115, DOT = 116, EQ_DOUBLE = 117, EQ_SINGLE = 118, - GT_EQ = 119, GT = 120, HASH = 121, IREGEX_SINGLE = 122, IREGEX_DOUBLE = 123, - LBRACE = 124, LBRACKET = 125, LPAREN = 126, LT_EQ = 127, LT = 128, NOT_EQ = 129, - NOT_IREGEX = 130, NOT_REGEX = 131, NULL_PROPERTY = 132, NULLISH = 133, - PERCENT = 134, PLUS = 135, QUERY = 136, QUOTE_DOUBLE = 137, QUOTE_SINGLE_TEMPLATE = 138, - QUOTE_SINGLE_TEMPLATE_FULL = 139, QUOTE_SINGLE = 140, REGEX_SINGLE = 141, - REGEX_DOUBLE = 142, RBRACE = 143, RBRACKET = 144, RPAREN = 145, SEMICOLON = 146, - SLASH = 147, UNDERSCORE = 148, MULTI_LINE_COMMENT = 149, SINGLE_LINE_COMMENT = 150, - WHITESPACE = 151, STRING_TEXT = 152, STRING_ESCAPE_TRIGGER = 153, FULL_STRING_TEXT = 154, - FULL_STRING_ESCAPE_TRIGGER = 155 + ASOF = 8, BETWEEN = 9, BOTH = 10, BY = 11, CASE = 12, CAST = 13, CATCH = 14, + COHORT = 15, COLLATE = 16, CROSS = 17, CUBE = 18, CURRENT = 19, DATE = 20, + DAY = 21, DESC = 22, DESCENDING = 23, DISTINCT = 24, ELSE = 25, END = 26, + EXTRACT = 27, FINAL = 28, FINALLY = 29, FIRST = 30, FN = 31, FOLLOWING = 32, + FOR = 33, FROM = 34, FULL = 35, GROUP = 36, HAVING = 37, HOUR = 38, + ID = 39, IF = 40, ILIKE = 41, IN = 42, INF = 43, INNER = 44, INTERVAL = 45, + IS = 46, JOIN = 47, KEY = 48, LAST = 49, LEADING = 50, LEFT = 51, LET = 52, + LIKE = 53, LIMIT = 54, MINUTE = 55, MONTH = 56, NAN_SQL = 57, NOT = 58, + NULL_SQL = 59, NULLS = 60, OFFSET = 61, ON = 62, OR = 63, ORDER = 64, + OUTER = 65, OVER = 66, PARTITION = 67, PRECEDING = 68, PREWHERE = 69, + QUARTER = 70, RANGE = 71, RETURN = 72, RIGHT = 73, ROLLUP = 74, ROW = 75, + ROWS = 76, SAMPLE = 77, SECOND = 78, SELECT = 79, SEMI = 80, SETTINGS = 81, + SUBSTRING = 82, THEN = 83, THROW = 84, TIES = 85, TIMESTAMP = 86, TO = 87, + TOP = 88, TOTALS = 89, TRAILING = 90, TRIM = 91, TRUNCATE = 92, TRY = 93, + UNBOUNDED = 94, UNION = 95, USING = 96, WEEK = 97, WHEN = 98, WHERE = 99, + WHILE = 100, WINDOW = 101, WITH = 102, YEAR = 103, ESCAPE_CHAR_COMMON = 104, + IDENTIFIER = 105, FLOATING_LITERAL = 106, OCTAL_LITERAL = 107, DECIMAL_LITERAL = 108, + HEXADECIMAL_LITERAL = 109, STRING_LITERAL = 110, ARROW = 111, ASTERISK = 112, + BACKQUOTE = 113, BACKSLASH = 114, COLON = 115, COMMA = 116, CONCAT = 117, + DASH = 118, DOLLAR = 119, DOT = 120, EQ_DOUBLE = 121, EQ_SINGLE = 122, + GT_EQ = 123, GT = 124, HASH = 125, IREGEX_SINGLE = 126, IREGEX_DOUBLE = 127, + LBRACE = 128, LBRACKET = 129, LPAREN = 130, LT_EQ = 131, LT = 132, NOT_EQ = 133, + NOT_IREGEX = 134, NOT_REGEX = 135, NULL_PROPERTY = 136, NULLISH = 137, + PERCENT = 138, PLUS = 139, QUERY = 140, QUOTE_DOUBLE = 141, QUOTE_SINGLE_TEMPLATE = 142, + QUOTE_SINGLE_TEMPLATE_FULL = 143, QUOTE_SINGLE = 144, REGEX_SINGLE = 145, + REGEX_DOUBLE = 146, RBRACE = 147, RBRACKET = 148, RPAREN = 149, SEMICOLON = 150, + SLASH = 151, UNDERSCORE = 152, MULTI_LINE_COMMENT = 153, SINGLE_LINE_COMMENT = 154, + WHITESPACE = 155, STRING_TEXT = 156, STRING_ESCAPE_TRIGGER = 157, FULL_STRING_TEXT = 158, + FULL_STRING_ESCAPE_TRIGGER = 159 }; enum { diff --git a/hogql_parser/HogQLLexer.interp b/hogql_parser/HogQLLexer.interp index 77c0c2456d11a..fb9d54e6ec3c5 100644 --- a/hogql_parser/HogQLLexer.interp +++ b/hogql_parser/HogQLLexer.interp @@ -106,6 +106,10 @@ null null null null +null +null +null +null '->' '*' '`' @@ -171,6 +175,7 @@ BOTH BY CASE CAST +CATCH COHORT COLLATE CROSS @@ -185,6 +190,7 @@ ELSE END EXTRACT FINAL +FINALLY FIRST FN FOLLOWING @@ -239,6 +245,7 @@ SEMI SETTINGS SUBSTRING THEN +THROW TIES TIMESTAMP TO @@ -247,6 +254,7 @@ TOTALS TRAILING TRIM TRUNCATE +TRY UNBOUNDED UNION USING @@ -328,6 +336,7 @@ BOTH BY CASE CAST +CATCH COHORT COLLATE CROSS @@ -342,6 +351,7 @@ ELSE END EXTRACT FINAL +FINALLY FIRST FN FOLLOWING @@ -396,6 +406,7 @@ SEMI SETTINGS SUBSTRING THEN +THROW TIES TIMESTAMP TO @@ -404,6 +415,7 @@ TOTALS TRAILING TRIM TRUNCATE +TRY UNBOUNDED UNION USING @@ -512,4 +524,4 @@ IN_TEMPLATE_STRING IN_FULL_TEMPLATE_STRING atn: -[4, 0, 155, 1417, 6, -1, 6, -1, 6, -1, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 416, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 619, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 3, 98, 983, 8, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 3, 99, 1012, 8, 99, 1, 100, 1, 100, 1, 100, 3, 100, 1017, 8, 100, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1023, 8, 100, 10, 100, 12, 100, 1026, 9, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1037, 8, 100, 10, 100, 12, 100, 1040, 9, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1053, 8, 100, 10, 100, 12, 100, 1056, 9, 100, 1, 100, 1, 100, 3, 100, 1060, 8, 100, 1, 101, 1, 101, 1, 101, 5, 101, 1065, 8, 101, 10, 101, 12, 101, 1068, 9, 101, 1, 101, 1, 101, 3, 101, 1072, 8, 101, 1, 101, 1, 101, 3, 101, 1076, 8, 101, 1, 101, 4, 101, 1079, 8, 101, 11, 101, 12, 101, 1080, 1, 101, 1, 101, 1, 101, 3, 101, 1086, 8, 101, 1, 101, 1, 101, 3, 101, 1090, 8, 101, 1, 101, 4, 101, 1093, 8, 101, 11, 101, 12, 101, 1094, 1, 101, 1, 101, 1, 101, 5, 101, 1100, 8, 101, 10, 101, 12, 101, 1103, 9, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1108, 8, 101, 1, 101, 4, 101, 1111, 8, 101, 11, 101, 12, 101, 1112, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1120, 8, 101, 1, 101, 4, 101, 1123, 8, 101, 11, 101, 12, 101, 1124, 1, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1131, 8, 101, 1, 101, 4, 101, 1134, 8, 101, 11, 101, 12, 101, 1135, 3, 101, 1138, 8, 101, 1, 102, 1, 102, 4, 102, 1142, 8, 102, 11, 102, 12, 102, 1143, 1, 103, 4, 103, 1147, 8, 103, 11, 103, 12, 103, 1148, 1, 104, 1, 104, 1, 104, 4, 104, 1154, 8, 104, 11, 104, 12, 104, 1155, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 5, 105, 1167, 8, 105, 10, 105, 12, 105, 1170, 9, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 115, 1, 115, 1, 116, 1, 116, 1, 117, 1, 117, 1, 118, 1, 118, 1, 119, 1, 119, 1, 120, 1, 120, 1, 121, 1, 121, 1, 122, 1, 122, 1, 123, 1, 123, 1, 124, 1, 124, 1, 125, 1, 125, 1, 126, 1, 126, 1, 127, 1, 127, 1, 128, 1, 128, 1, 129, 1, 129, 1, 130, 1, 130, 1, 131, 1, 131, 1, 132, 1, 132, 1, 133, 1, 133, 1, 134, 1, 134, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 138, 1, 138, 1, 139, 1, 139, 1, 140, 1, 140, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 144, 1, 144, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 3, 158, 1292, 8, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 164, 1, 164, 1, 165, 1, 165, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 174, 1, 174, 1, 175, 1, 175, 1, 176, 1, 176, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 5, 178, 1350, 8, 178, 10, 178, 12, 178, 1353, 9, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 3, 179, 1364, 8, 179, 1, 179, 5, 179, 1367, 8, 179, 10, 179, 12, 179, 1370, 9, 179, 1, 179, 3, 179, 1373, 8, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 4, 181, 1392, 8, 181, 11, 181, 12, 181, 1393, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 4, 184, 1410, 8, 184, 11, 184, 12, 184, 1411, 1, 185, 1, 185, 1, 185, 1, 185, 1, 1351, 0, 186, 3, 1, 5, 2, 7, 3, 9, 4, 11, 5, 13, 6, 15, 7, 17, 8, 19, 9, 21, 10, 23, 11, 25, 12, 27, 13, 29, 14, 31, 15, 33, 16, 35, 17, 37, 18, 39, 19, 41, 20, 43, 21, 45, 22, 47, 23, 49, 24, 51, 25, 53, 26, 55, 27, 57, 28, 59, 29, 61, 30, 63, 31, 65, 32, 67, 33, 69, 34, 71, 35, 73, 36, 75, 37, 77, 38, 79, 39, 81, 40, 83, 41, 85, 42, 87, 43, 89, 44, 91, 45, 93, 46, 95, 47, 97, 48, 99, 49, 101, 50, 103, 51, 105, 52, 107, 53, 109, 54, 111, 55, 113, 56, 115, 57, 117, 58, 119, 59, 121, 60, 123, 61, 125, 62, 127, 63, 129, 64, 131, 65, 133, 66, 135, 67, 137, 68, 139, 69, 141, 70, 143, 71, 145, 72, 147, 73, 149, 74, 151, 75, 153, 76, 155, 77, 157, 78, 159, 79, 161, 80, 163, 81, 165, 82, 167, 83, 169, 84, 171, 85, 173, 86, 175, 87, 177, 88, 179, 89, 181, 90, 183, 91, 185, 92, 187, 93, 189, 94, 191, 95, 193, 96, 195, 97, 197, 98, 199, 99, 201, 100, 203, 101, 205, 102, 207, 103, 209, 104, 211, 105, 213, 106, 215, 0, 217, 0, 219, 0, 221, 0, 223, 0, 225, 0, 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, 0, 239, 0, 241, 0, 243, 0, 245, 0, 247, 0, 249, 0, 251, 0, 253, 0, 255, 0, 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, 0, 269, 0, 271, 0, 273, 0, 275, 107, 277, 108, 279, 109, 281, 110, 283, 111, 285, 112, 287, 113, 289, 114, 291, 115, 293, 116, 295, 117, 297, 118, 299, 119, 301, 120, 303, 121, 305, 122, 307, 123, 309, 124, 311, 125, 313, 126, 315, 127, 317, 128, 319, 129, 321, 130, 323, 131, 325, 132, 327, 133, 329, 134, 331, 135, 333, 136, 335, 137, 337, 138, 339, 139, 341, 140, 343, 141, 345, 142, 347, 143, 349, 144, 351, 145, 353, 146, 355, 147, 357, 148, 359, 149, 361, 150, 363, 151, 365, 152, 367, 153, 369, 0, 371, 154, 373, 155, 3, 0, 1, 2, 38, 2, 0, 92, 92, 96, 96, 2, 0, 34, 34, 92, 92, 2, 0, 39, 39, 92, 92, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, 2, 0, 65, 90, 97, 122, 1, 0, 48, 55, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 10, 10, 13, 13, 2, 1, 10, 10, 13, 13, 2, 0, 9, 13, 32, 32, 3, 0, 39, 39, 92, 92, 123, 123, 1, 0, 123, 123, 1453, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 1, 365, 1, 0, 0, 0, 1, 367, 1, 0, 0, 0, 1, 369, 1, 0, 0, 0, 2, 371, 1, 0, 0, 0, 2, 373, 1, 0, 0, 0, 3, 375, 1, 0, 0, 0, 5, 379, 1, 0, 0, 0, 7, 383, 1, 0, 0, 0, 9, 388, 1, 0, 0, 0, 11, 392, 1, 0, 0, 0, 13, 398, 1, 0, 0, 0, 15, 415, 1, 0, 0, 0, 17, 417, 1, 0, 0, 0, 19, 422, 1, 0, 0, 0, 21, 430, 1, 0, 0, 0, 23, 435, 1, 0, 0, 0, 25, 438, 1, 0, 0, 0, 27, 443, 1, 0, 0, 0, 29, 448, 1, 0, 0, 0, 31, 455, 1, 0, 0, 0, 33, 463, 1, 0, 0, 0, 35, 469, 1, 0, 0, 0, 37, 474, 1, 0, 0, 0, 39, 482, 1, 0, 0, 0, 41, 487, 1, 0, 0, 0, 43, 491, 1, 0, 0, 0, 45, 496, 1, 0, 0, 0, 47, 507, 1, 0, 0, 0, 49, 516, 1, 0, 0, 0, 51, 521, 1, 0, 0, 0, 53, 525, 1, 0, 0, 0, 55, 533, 1, 0, 0, 0, 57, 539, 1, 0, 0, 0, 59, 545, 1, 0, 0, 0, 61, 548, 1, 0, 0, 0, 63, 558, 1, 0, 0, 0, 65, 562, 1, 0, 0, 0, 67, 567, 1, 0, 0, 0, 69, 572, 1, 0, 0, 0, 71, 578, 1, 0, 0, 0, 73, 585, 1, 0, 0, 0, 75, 590, 1, 0, 0, 0, 77, 593, 1, 0, 0, 0, 79, 596, 1, 0, 0, 0, 81, 602, 1, 0, 0, 0, 83, 618, 1, 0, 0, 0, 85, 620, 1, 0, 0, 0, 87, 626, 1, 0, 0, 0, 89, 635, 1, 0, 0, 0, 91, 638, 1, 0, 0, 0, 93, 643, 1, 0, 0, 0, 95, 647, 1, 0, 0, 0, 97, 652, 1, 0, 0, 0, 99, 660, 1, 0, 0, 0, 101, 665, 1, 0, 0, 0, 103, 669, 1, 0, 0, 0, 105, 674, 1, 0, 0, 0, 107, 680, 1, 0, 0, 0, 109, 687, 1, 0, 0, 0, 111, 693, 1, 0, 0, 0, 113, 697, 1, 0, 0, 0, 115, 701, 1, 0, 0, 0, 117, 706, 1, 0, 0, 0, 119, 712, 1, 0, 0, 0, 121, 719, 1, 0, 0, 0, 123, 722, 1, 0, 0, 0, 125, 725, 1, 0, 0, 0, 127, 731, 1, 0, 0, 0, 129, 737, 1, 0, 0, 0, 131, 742, 1, 0, 0, 0, 133, 752, 1, 0, 0, 0, 135, 762, 1, 0, 0, 0, 137, 771, 1, 0, 0, 0, 139, 779, 1, 0, 0, 0, 141, 785, 1, 0, 0, 0, 143, 792, 1, 0, 0, 0, 145, 798, 1, 0, 0, 0, 147, 805, 1, 0, 0, 0, 149, 809, 1, 0, 0, 0, 151, 814, 1, 0, 0, 0, 153, 821, 1, 0, 0, 0, 155, 828, 1, 0, 0, 0, 157, 835, 1, 0, 0, 0, 159, 840, 1, 0, 0, 0, 161, 849, 1, 0, 0, 0, 163, 859, 1, 0, 0, 0, 165, 864, 1, 0, 0, 0, 167, 869, 1, 0, 0, 0, 169, 879, 1, 0, 0, 0, 171, 882, 1, 0, 0, 0, 173, 886, 1, 0, 0, 0, 175, 893, 1, 0, 0, 0, 177, 902, 1, 0, 0, 0, 179, 907, 1, 0, 0, 0, 181, 916, 1, 0, 0, 0, 183, 926, 1, 0, 0, 0, 185, 932, 1, 0, 0, 0, 187, 938, 1, 0, 0, 0, 189, 943, 1, 0, 0, 0, 191, 948, 1, 0, 0, 0, 193, 954, 1, 0, 0, 0, 195, 960, 1, 0, 0, 0, 197, 967, 1, 0, 0, 0, 199, 982, 1, 0, 0, 0, 201, 1011, 1, 0, 0, 0, 203, 1059, 1, 0, 0, 0, 205, 1137, 1, 0, 0, 0, 207, 1139, 1, 0, 0, 0, 209, 1146, 1, 0, 0, 0, 211, 1150, 1, 0, 0, 0, 213, 1157, 1, 0, 0, 0, 215, 1173, 1, 0, 0, 0, 217, 1175, 1, 0, 0, 0, 219, 1177, 1, 0, 0, 0, 221, 1179, 1, 0, 0, 0, 223, 1181, 1, 0, 0, 0, 225, 1183, 1, 0, 0, 0, 227, 1185, 1, 0, 0, 0, 229, 1187, 1, 0, 0, 0, 231, 1189, 1, 0, 0, 0, 233, 1191, 1, 0, 0, 0, 235, 1193, 1, 0, 0, 0, 237, 1195, 1, 0, 0, 0, 239, 1197, 1, 0, 0, 0, 241, 1199, 1, 0, 0, 0, 243, 1201, 1, 0, 0, 0, 245, 1203, 1, 0, 0, 0, 247, 1205, 1, 0, 0, 0, 249, 1207, 1, 0, 0, 0, 251, 1209, 1, 0, 0, 0, 253, 1211, 1, 0, 0, 0, 255, 1213, 1, 0, 0, 0, 257, 1215, 1, 0, 0, 0, 259, 1217, 1, 0, 0, 0, 261, 1219, 1, 0, 0, 0, 263, 1221, 1, 0, 0, 0, 265, 1223, 1, 0, 0, 0, 267, 1225, 1, 0, 0, 0, 269, 1227, 1, 0, 0, 0, 271, 1229, 1, 0, 0, 0, 273, 1231, 1, 0, 0, 0, 275, 1233, 1, 0, 0, 0, 277, 1236, 1, 0, 0, 0, 279, 1238, 1, 0, 0, 0, 281, 1240, 1, 0, 0, 0, 283, 1242, 1, 0, 0, 0, 285, 1244, 1, 0, 0, 0, 287, 1246, 1, 0, 0, 0, 289, 1249, 1, 0, 0, 0, 291, 1251, 1, 0, 0, 0, 293, 1253, 1, 0, 0, 0, 295, 1255, 1, 0, 0, 0, 297, 1258, 1, 0, 0, 0, 299, 1260, 1, 0, 0, 0, 301, 1263, 1, 0, 0, 0, 303, 1265, 1, 0, 0, 0, 305, 1267, 1, 0, 0, 0, 307, 1270, 1, 0, 0, 0, 309, 1274, 1, 0, 0, 0, 311, 1278, 1, 0, 0, 0, 313, 1280, 1, 0, 0, 0, 315, 1282, 1, 0, 0, 0, 317, 1285, 1, 0, 0, 0, 319, 1291, 1, 0, 0, 0, 321, 1293, 1, 0, 0, 0, 323, 1297, 1, 0, 0, 0, 325, 1300, 1, 0, 0, 0, 327, 1303, 1, 0, 0, 0, 329, 1306, 1, 0, 0, 0, 331, 1308, 1, 0, 0, 0, 333, 1310, 1, 0, 0, 0, 335, 1312, 1, 0, 0, 0, 337, 1314, 1, 0, 0, 0, 339, 1319, 1, 0, 0, 0, 341, 1324, 1, 0, 0, 0, 343, 1326, 1, 0, 0, 0, 345, 1328, 1, 0, 0, 0, 347, 1331, 1, 0, 0, 0, 349, 1335, 1, 0, 0, 0, 351, 1337, 1, 0, 0, 0, 353, 1339, 1, 0, 0, 0, 355, 1341, 1, 0, 0, 0, 357, 1343, 1, 0, 0, 0, 359, 1345, 1, 0, 0, 0, 361, 1363, 1, 0, 0, 0, 363, 1376, 1, 0, 0, 0, 365, 1391, 1, 0, 0, 0, 367, 1395, 1, 0, 0, 0, 369, 1399, 1, 0, 0, 0, 371, 1409, 1, 0, 0, 0, 373, 1413, 1, 0, 0, 0, 375, 376, 3, 215, 106, 0, 376, 377, 3, 237, 117, 0, 377, 378, 3, 237, 117, 0, 378, 4, 1, 0, 0, 0, 379, 380, 3, 215, 106, 0, 380, 381, 3, 241, 119, 0, 381, 382, 3, 221, 109, 0, 382, 6, 1, 0, 0, 0, 383, 384, 3, 215, 106, 0, 384, 385, 3, 241, 119, 0, 385, 386, 3, 253, 125, 0, 386, 387, 3, 231, 114, 0, 387, 8, 1, 0, 0, 0, 388, 389, 3, 215, 106, 0, 389, 390, 3, 241, 119, 0, 390, 391, 3, 263, 130, 0, 391, 10, 1, 0, 0, 0, 392, 393, 3, 215, 106, 0, 393, 394, 3, 249, 123, 0, 394, 395, 3, 249, 123, 0, 395, 396, 3, 215, 106, 0, 396, 397, 3, 263, 130, 0, 397, 12, 1, 0, 0, 0, 398, 399, 3, 215, 106, 0, 399, 400, 3, 251, 124, 0, 400, 14, 1, 0, 0, 0, 401, 402, 3, 215, 106, 0, 402, 403, 3, 251, 124, 0, 403, 404, 3, 219, 108, 0, 404, 416, 1, 0, 0, 0, 405, 406, 3, 215, 106, 0, 406, 407, 3, 251, 124, 0, 407, 408, 3, 219, 108, 0, 408, 409, 3, 223, 110, 0, 409, 410, 3, 241, 119, 0, 410, 411, 3, 221, 109, 0, 411, 412, 3, 231, 114, 0, 412, 413, 3, 241, 119, 0, 413, 414, 3, 227, 112, 0, 414, 416, 1, 0, 0, 0, 415, 401, 1, 0, 0, 0, 415, 405, 1, 0, 0, 0, 416, 16, 1, 0, 0, 0, 417, 418, 3, 215, 106, 0, 418, 419, 3, 251, 124, 0, 419, 420, 3, 243, 120, 0, 420, 421, 3, 225, 111, 0, 421, 18, 1, 0, 0, 0, 422, 423, 3, 217, 107, 0, 423, 424, 3, 223, 110, 0, 424, 425, 3, 253, 125, 0, 425, 426, 3, 259, 128, 0, 426, 427, 3, 223, 110, 0, 427, 428, 3, 223, 110, 0, 428, 429, 3, 241, 119, 0, 429, 20, 1, 0, 0, 0, 430, 431, 3, 217, 107, 0, 431, 432, 3, 243, 120, 0, 432, 433, 3, 253, 125, 0, 433, 434, 3, 229, 113, 0, 434, 22, 1, 0, 0, 0, 435, 436, 3, 217, 107, 0, 436, 437, 3, 263, 130, 0, 437, 24, 1, 0, 0, 0, 438, 439, 3, 219, 108, 0, 439, 440, 3, 215, 106, 0, 440, 441, 3, 251, 124, 0, 441, 442, 3, 223, 110, 0, 442, 26, 1, 0, 0, 0, 443, 444, 3, 219, 108, 0, 444, 445, 3, 215, 106, 0, 445, 446, 3, 251, 124, 0, 446, 447, 3, 253, 125, 0, 447, 28, 1, 0, 0, 0, 448, 449, 3, 219, 108, 0, 449, 450, 3, 243, 120, 0, 450, 451, 3, 229, 113, 0, 451, 452, 3, 243, 120, 0, 452, 453, 3, 249, 123, 0, 453, 454, 3, 253, 125, 0, 454, 30, 1, 0, 0, 0, 455, 456, 3, 219, 108, 0, 456, 457, 3, 243, 120, 0, 457, 458, 3, 237, 117, 0, 458, 459, 3, 237, 117, 0, 459, 460, 3, 215, 106, 0, 460, 461, 3, 253, 125, 0, 461, 462, 3, 223, 110, 0, 462, 32, 1, 0, 0, 0, 463, 464, 3, 219, 108, 0, 464, 465, 3, 249, 123, 0, 465, 466, 3, 243, 120, 0, 466, 467, 3, 251, 124, 0, 467, 468, 3, 251, 124, 0, 468, 34, 1, 0, 0, 0, 469, 470, 3, 219, 108, 0, 470, 471, 3, 255, 126, 0, 471, 472, 3, 217, 107, 0, 472, 473, 3, 223, 110, 0, 473, 36, 1, 0, 0, 0, 474, 475, 3, 219, 108, 0, 475, 476, 3, 255, 126, 0, 476, 477, 3, 249, 123, 0, 477, 478, 3, 249, 123, 0, 478, 479, 3, 223, 110, 0, 479, 480, 3, 241, 119, 0, 480, 481, 3, 253, 125, 0, 481, 38, 1, 0, 0, 0, 482, 483, 3, 221, 109, 0, 483, 484, 3, 215, 106, 0, 484, 485, 3, 253, 125, 0, 485, 486, 3, 223, 110, 0, 486, 40, 1, 0, 0, 0, 487, 488, 3, 221, 109, 0, 488, 489, 3, 215, 106, 0, 489, 490, 3, 263, 130, 0, 490, 42, 1, 0, 0, 0, 491, 492, 3, 221, 109, 0, 492, 493, 3, 223, 110, 0, 493, 494, 3, 251, 124, 0, 494, 495, 3, 219, 108, 0, 495, 44, 1, 0, 0, 0, 496, 497, 3, 221, 109, 0, 497, 498, 3, 223, 110, 0, 498, 499, 3, 251, 124, 0, 499, 500, 3, 219, 108, 0, 500, 501, 3, 223, 110, 0, 501, 502, 3, 241, 119, 0, 502, 503, 3, 221, 109, 0, 503, 504, 3, 231, 114, 0, 504, 505, 3, 241, 119, 0, 505, 506, 3, 227, 112, 0, 506, 46, 1, 0, 0, 0, 507, 508, 3, 221, 109, 0, 508, 509, 3, 231, 114, 0, 509, 510, 3, 251, 124, 0, 510, 511, 3, 253, 125, 0, 511, 512, 3, 231, 114, 0, 512, 513, 3, 241, 119, 0, 513, 514, 3, 219, 108, 0, 514, 515, 3, 253, 125, 0, 515, 48, 1, 0, 0, 0, 516, 517, 3, 223, 110, 0, 517, 518, 3, 237, 117, 0, 518, 519, 3, 251, 124, 0, 519, 520, 3, 223, 110, 0, 520, 50, 1, 0, 0, 0, 521, 522, 3, 223, 110, 0, 522, 523, 3, 241, 119, 0, 523, 524, 3, 221, 109, 0, 524, 52, 1, 0, 0, 0, 525, 526, 3, 223, 110, 0, 526, 527, 3, 261, 129, 0, 527, 528, 3, 253, 125, 0, 528, 529, 3, 249, 123, 0, 529, 530, 3, 215, 106, 0, 530, 531, 3, 219, 108, 0, 531, 532, 3, 253, 125, 0, 532, 54, 1, 0, 0, 0, 533, 534, 3, 225, 111, 0, 534, 535, 3, 231, 114, 0, 535, 536, 3, 241, 119, 0, 536, 537, 3, 215, 106, 0, 537, 538, 3, 237, 117, 0, 538, 56, 1, 0, 0, 0, 539, 540, 3, 225, 111, 0, 540, 541, 3, 231, 114, 0, 541, 542, 3, 249, 123, 0, 542, 543, 3, 251, 124, 0, 543, 544, 3, 253, 125, 0, 544, 58, 1, 0, 0, 0, 545, 546, 3, 225, 111, 0, 546, 547, 3, 241, 119, 0, 547, 60, 1, 0, 0, 0, 548, 549, 3, 225, 111, 0, 549, 550, 3, 243, 120, 0, 550, 551, 3, 237, 117, 0, 551, 552, 3, 237, 117, 0, 552, 553, 3, 243, 120, 0, 553, 554, 3, 259, 128, 0, 554, 555, 3, 231, 114, 0, 555, 556, 3, 241, 119, 0, 556, 557, 3, 227, 112, 0, 557, 62, 1, 0, 0, 0, 558, 559, 3, 225, 111, 0, 559, 560, 3, 243, 120, 0, 560, 561, 3, 249, 123, 0, 561, 64, 1, 0, 0, 0, 562, 563, 3, 225, 111, 0, 563, 564, 3, 249, 123, 0, 564, 565, 3, 243, 120, 0, 565, 566, 3, 239, 118, 0, 566, 66, 1, 0, 0, 0, 567, 568, 3, 225, 111, 0, 568, 569, 3, 255, 126, 0, 569, 570, 3, 237, 117, 0, 570, 571, 3, 237, 117, 0, 571, 68, 1, 0, 0, 0, 572, 573, 3, 227, 112, 0, 573, 574, 3, 249, 123, 0, 574, 575, 3, 243, 120, 0, 575, 576, 3, 255, 126, 0, 576, 577, 3, 245, 121, 0, 577, 70, 1, 0, 0, 0, 578, 579, 3, 229, 113, 0, 579, 580, 3, 215, 106, 0, 580, 581, 3, 257, 127, 0, 581, 582, 3, 231, 114, 0, 582, 583, 3, 241, 119, 0, 583, 584, 3, 227, 112, 0, 584, 72, 1, 0, 0, 0, 585, 586, 3, 229, 113, 0, 586, 587, 3, 243, 120, 0, 587, 588, 3, 255, 126, 0, 588, 589, 3, 249, 123, 0, 589, 74, 1, 0, 0, 0, 590, 591, 3, 231, 114, 0, 591, 592, 3, 221, 109, 0, 592, 76, 1, 0, 0, 0, 593, 594, 3, 231, 114, 0, 594, 595, 3, 225, 111, 0, 595, 78, 1, 0, 0, 0, 596, 597, 3, 231, 114, 0, 597, 598, 3, 237, 117, 0, 598, 599, 3, 231, 114, 0, 599, 600, 3, 235, 116, 0, 600, 601, 3, 223, 110, 0, 601, 80, 1, 0, 0, 0, 602, 603, 3, 231, 114, 0, 603, 604, 3, 241, 119, 0, 604, 82, 1, 0, 0, 0, 605, 606, 3, 231, 114, 0, 606, 607, 3, 241, 119, 0, 607, 608, 3, 225, 111, 0, 608, 619, 1, 0, 0, 0, 609, 610, 3, 231, 114, 0, 610, 611, 3, 241, 119, 0, 611, 612, 3, 225, 111, 0, 612, 613, 3, 231, 114, 0, 613, 614, 3, 241, 119, 0, 614, 615, 3, 231, 114, 0, 615, 616, 3, 253, 125, 0, 616, 617, 3, 263, 130, 0, 617, 619, 1, 0, 0, 0, 618, 605, 1, 0, 0, 0, 618, 609, 1, 0, 0, 0, 619, 84, 1, 0, 0, 0, 620, 621, 3, 231, 114, 0, 621, 622, 3, 241, 119, 0, 622, 623, 3, 241, 119, 0, 623, 624, 3, 223, 110, 0, 624, 625, 3, 249, 123, 0, 625, 86, 1, 0, 0, 0, 626, 627, 3, 231, 114, 0, 627, 628, 3, 241, 119, 0, 628, 629, 3, 253, 125, 0, 629, 630, 3, 223, 110, 0, 630, 631, 3, 249, 123, 0, 631, 632, 3, 257, 127, 0, 632, 633, 3, 215, 106, 0, 633, 634, 3, 237, 117, 0, 634, 88, 1, 0, 0, 0, 635, 636, 3, 231, 114, 0, 636, 637, 3, 251, 124, 0, 637, 90, 1, 0, 0, 0, 638, 639, 3, 233, 115, 0, 639, 640, 3, 243, 120, 0, 640, 641, 3, 231, 114, 0, 641, 642, 3, 241, 119, 0, 642, 92, 1, 0, 0, 0, 643, 644, 3, 235, 116, 0, 644, 645, 3, 223, 110, 0, 645, 646, 3, 263, 130, 0, 646, 94, 1, 0, 0, 0, 647, 648, 3, 237, 117, 0, 648, 649, 3, 215, 106, 0, 649, 650, 3, 251, 124, 0, 650, 651, 3, 253, 125, 0, 651, 96, 1, 0, 0, 0, 652, 653, 3, 237, 117, 0, 653, 654, 3, 223, 110, 0, 654, 655, 3, 215, 106, 0, 655, 656, 3, 221, 109, 0, 656, 657, 3, 231, 114, 0, 657, 658, 3, 241, 119, 0, 658, 659, 3, 227, 112, 0, 659, 98, 1, 0, 0, 0, 660, 661, 3, 237, 117, 0, 661, 662, 3, 223, 110, 0, 662, 663, 3, 225, 111, 0, 663, 664, 3, 253, 125, 0, 664, 100, 1, 0, 0, 0, 665, 666, 3, 237, 117, 0, 666, 667, 3, 223, 110, 0, 667, 668, 3, 253, 125, 0, 668, 102, 1, 0, 0, 0, 669, 670, 3, 237, 117, 0, 670, 671, 3, 231, 114, 0, 671, 672, 3, 235, 116, 0, 672, 673, 3, 223, 110, 0, 673, 104, 1, 0, 0, 0, 674, 675, 3, 237, 117, 0, 675, 676, 3, 231, 114, 0, 676, 677, 3, 239, 118, 0, 677, 678, 3, 231, 114, 0, 678, 679, 3, 253, 125, 0, 679, 106, 1, 0, 0, 0, 680, 681, 3, 239, 118, 0, 681, 682, 3, 231, 114, 0, 682, 683, 3, 241, 119, 0, 683, 684, 3, 255, 126, 0, 684, 685, 3, 253, 125, 0, 685, 686, 3, 223, 110, 0, 686, 108, 1, 0, 0, 0, 687, 688, 3, 239, 118, 0, 688, 689, 3, 243, 120, 0, 689, 690, 3, 241, 119, 0, 690, 691, 3, 253, 125, 0, 691, 692, 3, 229, 113, 0, 692, 110, 1, 0, 0, 0, 693, 694, 3, 241, 119, 0, 694, 695, 3, 215, 106, 0, 695, 696, 3, 241, 119, 0, 696, 112, 1, 0, 0, 0, 697, 698, 3, 241, 119, 0, 698, 699, 3, 243, 120, 0, 699, 700, 3, 253, 125, 0, 700, 114, 1, 0, 0, 0, 701, 702, 3, 241, 119, 0, 702, 703, 3, 255, 126, 0, 703, 704, 3, 237, 117, 0, 704, 705, 3, 237, 117, 0, 705, 116, 1, 0, 0, 0, 706, 707, 3, 241, 119, 0, 707, 708, 3, 255, 126, 0, 708, 709, 3, 237, 117, 0, 709, 710, 3, 237, 117, 0, 710, 711, 3, 251, 124, 0, 711, 118, 1, 0, 0, 0, 712, 713, 3, 243, 120, 0, 713, 714, 3, 225, 111, 0, 714, 715, 3, 225, 111, 0, 715, 716, 3, 251, 124, 0, 716, 717, 3, 223, 110, 0, 717, 718, 3, 253, 125, 0, 718, 120, 1, 0, 0, 0, 719, 720, 3, 243, 120, 0, 720, 721, 3, 241, 119, 0, 721, 122, 1, 0, 0, 0, 722, 723, 3, 243, 120, 0, 723, 724, 3, 249, 123, 0, 724, 124, 1, 0, 0, 0, 725, 726, 3, 243, 120, 0, 726, 727, 3, 249, 123, 0, 727, 728, 3, 221, 109, 0, 728, 729, 3, 223, 110, 0, 729, 730, 3, 249, 123, 0, 730, 126, 1, 0, 0, 0, 731, 732, 3, 243, 120, 0, 732, 733, 3, 255, 126, 0, 733, 734, 3, 253, 125, 0, 734, 735, 3, 223, 110, 0, 735, 736, 3, 249, 123, 0, 736, 128, 1, 0, 0, 0, 737, 738, 3, 243, 120, 0, 738, 739, 3, 257, 127, 0, 739, 740, 3, 223, 110, 0, 740, 741, 3, 249, 123, 0, 741, 130, 1, 0, 0, 0, 742, 743, 3, 245, 121, 0, 743, 744, 3, 215, 106, 0, 744, 745, 3, 249, 123, 0, 745, 746, 3, 253, 125, 0, 746, 747, 3, 231, 114, 0, 747, 748, 3, 253, 125, 0, 748, 749, 3, 231, 114, 0, 749, 750, 3, 243, 120, 0, 750, 751, 3, 241, 119, 0, 751, 132, 1, 0, 0, 0, 752, 753, 3, 245, 121, 0, 753, 754, 3, 249, 123, 0, 754, 755, 3, 223, 110, 0, 755, 756, 3, 219, 108, 0, 756, 757, 3, 223, 110, 0, 757, 758, 3, 221, 109, 0, 758, 759, 3, 231, 114, 0, 759, 760, 3, 241, 119, 0, 760, 761, 3, 227, 112, 0, 761, 134, 1, 0, 0, 0, 762, 763, 3, 245, 121, 0, 763, 764, 3, 249, 123, 0, 764, 765, 3, 223, 110, 0, 765, 766, 3, 259, 128, 0, 766, 767, 3, 229, 113, 0, 767, 768, 3, 223, 110, 0, 768, 769, 3, 249, 123, 0, 769, 770, 3, 223, 110, 0, 770, 136, 1, 0, 0, 0, 771, 772, 3, 247, 122, 0, 772, 773, 3, 255, 126, 0, 773, 774, 3, 215, 106, 0, 774, 775, 3, 249, 123, 0, 775, 776, 3, 253, 125, 0, 776, 777, 3, 223, 110, 0, 777, 778, 3, 249, 123, 0, 778, 138, 1, 0, 0, 0, 779, 780, 3, 249, 123, 0, 780, 781, 3, 215, 106, 0, 781, 782, 3, 241, 119, 0, 782, 783, 3, 227, 112, 0, 783, 784, 3, 223, 110, 0, 784, 140, 1, 0, 0, 0, 785, 786, 3, 249, 123, 0, 786, 787, 3, 223, 110, 0, 787, 788, 3, 253, 125, 0, 788, 789, 3, 255, 126, 0, 789, 790, 3, 249, 123, 0, 790, 791, 3, 241, 119, 0, 791, 142, 1, 0, 0, 0, 792, 793, 3, 249, 123, 0, 793, 794, 3, 231, 114, 0, 794, 795, 3, 227, 112, 0, 795, 796, 3, 229, 113, 0, 796, 797, 3, 253, 125, 0, 797, 144, 1, 0, 0, 0, 798, 799, 3, 249, 123, 0, 799, 800, 3, 243, 120, 0, 800, 801, 3, 237, 117, 0, 801, 802, 3, 237, 117, 0, 802, 803, 3, 255, 126, 0, 803, 804, 3, 245, 121, 0, 804, 146, 1, 0, 0, 0, 805, 806, 3, 249, 123, 0, 806, 807, 3, 243, 120, 0, 807, 808, 3, 259, 128, 0, 808, 148, 1, 0, 0, 0, 809, 810, 3, 249, 123, 0, 810, 811, 3, 243, 120, 0, 811, 812, 3, 259, 128, 0, 812, 813, 3, 251, 124, 0, 813, 150, 1, 0, 0, 0, 814, 815, 3, 251, 124, 0, 815, 816, 3, 215, 106, 0, 816, 817, 3, 239, 118, 0, 817, 818, 3, 245, 121, 0, 818, 819, 3, 237, 117, 0, 819, 820, 3, 223, 110, 0, 820, 152, 1, 0, 0, 0, 821, 822, 3, 251, 124, 0, 822, 823, 3, 223, 110, 0, 823, 824, 3, 219, 108, 0, 824, 825, 3, 243, 120, 0, 825, 826, 3, 241, 119, 0, 826, 827, 3, 221, 109, 0, 827, 154, 1, 0, 0, 0, 828, 829, 3, 251, 124, 0, 829, 830, 3, 223, 110, 0, 830, 831, 3, 237, 117, 0, 831, 832, 3, 223, 110, 0, 832, 833, 3, 219, 108, 0, 833, 834, 3, 253, 125, 0, 834, 156, 1, 0, 0, 0, 835, 836, 3, 251, 124, 0, 836, 837, 3, 223, 110, 0, 837, 838, 3, 239, 118, 0, 838, 839, 3, 231, 114, 0, 839, 158, 1, 0, 0, 0, 840, 841, 3, 251, 124, 0, 841, 842, 3, 223, 110, 0, 842, 843, 3, 253, 125, 0, 843, 844, 3, 253, 125, 0, 844, 845, 3, 231, 114, 0, 845, 846, 3, 241, 119, 0, 846, 847, 3, 227, 112, 0, 847, 848, 3, 251, 124, 0, 848, 160, 1, 0, 0, 0, 849, 850, 3, 251, 124, 0, 850, 851, 3, 255, 126, 0, 851, 852, 3, 217, 107, 0, 852, 853, 3, 251, 124, 0, 853, 854, 3, 253, 125, 0, 854, 855, 3, 249, 123, 0, 855, 856, 3, 231, 114, 0, 856, 857, 3, 241, 119, 0, 857, 858, 3, 227, 112, 0, 858, 162, 1, 0, 0, 0, 859, 860, 3, 253, 125, 0, 860, 861, 3, 229, 113, 0, 861, 862, 3, 223, 110, 0, 862, 863, 3, 241, 119, 0, 863, 164, 1, 0, 0, 0, 864, 865, 3, 253, 125, 0, 865, 866, 3, 231, 114, 0, 866, 867, 3, 223, 110, 0, 867, 868, 3, 251, 124, 0, 868, 166, 1, 0, 0, 0, 869, 870, 3, 253, 125, 0, 870, 871, 3, 231, 114, 0, 871, 872, 3, 239, 118, 0, 872, 873, 3, 223, 110, 0, 873, 874, 3, 251, 124, 0, 874, 875, 3, 253, 125, 0, 875, 876, 3, 215, 106, 0, 876, 877, 3, 239, 118, 0, 877, 878, 3, 245, 121, 0, 878, 168, 1, 0, 0, 0, 879, 880, 3, 253, 125, 0, 880, 881, 3, 243, 120, 0, 881, 170, 1, 0, 0, 0, 882, 883, 3, 253, 125, 0, 883, 884, 3, 243, 120, 0, 884, 885, 3, 245, 121, 0, 885, 172, 1, 0, 0, 0, 886, 887, 3, 253, 125, 0, 887, 888, 3, 243, 120, 0, 888, 889, 3, 253, 125, 0, 889, 890, 3, 215, 106, 0, 890, 891, 3, 237, 117, 0, 891, 892, 3, 251, 124, 0, 892, 174, 1, 0, 0, 0, 893, 894, 3, 253, 125, 0, 894, 895, 3, 249, 123, 0, 895, 896, 3, 215, 106, 0, 896, 897, 3, 231, 114, 0, 897, 898, 3, 237, 117, 0, 898, 899, 3, 231, 114, 0, 899, 900, 3, 241, 119, 0, 900, 901, 3, 227, 112, 0, 901, 176, 1, 0, 0, 0, 902, 903, 3, 253, 125, 0, 903, 904, 3, 249, 123, 0, 904, 905, 3, 231, 114, 0, 905, 906, 3, 239, 118, 0, 906, 178, 1, 0, 0, 0, 907, 908, 3, 253, 125, 0, 908, 909, 3, 249, 123, 0, 909, 910, 3, 255, 126, 0, 910, 911, 3, 241, 119, 0, 911, 912, 3, 219, 108, 0, 912, 913, 3, 215, 106, 0, 913, 914, 3, 253, 125, 0, 914, 915, 3, 223, 110, 0, 915, 180, 1, 0, 0, 0, 916, 917, 3, 255, 126, 0, 917, 918, 3, 241, 119, 0, 918, 919, 3, 217, 107, 0, 919, 920, 3, 243, 120, 0, 920, 921, 3, 255, 126, 0, 921, 922, 3, 241, 119, 0, 922, 923, 3, 221, 109, 0, 923, 924, 3, 223, 110, 0, 924, 925, 3, 221, 109, 0, 925, 182, 1, 0, 0, 0, 926, 927, 3, 255, 126, 0, 927, 928, 3, 241, 119, 0, 928, 929, 3, 231, 114, 0, 929, 930, 3, 243, 120, 0, 930, 931, 3, 241, 119, 0, 931, 184, 1, 0, 0, 0, 932, 933, 3, 255, 126, 0, 933, 934, 3, 251, 124, 0, 934, 935, 3, 231, 114, 0, 935, 936, 3, 241, 119, 0, 936, 937, 3, 227, 112, 0, 937, 186, 1, 0, 0, 0, 938, 939, 3, 259, 128, 0, 939, 940, 3, 223, 110, 0, 940, 941, 3, 223, 110, 0, 941, 942, 3, 235, 116, 0, 942, 188, 1, 0, 0, 0, 943, 944, 3, 259, 128, 0, 944, 945, 3, 229, 113, 0, 945, 946, 3, 223, 110, 0, 946, 947, 3, 241, 119, 0, 947, 190, 1, 0, 0, 0, 948, 949, 3, 259, 128, 0, 949, 950, 3, 229, 113, 0, 950, 951, 3, 223, 110, 0, 951, 952, 3, 249, 123, 0, 952, 953, 3, 223, 110, 0, 953, 192, 1, 0, 0, 0, 954, 955, 3, 259, 128, 0, 955, 956, 3, 229, 113, 0, 956, 957, 3, 231, 114, 0, 957, 958, 3, 237, 117, 0, 958, 959, 3, 223, 110, 0, 959, 194, 1, 0, 0, 0, 960, 961, 3, 259, 128, 0, 961, 962, 3, 231, 114, 0, 962, 963, 3, 241, 119, 0, 963, 964, 3, 221, 109, 0, 964, 965, 3, 243, 120, 0, 965, 966, 3, 259, 128, 0, 966, 196, 1, 0, 0, 0, 967, 968, 3, 259, 128, 0, 968, 969, 3, 231, 114, 0, 969, 970, 3, 253, 125, 0, 970, 971, 3, 229, 113, 0, 971, 198, 1, 0, 0, 0, 972, 973, 3, 263, 130, 0, 973, 974, 3, 223, 110, 0, 974, 975, 3, 215, 106, 0, 975, 976, 3, 249, 123, 0, 976, 983, 1, 0, 0, 0, 977, 978, 3, 263, 130, 0, 978, 979, 3, 263, 130, 0, 979, 980, 3, 263, 130, 0, 980, 981, 3, 263, 130, 0, 981, 983, 1, 0, 0, 0, 982, 972, 1, 0, 0, 0, 982, 977, 1, 0, 0, 0, 983, 200, 1, 0, 0, 0, 984, 985, 3, 281, 139, 0, 985, 986, 3, 217, 107, 0, 986, 1012, 1, 0, 0, 0, 987, 988, 3, 281, 139, 0, 988, 989, 3, 225, 111, 0, 989, 1012, 1, 0, 0, 0, 990, 991, 3, 281, 139, 0, 991, 992, 3, 249, 123, 0, 992, 1012, 1, 0, 0, 0, 993, 994, 3, 281, 139, 0, 994, 995, 3, 241, 119, 0, 995, 1012, 1, 0, 0, 0, 996, 997, 3, 281, 139, 0, 997, 998, 3, 253, 125, 0, 998, 1012, 1, 0, 0, 0, 999, 1000, 3, 281, 139, 0, 1000, 1001, 5, 48, 0, 0, 1001, 1012, 1, 0, 0, 0, 1002, 1003, 3, 281, 139, 0, 1003, 1004, 3, 215, 106, 0, 1004, 1012, 1, 0, 0, 0, 1005, 1006, 3, 281, 139, 0, 1006, 1007, 3, 257, 127, 0, 1007, 1012, 1, 0, 0, 0, 1008, 1009, 3, 281, 139, 0, 1009, 1010, 3, 281, 139, 0, 1010, 1012, 1, 0, 0, 0, 1011, 984, 1, 0, 0, 0, 1011, 987, 1, 0, 0, 0, 1011, 990, 1, 0, 0, 0, 1011, 993, 1, 0, 0, 0, 1011, 996, 1, 0, 0, 0, 1011, 999, 1, 0, 0, 0, 1011, 1002, 1, 0, 0, 0, 1011, 1005, 1, 0, 0, 0, 1011, 1008, 1, 0, 0, 0, 1012, 202, 1, 0, 0, 0, 1013, 1017, 3, 267, 132, 0, 1014, 1017, 3, 357, 177, 0, 1015, 1017, 3, 291, 144, 0, 1016, 1013, 1, 0, 0, 0, 1016, 1014, 1, 0, 0, 0, 1016, 1015, 1, 0, 0, 0, 1017, 1024, 1, 0, 0, 0, 1018, 1023, 3, 267, 132, 0, 1019, 1023, 3, 357, 177, 0, 1020, 1023, 3, 271, 134, 0, 1021, 1023, 3, 291, 144, 0, 1022, 1018, 1, 0, 0, 0, 1022, 1019, 1, 0, 0, 0, 1022, 1020, 1, 0, 0, 0, 1022, 1021, 1, 0, 0, 0, 1023, 1026, 1, 0, 0, 0, 1024, 1022, 1, 0, 0, 0, 1024, 1025, 1, 0, 0, 0, 1025, 1060, 1, 0, 0, 0, 1026, 1024, 1, 0, 0, 0, 1027, 1038, 3, 279, 138, 0, 1028, 1037, 8, 0, 0, 0, 1029, 1037, 3, 201, 99, 0, 1030, 1031, 3, 281, 139, 0, 1031, 1032, 3, 341, 169, 0, 1032, 1037, 1, 0, 0, 0, 1033, 1034, 3, 279, 138, 0, 1034, 1035, 3, 279, 138, 0, 1035, 1037, 1, 0, 0, 0, 1036, 1028, 1, 0, 0, 0, 1036, 1029, 1, 0, 0, 0, 1036, 1030, 1, 0, 0, 0, 1036, 1033, 1, 0, 0, 0, 1037, 1040, 1, 0, 0, 0, 1038, 1036, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1041, 1, 0, 0, 0, 1040, 1038, 1, 0, 0, 0, 1041, 1042, 3, 279, 138, 0, 1042, 1060, 1, 0, 0, 0, 1043, 1054, 3, 335, 166, 0, 1044, 1053, 8, 1, 0, 0, 1045, 1053, 3, 201, 99, 0, 1046, 1047, 3, 281, 139, 0, 1047, 1048, 3, 335, 166, 0, 1048, 1053, 1, 0, 0, 0, 1049, 1050, 3, 335, 166, 0, 1050, 1051, 3, 335, 166, 0, 1051, 1053, 1, 0, 0, 0, 1052, 1044, 1, 0, 0, 0, 1052, 1045, 1, 0, 0, 0, 1052, 1046, 1, 0, 0, 0, 1052, 1049, 1, 0, 0, 0, 1053, 1056, 1, 0, 0, 0, 1054, 1052, 1, 0, 0, 0, 1054, 1055, 1, 0, 0, 0, 1055, 1057, 1, 0, 0, 0, 1056, 1054, 1, 0, 0, 0, 1057, 1058, 3, 335, 166, 0, 1058, 1060, 1, 0, 0, 0, 1059, 1016, 1, 0, 0, 0, 1059, 1027, 1, 0, 0, 0, 1059, 1043, 1, 0, 0, 0, 1060, 204, 1, 0, 0, 0, 1061, 1062, 3, 211, 104, 0, 1062, 1066, 3, 293, 145, 0, 1063, 1065, 3, 273, 135, 0, 1064, 1063, 1, 0, 0, 0, 1065, 1068, 1, 0, 0, 0, 1066, 1064, 1, 0, 0, 0, 1066, 1067, 1, 0, 0, 0, 1067, 1071, 1, 0, 0, 0, 1068, 1066, 1, 0, 0, 0, 1069, 1072, 3, 245, 121, 0, 1070, 1072, 3, 223, 110, 0, 1071, 1069, 1, 0, 0, 0, 1071, 1070, 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1076, 3, 331, 164, 0, 1074, 1076, 3, 289, 143, 0, 1075, 1073, 1, 0, 0, 0, 1075, 1074, 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1078, 1, 0, 0, 0, 1077, 1079, 3, 271, 134, 0, 1078, 1077, 1, 0, 0, 0, 1079, 1080, 1, 0, 0, 0, 1080, 1078, 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1138, 1, 0, 0, 0, 1082, 1085, 3, 211, 104, 0, 1083, 1086, 3, 245, 121, 0, 1084, 1086, 3, 223, 110, 0, 1085, 1083, 1, 0, 0, 0, 1085, 1084, 1, 0, 0, 0, 1086, 1089, 1, 0, 0, 0, 1087, 1090, 3, 331, 164, 0, 1088, 1090, 3, 289, 143, 0, 1089, 1087, 1, 0, 0, 0, 1089, 1088, 1, 0, 0, 0, 1089, 1090, 1, 0, 0, 0, 1090, 1092, 1, 0, 0, 0, 1091, 1093, 3, 271, 134, 0, 1092, 1091, 1, 0, 0, 0, 1093, 1094, 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1138, 1, 0, 0, 0, 1096, 1097, 3, 209, 103, 0, 1097, 1101, 3, 293, 145, 0, 1098, 1100, 3, 271, 134, 0, 1099, 1098, 1, 0, 0, 0, 1100, 1103, 1, 0, 0, 0, 1101, 1099, 1, 0, 0, 0, 1101, 1102, 1, 0, 0, 0, 1102, 1104, 1, 0, 0, 0, 1103, 1101, 1, 0, 0, 0, 1104, 1107, 3, 223, 110, 0, 1105, 1108, 3, 331, 164, 0, 1106, 1108, 3, 289, 143, 0, 1107, 1105, 1, 0, 0, 0, 1107, 1106, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1110, 1, 0, 0, 0, 1109, 1111, 3, 271, 134, 0, 1110, 1109, 1, 0, 0, 0, 1111, 1112, 1, 0, 0, 0, 1112, 1110, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1138, 1, 0, 0, 0, 1114, 1115, 3, 293, 145, 0, 1115, 1116, 3, 209, 103, 0, 1116, 1119, 3, 223, 110, 0, 1117, 1120, 3, 331, 164, 0, 1118, 1120, 3, 289, 143, 0, 1119, 1117, 1, 0, 0, 0, 1119, 1118, 1, 0, 0, 0, 1119, 1120, 1, 0, 0, 0, 1120, 1122, 1, 0, 0, 0, 1121, 1123, 3, 271, 134, 0, 1122, 1121, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 1122, 1, 0, 0, 0, 1124, 1125, 1, 0, 0, 0, 1125, 1138, 1, 0, 0, 0, 1126, 1127, 3, 209, 103, 0, 1127, 1130, 3, 223, 110, 0, 1128, 1131, 3, 331, 164, 0, 1129, 1131, 3, 289, 143, 0, 1130, 1128, 1, 0, 0, 0, 1130, 1129, 1, 0, 0, 0, 1130, 1131, 1, 0, 0, 0, 1131, 1133, 1, 0, 0, 0, 1132, 1134, 3, 271, 134, 0, 1133, 1132, 1, 0, 0, 0, 1134, 1135, 1, 0, 0, 0, 1135, 1133, 1, 0, 0, 0, 1135, 1136, 1, 0, 0, 0, 1136, 1138, 1, 0, 0, 0, 1137, 1061, 1, 0, 0, 0, 1137, 1082, 1, 0, 0, 0, 1137, 1096, 1, 0, 0, 0, 1137, 1114, 1, 0, 0, 0, 1137, 1126, 1, 0, 0, 0, 1138, 206, 1, 0, 0, 0, 1139, 1141, 5, 48, 0, 0, 1140, 1142, 3, 269, 133, 0, 1141, 1140, 1, 0, 0, 0, 1142, 1143, 1, 0, 0, 0, 1143, 1141, 1, 0, 0, 0, 1143, 1144, 1, 0, 0, 0, 1144, 208, 1, 0, 0, 0, 1145, 1147, 3, 271, 134, 0, 1146, 1145, 1, 0, 0, 0, 1147, 1148, 1, 0, 0, 0, 1148, 1146, 1, 0, 0, 0, 1148, 1149, 1, 0, 0, 0, 1149, 210, 1, 0, 0, 0, 1150, 1151, 5, 48, 0, 0, 1151, 1153, 3, 261, 129, 0, 1152, 1154, 3, 273, 135, 0, 1153, 1152, 1, 0, 0, 0, 1154, 1155, 1, 0, 0, 0, 1155, 1153, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 212, 1, 0, 0, 0, 1157, 1168, 3, 341, 169, 0, 1158, 1167, 8, 2, 0, 0, 1159, 1167, 3, 201, 99, 0, 1160, 1161, 3, 281, 139, 0, 1161, 1162, 3, 341, 169, 0, 1162, 1167, 1, 0, 0, 0, 1163, 1164, 3, 341, 169, 0, 1164, 1165, 3, 341, 169, 0, 1165, 1167, 1, 0, 0, 0, 1166, 1158, 1, 0, 0, 0, 1166, 1159, 1, 0, 0, 0, 1166, 1160, 1, 0, 0, 0, 1166, 1163, 1, 0, 0, 0, 1167, 1170, 1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, 1168, 1169, 1, 0, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1168, 1, 0, 0, 0, 1171, 1172, 3, 341, 169, 0, 1172, 214, 1, 0, 0, 0, 1173, 1174, 7, 3, 0, 0, 1174, 216, 1, 0, 0, 0, 1175, 1176, 7, 4, 0, 0, 1176, 218, 1, 0, 0, 0, 1177, 1178, 7, 5, 0, 0, 1178, 220, 1, 0, 0, 0, 1179, 1180, 7, 6, 0, 0, 1180, 222, 1, 0, 0, 0, 1181, 1182, 7, 7, 0, 0, 1182, 224, 1, 0, 0, 0, 1183, 1184, 7, 8, 0, 0, 1184, 226, 1, 0, 0, 0, 1185, 1186, 7, 9, 0, 0, 1186, 228, 1, 0, 0, 0, 1187, 1188, 7, 10, 0, 0, 1188, 230, 1, 0, 0, 0, 1189, 1190, 7, 11, 0, 0, 1190, 232, 1, 0, 0, 0, 1191, 1192, 7, 12, 0, 0, 1192, 234, 1, 0, 0, 0, 1193, 1194, 7, 13, 0, 0, 1194, 236, 1, 0, 0, 0, 1195, 1196, 7, 14, 0, 0, 1196, 238, 1, 0, 0, 0, 1197, 1198, 7, 15, 0, 0, 1198, 240, 1, 0, 0, 0, 1199, 1200, 7, 16, 0, 0, 1200, 242, 1, 0, 0, 0, 1201, 1202, 7, 17, 0, 0, 1202, 244, 1, 0, 0, 0, 1203, 1204, 7, 18, 0, 0, 1204, 246, 1, 0, 0, 0, 1205, 1206, 7, 19, 0, 0, 1206, 248, 1, 0, 0, 0, 1207, 1208, 7, 20, 0, 0, 1208, 250, 1, 0, 0, 0, 1209, 1210, 7, 21, 0, 0, 1210, 252, 1, 0, 0, 0, 1211, 1212, 7, 22, 0, 0, 1212, 254, 1, 0, 0, 0, 1213, 1214, 7, 23, 0, 0, 1214, 256, 1, 0, 0, 0, 1215, 1216, 7, 24, 0, 0, 1216, 258, 1, 0, 0, 0, 1217, 1218, 7, 25, 0, 0, 1218, 260, 1, 0, 0, 0, 1219, 1220, 7, 26, 0, 0, 1220, 262, 1, 0, 0, 0, 1221, 1222, 7, 27, 0, 0, 1222, 264, 1, 0, 0, 0, 1223, 1224, 7, 28, 0, 0, 1224, 266, 1, 0, 0, 0, 1225, 1226, 7, 29, 0, 0, 1226, 268, 1, 0, 0, 0, 1227, 1228, 7, 30, 0, 0, 1228, 270, 1, 0, 0, 0, 1229, 1230, 7, 31, 0, 0, 1230, 272, 1, 0, 0, 0, 1231, 1232, 7, 32, 0, 0, 1232, 274, 1, 0, 0, 0, 1233, 1234, 5, 45, 0, 0, 1234, 1235, 5, 62, 0, 0, 1235, 276, 1, 0, 0, 0, 1236, 1237, 5, 42, 0, 0, 1237, 278, 1, 0, 0, 0, 1238, 1239, 5, 96, 0, 0, 1239, 280, 1, 0, 0, 0, 1240, 1241, 5, 92, 0, 0, 1241, 282, 1, 0, 0, 0, 1242, 1243, 5, 58, 0, 0, 1243, 284, 1, 0, 0, 0, 1244, 1245, 5, 44, 0, 0, 1245, 286, 1, 0, 0, 0, 1246, 1247, 5, 124, 0, 0, 1247, 1248, 5, 124, 0, 0, 1248, 288, 1, 0, 0, 0, 1249, 1250, 5, 45, 0, 0, 1250, 290, 1, 0, 0, 0, 1251, 1252, 5, 36, 0, 0, 1252, 292, 1, 0, 0, 0, 1253, 1254, 5, 46, 0, 0, 1254, 294, 1, 0, 0, 0, 1255, 1256, 5, 61, 0, 0, 1256, 1257, 5, 61, 0, 0, 1257, 296, 1, 0, 0, 0, 1258, 1259, 5, 61, 0, 0, 1259, 298, 1, 0, 0, 0, 1260, 1261, 5, 62, 0, 0, 1261, 1262, 5, 61, 0, 0, 1262, 300, 1, 0, 0, 0, 1263, 1264, 5, 62, 0, 0, 1264, 302, 1, 0, 0, 0, 1265, 1266, 5, 35, 0, 0, 1266, 304, 1, 0, 0, 0, 1267, 1268, 5, 126, 0, 0, 1268, 1269, 5, 42, 0, 0, 1269, 306, 1, 0, 0, 0, 1270, 1271, 5, 61, 0, 0, 1271, 1272, 5, 126, 0, 0, 1272, 1273, 5, 42, 0, 0, 1273, 308, 1, 0, 0, 0, 1274, 1275, 5, 123, 0, 0, 1275, 1276, 1, 0, 0, 0, 1276, 1277, 6, 153, 0, 0, 1277, 310, 1, 0, 0, 0, 1278, 1279, 5, 91, 0, 0, 1279, 312, 1, 0, 0, 0, 1280, 1281, 5, 40, 0, 0, 1281, 314, 1, 0, 0, 0, 1282, 1283, 5, 60, 0, 0, 1283, 1284, 5, 61, 0, 0, 1284, 316, 1, 0, 0, 0, 1285, 1286, 5, 60, 0, 0, 1286, 318, 1, 0, 0, 0, 1287, 1288, 5, 33, 0, 0, 1288, 1292, 5, 61, 0, 0, 1289, 1290, 5, 60, 0, 0, 1290, 1292, 5, 62, 0, 0, 1291, 1287, 1, 0, 0, 0, 1291, 1289, 1, 0, 0, 0, 1292, 320, 1, 0, 0, 0, 1293, 1294, 5, 33, 0, 0, 1294, 1295, 5, 126, 0, 0, 1295, 1296, 5, 42, 0, 0, 1296, 322, 1, 0, 0, 0, 1297, 1298, 5, 33, 0, 0, 1298, 1299, 5, 126, 0, 0, 1299, 324, 1, 0, 0, 0, 1300, 1301, 5, 63, 0, 0, 1301, 1302, 5, 46, 0, 0, 1302, 326, 1, 0, 0, 0, 1303, 1304, 5, 63, 0, 0, 1304, 1305, 5, 63, 0, 0, 1305, 328, 1, 0, 0, 0, 1306, 1307, 5, 37, 0, 0, 1307, 330, 1, 0, 0, 0, 1308, 1309, 5, 43, 0, 0, 1309, 332, 1, 0, 0, 0, 1310, 1311, 5, 63, 0, 0, 1311, 334, 1, 0, 0, 0, 1312, 1313, 5, 34, 0, 0, 1313, 336, 1, 0, 0, 0, 1314, 1315, 5, 102, 0, 0, 1315, 1316, 5, 39, 0, 0, 1316, 1317, 1, 0, 0, 0, 1317, 1318, 6, 167, 1, 0, 1318, 338, 1, 0, 0, 0, 1319, 1320, 5, 70, 0, 0, 1320, 1321, 5, 39, 0, 0, 1321, 1322, 1, 0, 0, 0, 1322, 1323, 6, 168, 2, 0, 1323, 340, 1, 0, 0, 0, 1324, 1325, 5, 39, 0, 0, 1325, 342, 1, 0, 0, 0, 1326, 1327, 5, 126, 0, 0, 1327, 344, 1, 0, 0, 0, 1328, 1329, 5, 61, 0, 0, 1329, 1330, 5, 126, 0, 0, 1330, 346, 1, 0, 0, 0, 1331, 1332, 5, 125, 0, 0, 1332, 1333, 1, 0, 0, 0, 1333, 1334, 6, 172, 3, 0, 1334, 348, 1, 0, 0, 0, 1335, 1336, 5, 93, 0, 0, 1336, 350, 1, 0, 0, 0, 1337, 1338, 5, 41, 0, 0, 1338, 352, 1, 0, 0, 0, 1339, 1340, 5, 59, 0, 0, 1340, 354, 1, 0, 0, 0, 1341, 1342, 5, 47, 0, 0, 1342, 356, 1, 0, 0, 0, 1343, 1344, 5, 95, 0, 0, 1344, 358, 1, 0, 0, 0, 1345, 1346, 5, 47, 0, 0, 1346, 1347, 5, 42, 0, 0, 1347, 1351, 1, 0, 0, 0, 1348, 1350, 9, 0, 0, 0, 1349, 1348, 1, 0, 0, 0, 1350, 1353, 1, 0, 0, 0, 1351, 1352, 1, 0, 0, 0, 1351, 1349, 1, 0, 0, 0, 1352, 1354, 1, 0, 0, 0, 1353, 1351, 1, 0, 0, 0, 1354, 1355, 5, 42, 0, 0, 1355, 1356, 5, 47, 0, 0, 1356, 1357, 1, 0, 0, 0, 1357, 1358, 6, 178, 4, 0, 1358, 360, 1, 0, 0, 0, 1359, 1360, 5, 45, 0, 0, 1360, 1364, 5, 45, 0, 0, 1361, 1362, 5, 47, 0, 0, 1362, 1364, 5, 47, 0, 0, 1363, 1359, 1, 0, 0, 0, 1363, 1361, 1, 0, 0, 0, 1364, 1368, 1, 0, 0, 0, 1365, 1367, 8, 33, 0, 0, 1366, 1365, 1, 0, 0, 0, 1367, 1370, 1, 0, 0, 0, 1368, 1366, 1, 0, 0, 0, 1368, 1369, 1, 0, 0, 0, 1369, 1372, 1, 0, 0, 0, 1370, 1368, 1, 0, 0, 0, 1371, 1373, 7, 34, 0, 0, 1372, 1371, 1, 0, 0, 0, 1373, 1374, 1, 0, 0, 0, 1374, 1375, 6, 179, 4, 0, 1375, 362, 1, 0, 0, 0, 1376, 1377, 7, 35, 0, 0, 1377, 1378, 1, 0, 0, 0, 1378, 1379, 6, 180, 5, 0, 1379, 364, 1, 0, 0, 0, 1380, 1392, 8, 36, 0, 0, 1381, 1392, 3, 201, 99, 0, 1382, 1383, 3, 281, 139, 0, 1383, 1384, 3, 341, 169, 0, 1384, 1392, 1, 0, 0, 0, 1385, 1386, 3, 281, 139, 0, 1386, 1387, 3, 309, 153, 0, 1387, 1392, 1, 0, 0, 0, 1388, 1389, 3, 341, 169, 0, 1389, 1390, 3, 341, 169, 0, 1390, 1392, 1, 0, 0, 0, 1391, 1380, 1, 0, 0, 0, 1391, 1381, 1, 0, 0, 0, 1391, 1382, 1, 0, 0, 0, 1391, 1385, 1, 0, 0, 0, 1391, 1388, 1, 0, 0, 0, 1392, 1393, 1, 0, 0, 0, 1393, 1391, 1, 0, 0, 0, 1393, 1394, 1, 0, 0, 0, 1394, 366, 1, 0, 0, 0, 1395, 1396, 3, 309, 153, 0, 1396, 1397, 1, 0, 0, 0, 1397, 1398, 6, 182, 0, 0, 1398, 368, 1, 0, 0, 0, 1399, 1400, 3, 341, 169, 0, 1400, 1401, 1, 0, 0, 0, 1401, 1402, 6, 183, 6, 0, 1402, 1403, 6, 183, 3, 0, 1403, 370, 1, 0, 0, 0, 1404, 1410, 8, 37, 0, 0, 1405, 1410, 3, 201, 99, 0, 1406, 1407, 3, 281, 139, 0, 1407, 1408, 3, 309, 153, 0, 1408, 1410, 1, 0, 0, 0, 1409, 1404, 1, 0, 0, 0, 1409, 1405, 1, 0, 0, 0, 1409, 1406, 1, 0, 0, 0, 1410, 1411, 1, 0, 0, 0, 1411, 1409, 1, 0, 0, 0, 1411, 1412, 1, 0, 0, 0, 1412, 372, 1, 0, 0, 0, 1413, 1414, 3, 309, 153, 0, 1414, 1415, 1, 0, 0, 0, 1415, 1416, 6, 185, 0, 0, 1416, 374, 1, 0, 0, 0, 44, 0, 1, 2, 415, 618, 982, 1011, 1016, 1022, 1024, 1036, 1038, 1052, 1054, 1059, 1066, 1071, 1075, 1080, 1085, 1089, 1094, 1101, 1107, 1112, 1119, 1124, 1130, 1135, 1137, 1143, 1148, 1155, 1166, 1168, 1291, 1351, 1363, 1368, 1372, 1391, 1393, 1409, 1411, 7, 5, 0, 0, 5, 1, 0, 5, 2, 0, 4, 0, 0, 6, 0, 0, 0, 1, 0, 7, 140, 0] \ No newline at end of file +[4, 0, 159, 1449, 6, -1, 6, -1, 6, -1, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 424, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 641, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 3, 102, 1015, 8, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 3, 103, 1044, 8, 103, 1, 104, 1, 104, 1, 104, 3, 104, 1049, 8, 104, 1, 104, 1, 104, 1, 104, 1, 104, 5, 104, 1055, 8, 104, 10, 104, 12, 104, 1058, 9, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 5, 104, 1069, 8, 104, 10, 104, 12, 104, 1072, 9, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 5, 104, 1085, 8, 104, 10, 104, 12, 104, 1088, 9, 104, 1, 104, 1, 104, 3, 104, 1092, 8, 104, 1, 105, 1, 105, 1, 105, 5, 105, 1097, 8, 105, 10, 105, 12, 105, 1100, 9, 105, 1, 105, 1, 105, 3, 105, 1104, 8, 105, 1, 105, 1, 105, 3, 105, 1108, 8, 105, 1, 105, 4, 105, 1111, 8, 105, 11, 105, 12, 105, 1112, 1, 105, 1, 105, 1, 105, 3, 105, 1118, 8, 105, 1, 105, 1, 105, 3, 105, 1122, 8, 105, 1, 105, 4, 105, 1125, 8, 105, 11, 105, 12, 105, 1126, 1, 105, 1, 105, 1, 105, 5, 105, 1132, 8, 105, 10, 105, 12, 105, 1135, 9, 105, 1, 105, 1, 105, 1, 105, 3, 105, 1140, 8, 105, 1, 105, 4, 105, 1143, 8, 105, 11, 105, 12, 105, 1144, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 3, 105, 1152, 8, 105, 1, 105, 4, 105, 1155, 8, 105, 11, 105, 12, 105, 1156, 1, 105, 1, 105, 1, 105, 1, 105, 3, 105, 1163, 8, 105, 1, 105, 4, 105, 1166, 8, 105, 11, 105, 12, 105, 1167, 3, 105, 1170, 8, 105, 1, 106, 1, 106, 4, 106, 1174, 8, 106, 11, 106, 12, 106, 1175, 1, 107, 4, 107, 1179, 8, 107, 11, 107, 12, 107, 1180, 1, 108, 1, 108, 1, 108, 4, 108, 1186, 8, 108, 11, 108, 12, 108, 1187, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 5, 109, 1199, 8, 109, 10, 109, 12, 109, 1202, 9, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 115, 1, 115, 1, 116, 1, 116, 1, 117, 1, 117, 1, 118, 1, 118, 1, 119, 1, 119, 1, 120, 1, 120, 1, 121, 1, 121, 1, 122, 1, 122, 1, 123, 1, 123, 1, 124, 1, 124, 1, 125, 1, 125, 1, 126, 1, 126, 1, 127, 1, 127, 1, 128, 1, 128, 1, 129, 1, 129, 1, 130, 1, 130, 1, 131, 1, 131, 1, 132, 1, 132, 1, 133, 1, 133, 1, 134, 1, 134, 1, 135, 1, 135, 1, 136, 1, 136, 1, 137, 1, 137, 1, 138, 1, 138, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 142, 1, 142, 1, 143, 1, 143, 1, 144, 1, 144, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 148, 1, 148, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 3, 162, 1324, 8, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 168, 1, 168, 1, 169, 1, 169, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 178, 1, 178, 1, 179, 1, 179, 1, 180, 1, 180, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 5, 182, 1382, 8, 182, 10, 182, 12, 182, 1385, 9, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 3, 183, 1396, 8, 183, 1, 183, 5, 183, 1399, 8, 183, 10, 183, 12, 183, 1402, 9, 183, 1, 183, 3, 183, 1405, 8, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 4, 185, 1424, 8, 185, 11, 185, 12, 185, 1425, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 4, 188, 1442, 8, 188, 11, 188, 12, 188, 1443, 1, 189, 1, 189, 1, 189, 1, 189, 1, 1383, 0, 190, 3, 1, 5, 2, 7, 3, 9, 4, 11, 5, 13, 6, 15, 7, 17, 8, 19, 9, 21, 10, 23, 11, 25, 12, 27, 13, 29, 14, 31, 15, 33, 16, 35, 17, 37, 18, 39, 19, 41, 20, 43, 21, 45, 22, 47, 23, 49, 24, 51, 25, 53, 26, 55, 27, 57, 28, 59, 29, 61, 30, 63, 31, 65, 32, 67, 33, 69, 34, 71, 35, 73, 36, 75, 37, 77, 38, 79, 39, 81, 40, 83, 41, 85, 42, 87, 43, 89, 44, 91, 45, 93, 46, 95, 47, 97, 48, 99, 49, 101, 50, 103, 51, 105, 52, 107, 53, 109, 54, 111, 55, 113, 56, 115, 57, 117, 58, 119, 59, 121, 60, 123, 61, 125, 62, 127, 63, 129, 64, 131, 65, 133, 66, 135, 67, 137, 68, 139, 69, 141, 70, 143, 71, 145, 72, 147, 73, 149, 74, 151, 75, 153, 76, 155, 77, 157, 78, 159, 79, 161, 80, 163, 81, 165, 82, 167, 83, 169, 84, 171, 85, 173, 86, 175, 87, 177, 88, 179, 89, 181, 90, 183, 91, 185, 92, 187, 93, 189, 94, 191, 95, 193, 96, 195, 97, 197, 98, 199, 99, 201, 100, 203, 101, 205, 102, 207, 103, 209, 104, 211, 105, 213, 106, 215, 107, 217, 108, 219, 109, 221, 110, 223, 0, 225, 0, 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, 0, 239, 0, 241, 0, 243, 0, 245, 0, 247, 0, 249, 0, 251, 0, 253, 0, 255, 0, 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, 0, 269, 0, 271, 0, 273, 0, 275, 0, 277, 0, 279, 0, 281, 0, 283, 111, 285, 112, 287, 113, 289, 114, 291, 115, 293, 116, 295, 117, 297, 118, 299, 119, 301, 120, 303, 121, 305, 122, 307, 123, 309, 124, 311, 125, 313, 126, 315, 127, 317, 128, 319, 129, 321, 130, 323, 131, 325, 132, 327, 133, 329, 134, 331, 135, 333, 136, 335, 137, 337, 138, 339, 139, 341, 140, 343, 141, 345, 142, 347, 143, 349, 144, 351, 145, 353, 146, 355, 147, 357, 148, 359, 149, 361, 150, 363, 151, 365, 152, 367, 153, 369, 154, 371, 155, 373, 156, 375, 157, 377, 0, 379, 158, 381, 159, 3, 0, 1, 2, 38, 2, 0, 92, 92, 96, 96, 2, 0, 34, 34, 92, 92, 2, 0, 39, 39, 92, 92, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, 2, 0, 65, 90, 97, 122, 1, 0, 48, 55, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 10, 10, 13, 13, 2, 1, 10, 10, 13, 13, 2, 0, 9, 13, 32, 32, 3, 0, 39, 39, 92, 92, 123, 123, 1, 0, 123, 123, 1485, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 1, 373, 1, 0, 0, 0, 1, 375, 1, 0, 0, 0, 1, 377, 1, 0, 0, 0, 2, 379, 1, 0, 0, 0, 2, 381, 1, 0, 0, 0, 3, 383, 1, 0, 0, 0, 5, 387, 1, 0, 0, 0, 7, 391, 1, 0, 0, 0, 9, 396, 1, 0, 0, 0, 11, 400, 1, 0, 0, 0, 13, 406, 1, 0, 0, 0, 15, 423, 1, 0, 0, 0, 17, 425, 1, 0, 0, 0, 19, 430, 1, 0, 0, 0, 21, 438, 1, 0, 0, 0, 23, 443, 1, 0, 0, 0, 25, 446, 1, 0, 0, 0, 27, 451, 1, 0, 0, 0, 29, 456, 1, 0, 0, 0, 31, 462, 1, 0, 0, 0, 33, 469, 1, 0, 0, 0, 35, 477, 1, 0, 0, 0, 37, 483, 1, 0, 0, 0, 39, 488, 1, 0, 0, 0, 41, 496, 1, 0, 0, 0, 43, 501, 1, 0, 0, 0, 45, 505, 1, 0, 0, 0, 47, 510, 1, 0, 0, 0, 49, 521, 1, 0, 0, 0, 51, 530, 1, 0, 0, 0, 53, 535, 1, 0, 0, 0, 55, 539, 1, 0, 0, 0, 57, 547, 1, 0, 0, 0, 59, 553, 1, 0, 0, 0, 61, 561, 1, 0, 0, 0, 63, 567, 1, 0, 0, 0, 65, 570, 1, 0, 0, 0, 67, 580, 1, 0, 0, 0, 69, 584, 1, 0, 0, 0, 71, 589, 1, 0, 0, 0, 73, 594, 1, 0, 0, 0, 75, 600, 1, 0, 0, 0, 77, 607, 1, 0, 0, 0, 79, 612, 1, 0, 0, 0, 81, 615, 1, 0, 0, 0, 83, 618, 1, 0, 0, 0, 85, 624, 1, 0, 0, 0, 87, 640, 1, 0, 0, 0, 89, 642, 1, 0, 0, 0, 91, 648, 1, 0, 0, 0, 93, 657, 1, 0, 0, 0, 95, 660, 1, 0, 0, 0, 97, 665, 1, 0, 0, 0, 99, 669, 1, 0, 0, 0, 101, 674, 1, 0, 0, 0, 103, 682, 1, 0, 0, 0, 105, 687, 1, 0, 0, 0, 107, 691, 1, 0, 0, 0, 109, 696, 1, 0, 0, 0, 111, 702, 1, 0, 0, 0, 113, 709, 1, 0, 0, 0, 115, 715, 1, 0, 0, 0, 117, 719, 1, 0, 0, 0, 119, 723, 1, 0, 0, 0, 121, 728, 1, 0, 0, 0, 123, 734, 1, 0, 0, 0, 125, 741, 1, 0, 0, 0, 127, 744, 1, 0, 0, 0, 129, 747, 1, 0, 0, 0, 131, 753, 1, 0, 0, 0, 133, 759, 1, 0, 0, 0, 135, 764, 1, 0, 0, 0, 137, 774, 1, 0, 0, 0, 139, 784, 1, 0, 0, 0, 141, 793, 1, 0, 0, 0, 143, 801, 1, 0, 0, 0, 145, 807, 1, 0, 0, 0, 147, 814, 1, 0, 0, 0, 149, 820, 1, 0, 0, 0, 151, 827, 1, 0, 0, 0, 153, 831, 1, 0, 0, 0, 155, 836, 1, 0, 0, 0, 157, 843, 1, 0, 0, 0, 159, 850, 1, 0, 0, 0, 161, 857, 1, 0, 0, 0, 163, 862, 1, 0, 0, 0, 165, 871, 1, 0, 0, 0, 167, 881, 1, 0, 0, 0, 169, 886, 1, 0, 0, 0, 171, 892, 1, 0, 0, 0, 173, 897, 1, 0, 0, 0, 175, 907, 1, 0, 0, 0, 177, 910, 1, 0, 0, 0, 179, 914, 1, 0, 0, 0, 181, 921, 1, 0, 0, 0, 183, 930, 1, 0, 0, 0, 185, 935, 1, 0, 0, 0, 187, 944, 1, 0, 0, 0, 189, 948, 1, 0, 0, 0, 191, 958, 1, 0, 0, 0, 193, 964, 1, 0, 0, 0, 195, 970, 1, 0, 0, 0, 197, 975, 1, 0, 0, 0, 199, 980, 1, 0, 0, 0, 201, 986, 1, 0, 0, 0, 203, 992, 1, 0, 0, 0, 205, 999, 1, 0, 0, 0, 207, 1014, 1, 0, 0, 0, 209, 1043, 1, 0, 0, 0, 211, 1091, 1, 0, 0, 0, 213, 1169, 1, 0, 0, 0, 215, 1171, 1, 0, 0, 0, 217, 1178, 1, 0, 0, 0, 219, 1182, 1, 0, 0, 0, 221, 1189, 1, 0, 0, 0, 223, 1205, 1, 0, 0, 0, 225, 1207, 1, 0, 0, 0, 227, 1209, 1, 0, 0, 0, 229, 1211, 1, 0, 0, 0, 231, 1213, 1, 0, 0, 0, 233, 1215, 1, 0, 0, 0, 235, 1217, 1, 0, 0, 0, 237, 1219, 1, 0, 0, 0, 239, 1221, 1, 0, 0, 0, 241, 1223, 1, 0, 0, 0, 243, 1225, 1, 0, 0, 0, 245, 1227, 1, 0, 0, 0, 247, 1229, 1, 0, 0, 0, 249, 1231, 1, 0, 0, 0, 251, 1233, 1, 0, 0, 0, 253, 1235, 1, 0, 0, 0, 255, 1237, 1, 0, 0, 0, 257, 1239, 1, 0, 0, 0, 259, 1241, 1, 0, 0, 0, 261, 1243, 1, 0, 0, 0, 263, 1245, 1, 0, 0, 0, 265, 1247, 1, 0, 0, 0, 267, 1249, 1, 0, 0, 0, 269, 1251, 1, 0, 0, 0, 271, 1253, 1, 0, 0, 0, 273, 1255, 1, 0, 0, 0, 275, 1257, 1, 0, 0, 0, 277, 1259, 1, 0, 0, 0, 279, 1261, 1, 0, 0, 0, 281, 1263, 1, 0, 0, 0, 283, 1265, 1, 0, 0, 0, 285, 1268, 1, 0, 0, 0, 287, 1270, 1, 0, 0, 0, 289, 1272, 1, 0, 0, 0, 291, 1274, 1, 0, 0, 0, 293, 1276, 1, 0, 0, 0, 295, 1278, 1, 0, 0, 0, 297, 1281, 1, 0, 0, 0, 299, 1283, 1, 0, 0, 0, 301, 1285, 1, 0, 0, 0, 303, 1287, 1, 0, 0, 0, 305, 1290, 1, 0, 0, 0, 307, 1292, 1, 0, 0, 0, 309, 1295, 1, 0, 0, 0, 311, 1297, 1, 0, 0, 0, 313, 1299, 1, 0, 0, 0, 315, 1302, 1, 0, 0, 0, 317, 1306, 1, 0, 0, 0, 319, 1310, 1, 0, 0, 0, 321, 1312, 1, 0, 0, 0, 323, 1314, 1, 0, 0, 0, 325, 1317, 1, 0, 0, 0, 327, 1323, 1, 0, 0, 0, 329, 1325, 1, 0, 0, 0, 331, 1329, 1, 0, 0, 0, 333, 1332, 1, 0, 0, 0, 335, 1335, 1, 0, 0, 0, 337, 1338, 1, 0, 0, 0, 339, 1340, 1, 0, 0, 0, 341, 1342, 1, 0, 0, 0, 343, 1344, 1, 0, 0, 0, 345, 1346, 1, 0, 0, 0, 347, 1351, 1, 0, 0, 0, 349, 1356, 1, 0, 0, 0, 351, 1358, 1, 0, 0, 0, 353, 1360, 1, 0, 0, 0, 355, 1363, 1, 0, 0, 0, 357, 1367, 1, 0, 0, 0, 359, 1369, 1, 0, 0, 0, 361, 1371, 1, 0, 0, 0, 363, 1373, 1, 0, 0, 0, 365, 1375, 1, 0, 0, 0, 367, 1377, 1, 0, 0, 0, 369, 1395, 1, 0, 0, 0, 371, 1408, 1, 0, 0, 0, 373, 1423, 1, 0, 0, 0, 375, 1427, 1, 0, 0, 0, 377, 1431, 1, 0, 0, 0, 379, 1441, 1, 0, 0, 0, 381, 1445, 1, 0, 0, 0, 383, 384, 3, 223, 110, 0, 384, 385, 3, 245, 121, 0, 385, 386, 3, 245, 121, 0, 386, 4, 1, 0, 0, 0, 387, 388, 3, 223, 110, 0, 388, 389, 3, 249, 123, 0, 389, 390, 3, 229, 113, 0, 390, 6, 1, 0, 0, 0, 391, 392, 3, 223, 110, 0, 392, 393, 3, 249, 123, 0, 393, 394, 3, 261, 129, 0, 394, 395, 3, 239, 118, 0, 395, 8, 1, 0, 0, 0, 396, 397, 3, 223, 110, 0, 397, 398, 3, 249, 123, 0, 398, 399, 3, 271, 134, 0, 399, 10, 1, 0, 0, 0, 400, 401, 3, 223, 110, 0, 401, 402, 3, 257, 127, 0, 402, 403, 3, 257, 127, 0, 403, 404, 3, 223, 110, 0, 404, 405, 3, 271, 134, 0, 405, 12, 1, 0, 0, 0, 406, 407, 3, 223, 110, 0, 407, 408, 3, 259, 128, 0, 408, 14, 1, 0, 0, 0, 409, 410, 3, 223, 110, 0, 410, 411, 3, 259, 128, 0, 411, 412, 3, 227, 112, 0, 412, 424, 1, 0, 0, 0, 413, 414, 3, 223, 110, 0, 414, 415, 3, 259, 128, 0, 415, 416, 3, 227, 112, 0, 416, 417, 3, 231, 114, 0, 417, 418, 3, 249, 123, 0, 418, 419, 3, 229, 113, 0, 419, 420, 3, 239, 118, 0, 420, 421, 3, 249, 123, 0, 421, 422, 3, 235, 116, 0, 422, 424, 1, 0, 0, 0, 423, 409, 1, 0, 0, 0, 423, 413, 1, 0, 0, 0, 424, 16, 1, 0, 0, 0, 425, 426, 3, 223, 110, 0, 426, 427, 3, 259, 128, 0, 427, 428, 3, 251, 124, 0, 428, 429, 3, 233, 115, 0, 429, 18, 1, 0, 0, 0, 430, 431, 3, 225, 111, 0, 431, 432, 3, 231, 114, 0, 432, 433, 3, 261, 129, 0, 433, 434, 3, 267, 132, 0, 434, 435, 3, 231, 114, 0, 435, 436, 3, 231, 114, 0, 436, 437, 3, 249, 123, 0, 437, 20, 1, 0, 0, 0, 438, 439, 3, 225, 111, 0, 439, 440, 3, 251, 124, 0, 440, 441, 3, 261, 129, 0, 441, 442, 3, 237, 117, 0, 442, 22, 1, 0, 0, 0, 443, 444, 3, 225, 111, 0, 444, 445, 3, 271, 134, 0, 445, 24, 1, 0, 0, 0, 446, 447, 3, 227, 112, 0, 447, 448, 3, 223, 110, 0, 448, 449, 3, 259, 128, 0, 449, 450, 3, 231, 114, 0, 450, 26, 1, 0, 0, 0, 451, 452, 3, 227, 112, 0, 452, 453, 3, 223, 110, 0, 453, 454, 3, 259, 128, 0, 454, 455, 3, 261, 129, 0, 455, 28, 1, 0, 0, 0, 456, 457, 3, 227, 112, 0, 457, 458, 3, 223, 110, 0, 458, 459, 3, 261, 129, 0, 459, 460, 3, 227, 112, 0, 460, 461, 3, 237, 117, 0, 461, 30, 1, 0, 0, 0, 462, 463, 3, 227, 112, 0, 463, 464, 3, 251, 124, 0, 464, 465, 3, 237, 117, 0, 465, 466, 3, 251, 124, 0, 466, 467, 3, 257, 127, 0, 467, 468, 3, 261, 129, 0, 468, 32, 1, 0, 0, 0, 469, 470, 3, 227, 112, 0, 470, 471, 3, 251, 124, 0, 471, 472, 3, 245, 121, 0, 472, 473, 3, 245, 121, 0, 473, 474, 3, 223, 110, 0, 474, 475, 3, 261, 129, 0, 475, 476, 3, 231, 114, 0, 476, 34, 1, 0, 0, 0, 477, 478, 3, 227, 112, 0, 478, 479, 3, 257, 127, 0, 479, 480, 3, 251, 124, 0, 480, 481, 3, 259, 128, 0, 481, 482, 3, 259, 128, 0, 482, 36, 1, 0, 0, 0, 483, 484, 3, 227, 112, 0, 484, 485, 3, 263, 130, 0, 485, 486, 3, 225, 111, 0, 486, 487, 3, 231, 114, 0, 487, 38, 1, 0, 0, 0, 488, 489, 3, 227, 112, 0, 489, 490, 3, 263, 130, 0, 490, 491, 3, 257, 127, 0, 491, 492, 3, 257, 127, 0, 492, 493, 3, 231, 114, 0, 493, 494, 3, 249, 123, 0, 494, 495, 3, 261, 129, 0, 495, 40, 1, 0, 0, 0, 496, 497, 3, 229, 113, 0, 497, 498, 3, 223, 110, 0, 498, 499, 3, 261, 129, 0, 499, 500, 3, 231, 114, 0, 500, 42, 1, 0, 0, 0, 501, 502, 3, 229, 113, 0, 502, 503, 3, 223, 110, 0, 503, 504, 3, 271, 134, 0, 504, 44, 1, 0, 0, 0, 505, 506, 3, 229, 113, 0, 506, 507, 3, 231, 114, 0, 507, 508, 3, 259, 128, 0, 508, 509, 3, 227, 112, 0, 509, 46, 1, 0, 0, 0, 510, 511, 3, 229, 113, 0, 511, 512, 3, 231, 114, 0, 512, 513, 3, 259, 128, 0, 513, 514, 3, 227, 112, 0, 514, 515, 3, 231, 114, 0, 515, 516, 3, 249, 123, 0, 516, 517, 3, 229, 113, 0, 517, 518, 3, 239, 118, 0, 518, 519, 3, 249, 123, 0, 519, 520, 3, 235, 116, 0, 520, 48, 1, 0, 0, 0, 521, 522, 3, 229, 113, 0, 522, 523, 3, 239, 118, 0, 523, 524, 3, 259, 128, 0, 524, 525, 3, 261, 129, 0, 525, 526, 3, 239, 118, 0, 526, 527, 3, 249, 123, 0, 527, 528, 3, 227, 112, 0, 528, 529, 3, 261, 129, 0, 529, 50, 1, 0, 0, 0, 530, 531, 3, 231, 114, 0, 531, 532, 3, 245, 121, 0, 532, 533, 3, 259, 128, 0, 533, 534, 3, 231, 114, 0, 534, 52, 1, 0, 0, 0, 535, 536, 3, 231, 114, 0, 536, 537, 3, 249, 123, 0, 537, 538, 3, 229, 113, 0, 538, 54, 1, 0, 0, 0, 539, 540, 3, 231, 114, 0, 540, 541, 3, 269, 133, 0, 541, 542, 3, 261, 129, 0, 542, 543, 3, 257, 127, 0, 543, 544, 3, 223, 110, 0, 544, 545, 3, 227, 112, 0, 545, 546, 3, 261, 129, 0, 546, 56, 1, 0, 0, 0, 547, 548, 3, 233, 115, 0, 548, 549, 3, 239, 118, 0, 549, 550, 3, 249, 123, 0, 550, 551, 3, 223, 110, 0, 551, 552, 3, 245, 121, 0, 552, 58, 1, 0, 0, 0, 553, 554, 3, 233, 115, 0, 554, 555, 3, 239, 118, 0, 555, 556, 3, 249, 123, 0, 556, 557, 3, 223, 110, 0, 557, 558, 3, 245, 121, 0, 558, 559, 3, 245, 121, 0, 559, 560, 3, 271, 134, 0, 560, 60, 1, 0, 0, 0, 561, 562, 3, 233, 115, 0, 562, 563, 3, 239, 118, 0, 563, 564, 3, 257, 127, 0, 564, 565, 3, 259, 128, 0, 565, 566, 3, 261, 129, 0, 566, 62, 1, 0, 0, 0, 567, 568, 3, 233, 115, 0, 568, 569, 3, 249, 123, 0, 569, 64, 1, 0, 0, 0, 570, 571, 3, 233, 115, 0, 571, 572, 3, 251, 124, 0, 572, 573, 3, 245, 121, 0, 573, 574, 3, 245, 121, 0, 574, 575, 3, 251, 124, 0, 575, 576, 3, 267, 132, 0, 576, 577, 3, 239, 118, 0, 577, 578, 3, 249, 123, 0, 578, 579, 3, 235, 116, 0, 579, 66, 1, 0, 0, 0, 580, 581, 3, 233, 115, 0, 581, 582, 3, 251, 124, 0, 582, 583, 3, 257, 127, 0, 583, 68, 1, 0, 0, 0, 584, 585, 3, 233, 115, 0, 585, 586, 3, 257, 127, 0, 586, 587, 3, 251, 124, 0, 587, 588, 3, 247, 122, 0, 588, 70, 1, 0, 0, 0, 589, 590, 3, 233, 115, 0, 590, 591, 3, 263, 130, 0, 591, 592, 3, 245, 121, 0, 592, 593, 3, 245, 121, 0, 593, 72, 1, 0, 0, 0, 594, 595, 3, 235, 116, 0, 595, 596, 3, 257, 127, 0, 596, 597, 3, 251, 124, 0, 597, 598, 3, 263, 130, 0, 598, 599, 3, 253, 125, 0, 599, 74, 1, 0, 0, 0, 600, 601, 3, 237, 117, 0, 601, 602, 3, 223, 110, 0, 602, 603, 3, 265, 131, 0, 603, 604, 3, 239, 118, 0, 604, 605, 3, 249, 123, 0, 605, 606, 3, 235, 116, 0, 606, 76, 1, 0, 0, 0, 607, 608, 3, 237, 117, 0, 608, 609, 3, 251, 124, 0, 609, 610, 3, 263, 130, 0, 610, 611, 3, 257, 127, 0, 611, 78, 1, 0, 0, 0, 612, 613, 3, 239, 118, 0, 613, 614, 3, 229, 113, 0, 614, 80, 1, 0, 0, 0, 615, 616, 3, 239, 118, 0, 616, 617, 3, 233, 115, 0, 617, 82, 1, 0, 0, 0, 618, 619, 3, 239, 118, 0, 619, 620, 3, 245, 121, 0, 620, 621, 3, 239, 118, 0, 621, 622, 3, 243, 120, 0, 622, 623, 3, 231, 114, 0, 623, 84, 1, 0, 0, 0, 624, 625, 3, 239, 118, 0, 625, 626, 3, 249, 123, 0, 626, 86, 1, 0, 0, 0, 627, 628, 3, 239, 118, 0, 628, 629, 3, 249, 123, 0, 629, 630, 3, 233, 115, 0, 630, 641, 1, 0, 0, 0, 631, 632, 3, 239, 118, 0, 632, 633, 3, 249, 123, 0, 633, 634, 3, 233, 115, 0, 634, 635, 3, 239, 118, 0, 635, 636, 3, 249, 123, 0, 636, 637, 3, 239, 118, 0, 637, 638, 3, 261, 129, 0, 638, 639, 3, 271, 134, 0, 639, 641, 1, 0, 0, 0, 640, 627, 1, 0, 0, 0, 640, 631, 1, 0, 0, 0, 641, 88, 1, 0, 0, 0, 642, 643, 3, 239, 118, 0, 643, 644, 3, 249, 123, 0, 644, 645, 3, 249, 123, 0, 645, 646, 3, 231, 114, 0, 646, 647, 3, 257, 127, 0, 647, 90, 1, 0, 0, 0, 648, 649, 3, 239, 118, 0, 649, 650, 3, 249, 123, 0, 650, 651, 3, 261, 129, 0, 651, 652, 3, 231, 114, 0, 652, 653, 3, 257, 127, 0, 653, 654, 3, 265, 131, 0, 654, 655, 3, 223, 110, 0, 655, 656, 3, 245, 121, 0, 656, 92, 1, 0, 0, 0, 657, 658, 3, 239, 118, 0, 658, 659, 3, 259, 128, 0, 659, 94, 1, 0, 0, 0, 660, 661, 3, 241, 119, 0, 661, 662, 3, 251, 124, 0, 662, 663, 3, 239, 118, 0, 663, 664, 3, 249, 123, 0, 664, 96, 1, 0, 0, 0, 665, 666, 3, 243, 120, 0, 666, 667, 3, 231, 114, 0, 667, 668, 3, 271, 134, 0, 668, 98, 1, 0, 0, 0, 669, 670, 3, 245, 121, 0, 670, 671, 3, 223, 110, 0, 671, 672, 3, 259, 128, 0, 672, 673, 3, 261, 129, 0, 673, 100, 1, 0, 0, 0, 674, 675, 3, 245, 121, 0, 675, 676, 3, 231, 114, 0, 676, 677, 3, 223, 110, 0, 677, 678, 3, 229, 113, 0, 678, 679, 3, 239, 118, 0, 679, 680, 3, 249, 123, 0, 680, 681, 3, 235, 116, 0, 681, 102, 1, 0, 0, 0, 682, 683, 3, 245, 121, 0, 683, 684, 3, 231, 114, 0, 684, 685, 3, 233, 115, 0, 685, 686, 3, 261, 129, 0, 686, 104, 1, 0, 0, 0, 687, 688, 3, 245, 121, 0, 688, 689, 3, 231, 114, 0, 689, 690, 3, 261, 129, 0, 690, 106, 1, 0, 0, 0, 691, 692, 3, 245, 121, 0, 692, 693, 3, 239, 118, 0, 693, 694, 3, 243, 120, 0, 694, 695, 3, 231, 114, 0, 695, 108, 1, 0, 0, 0, 696, 697, 3, 245, 121, 0, 697, 698, 3, 239, 118, 0, 698, 699, 3, 247, 122, 0, 699, 700, 3, 239, 118, 0, 700, 701, 3, 261, 129, 0, 701, 110, 1, 0, 0, 0, 702, 703, 3, 247, 122, 0, 703, 704, 3, 239, 118, 0, 704, 705, 3, 249, 123, 0, 705, 706, 3, 263, 130, 0, 706, 707, 3, 261, 129, 0, 707, 708, 3, 231, 114, 0, 708, 112, 1, 0, 0, 0, 709, 710, 3, 247, 122, 0, 710, 711, 3, 251, 124, 0, 711, 712, 3, 249, 123, 0, 712, 713, 3, 261, 129, 0, 713, 714, 3, 237, 117, 0, 714, 114, 1, 0, 0, 0, 715, 716, 3, 249, 123, 0, 716, 717, 3, 223, 110, 0, 717, 718, 3, 249, 123, 0, 718, 116, 1, 0, 0, 0, 719, 720, 3, 249, 123, 0, 720, 721, 3, 251, 124, 0, 721, 722, 3, 261, 129, 0, 722, 118, 1, 0, 0, 0, 723, 724, 3, 249, 123, 0, 724, 725, 3, 263, 130, 0, 725, 726, 3, 245, 121, 0, 726, 727, 3, 245, 121, 0, 727, 120, 1, 0, 0, 0, 728, 729, 3, 249, 123, 0, 729, 730, 3, 263, 130, 0, 730, 731, 3, 245, 121, 0, 731, 732, 3, 245, 121, 0, 732, 733, 3, 259, 128, 0, 733, 122, 1, 0, 0, 0, 734, 735, 3, 251, 124, 0, 735, 736, 3, 233, 115, 0, 736, 737, 3, 233, 115, 0, 737, 738, 3, 259, 128, 0, 738, 739, 3, 231, 114, 0, 739, 740, 3, 261, 129, 0, 740, 124, 1, 0, 0, 0, 741, 742, 3, 251, 124, 0, 742, 743, 3, 249, 123, 0, 743, 126, 1, 0, 0, 0, 744, 745, 3, 251, 124, 0, 745, 746, 3, 257, 127, 0, 746, 128, 1, 0, 0, 0, 747, 748, 3, 251, 124, 0, 748, 749, 3, 257, 127, 0, 749, 750, 3, 229, 113, 0, 750, 751, 3, 231, 114, 0, 751, 752, 3, 257, 127, 0, 752, 130, 1, 0, 0, 0, 753, 754, 3, 251, 124, 0, 754, 755, 3, 263, 130, 0, 755, 756, 3, 261, 129, 0, 756, 757, 3, 231, 114, 0, 757, 758, 3, 257, 127, 0, 758, 132, 1, 0, 0, 0, 759, 760, 3, 251, 124, 0, 760, 761, 3, 265, 131, 0, 761, 762, 3, 231, 114, 0, 762, 763, 3, 257, 127, 0, 763, 134, 1, 0, 0, 0, 764, 765, 3, 253, 125, 0, 765, 766, 3, 223, 110, 0, 766, 767, 3, 257, 127, 0, 767, 768, 3, 261, 129, 0, 768, 769, 3, 239, 118, 0, 769, 770, 3, 261, 129, 0, 770, 771, 3, 239, 118, 0, 771, 772, 3, 251, 124, 0, 772, 773, 3, 249, 123, 0, 773, 136, 1, 0, 0, 0, 774, 775, 3, 253, 125, 0, 775, 776, 3, 257, 127, 0, 776, 777, 3, 231, 114, 0, 777, 778, 3, 227, 112, 0, 778, 779, 3, 231, 114, 0, 779, 780, 3, 229, 113, 0, 780, 781, 3, 239, 118, 0, 781, 782, 3, 249, 123, 0, 782, 783, 3, 235, 116, 0, 783, 138, 1, 0, 0, 0, 784, 785, 3, 253, 125, 0, 785, 786, 3, 257, 127, 0, 786, 787, 3, 231, 114, 0, 787, 788, 3, 267, 132, 0, 788, 789, 3, 237, 117, 0, 789, 790, 3, 231, 114, 0, 790, 791, 3, 257, 127, 0, 791, 792, 3, 231, 114, 0, 792, 140, 1, 0, 0, 0, 793, 794, 3, 255, 126, 0, 794, 795, 3, 263, 130, 0, 795, 796, 3, 223, 110, 0, 796, 797, 3, 257, 127, 0, 797, 798, 3, 261, 129, 0, 798, 799, 3, 231, 114, 0, 799, 800, 3, 257, 127, 0, 800, 142, 1, 0, 0, 0, 801, 802, 3, 257, 127, 0, 802, 803, 3, 223, 110, 0, 803, 804, 3, 249, 123, 0, 804, 805, 3, 235, 116, 0, 805, 806, 3, 231, 114, 0, 806, 144, 1, 0, 0, 0, 807, 808, 3, 257, 127, 0, 808, 809, 3, 231, 114, 0, 809, 810, 3, 261, 129, 0, 810, 811, 3, 263, 130, 0, 811, 812, 3, 257, 127, 0, 812, 813, 3, 249, 123, 0, 813, 146, 1, 0, 0, 0, 814, 815, 3, 257, 127, 0, 815, 816, 3, 239, 118, 0, 816, 817, 3, 235, 116, 0, 817, 818, 3, 237, 117, 0, 818, 819, 3, 261, 129, 0, 819, 148, 1, 0, 0, 0, 820, 821, 3, 257, 127, 0, 821, 822, 3, 251, 124, 0, 822, 823, 3, 245, 121, 0, 823, 824, 3, 245, 121, 0, 824, 825, 3, 263, 130, 0, 825, 826, 3, 253, 125, 0, 826, 150, 1, 0, 0, 0, 827, 828, 3, 257, 127, 0, 828, 829, 3, 251, 124, 0, 829, 830, 3, 267, 132, 0, 830, 152, 1, 0, 0, 0, 831, 832, 3, 257, 127, 0, 832, 833, 3, 251, 124, 0, 833, 834, 3, 267, 132, 0, 834, 835, 3, 259, 128, 0, 835, 154, 1, 0, 0, 0, 836, 837, 3, 259, 128, 0, 837, 838, 3, 223, 110, 0, 838, 839, 3, 247, 122, 0, 839, 840, 3, 253, 125, 0, 840, 841, 3, 245, 121, 0, 841, 842, 3, 231, 114, 0, 842, 156, 1, 0, 0, 0, 843, 844, 3, 259, 128, 0, 844, 845, 3, 231, 114, 0, 845, 846, 3, 227, 112, 0, 846, 847, 3, 251, 124, 0, 847, 848, 3, 249, 123, 0, 848, 849, 3, 229, 113, 0, 849, 158, 1, 0, 0, 0, 850, 851, 3, 259, 128, 0, 851, 852, 3, 231, 114, 0, 852, 853, 3, 245, 121, 0, 853, 854, 3, 231, 114, 0, 854, 855, 3, 227, 112, 0, 855, 856, 3, 261, 129, 0, 856, 160, 1, 0, 0, 0, 857, 858, 3, 259, 128, 0, 858, 859, 3, 231, 114, 0, 859, 860, 3, 247, 122, 0, 860, 861, 3, 239, 118, 0, 861, 162, 1, 0, 0, 0, 862, 863, 3, 259, 128, 0, 863, 864, 3, 231, 114, 0, 864, 865, 3, 261, 129, 0, 865, 866, 3, 261, 129, 0, 866, 867, 3, 239, 118, 0, 867, 868, 3, 249, 123, 0, 868, 869, 3, 235, 116, 0, 869, 870, 3, 259, 128, 0, 870, 164, 1, 0, 0, 0, 871, 872, 3, 259, 128, 0, 872, 873, 3, 263, 130, 0, 873, 874, 3, 225, 111, 0, 874, 875, 3, 259, 128, 0, 875, 876, 3, 261, 129, 0, 876, 877, 3, 257, 127, 0, 877, 878, 3, 239, 118, 0, 878, 879, 3, 249, 123, 0, 879, 880, 3, 235, 116, 0, 880, 166, 1, 0, 0, 0, 881, 882, 3, 261, 129, 0, 882, 883, 3, 237, 117, 0, 883, 884, 3, 231, 114, 0, 884, 885, 3, 249, 123, 0, 885, 168, 1, 0, 0, 0, 886, 887, 3, 261, 129, 0, 887, 888, 3, 237, 117, 0, 888, 889, 3, 257, 127, 0, 889, 890, 3, 251, 124, 0, 890, 891, 3, 267, 132, 0, 891, 170, 1, 0, 0, 0, 892, 893, 3, 261, 129, 0, 893, 894, 3, 239, 118, 0, 894, 895, 3, 231, 114, 0, 895, 896, 3, 259, 128, 0, 896, 172, 1, 0, 0, 0, 897, 898, 3, 261, 129, 0, 898, 899, 3, 239, 118, 0, 899, 900, 3, 247, 122, 0, 900, 901, 3, 231, 114, 0, 901, 902, 3, 259, 128, 0, 902, 903, 3, 261, 129, 0, 903, 904, 3, 223, 110, 0, 904, 905, 3, 247, 122, 0, 905, 906, 3, 253, 125, 0, 906, 174, 1, 0, 0, 0, 907, 908, 3, 261, 129, 0, 908, 909, 3, 251, 124, 0, 909, 176, 1, 0, 0, 0, 910, 911, 3, 261, 129, 0, 911, 912, 3, 251, 124, 0, 912, 913, 3, 253, 125, 0, 913, 178, 1, 0, 0, 0, 914, 915, 3, 261, 129, 0, 915, 916, 3, 251, 124, 0, 916, 917, 3, 261, 129, 0, 917, 918, 3, 223, 110, 0, 918, 919, 3, 245, 121, 0, 919, 920, 3, 259, 128, 0, 920, 180, 1, 0, 0, 0, 921, 922, 3, 261, 129, 0, 922, 923, 3, 257, 127, 0, 923, 924, 3, 223, 110, 0, 924, 925, 3, 239, 118, 0, 925, 926, 3, 245, 121, 0, 926, 927, 3, 239, 118, 0, 927, 928, 3, 249, 123, 0, 928, 929, 3, 235, 116, 0, 929, 182, 1, 0, 0, 0, 930, 931, 3, 261, 129, 0, 931, 932, 3, 257, 127, 0, 932, 933, 3, 239, 118, 0, 933, 934, 3, 247, 122, 0, 934, 184, 1, 0, 0, 0, 935, 936, 3, 261, 129, 0, 936, 937, 3, 257, 127, 0, 937, 938, 3, 263, 130, 0, 938, 939, 3, 249, 123, 0, 939, 940, 3, 227, 112, 0, 940, 941, 3, 223, 110, 0, 941, 942, 3, 261, 129, 0, 942, 943, 3, 231, 114, 0, 943, 186, 1, 0, 0, 0, 944, 945, 3, 261, 129, 0, 945, 946, 3, 257, 127, 0, 946, 947, 3, 271, 134, 0, 947, 188, 1, 0, 0, 0, 948, 949, 3, 263, 130, 0, 949, 950, 3, 249, 123, 0, 950, 951, 3, 225, 111, 0, 951, 952, 3, 251, 124, 0, 952, 953, 3, 263, 130, 0, 953, 954, 3, 249, 123, 0, 954, 955, 3, 229, 113, 0, 955, 956, 3, 231, 114, 0, 956, 957, 3, 229, 113, 0, 957, 190, 1, 0, 0, 0, 958, 959, 3, 263, 130, 0, 959, 960, 3, 249, 123, 0, 960, 961, 3, 239, 118, 0, 961, 962, 3, 251, 124, 0, 962, 963, 3, 249, 123, 0, 963, 192, 1, 0, 0, 0, 964, 965, 3, 263, 130, 0, 965, 966, 3, 259, 128, 0, 966, 967, 3, 239, 118, 0, 967, 968, 3, 249, 123, 0, 968, 969, 3, 235, 116, 0, 969, 194, 1, 0, 0, 0, 970, 971, 3, 267, 132, 0, 971, 972, 3, 231, 114, 0, 972, 973, 3, 231, 114, 0, 973, 974, 3, 243, 120, 0, 974, 196, 1, 0, 0, 0, 975, 976, 3, 267, 132, 0, 976, 977, 3, 237, 117, 0, 977, 978, 3, 231, 114, 0, 978, 979, 3, 249, 123, 0, 979, 198, 1, 0, 0, 0, 980, 981, 3, 267, 132, 0, 981, 982, 3, 237, 117, 0, 982, 983, 3, 231, 114, 0, 983, 984, 3, 257, 127, 0, 984, 985, 3, 231, 114, 0, 985, 200, 1, 0, 0, 0, 986, 987, 3, 267, 132, 0, 987, 988, 3, 237, 117, 0, 988, 989, 3, 239, 118, 0, 989, 990, 3, 245, 121, 0, 990, 991, 3, 231, 114, 0, 991, 202, 1, 0, 0, 0, 992, 993, 3, 267, 132, 0, 993, 994, 3, 239, 118, 0, 994, 995, 3, 249, 123, 0, 995, 996, 3, 229, 113, 0, 996, 997, 3, 251, 124, 0, 997, 998, 3, 267, 132, 0, 998, 204, 1, 0, 0, 0, 999, 1000, 3, 267, 132, 0, 1000, 1001, 3, 239, 118, 0, 1001, 1002, 3, 261, 129, 0, 1002, 1003, 3, 237, 117, 0, 1003, 206, 1, 0, 0, 0, 1004, 1005, 3, 271, 134, 0, 1005, 1006, 3, 231, 114, 0, 1006, 1007, 3, 223, 110, 0, 1007, 1008, 3, 257, 127, 0, 1008, 1015, 1, 0, 0, 0, 1009, 1010, 3, 271, 134, 0, 1010, 1011, 3, 271, 134, 0, 1011, 1012, 3, 271, 134, 0, 1012, 1013, 3, 271, 134, 0, 1013, 1015, 1, 0, 0, 0, 1014, 1004, 1, 0, 0, 0, 1014, 1009, 1, 0, 0, 0, 1015, 208, 1, 0, 0, 0, 1016, 1017, 3, 289, 143, 0, 1017, 1018, 3, 225, 111, 0, 1018, 1044, 1, 0, 0, 0, 1019, 1020, 3, 289, 143, 0, 1020, 1021, 3, 233, 115, 0, 1021, 1044, 1, 0, 0, 0, 1022, 1023, 3, 289, 143, 0, 1023, 1024, 3, 257, 127, 0, 1024, 1044, 1, 0, 0, 0, 1025, 1026, 3, 289, 143, 0, 1026, 1027, 3, 249, 123, 0, 1027, 1044, 1, 0, 0, 0, 1028, 1029, 3, 289, 143, 0, 1029, 1030, 3, 261, 129, 0, 1030, 1044, 1, 0, 0, 0, 1031, 1032, 3, 289, 143, 0, 1032, 1033, 5, 48, 0, 0, 1033, 1044, 1, 0, 0, 0, 1034, 1035, 3, 289, 143, 0, 1035, 1036, 3, 223, 110, 0, 1036, 1044, 1, 0, 0, 0, 1037, 1038, 3, 289, 143, 0, 1038, 1039, 3, 265, 131, 0, 1039, 1044, 1, 0, 0, 0, 1040, 1041, 3, 289, 143, 0, 1041, 1042, 3, 289, 143, 0, 1042, 1044, 1, 0, 0, 0, 1043, 1016, 1, 0, 0, 0, 1043, 1019, 1, 0, 0, 0, 1043, 1022, 1, 0, 0, 0, 1043, 1025, 1, 0, 0, 0, 1043, 1028, 1, 0, 0, 0, 1043, 1031, 1, 0, 0, 0, 1043, 1034, 1, 0, 0, 0, 1043, 1037, 1, 0, 0, 0, 1043, 1040, 1, 0, 0, 0, 1044, 210, 1, 0, 0, 0, 1045, 1049, 3, 275, 136, 0, 1046, 1049, 3, 365, 181, 0, 1047, 1049, 3, 299, 148, 0, 1048, 1045, 1, 0, 0, 0, 1048, 1046, 1, 0, 0, 0, 1048, 1047, 1, 0, 0, 0, 1049, 1056, 1, 0, 0, 0, 1050, 1055, 3, 275, 136, 0, 1051, 1055, 3, 365, 181, 0, 1052, 1055, 3, 279, 138, 0, 1053, 1055, 3, 299, 148, 0, 1054, 1050, 1, 0, 0, 0, 1054, 1051, 1, 0, 0, 0, 1054, 1052, 1, 0, 0, 0, 1054, 1053, 1, 0, 0, 0, 1055, 1058, 1, 0, 0, 0, 1056, 1054, 1, 0, 0, 0, 1056, 1057, 1, 0, 0, 0, 1057, 1092, 1, 0, 0, 0, 1058, 1056, 1, 0, 0, 0, 1059, 1070, 3, 287, 142, 0, 1060, 1069, 8, 0, 0, 0, 1061, 1069, 3, 209, 103, 0, 1062, 1063, 3, 289, 143, 0, 1063, 1064, 3, 349, 173, 0, 1064, 1069, 1, 0, 0, 0, 1065, 1066, 3, 287, 142, 0, 1066, 1067, 3, 287, 142, 0, 1067, 1069, 1, 0, 0, 0, 1068, 1060, 1, 0, 0, 0, 1068, 1061, 1, 0, 0, 0, 1068, 1062, 1, 0, 0, 0, 1068, 1065, 1, 0, 0, 0, 1069, 1072, 1, 0, 0, 0, 1070, 1068, 1, 0, 0, 0, 1070, 1071, 1, 0, 0, 0, 1071, 1073, 1, 0, 0, 0, 1072, 1070, 1, 0, 0, 0, 1073, 1074, 3, 287, 142, 0, 1074, 1092, 1, 0, 0, 0, 1075, 1086, 3, 343, 170, 0, 1076, 1085, 8, 1, 0, 0, 1077, 1085, 3, 209, 103, 0, 1078, 1079, 3, 289, 143, 0, 1079, 1080, 3, 343, 170, 0, 1080, 1085, 1, 0, 0, 0, 1081, 1082, 3, 343, 170, 0, 1082, 1083, 3, 343, 170, 0, 1083, 1085, 1, 0, 0, 0, 1084, 1076, 1, 0, 0, 0, 1084, 1077, 1, 0, 0, 0, 1084, 1078, 1, 0, 0, 0, 1084, 1081, 1, 0, 0, 0, 1085, 1088, 1, 0, 0, 0, 1086, 1084, 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, 1089, 1, 0, 0, 0, 1088, 1086, 1, 0, 0, 0, 1089, 1090, 3, 343, 170, 0, 1090, 1092, 1, 0, 0, 0, 1091, 1048, 1, 0, 0, 0, 1091, 1059, 1, 0, 0, 0, 1091, 1075, 1, 0, 0, 0, 1092, 212, 1, 0, 0, 0, 1093, 1094, 3, 219, 108, 0, 1094, 1098, 3, 301, 149, 0, 1095, 1097, 3, 281, 139, 0, 1096, 1095, 1, 0, 0, 0, 1097, 1100, 1, 0, 0, 0, 1098, 1096, 1, 0, 0, 0, 1098, 1099, 1, 0, 0, 0, 1099, 1103, 1, 0, 0, 0, 1100, 1098, 1, 0, 0, 0, 1101, 1104, 3, 253, 125, 0, 1102, 1104, 3, 231, 114, 0, 1103, 1101, 1, 0, 0, 0, 1103, 1102, 1, 0, 0, 0, 1104, 1107, 1, 0, 0, 0, 1105, 1108, 3, 339, 168, 0, 1106, 1108, 3, 297, 147, 0, 1107, 1105, 1, 0, 0, 0, 1107, 1106, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1110, 1, 0, 0, 0, 1109, 1111, 3, 279, 138, 0, 1110, 1109, 1, 0, 0, 0, 1111, 1112, 1, 0, 0, 0, 1112, 1110, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1170, 1, 0, 0, 0, 1114, 1117, 3, 219, 108, 0, 1115, 1118, 3, 253, 125, 0, 1116, 1118, 3, 231, 114, 0, 1117, 1115, 1, 0, 0, 0, 1117, 1116, 1, 0, 0, 0, 1118, 1121, 1, 0, 0, 0, 1119, 1122, 3, 339, 168, 0, 1120, 1122, 3, 297, 147, 0, 1121, 1119, 1, 0, 0, 0, 1121, 1120, 1, 0, 0, 0, 1121, 1122, 1, 0, 0, 0, 1122, 1124, 1, 0, 0, 0, 1123, 1125, 3, 279, 138, 0, 1124, 1123, 1, 0, 0, 0, 1125, 1126, 1, 0, 0, 0, 1126, 1124, 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 1170, 1, 0, 0, 0, 1128, 1129, 3, 217, 107, 0, 1129, 1133, 3, 301, 149, 0, 1130, 1132, 3, 279, 138, 0, 1131, 1130, 1, 0, 0, 0, 1132, 1135, 1, 0, 0, 0, 1133, 1131, 1, 0, 0, 0, 1133, 1134, 1, 0, 0, 0, 1134, 1136, 1, 0, 0, 0, 1135, 1133, 1, 0, 0, 0, 1136, 1139, 3, 231, 114, 0, 1137, 1140, 3, 339, 168, 0, 1138, 1140, 3, 297, 147, 0, 1139, 1137, 1, 0, 0, 0, 1139, 1138, 1, 0, 0, 0, 1139, 1140, 1, 0, 0, 0, 1140, 1142, 1, 0, 0, 0, 1141, 1143, 3, 279, 138, 0, 1142, 1141, 1, 0, 0, 0, 1143, 1144, 1, 0, 0, 0, 1144, 1142, 1, 0, 0, 0, 1144, 1145, 1, 0, 0, 0, 1145, 1170, 1, 0, 0, 0, 1146, 1147, 3, 301, 149, 0, 1147, 1148, 3, 217, 107, 0, 1148, 1151, 3, 231, 114, 0, 1149, 1152, 3, 339, 168, 0, 1150, 1152, 3, 297, 147, 0, 1151, 1149, 1, 0, 0, 0, 1151, 1150, 1, 0, 0, 0, 1151, 1152, 1, 0, 0, 0, 1152, 1154, 1, 0, 0, 0, 1153, 1155, 3, 279, 138, 0, 1154, 1153, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1154, 1, 0, 0, 0, 1156, 1157, 1, 0, 0, 0, 1157, 1170, 1, 0, 0, 0, 1158, 1159, 3, 217, 107, 0, 1159, 1162, 3, 231, 114, 0, 1160, 1163, 3, 339, 168, 0, 1161, 1163, 3, 297, 147, 0, 1162, 1160, 1, 0, 0, 0, 1162, 1161, 1, 0, 0, 0, 1162, 1163, 1, 0, 0, 0, 1163, 1165, 1, 0, 0, 0, 1164, 1166, 3, 279, 138, 0, 1165, 1164, 1, 0, 0, 0, 1166, 1167, 1, 0, 0, 0, 1167, 1165, 1, 0, 0, 0, 1167, 1168, 1, 0, 0, 0, 1168, 1170, 1, 0, 0, 0, 1169, 1093, 1, 0, 0, 0, 1169, 1114, 1, 0, 0, 0, 1169, 1128, 1, 0, 0, 0, 1169, 1146, 1, 0, 0, 0, 1169, 1158, 1, 0, 0, 0, 1170, 214, 1, 0, 0, 0, 1171, 1173, 5, 48, 0, 0, 1172, 1174, 3, 277, 137, 0, 1173, 1172, 1, 0, 0, 0, 1174, 1175, 1, 0, 0, 0, 1175, 1173, 1, 0, 0, 0, 1175, 1176, 1, 0, 0, 0, 1176, 216, 1, 0, 0, 0, 1177, 1179, 3, 279, 138, 0, 1178, 1177, 1, 0, 0, 0, 1179, 1180, 1, 0, 0, 0, 1180, 1178, 1, 0, 0, 0, 1180, 1181, 1, 0, 0, 0, 1181, 218, 1, 0, 0, 0, 1182, 1183, 5, 48, 0, 0, 1183, 1185, 3, 269, 133, 0, 1184, 1186, 3, 281, 139, 0, 1185, 1184, 1, 0, 0, 0, 1186, 1187, 1, 0, 0, 0, 1187, 1185, 1, 0, 0, 0, 1187, 1188, 1, 0, 0, 0, 1188, 220, 1, 0, 0, 0, 1189, 1200, 3, 349, 173, 0, 1190, 1199, 8, 2, 0, 0, 1191, 1199, 3, 209, 103, 0, 1192, 1193, 3, 289, 143, 0, 1193, 1194, 3, 349, 173, 0, 1194, 1199, 1, 0, 0, 0, 1195, 1196, 3, 349, 173, 0, 1196, 1197, 3, 349, 173, 0, 1197, 1199, 1, 0, 0, 0, 1198, 1190, 1, 0, 0, 0, 1198, 1191, 1, 0, 0, 0, 1198, 1192, 1, 0, 0, 0, 1198, 1195, 1, 0, 0, 0, 1199, 1202, 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 1203, 1, 0, 0, 0, 1202, 1200, 1, 0, 0, 0, 1203, 1204, 3, 349, 173, 0, 1204, 222, 1, 0, 0, 0, 1205, 1206, 7, 3, 0, 0, 1206, 224, 1, 0, 0, 0, 1207, 1208, 7, 4, 0, 0, 1208, 226, 1, 0, 0, 0, 1209, 1210, 7, 5, 0, 0, 1210, 228, 1, 0, 0, 0, 1211, 1212, 7, 6, 0, 0, 1212, 230, 1, 0, 0, 0, 1213, 1214, 7, 7, 0, 0, 1214, 232, 1, 0, 0, 0, 1215, 1216, 7, 8, 0, 0, 1216, 234, 1, 0, 0, 0, 1217, 1218, 7, 9, 0, 0, 1218, 236, 1, 0, 0, 0, 1219, 1220, 7, 10, 0, 0, 1220, 238, 1, 0, 0, 0, 1221, 1222, 7, 11, 0, 0, 1222, 240, 1, 0, 0, 0, 1223, 1224, 7, 12, 0, 0, 1224, 242, 1, 0, 0, 0, 1225, 1226, 7, 13, 0, 0, 1226, 244, 1, 0, 0, 0, 1227, 1228, 7, 14, 0, 0, 1228, 246, 1, 0, 0, 0, 1229, 1230, 7, 15, 0, 0, 1230, 248, 1, 0, 0, 0, 1231, 1232, 7, 16, 0, 0, 1232, 250, 1, 0, 0, 0, 1233, 1234, 7, 17, 0, 0, 1234, 252, 1, 0, 0, 0, 1235, 1236, 7, 18, 0, 0, 1236, 254, 1, 0, 0, 0, 1237, 1238, 7, 19, 0, 0, 1238, 256, 1, 0, 0, 0, 1239, 1240, 7, 20, 0, 0, 1240, 258, 1, 0, 0, 0, 1241, 1242, 7, 21, 0, 0, 1242, 260, 1, 0, 0, 0, 1243, 1244, 7, 22, 0, 0, 1244, 262, 1, 0, 0, 0, 1245, 1246, 7, 23, 0, 0, 1246, 264, 1, 0, 0, 0, 1247, 1248, 7, 24, 0, 0, 1248, 266, 1, 0, 0, 0, 1249, 1250, 7, 25, 0, 0, 1250, 268, 1, 0, 0, 0, 1251, 1252, 7, 26, 0, 0, 1252, 270, 1, 0, 0, 0, 1253, 1254, 7, 27, 0, 0, 1254, 272, 1, 0, 0, 0, 1255, 1256, 7, 28, 0, 0, 1256, 274, 1, 0, 0, 0, 1257, 1258, 7, 29, 0, 0, 1258, 276, 1, 0, 0, 0, 1259, 1260, 7, 30, 0, 0, 1260, 278, 1, 0, 0, 0, 1261, 1262, 7, 31, 0, 0, 1262, 280, 1, 0, 0, 0, 1263, 1264, 7, 32, 0, 0, 1264, 282, 1, 0, 0, 0, 1265, 1266, 5, 45, 0, 0, 1266, 1267, 5, 62, 0, 0, 1267, 284, 1, 0, 0, 0, 1268, 1269, 5, 42, 0, 0, 1269, 286, 1, 0, 0, 0, 1270, 1271, 5, 96, 0, 0, 1271, 288, 1, 0, 0, 0, 1272, 1273, 5, 92, 0, 0, 1273, 290, 1, 0, 0, 0, 1274, 1275, 5, 58, 0, 0, 1275, 292, 1, 0, 0, 0, 1276, 1277, 5, 44, 0, 0, 1277, 294, 1, 0, 0, 0, 1278, 1279, 5, 124, 0, 0, 1279, 1280, 5, 124, 0, 0, 1280, 296, 1, 0, 0, 0, 1281, 1282, 5, 45, 0, 0, 1282, 298, 1, 0, 0, 0, 1283, 1284, 5, 36, 0, 0, 1284, 300, 1, 0, 0, 0, 1285, 1286, 5, 46, 0, 0, 1286, 302, 1, 0, 0, 0, 1287, 1288, 5, 61, 0, 0, 1288, 1289, 5, 61, 0, 0, 1289, 304, 1, 0, 0, 0, 1290, 1291, 5, 61, 0, 0, 1291, 306, 1, 0, 0, 0, 1292, 1293, 5, 62, 0, 0, 1293, 1294, 5, 61, 0, 0, 1294, 308, 1, 0, 0, 0, 1295, 1296, 5, 62, 0, 0, 1296, 310, 1, 0, 0, 0, 1297, 1298, 5, 35, 0, 0, 1298, 312, 1, 0, 0, 0, 1299, 1300, 5, 126, 0, 0, 1300, 1301, 5, 42, 0, 0, 1301, 314, 1, 0, 0, 0, 1302, 1303, 5, 61, 0, 0, 1303, 1304, 5, 126, 0, 0, 1304, 1305, 5, 42, 0, 0, 1305, 316, 1, 0, 0, 0, 1306, 1307, 5, 123, 0, 0, 1307, 1308, 1, 0, 0, 0, 1308, 1309, 6, 157, 0, 0, 1309, 318, 1, 0, 0, 0, 1310, 1311, 5, 91, 0, 0, 1311, 320, 1, 0, 0, 0, 1312, 1313, 5, 40, 0, 0, 1313, 322, 1, 0, 0, 0, 1314, 1315, 5, 60, 0, 0, 1315, 1316, 5, 61, 0, 0, 1316, 324, 1, 0, 0, 0, 1317, 1318, 5, 60, 0, 0, 1318, 326, 1, 0, 0, 0, 1319, 1320, 5, 33, 0, 0, 1320, 1324, 5, 61, 0, 0, 1321, 1322, 5, 60, 0, 0, 1322, 1324, 5, 62, 0, 0, 1323, 1319, 1, 0, 0, 0, 1323, 1321, 1, 0, 0, 0, 1324, 328, 1, 0, 0, 0, 1325, 1326, 5, 33, 0, 0, 1326, 1327, 5, 126, 0, 0, 1327, 1328, 5, 42, 0, 0, 1328, 330, 1, 0, 0, 0, 1329, 1330, 5, 33, 0, 0, 1330, 1331, 5, 126, 0, 0, 1331, 332, 1, 0, 0, 0, 1332, 1333, 5, 63, 0, 0, 1333, 1334, 5, 46, 0, 0, 1334, 334, 1, 0, 0, 0, 1335, 1336, 5, 63, 0, 0, 1336, 1337, 5, 63, 0, 0, 1337, 336, 1, 0, 0, 0, 1338, 1339, 5, 37, 0, 0, 1339, 338, 1, 0, 0, 0, 1340, 1341, 5, 43, 0, 0, 1341, 340, 1, 0, 0, 0, 1342, 1343, 5, 63, 0, 0, 1343, 342, 1, 0, 0, 0, 1344, 1345, 5, 34, 0, 0, 1345, 344, 1, 0, 0, 0, 1346, 1347, 5, 102, 0, 0, 1347, 1348, 5, 39, 0, 0, 1348, 1349, 1, 0, 0, 0, 1349, 1350, 6, 171, 1, 0, 1350, 346, 1, 0, 0, 0, 1351, 1352, 5, 70, 0, 0, 1352, 1353, 5, 39, 0, 0, 1353, 1354, 1, 0, 0, 0, 1354, 1355, 6, 172, 2, 0, 1355, 348, 1, 0, 0, 0, 1356, 1357, 5, 39, 0, 0, 1357, 350, 1, 0, 0, 0, 1358, 1359, 5, 126, 0, 0, 1359, 352, 1, 0, 0, 0, 1360, 1361, 5, 61, 0, 0, 1361, 1362, 5, 126, 0, 0, 1362, 354, 1, 0, 0, 0, 1363, 1364, 5, 125, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, 1366, 6, 176, 3, 0, 1366, 356, 1, 0, 0, 0, 1367, 1368, 5, 93, 0, 0, 1368, 358, 1, 0, 0, 0, 1369, 1370, 5, 41, 0, 0, 1370, 360, 1, 0, 0, 0, 1371, 1372, 5, 59, 0, 0, 1372, 362, 1, 0, 0, 0, 1373, 1374, 5, 47, 0, 0, 1374, 364, 1, 0, 0, 0, 1375, 1376, 5, 95, 0, 0, 1376, 366, 1, 0, 0, 0, 1377, 1378, 5, 47, 0, 0, 1378, 1379, 5, 42, 0, 0, 1379, 1383, 1, 0, 0, 0, 1380, 1382, 9, 0, 0, 0, 1381, 1380, 1, 0, 0, 0, 1382, 1385, 1, 0, 0, 0, 1383, 1384, 1, 0, 0, 0, 1383, 1381, 1, 0, 0, 0, 1384, 1386, 1, 0, 0, 0, 1385, 1383, 1, 0, 0, 0, 1386, 1387, 5, 42, 0, 0, 1387, 1388, 5, 47, 0, 0, 1388, 1389, 1, 0, 0, 0, 1389, 1390, 6, 182, 4, 0, 1390, 368, 1, 0, 0, 0, 1391, 1392, 5, 45, 0, 0, 1392, 1396, 5, 45, 0, 0, 1393, 1394, 5, 47, 0, 0, 1394, 1396, 5, 47, 0, 0, 1395, 1391, 1, 0, 0, 0, 1395, 1393, 1, 0, 0, 0, 1396, 1400, 1, 0, 0, 0, 1397, 1399, 8, 33, 0, 0, 1398, 1397, 1, 0, 0, 0, 1399, 1402, 1, 0, 0, 0, 1400, 1398, 1, 0, 0, 0, 1400, 1401, 1, 0, 0, 0, 1401, 1404, 1, 0, 0, 0, 1402, 1400, 1, 0, 0, 0, 1403, 1405, 7, 34, 0, 0, 1404, 1403, 1, 0, 0, 0, 1405, 1406, 1, 0, 0, 0, 1406, 1407, 6, 183, 4, 0, 1407, 370, 1, 0, 0, 0, 1408, 1409, 7, 35, 0, 0, 1409, 1410, 1, 0, 0, 0, 1410, 1411, 6, 184, 5, 0, 1411, 372, 1, 0, 0, 0, 1412, 1424, 8, 36, 0, 0, 1413, 1424, 3, 209, 103, 0, 1414, 1415, 3, 289, 143, 0, 1415, 1416, 3, 349, 173, 0, 1416, 1424, 1, 0, 0, 0, 1417, 1418, 3, 289, 143, 0, 1418, 1419, 3, 317, 157, 0, 1419, 1424, 1, 0, 0, 0, 1420, 1421, 3, 349, 173, 0, 1421, 1422, 3, 349, 173, 0, 1422, 1424, 1, 0, 0, 0, 1423, 1412, 1, 0, 0, 0, 1423, 1413, 1, 0, 0, 0, 1423, 1414, 1, 0, 0, 0, 1423, 1417, 1, 0, 0, 0, 1423, 1420, 1, 0, 0, 0, 1424, 1425, 1, 0, 0, 0, 1425, 1423, 1, 0, 0, 0, 1425, 1426, 1, 0, 0, 0, 1426, 374, 1, 0, 0, 0, 1427, 1428, 3, 317, 157, 0, 1428, 1429, 1, 0, 0, 0, 1429, 1430, 6, 186, 0, 0, 1430, 376, 1, 0, 0, 0, 1431, 1432, 3, 349, 173, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1434, 6, 187, 6, 0, 1434, 1435, 6, 187, 3, 0, 1435, 378, 1, 0, 0, 0, 1436, 1442, 8, 37, 0, 0, 1437, 1442, 3, 209, 103, 0, 1438, 1439, 3, 289, 143, 0, 1439, 1440, 3, 317, 157, 0, 1440, 1442, 1, 0, 0, 0, 1441, 1436, 1, 0, 0, 0, 1441, 1437, 1, 0, 0, 0, 1441, 1438, 1, 0, 0, 0, 1442, 1443, 1, 0, 0, 0, 1443, 1441, 1, 0, 0, 0, 1443, 1444, 1, 0, 0, 0, 1444, 380, 1, 0, 0, 0, 1445, 1446, 3, 317, 157, 0, 1446, 1447, 1, 0, 0, 0, 1447, 1448, 6, 189, 0, 0, 1448, 382, 1, 0, 0, 0, 44, 0, 1, 2, 423, 640, 1014, 1043, 1048, 1054, 1056, 1068, 1070, 1084, 1086, 1091, 1098, 1103, 1107, 1112, 1117, 1121, 1126, 1133, 1139, 1144, 1151, 1156, 1162, 1167, 1169, 1175, 1180, 1187, 1198, 1200, 1323, 1383, 1395, 1400, 1404, 1423, 1425, 1441, 1443, 7, 5, 0, 0, 5, 1, 0, 5, 2, 0, 4, 0, 0, 6, 0, 0, 0, 1, 0, 7, 144, 0] \ No newline at end of file diff --git a/hogql_parser/HogQLLexer.tokens b/hogql_parser/HogQLLexer.tokens index 3ba82bf92c17b..320718e97710b 100644 --- a/hogql_parser/HogQLLexer.tokens +++ b/hogql_parser/HogQLLexer.tokens @@ -11,186 +11,190 @@ BOTH=10 BY=11 CASE=12 CAST=13 -COHORT=14 -COLLATE=15 -CROSS=16 -CUBE=17 -CURRENT=18 -DATE=19 -DAY=20 -DESC=21 -DESCENDING=22 -DISTINCT=23 -ELSE=24 -END=25 -EXTRACT=26 -FINAL=27 -FIRST=28 -FN=29 -FOLLOWING=30 -FOR=31 -FROM=32 -FULL=33 -GROUP=34 -HAVING=35 -HOUR=36 -ID=37 -IF=38 -ILIKE=39 -IN=40 -INF=41 -INNER=42 -INTERVAL=43 -IS=44 -JOIN=45 -KEY=46 -LAST=47 -LEADING=48 -LEFT=49 -LET=50 -LIKE=51 -LIMIT=52 -MINUTE=53 -MONTH=54 -NAN_SQL=55 -NOT=56 -NULL_SQL=57 -NULLS=58 -OFFSET=59 -ON=60 -OR=61 -ORDER=62 -OUTER=63 -OVER=64 -PARTITION=65 -PRECEDING=66 -PREWHERE=67 -QUARTER=68 -RANGE=69 -RETURN=70 -RIGHT=71 -ROLLUP=72 -ROW=73 -ROWS=74 -SAMPLE=75 -SECOND=76 -SELECT=77 -SEMI=78 -SETTINGS=79 -SUBSTRING=80 -THEN=81 -TIES=82 -TIMESTAMP=83 -TO=84 -TOP=85 -TOTALS=86 -TRAILING=87 -TRIM=88 -TRUNCATE=89 -UNBOUNDED=90 -UNION=91 -USING=92 -WEEK=93 -WHEN=94 -WHERE=95 -WHILE=96 -WINDOW=97 -WITH=98 -YEAR=99 -ESCAPE_CHAR_COMMON=100 -IDENTIFIER=101 -FLOATING_LITERAL=102 -OCTAL_LITERAL=103 -DECIMAL_LITERAL=104 -HEXADECIMAL_LITERAL=105 -STRING_LITERAL=106 -ARROW=107 -ASTERISK=108 -BACKQUOTE=109 -BACKSLASH=110 -COLON=111 -COMMA=112 -CONCAT=113 -DASH=114 -DOLLAR=115 -DOT=116 -EQ_DOUBLE=117 -EQ_SINGLE=118 -GT_EQ=119 -GT=120 -HASH=121 -IREGEX_SINGLE=122 -IREGEX_DOUBLE=123 -LBRACE=124 -LBRACKET=125 -LPAREN=126 -LT_EQ=127 -LT=128 -NOT_EQ=129 -NOT_IREGEX=130 -NOT_REGEX=131 -NULL_PROPERTY=132 -NULLISH=133 -PERCENT=134 -PLUS=135 -QUERY=136 -QUOTE_DOUBLE=137 -QUOTE_SINGLE_TEMPLATE=138 -QUOTE_SINGLE_TEMPLATE_FULL=139 -QUOTE_SINGLE=140 -REGEX_SINGLE=141 -REGEX_DOUBLE=142 -RBRACE=143 -RBRACKET=144 -RPAREN=145 -SEMICOLON=146 -SLASH=147 -UNDERSCORE=148 -MULTI_LINE_COMMENT=149 -SINGLE_LINE_COMMENT=150 -WHITESPACE=151 -STRING_TEXT=152 -STRING_ESCAPE_TRIGGER=153 -FULL_STRING_TEXT=154 -FULL_STRING_ESCAPE_TRIGGER=155 -'->'=107 -'*'=108 -'`'=109 -'\\'=110 -':'=111 -','=112 -'||'=113 -'-'=114 -'$'=115 -'.'=116 -'=='=117 -'='=118 -'>='=119 -'>'=120 -'#'=121 -'~*'=122 -'=~*'=123 -'{'=124 -'['=125 -'('=126 -'<='=127 -'<'=128 -'!~*'=130 -'!~'=131 -'?.'=132 -'??'=133 -'%'=134 -'+'=135 -'?'=136 -'"'=137 -'f\''=138 -'F\''=139 -'\''=140 -'~'=141 -'=~'=142 -'}'=143 -']'=144 -')'=145 -';'=146 -'/'=147 -'_'=148 +CATCH=14 +COHORT=15 +COLLATE=16 +CROSS=17 +CUBE=18 +CURRENT=19 +DATE=20 +DAY=21 +DESC=22 +DESCENDING=23 +DISTINCT=24 +ELSE=25 +END=26 +EXTRACT=27 +FINAL=28 +FINALLY=29 +FIRST=30 +FN=31 +FOLLOWING=32 +FOR=33 +FROM=34 +FULL=35 +GROUP=36 +HAVING=37 +HOUR=38 +ID=39 +IF=40 +ILIKE=41 +IN=42 +INF=43 +INNER=44 +INTERVAL=45 +IS=46 +JOIN=47 +KEY=48 +LAST=49 +LEADING=50 +LEFT=51 +LET=52 +LIKE=53 +LIMIT=54 +MINUTE=55 +MONTH=56 +NAN_SQL=57 +NOT=58 +NULL_SQL=59 +NULLS=60 +OFFSET=61 +ON=62 +OR=63 +ORDER=64 +OUTER=65 +OVER=66 +PARTITION=67 +PRECEDING=68 +PREWHERE=69 +QUARTER=70 +RANGE=71 +RETURN=72 +RIGHT=73 +ROLLUP=74 +ROW=75 +ROWS=76 +SAMPLE=77 +SECOND=78 +SELECT=79 +SEMI=80 +SETTINGS=81 +SUBSTRING=82 +THEN=83 +THROW=84 +TIES=85 +TIMESTAMP=86 +TO=87 +TOP=88 +TOTALS=89 +TRAILING=90 +TRIM=91 +TRUNCATE=92 +TRY=93 +UNBOUNDED=94 +UNION=95 +USING=96 +WEEK=97 +WHEN=98 +WHERE=99 +WHILE=100 +WINDOW=101 +WITH=102 +YEAR=103 +ESCAPE_CHAR_COMMON=104 +IDENTIFIER=105 +FLOATING_LITERAL=106 +OCTAL_LITERAL=107 +DECIMAL_LITERAL=108 +HEXADECIMAL_LITERAL=109 +STRING_LITERAL=110 +ARROW=111 +ASTERISK=112 +BACKQUOTE=113 +BACKSLASH=114 +COLON=115 +COMMA=116 +CONCAT=117 +DASH=118 +DOLLAR=119 +DOT=120 +EQ_DOUBLE=121 +EQ_SINGLE=122 +GT_EQ=123 +GT=124 +HASH=125 +IREGEX_SINGLE=126 +IREGEX_DOUBLE=127 +LBRACE=128 +LBRACKET=129 +LPAREN=130 +LT_EQ=131 +LT=132 +NOT_EQ=133 +NOT_IREGEX=134 +NOT_REGEX=135 +NULL_PROPERTY=136 +NULLISH=137 +PERCENT=138 +PLUS=139 +QUERY=140 +QUOTE_DOUBLE=141 +QUOTE_SINGLE_TEMPLATE=142 +QUOTE_SINGLE_TEMPLATE_FULL=143 +QUOTE_SINGLE=144 +REGEX_SINGLE=145 +REGEX_DOUBLE=146 +RBRACE=147 +RBRACKET=148 +RPAREN=149 +SEMICOLON=150 +SLASH=151 +UNDERSCORE=152 +MULTI_LINE_COMMENT=153 +SINGLE_LINE_COMMENT=154 +WHITESPACE=155 +STRING_TEXT=156 +STRING_ESCAPE_TRIGGER=157 +FULL_STRING_TEXT=158 +FULL_STRING_ESCAPE_TRIGGER=159 +'->'=111 +'*'=112 +'`'=113 +'\\'=114 +':'=115 +','=116 +'||'=117 +'-'=118 +'$'=119 +'.'=120 +'=='=121 +'='=122 +'>='=123 +'>'=124 +'#'=125 +'~*'=126 +'=~*'=127 +'{'=128 +'['=129 +'('=130 +'<='=131 +'<'=132 +'!~*'=134 +'!~'=135 +'?.'=136 +'??'=137 +'%'=138 +'+'=139 +'?'=140 +'"'=141 +'f\''=142 +'F\''=143 +'\''=144 +'~'=145 +'=~'=146 +'}'=147 +']'=148 +')'=149 +';'=150 +'/'=151 +'_'=152 diff --git a/hogql_parser/HogQLParser.cpp b/hogql_parser/HogQLParser.cpp index 17f52f0d28c27..00d7c0e7b68de 100644 --- a/hogql_parser/HogQLParser.cpp +++ b/hogql_parser/HogQLParser.cpp @@ -53,24 +53,24 @@ void hogqlparserParserInitialize() { auto staticData = std::make_unique( std::vector{ "program", "declaration", "expression", "varDecl", "identifierList", - "statement", "returnStmt", "ifStmt", "whileStmt", "forStmt", "forInStmt", - "funcStmt", "varAssignment", "exprStmt", "emptyStmt", "block", "kvPair", - "kvPairList", "select", "selectUnionStmt", "selectStmtWithParens", - "selectStmt", "withClause", "topClause", "fromClause", "arrayJoinClause", - "windowClause", "prewhereClause", "whereClause", "groupByClause", - "havingClause", "orderByClause", "projectionOrderByClause", "limitAndOffsetClause", - "offsetOnlyClause", "settingsClause", "joinExpr", "joinOp", "joinOpCross", - "joinConstraintClause", "sampleClause", "orderExprList", "orderExpr", - "ratioExpr", "settingExprList", "settingExpr", "windowExpr", "winPartitionByClause", - "winOrderByClause", "winFrameClause", "winFrameExtend", "winFrameBound", - "expr", "columnTypeExpr", "columnExprList", "columnExpr", "columnArgList", - "columnArgExpr", "columnLambdaExpr", "hogqlxTagElement", "hogqlxTagAttribute", - "withExprList", "withExpr", "columnIdentifier", "nestedIdentifier", - "tableExpr", "tableFunctionExpr", "tableIdentifier", "tableArgList", - "databaseIdentifier", "floatingLiteral", "numberLiteral", "literal", - "interval", "keyword", "keywordForAlias", "alias", "identifier", "enumValue", - "placeholder", "string", "templateString", "stringContents", "fullTemplateString", - "stringContentsFull" + "statement", "returnStmt", "throwStmt", "catchBlock", "tryCatchStmt", + "ifStmt", "whileStmt", "forStmt", "forInStmt", "funcStmt", "varAssignment", + "exprStmt", "emptyStmt", "block", "kvPair", "kvPairList", "select", + "selectUnionStmt", "selectStmtWithParens", "selectStmt", "withClause", + "topClause", "fromClause", "arrayJoinClause", "windowClause", "prewhereClause", + "whereClause", "groupByClause", "havingClause", "orderByClause", "projectionOrderByClause", + "limitAndOffsetClause", "offsetOnlyClause", "settingsClause", "joinExpr", + "joinOp", "joinOpCross", "joinConstraintClause", "sampleClause", "orderExprList", + "orderExpr", "ratioExpr", "settingExprList", "settingExpr", "windowExpr", + "winPartitionByClause", "winOrderByClause", "winFrameClause", "winFrameExtend", + "winFrameBound", "expr", "columnTypeExpr", "columnExprList", "columnExpr", + "columnArgList", "columnArgExpr", "columnLambdaExpr", "hogqlxTagElement", + "hogqlxTagAttribute", "withExprList", "withExpr", "columnIdentifier", + "nestedIdentifier", "tableExpr", "tableFunctionExpr", "tableIdentifier", + "tableArgList", "databaseIdentifier", "floatingLiteral", "numberLiteral", + "literal", "interval", "keyword", "keywordForAlias", "alias", "identifier", + "enumValue", "placeholder", "string", "templateString", "stringContents", + "fullTemplateString", "stringContentsFull" }, std::vector{ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", @@ -79,42 +79,42 @@ void hogqlparserParserInitialize() { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", "", "", "", "", "'->'", "'*'", "'`'", "'\\'", "':'", "','", "'||'", - "'-'", "'$'", "'.'", "'=='", "'='", "'>='", "'>'", "'#'", "'~*'", - "'=~*'", "'{'", "'['", "'('", "'<='", "'<'", "", "'!~*'", "'!~'", - "'\\u003F.'", "'\\u003F\\u003F'", "'%'", "'+'", "'\\u003F'", "'\"'", - "'f''", "'F''", "'''", "'~'", "'=~'", "'}'", "']'", "')'", "';'", - "'/'", "'_'" + "", "", "", "", "", "", "", "", "", "'->'", "'*'", "'`'", "'\\'", + "':'", "','", "'||'", "'-'", "'$'", "'.'", "'=='", "'='", "'>='", + "'>'", "'#'", "'~*'", "'=~*'", "'{'", "'['", "'('", "'<='", "'<'", + "", "'!~*'", "'!~'", "'\\u003F.'", "'\\u003F\\u003F'", "'%'", "'+'", + "'\\u003F'", "'\"'", "'f''", "'F''", "'''", "'~'", "'=~'", "'}'", + "']'", "')'", "';'", "'/'", "'_'" }, std::vector{ "", "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", "ASOF", - "BETWEEN", "BOTH", "BY", "CASE", "CAST", "COHORT", "COLLATE", "CROSS", - "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", - "ELSE", "END", "EXTRACT", "FINAL", "FIRST", "FN", "FOLLOWING", "FOR", - "FROM", "FULL", "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", "IN", - "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", + "BETWEEN", "BOTH", "BY", "CASE", "CAST", "CATCH", "COHORT", "COLLATE", + "CROSS", "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", + "ELSE", "END", "EXTRACT", "FINAL", "FINALLY", "FIRST", "FN", "FOLLOWING", + "FOR", "FROM", "FULL", "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", + "IN", "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", "NAN_SQL", "NOT", "NULL_SQL", "NULLS", "OFFSET", "ON", "OR", "ORDER", "OUTER", "OVER", "PARTITION", "PRECEDING", "PREWHERE", "QUARTER", "RANGE", "RETURN", "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT", "SEMI", - "SETTINGS", "SUBSTRING", "THEN", "TIES", "TIMESTAMP", "TO", "TOP", - "TOTALS", "TRAILING", "TRIM", "TRUNCATE", "UNBOUNDED", "UNION", "USING", - "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", - "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", - "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW", "ASTERISK", "BACKQUOTE", - "BACKSLASH", "COLON", "COMMA", "CONCAT", "DASH", "DOLLAR", "DOT", - "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", - "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", "LT_EQ", "LT", "NOT_EQ", - "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", "NULLISH", "PERCENT", - "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", "QUOTE_SINGLE_TEMPLATE_FULL", - "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", "RBRACE", "RBRACKET", - "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", "MULTI_LINE_COMMENT", - "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", - "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" + "SETTINGS", "SUBSTRING", "THEN", "THROW", "TIES", "TIMESTAMP", "TO", + "TOP", "TOTALS", "TRAILING", "TRIM", "TRUNCATE", "TRY", "UNBOUNDED", + "UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH", + "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", + "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW", + "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", "CONCAT", + "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT", + "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", + "LT_EQ", "LT", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", + "NULLISH", "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", + "QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", + "RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", + "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT", + "STRING_ESCAPE_TRIGGER", "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" } ); static const int32_t serializedATNSegment[] = { - 4,1,155,1267,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, + 4,1,159,1311,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, @@ -126,465 +126,484 @@ void hogqlparserParserInitialize() { 7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70, 7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77, 7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84, - 7,84,1,0,5,0,172,8,0,10,0,12,0,175,9,0,1,0,1,0,1,1,1,1,3,1,181,8,1,1, - 2,1,2,1,3,1,3,1,3,1,3,1,3,3,3,190,8,3,1,4,1,4,1,4,5,4,195,8,4,10,4,12, - 4,198,9,4,1,4,3,4,201,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5, - 213,8,5,1,6,1,6,3,6,217,8,6,1,6,3,6,220,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1, - 7,3,7,229,8,7,1,8,1,8,1,8,1,8,1,8,1,8,3,8,237,8,8,1,9,1,9,1,9,1,9,1,9, - 3,9,244,8,9,1,9,1,9,3,9,248,8,9,1,9,1,9,1,9,1,9,3,9,254,8,9,1,9,1,9,1, - 9,3,9,259,8,9,1,10,1,10,1,10,1,10,1,10,1,10,3,10,267,8,10,1,10,1,10,1, - 10,1,10,1,10,3,10,274,8,10,1,11,1,11,1,11,1,11,3,11,280,8,11,1,11,1,11, - 1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13,3,13,292,8,13,1,14,1,14,1,15, - 1,15,5,15,298,8,15,10,15,12,15,301,9,15,1,15,1,15,1,16,1,16,1,16,1,16, - 1,17,1,17,1,17,5,17,312,8,17,10,17,12,17,315,9,17,1,17,3,17,318,8,17, - 1,18,1,18,1,18,3,18,323,8,18,1,18,1,18,1,19,1,19,1,19,1,19,5,19,331,8, - 19,10,19,12,19,334,9,19,1,20,1,20,1,20,1,20,1,20,1,20,3,20,342,8,20,1, - 21,3,21,345,8,21,1,21,1,21,3,21,349,8,21,1,21,3,21,352,8,21,1,21,1,21, - 3,21,356,8,21,1,21,3,21,359,8,21,1,21,3,21,362,8,21,1,21,3,21,365,8,21, - 1,21,3,21,368,8,21,1,21,1,21,3,21,372,8,21,1,21,1,21,3,21,376,8,21,1, - 21,3,21,379,8,21,1,21,3,21,382,8,21,1,21,3,21,385,8,21,1,21,1,21,3,21, - 389,8,21,1,21,3,21,392,8,21,1,22,1,22,1,22,1,23,1,23,1,23,1,23,3,23,401, - 8,23,1,24,1,24,1,24,1,25,3,25,407,8,25,1,25,1,25,1,25,1,25,1,26,1,26, - 1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,5,26,426,8,26, - 10,26,12,26,429,9,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29, - 1,29,1,29,1,29,1,29,3,29,445,8,29,1,30,1,30,1,30,1,31,1,31,1,31,1,31, - 1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,3,33,462,8,33,1,33,1,33,1,33, - 1,33,3,33,468,8,33,1,33,1,33,1,33,1,33,3,33,474,8,33,1,33,1,33,1,33,1, - 33,1,33,1,33,1,33,1,33,1,33,3,33,485,8,33,3,33,487,8,33,1,34,1,34,1,34, - 1,35,1,35,1,35,1,36,1,36,1,36,3,36,498,8,36,1,36,3,36,501,8,36,1,36,1, - 36,1,36,1,36,3,36,507,8,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,515,8,36, - 1,36,1,36,1,36,1,36,5,36,521,8,36,10,36,12,36,524,9,36,1,37,3,37,527, - 8,37,1,37,1,37,1,37,3,37,532,8,37,1,37,3,37,535,8,37,1,37,3,37,538,8, - 37,1,37,1,37,3,37,542,8,37,1,37,1,37,3,37,546,8,37,1,37,3,37,549,8,37, - 3,37,551,8,37,1,37,3,37,554,8,37,1,37,1,37,3,37,558,8,37,1,37,1,37,3, - 37,562,8,37,1,37,3,37,565,8,37,3,37,567,8,37,3,37,569,8,37,1,38,1,38, - 1,38,3,38,574,8,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,3,39, - 585,8,39,1,40,1,40,1,40,1,40,3,40,591,8,40,1,41,1,41,1,41,5,41,596,8, - 41,10,41,12,41,599,9,41,1,42,1,42,3,42,603,8,42,1,42,1,42,3,42,607,8, - 42,1,42,1,42,3,42,611,8,42,1,43,1,43,1,43,1,43,3,43,617,8,43,3,43,619, - 8,43,1,44,1,44,1,44,5,44,624,8,44,10,44,12,44,627,9,44,1,45,1,45,1,45, - 1,45,1,46,3,46,634,8,46,1,46,3,46,637,8,46,1,46,3,46,640,8,46,1,47,1, - 47,1,47,1,47,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1, - 50,1,50,3,50,659,8,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1, - 51,1,51,1,51,3,51,673,8,51,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1, - 53,1,53,1,53,1,53,5,53,687,8,53,10,53,12,53,690,9,53,1,53,3,53,693,8, - 53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,5,53,702,8,53,10,53,12,53,705,9, - 53,1,53,3,53,708,8,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,5,53,717,8,53, - 10,53,12,53,720,9,53,1,53,3,53,723,8,53,1,53,1,53,1,53,1,53,1,53,3,53, - 730,8,53,1,53,1,53,3,53,734,8,53,1,54,1,54,1,54,5,54,739,8,54,10,54,12, - 54,742,9,54,1,54,3,54,745,8,54,1,55,1,55,1,55,3,55,750,8,55,1,55,1,55, - 1,55,1,55,1,55,4,55,757,8,55,11,55,12,55,758,1,55,1,55,3,55,763,8,55, - 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55, - 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,787,8,55,1,55,1,55,1,55, - 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,804, - 8,55,1,55,1,55,1,55,1,55,3,55,810,8,55,1,55,3,55,813,8,55,1,55,3,55,816, - 8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,826,8,55,1,55,1,55, - 1,55,1,55,3,55,832,8,55,1,55,3,55,835,8,55,1,55,3,55,838,8,55,1,55,1, - 55,1,55,1,55,1,55,1,55,3,55,846,8,55,1,55,3,55,849,8,55,1,55,1,55,3,55, - 853,8,55,1,55,3,55,856,8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,3,55,870,8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,887,8,55,1,55,1,55,1,55,3, - 55,892,8,55,1,55,1,55,3,55,896,8,55,1,55,1,55,1,55,1,55,3,55,902,8,55, - 1,55,1,55,1,55,1,55,1,55,3,55,909,8,55,1,55,1,55,1,55,1,55,1,55,1,55, - 1,55,1,55,1,55,1,55,3,55,921,8,55,1,55,1,55,3,55,925,8,55,1,55,3,55,928, - 8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,937,8,55,1,55,1,55,1,55, - 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,951,8,55,1,55,1,55, - 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55, - 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55, - 1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,990,8,55,1,55,1,55,1,55,1,55, - 1,55,1,55,3,55,998,8,55,5,55,1000,8,55,10,55,12,55,1003,9,55,1,56,1,56, - 1,56,5,56,1008,8,56,10,56,12,56,1011,9,56,1,56,3,56,1014,8,56,1,57,1, - 57,3,57,1018,8,57,1,58,1,58,1,58,1,58,5,58,1024,8,58,10,58,12,58,1027, - 9,58,1,58,3,58,1030,8,58,1,58,1,58,1,58,1,58,1,58,5,58,1037,8,58,10,58, - 12,58,1040,9,58,1,58,3,58,1043,8,58,3,58,1045,8,58,1,58,1,58,1,58,1,59, - 1,59,1,59,5,59,1053,8,59,10,59,12,59,1056,9,59,1,59,1,59,1,59,1,59,1, - 59,1,59,5,59,1064,8,59,10,59,12,59,1067,9,59,1,59,1,59,3,59,1071,8,59, - 1,59,1,59,1,59,1,59,1,59,3,59,1078,8,59,1,60,1,60,1,60,1,60,1,60,1,60, - 1,60,1,60,1,60,1,60,1,60,3,60,1091,8,60,1,61,1,61,1,61,5,61,1096,8,61, - 10,61,12,61,1099,9,61,1,61,3,61,1102,8,61,1,62,1,62,1,62,1,62,1,62,1, - 62,1,62,1,62,1,62,1,62,3,62,1114,8,62,1,63,1,63,1,63,1,63,3,63,1120,8, - 63,1,63,3,63,1123,8,63,1,64,1,64,1,64,5,64,1128,8,64,10,64,12,64,1131, - 9,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,3,65,1142,8,65,1,65, - 1,65,1,65,1,65,3,65,1148,8,65,5,65,1150,8,65,10,65,12,65,1153,9,65,1, - 66,1,66,1,66,3,66,1158,8,66,1,66,1,66,1,67,1,67,1,67,3,67,1165,8,67,1, - 67,1,67,1,68,1,68,1,68,5,68,1172,8,68,10,68,12,68,1175,9,68,1,68,3,68, - 1178,8,68,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,3,70,1188,8,70,3,70, - 1190,8,70,1,71,3,71,1193,8,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,1201, - 8,71,1,72,1,72,1,72,3,72,1206,8,72,1,73,1,73,1,74,1,74,1,75,1,75,1,76, - 1,76,3,76,1216,8,76,1,77,1,77,1,77,3,77,1221,8,77,1,78,1,78,1,78,1,78, - 1,79,1,79,1,79,1,79,1,80,1,80,3,80,1233,8,80,1,81,1,81,5,81,1237,8,81, - 10,81,12,81,1240,9,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,3,82,1249,8, - 82,1,83,1,83,5,83,1253,8,83,10,83,12,83,1256,9,83,1,83,1,83,1,84,1,84, - 1,84,1,84,1,84,3,84,1265,8,84,1,84,0,3,72,110,130,85,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,132,134,136,138,140, - 142,144,146,148,150,152,154,156,158,160,162,164,166,168,0,16,2,0,17,17, - 72,72,2,0,42,42,49,49,3,0,1,1,4,4,8,8,4,0,1,1,3,4,8,8,78,78,2,0,49,49, - 71,71,2,0,1,1,4,4,2,0,7,7,21,22,2,0,28,28,47,47,2,0,69,69,74,74,3,0,10, - 10,48,48,87,87,2,0,39,39,51,51,1,0,103,104,2,0,114,114,135,135,7,0,20, - 20,36,36,53,54,68,68,76,76,93,93,99,99,12,0,1,19,21,28,30,35,37,40,42, - 49,51,52,56,56,58,67,69,75,77,92,94,95,97,98,4,0,19,19,28,28,37,37,46, - 46,1429,0,173,1,0,0,0,2,180,1,0,0,0,4,182,1,0,0,0,6,184,1,0,0,0,8,191, - 1,0,0,0,10,212,1,0,0,0,12,214,1,0,0,0,14,221,1,0,0,0,16,230,1,0,0,0,18, - 238,1,0,0,0,20,260,1,0,0,0,22,275,1,0,0,0,24,284,1,0,0,0,26,289,1,0,0, - 0,28,293,1,0,0,0,30,295,1,0,0,0,32,304,1,0,0,0,34,308,1,0,0,0,36,322, - 1,0,0,0,38,326,1,0,0,0,40,341,1,0,0,0,42,344,1,0,0,0,44,393,1,0,0,0,46, - 396,1,0,0,0,48,402,1,0,0,0,50,406,1,0,0,0,52,412,1,0,0,0,54,430,1,0,0, - 0,56,433,1,0,0,0,58,436,1,0,0,0,60,446,1,0,0,0,62,449,1,0,0,0,64,453, - 1,0,0,0,66,486,1,0,0,0,68,488,1,0,0,0,70,491,1,0,0,0,72,506,1,0,0,0,74, - 568,1,0,0,0,76,573,1,0,0,0,78,584,1,0,0,0,80,586,1,0,0,0,82,592,1,0,0, - 0,84,600,1,0,0,0,86,618,1,0,0,0,88,620,1,0,0,0,90,628,1,0,0,0,92,633, - 1,0,0,0,94,641,1,0,0,0,96,645,1,0,0,0,98,649,1,0,0,0,100,658,1,0,0,0, - 102,672,1,0,0,0,104,674,1,0,0,0,106,733,1,0,0,0,108,735,1,0,0,0,110,895, - 1,0,0,0,112,1004,1,0,0,0,114,1017,1,0,0,0,116,1044,1,0,0,0,118,1077,1, - 0,0,0,120,1090,1,0,0,0,122,1092,1,0,0,0,124,1113,1,0,0,0,126,1122,1,0, - 0,0,128,1124,1,0,0,0,130,1141,1,0,0,0,132,1154,1,0,0,0,134,1164,1,0,0, - 0,136,1168,1,0,0,0,138,1179,1,0,0,0,140,1189,1,0,0,0,142,1192,1,0,0,0, - 144,1205,1,0,0,0,146,1207,1,0,0,0,148,1209,1,0,0,0,150,1211,1,0,0,0,152, - 1215,1,0,0,0,154,1220,1,0,0,0,156,1222,1,0,0,0,158,1226,1,0,0,0,160,1232, - 1,0,0,0,162,1234,1,0,0,0,164,1248,1,0,0,0,166,1250,1,0,0,0,168,1264,1, - 0,0,0,170,172,3,2,1,0,171,170,1,0,0,0,172,175,1,0,0,0,173,171,1,0,0,0, - 173,174,1,0,0,0,174,176,1,0,0,0,175,173,1,0,0,0,176,177,5,0,0,1,177,1, - 1,0,0,0,178,181,3,6,3,0,179,181,3,10,5,0,180,178,1,0,0,0,180,179,1,0, - 0,0,181,3,1,0,0,0,182,183,3,110,55,0,183,5,1,0,0,0,184,185,5,50,0,0,185, - 189,3,154,77,0,186,187,5,111,0,0,187,188,5,118,0,0,188,190,3,4,2,0,189, - 186,1,0,0,0,189,190,1,0,0,0,190,7,1,0,0,0,191,196,3,154,77,0,192,193, - 5,112,0,0,193,195,3,154,77,0,194,192,1,0,0,0,195,198,1,0,0,0,196,194, - 1,0,0,0,196,197,1,0,0,0,197,200,1,0,0,0,198,196,1,0,0,0,199,201,5,112, - 0,0,200,199,1,0,0,0,200,201,1,0,0,0,201,9,1,0,0,0,202,213,3,12,6,0,203, - 213,3,14,7,0,204,213,3,16,8,0,205,213,3,20,10,0,206,213,3,18,9,0,207, - 213,3,22,11,0,208,213,3,24,12,0,209,213,3,30,15,0,210,213,3,26,13,0,211, - 213,3,28,14,0,212,202,1,0,0,0,212,203,1,0,0,0,212,204,1,0,0,0,212,205, - 1,0,0,0,212,206,1,0,0,0,212,207,1,0,0,0,212,208,1,0,0,0,212,209,1,0,0, - 0,212,210,1,0,0,0,212,211,1,0,0,0,213,11,1,0,0,0,214,216,5,70,0,0,215, - 217,3,4,2,0,216,215,1,0,0,0,216,217,1,0,0,0,217,219,1,0,0,0,218,220,5, - 146,0,0,219,218,1,0,0,0,219,220,1,0,0,0,220,13,1,0,0,0,221,222,5,38,0, - 0,222,223,5,126,0,0,223,224,3,4,2,0,224,225,5,145,0,0,225,228,3,10,5, - 0,226,227,5,24,0,0,227,229,3,10,5,0,228,226,1,0,0,0,228,229,1,0,0,0,229, - 15,1,0,0,0,230,231,5,96,0,0,231,232,5,126,0,0,232,233,3,4,2,0,233,234, - 5,145,0,0,234,236,3,10,5,0,235,237,5,146,0,0,236,235,1,0,0,0,236,237, - 1,0,0,0,237,17,1,0,0,0,238,239,5,31,0,0,239,243,5,126,0,0,240,244,3,6, - 3,0,241,244,3,24,12,0,242,244,3,4,2,0,243,240,1,0,0,0,243,241,1,0,0,0, - 243,242,1,0,0,0,243,244,1,0,0,0,244,245,1,0,0,0,245,247,5,146,0,0,246, - 248,3,4,2,0,247,246,1,0,0,0,247,248,1,0,0,0,248,249,1,0,0,0,249,253,5, - 146,0,0,250,254,3,6,3,0,251,254,3,24,12,0,252,254,3,4,2,0,253,250,1,0, - 0,0,253,251,1,0,0,0,253,252,1,0,0,0,253,254,1,0,0,0,254,255,1,0,0,0,255, - 256,5,145,0,0,256,258,3,10,5,0,257,259,5,146,0,0,258,257,1,0,0,0,258, - 259,1,0,0,0,259,19,1,0,0,0,260,261,5,31,0,0,261,262,5,126,0,0,262,263, - 5,50,0,0,263,266,3,154,77,0,264,265,5,112,0,0,265,267,3,154,77,0,266, - 264,1,0,0,0,266,267,1,0,0,0,267,268,1,0,0,0,268,269,5,40,0,0,269,270, - 3,4,2,0,270,271,5,145,0,0,271,273,3,10,5,0,272,274,5,146,0,0,273,272, - 1,0,0,0,273,274,1,0,0,0,274,21,1,0,0,0,275,276,5,29,0,0,276,277,3,154, - 77,0,277,279,5,126,0,0,278,280,3,8,4,0,279,278,1,0,0,0,279,280,1,0,0, - 0,280,281,1,0,0,0,281,282,5,145,0,0,282,283,3,30,15,0,283,23,1,0,0,0, - 284,285,3,4,2,0,285,286,5,111,0,0,286,287,5,118,0,0,287,288,3,4,2,0,288, - 25,1,0,0,0,289,291,3,4,2,0,290,292,5,146,0,0,291,290,1,0,0,0,291,292, - 1,0,0,0,292,27,1,0,0,0,293,294,5,146,0,0,294,29,1,0,0,0,295,299,5,124, - 0,0,296,298,3,2,1,0,297,296,1,0,0,0,298,301,1,0,0,0,299,297,1,0,0,0,299, - 300,1,0,0,0,300,302,1,0,0,0,301,299,1,0,0,0,302,303,5,143,0,0,303,31, - 1,0,0,0,304,305,3,4,2,0,305,306,5,111,0,0,306,307,3,4,2,0,307,33,1,0, - 0,0,308,313,3,32,16,0,309,310,5,112,0,0,310,312,3,32,16,0,311,309,1,0, - 0,0,312,315,1,0,0,0,313,311,1,0,0,0,313,314,1,0,0,0,314,317,1,0,0,0,315, - 313,1,0,0,0,316,318,5,112,0,0,317,316,1,0,0,0,317,318,1,0,0,0,318,35, - 1,0,0,0,319,323,3,38,19,0,320,323,3,42,21,0,321,323,3,118,59,0,322,319, - 1,0,0,0,322,320,1,0,0,0,322,321,1,0,0,0,323,324,1,0,0,0,324,325,5,0,0, - 1,325,37,1,0,0,0,326,332,3,40,20,0,327,328,5,91,0,0,328,329,5,1,0,0,329, - 331,3,40,20,0,330,327,1,0,0,0,331,334,1,0,0,0,332,330,1,0,0,0,332,333, - 1,0,0,0,333,39,1,0,0,0,334,332,1,0,0,0,335,342,3,42,21,0,336,337,5,126, - 0,0,337,338,3,38,19,0,338,339,5,145,0,0,339,342,1,0,0,0,340,342,3,158, - 79,0,341,335,1,0,0,0,341,336,1,0,0,0,341,340,1,0,0,0,342,41,1,0,0,0,343, - 345,3,44,22,0,344,343,1,0,0,0,344,345,1,0,0,0,345,346,1,0,0,0,346,348, - 5,77,0,0,347,349,5,23,0,0,348,347,1,0,0,0,348,349,1,0,0,0,349,351,1,0, - 0,0,350,352,3,46,23,0,351,350,1,0,0,0,351,352,1,0,0,0,352,353,1,0,0,0, - 353,355,3,108,54,0,354,356,3,48,24,0,355,354,1,0,0,0,355,356,1,0,0,0, - 356,358,1,0,0,0,357,359,3,50,25,0,358,357,1,0,0,0,358,359,1,0,0,0,359, - 361,1,0,0,0,360,362,3,54,27,0,361,360,1,0,0,0,361,362,1,0,0,0,362,364, - 1,0,0,0,363,365,3,56,28,0,364,363,1,0,0,0,364,365,1,0,0,0,365,367,1,0, - 0,0,366,368,3,58,29,0,367,366,1,0,0,0,367,368,1,0,0,0,368,371,1,0,0,0, - 369,370,5,98,0,0,370,372,7,0,0,0,371,369,1,0,0,0,371,372,1,0,0,0,372, - 375,1,0,0,0,373,374,5,98,0,0,374,376,5,86,0,0,375,373,1,0,0,0,375,376, - 1,0,0,0,376,378,1,0,0,0,377,379,3,60,30,0,378,377,1,0,0,0,378,379,1,0, - 0,0,379,381,1,0,0,0,380,382,3,52,26,0,381,380,1,0,0,0,381,382,1,0,0,0, - 382,384,1,0,0,0,383,385,3,62,31,0,384,383,1,0,0,0,384,385,1,0,0,0,385, - 388,1,0,0,0,386,389,3,66,33,0,387,389,3,68,34,0,388,386,1,0,0,0,388,387, - 1,0,0,0,388,389,1,0,0,0,389,391,1,0,0,0,390,392,3,70,35,0,391,390,1,0, - 0,0,391,392,1,0,0,0,392,43,1,0,0,0,393,394,5,98,0,0,394,395,3,122,61, - 0,395,45,1,0,0,0,396,397,5,85,0,0,397,400,5,104,0,0,398,399,5,98,0,0, - 399,401,5,82,0,0,400,398,1,0,0,0,400,401,1,0,0,0,401,47,1,0,0,0,402,403, - 5,32,0,0,403,404,3,72,36,0,404,49,1,0,0,0,405,407,7,1,0,0,406,405,1,0, - 0,0,406,407,1,0,0,0,407,408,1,0,0,0,408,409,5,5,0,0,409,410,5,45,0,0, - 410,411,3,108,54,0,411,51,1,0,0,0,412,413,5,97,0,0,413,414,3,154,77,0, - 414,415,5,6,0,0,415,416,5,126,0,0,416,417,3,92,46,0,417,427,5,145,0,0, - 418,419,5,112,0,0,419,420,3,154,77,0,420,421,5,6,0,0,421,422,5,126,0, - 0,422,423,3,92,46,0,423,424,5,145,0,0,424,426,1,0,0,0,425,418,1,0,0,0, - 426,429,1,0,0,0,427,425,1,0,0,0,427,428,1,0,0,0,428,53,1,0,0,0,429,427, - 1,0,0,0,430,431,5,67,0,0,431,432,3,110,55,0,432,55,1,0,0,0,433,434,5, - 95,0,0,434,435,3,110,55,0,435,57,1,0,0,0,436,437,5,34,0,0,437,444,5,11, - 0,0,438,439,7,0,0,0,439,440,5,126,0,0,440,441,3,108,54,0,441,442,5,145, - 0,0,442,445,1,0,0,0,443,445,3,108,54,0,444,438,1,0,0,0,444,443,1,0,0, - 0,445,59,1,0,0,0,446,447,5,35,0,0,447,448,3,110,55,0,448,61,1,0,0,0,449, - 450,5,62,0,0,450,451,5,11,0,0,451,452,3,82,41,0,452,63,1,0,0,0,453,454, - 5,62,0,0,454,455,5,11,0,0,455,456,3,108,54,0,456,65,1,0,0,0,457,458,5, - 52,0,0,458,461,3,110,55,0,459,460,5,112,0,0,460,462,3,110,55,0,461,459, - 1,0,0,0,461,462,1,0,0,0,462,467,1,0,0,0,463,464,5,98,0,0,464,468,5,82, - 0,0,465,466,5,11,0,0,466,468,3,108,54,0,467,463,1,0,0,0,467,465,1,0,0, - 0,467,468,1,0,0,0,468,487,1,0,0,0,469,470,5,52,0,0,470,473,3,110,55,0, - 471,472,5,98,0,0,472,474,5,82,0,0,473,471,1,0,0,0,473,474,1,0,0,0,474, - 475,1,0,0,0,475,476,5,59,0,0,476,477,3,110,55,0,477,487,1,0,0,0,478,479, - 5,52,0,0,479,480,3,110,55,0,480,481,5,59,0,0,481,484,3,110,55,0,482,483, - 5,11,0,0,483,485,3,108,54,0,484,482,1,0,0,0,484,485,1,0,0,0,485,487,1, - 0,0,0,486,457,1,0,0,0,486,469,1,0,0,0,486,478,1,0,0,0,487,67,1,0,0,0, - 488,489,5,59,0,0,489,490,3,110,55,0,490,69,1,0,0,0,491,492,5,79,0,0,492, - 493,3,88,44,0,493,71,1,0,0,0,494,495,6,36,-1,0,495,497,3,130,65,0,496, - 498,5,27,0,0,497,496,1,0,0,0,497,498,1,0,0,0,498,500,1,0,0,0,499,501, - 3,80,40,0,500,499,1,0,0,0,500,501,1,0,0,0,501,507,1,0,0,0,502,503,5,126, - 0,0,503,504,3,72,36,0,504,505,5,145,0,0,505,507,1,0,0,0,506,494,1,0,0, - 0,506,502,1,0,0,0,507,522,1,0,0,0,508,509,10,3,0,0,509,510,3,76,38,0, - 510,511,3,72,36,4,511,521,1,0,0,0,512,514,10,4,0,0,513,515,3,74,37,0, - 514,513,1,0,0,0,514,515,1,0,0,0,515,516,1,0,0,0,516,517,5,45,0,0,517, - 518,3,72,36,0,518,519,3,78,39,0,519,521,1,0,0,0,520,508,1,0,0,0,520,512, - 1,0,0,0,521,524,1,0,0,0,522,520,1,0,0,0,522,523,1,0,0,0,523,73,1,0,0, - 0,524,522,1,0,0,0,525,527,7,2,0,0,526,525,1,0,0,0,526,527,1,0,0,0,527, - 528,1,0,0,0,528,535,5,42,0,0,529,531,5,42,0,0,530,532,7,2,0,0,531,530, - 1,0,0,0,531,532,1,0,0,0,532,535,1,0,0,0,533,535,7,2,0,0,534,526,1,0,0, - 0,534,529,1,0,0,0,534,533,1,0,0,0,535,569,1,0,0,0,536,538,7,3,0,0,537, - 536,1,0,0,0,537,538,1,0,0,0,538,539,1,0,0,0,539,541,7,4,0,0,540,542,5, - 63,0,0,541,540,1,0,0,0,541,542,1,0,0,0,542,551,1,0,0,0,543,545,7,4,0, - 0,544,546,5,63,0,0,545,544,1,0,0,0,545,546,1,0,0,0,546,548,1,0,0,0,547, - 549,7,3,0,0,548,547,1,0,0,0,548,549,1,0,0,0,549,551,1,0,0,0,550,537,1, - 0,0,0,550,543,1,0,0,0,551,569,1,0,0,0,552,554,7,5,0,0,553,552,1,0,0,0, - 553,554,1,0,0,0,554,555,1,0,0,0,555,557,5,33,0,0,556,558,5,63,0,0,557, - 556,1,0,0,0,557,558,1,0,0,0,558,567,1,0,0,0,559,561,5,33,0,0,560,562, - 5,63,0,0,561,560,1,0,0,0,561,562,1,0,0,0,562,564,1,0,0,0,563,565,7,5, - 0,0,564,563,1,0,0,0,564,565,1,0,0,0,565,567,1,0,0,0,566,553,1,0,0,0,566, - 559,1,0,0,0,567,569,1,0,0,0,568,534,1,0,0,0,568,550,1,0,0,0,568,566,1, - 0,0,0,569,75,1,0,0,0,570,571,5,16,0,0,571,574,5,45,0,0,572,574,5,112, - 0,0,573,570,1,0,0,0,573,572,1,0,0,0,574,77,1,0,0,0,575,576,5,60,0,0,576, - 585,3,108,54,0,577,578,5,92,0,0,578,579,5,126,0,0,579,580,3,108,54,0, - 580,581,5,145,0,0,581,585,1,0,0,0,582,583,5,92,0,0,583,585,3,108,54,0, - 584,575,1,0,0,0,584,577,1,0,0,0,584,582,1,0,0,0,585,79,1,0,0,0,586,587, - 5,75,0,0,587,590,3,86,43,0,588,589,5,59,0,0,589,591,3,86,43,0,590,588, - 1,0,0,0,590,591,1,0,0,0,591,81,1,0,0,0,592,597,3,84,42,0,593,594,5,112, - 0,0,594,596,3,84,42,0,595,593,1,0,0,0,596,599,1,0,0,0,597,595,1,0,0,0, - 597,598,1,0,0,0,598,83,1,0,0,0,599,597,1,0,0,0,600,602,3,110,55,0,601, - 603,7,6,0,0,602,601,1,0,0,0,602,603,1,0,0,0,603,606,1,0,0,0,604,605,5, - 58,0,0,605,607,7,7,0,0,606,604,1,0,0,0,606,607,1,0,0,0,607,610,1,0,0, - 0,608,609,5,15,0,0,609,611,5,106,0,0,610,608,1,0,0,0,610,611,1,0,0,0, - 611,85,1,0,0,0,612,619,3,158,79,0,613,616,3,142,71,0,614,615,5,147,0, - 0,615,617,3,142,71,0,616,614,1,0,0,0,616,617,1,0,0,0,617,619,1,0,0,0, - 618,612,1,0,0,0,618,613,1,0,0,0,619,87,1,0,0,0,620,625,3,90,45,0,621, - 622,5,112,0,0,622,624,3,90,45,0,623,621,1,0,0,0,624,627,1,0,0,0,625,623, - 1,0,0,0,625,626,1,0,0,0,626,89,1,0,0,0,627,625,1,0,0,0,628,629,3,154, - 77,0,629,630,5,118,0,0,630,631,3,144,72,0,631,91,1,0,0,0,632,634,3,94, - 47,0,633,632,1,0,0,0,633,634,1,0,0,0,634,636,1,0,0,0,635,637,3,96,48, - 0,636,635,1,0,0,0,636,637,1,0,0,0,637,639,1,0,0,0,638,640,3,98,49,0,639, - 638,1,0,0,0,639,640,1,0,0,0,640,93,1,0,0,0,641,642,5,65,0,0,642,643,5, - 11,0,0,643,644,3,108,54,0,644,95,1,0,0,0,645,646,5,62,0,0,646,647,5,11, - 0,0,647,648,3,82,41,0,648,97,1,0,0,0,649,650,7,8,0,0,650,651,3,100,50, - 0,651,99,1,0,0,0,652,659,3,102,51,0,653,654,5,9,0,0,654,655,3,102,51, - 0,655,656,5,2,0,0,656,657,3,102,51,0,657,659,1,0,0,0,658,652,1,0,0,0, - 658,653,1,0,0,0,659,101,1,0,0,0,660,661,5,18,0,0,661,673,5,73,0,0,662, - 663,5,90,0,0,663,673,5,66,0,0,664,665,5,90,0,0,665,673,5,30,0,0,666,667, - 3,142,71,0,667,668,5,66,0,0,668,673,1,0,0,0,669,670,3,142,71,0,670,671, - 5,30,0,0,671,673,1,0,0,0,672,660,1,0,0,0,672,662,1,0,0,0,672,664,1,0, - 0,0,672,666,1,0,0,0,672,669,1,0,0,0,673,103,1,0,0,0,674,675,3,110,55, - 0,675,676,5,0,0,1,676,105,1,0,0,0,677,734,3,154,77,0,678,679,3,154,77, - 0,679,680,5,126,0,0,680,681,3,154,77,0,681,688,3,106,53,0,682,683,5,112, - 0,0,683,684,3,154,77,0,684,685,3,106,53,0,685,687,1,0,0,0,686,682,1,0, - 0,0,687,690,1,0,0,0,688,686,1,0,0,0,688,689,1,0,0,0,689,692,1,0,0,0,690, - 688,1,0,0,0,691,693,5,112,0,0,692,691,1,0,0,0,692,693,1,0,0,0,693,694, - 1,0,0,0,694,695,5,145,0,0,695,734,1,0,0,0,696,697,3,154,77,0,697,698, - 5,126,0,0,698,703,3,156,78,0,699,700,5,112,0,0,700,702,3,156,78,0,701, - 699,1,0,0,0,702,705,1,0,0,0,703,701,1,0,0,0,703,704,1,0,0,0,704,707,1, - 0,0,0,705,703,1,0,0,0,706,708,5,112,0,0,707,706,1,0,0,0,707,708,1,0,0, - 0,708,709,1,0,0,0,709,710,5,145,0,0,710,734,1,0,0,0,711,712,3,154,77, - 0,712,713,5,126,0,0,713,718,3,106,53,0,714,715,5,112,0,0,715,717,3,106, - 53,0,716,714,1,0,0,0,717,720,1,0,0,0,718,716,1,0,0,0,718,719,1,0,0,0, - 719,722,1,0,0,0,720,718,1,0,0,0,721,723,5,112,0,0,722,721,1,0,0,0,722, - 723,1,0,0,0,723,724,1,0,0,0,724,725,5,145,0,0,725,734,1,0,0,0,726,727, - 3,154,77,0,727,729,5,126,0,0,728,730,3,108,54,0,729,728,1,0,0,0,729,730, - 1,0,0,0,730,731,1,0,0,0,731,732,5,145,0,0,732,734,1,0,0,0,733,677,1,0, - 0,0,733,678,1,0,0,0,733,696,1,0,0,0,733,711,1,0,0,0,733,726,1,0,0,0,734, - 107,1,0,0,0,735,740,3,110,55,0,736,737,5,112,0,0,737,739,3,110,55,0,738, - 736,1,0,0,0,739,742,1,0,0,0,740,738,1,0,0,0,740,741,1,0,0,0,741,744,1, - 0,0,0,742,740,1,0,0,0,743,745,5,112,0,0,744,743,1,0,0,0,744,745,1,0,0, - 0,745,109,1,0,0,0,746,747,6,55,-1,0,747,749,5,12,0,0,748,750,3,110,55, - 0,749,748,1,0,0,0,749,750,1,0,0,0,750,756,1,0,0,0,751,752,5,94,0,0,752, - 753,3,110,55,0,753,754,5,81,0,0,754,755,3,110,55,0,755,757,1,0,0,0,756, - 751,1,0,0,0,757,758,1,0,0,0,758,756,1,0,0,0,758,759,1,0,0,0,759,762,1, - 0,0,0,760,761,5,24,0,0,761,763,3,110,55,0,762,760,1,0,0,0,762,763,1,0, - 0,0,763,764,1,0,0,0,764,765,5,25,0,0,765,896,1,0,0,0,766,767,5,13,0,0, - 767,768,5,126,0,0,768,769,3,110,55,0,769,770,5,6,0,0,770,771,3,106,53, - 0,771,772,5,145,0,0,772,896,1,0,0,0,773,774,5,19,0,0,774,896,5,106,0, - 0,775,776,5,43,0,0,776,777,3,110,55,0,777,778,3,146,73,0,778,896,1,0, - 0,0,779,780,5,80,0,0,780,781,5,126,0,0,781,782,3,110,55,0,782,783,5,32, - 0,0,783,786,3,110,55,0,784,785,5,31,0,0,785,787,3,110,55,0,786,784,1, - 0,0,0,786,787,1,0,0,0,787,788,1,0,0,0,788,789,5,145,0,0,789,896,1,0,0, - 0,790,791,5,83,0,0,791,896,5,106,0,0,792,793,5,88,0,0,793,794,5,126,0, - 0,794,795,7,9,0,0,795,796,3,160,80,0,796,797,5,32,0,0,797,798,3,110,55, - 0,798,799,5,145,0,0,799,896,1,0,0,0,800,801,3,154,77,0,801,803,5,126, - 0,0,802,804,3,108,54,0,803,802,1,0,0,0,803,804,1,0,0,0,804,805,1,0,0, - 0,805,806,5,145,0,0,806,815,1,0,0,0,807,809,5,126,0,0,808,810,5,23,0, - 0,809,808,1,0,0,0,809,810,1,0,0,0,810,812,1,0,0,0,811,813,3,112,56,0, - 812,811,1,0,0,0,812,813,1,0,0,0,813,814,1,0,0,0,814,816,5,145,0,0,815, - 807,1,0,0,0,815,816,1,0,0,0,816,817,1,0,0,0,817,818,5,64,0,0,818,819, - 5,126,0,0,819,820,3,92,46,0,820,821,5,145,0,0,821,896,1,0,0,0,822,823, - 3,154,77,0,823,825,5,126,0,0,824,826,3,108,54,0,825,824,1,0,0,0,825,826, - 1,0,0,0,826,827,1,0,0,0,827,828,5,145,0,0,828,837,1,0,0,0,829,831,5,126, - 0,0,830,832,5,23,0,0,831,830,1,0,0,0,831,832,1,0,0,0,832,834,1,0,0,0, - 833,835,3,112,56,0,834,833,1,0,0,0,834,835,1,0,0,0,835,836,1,0,0,0,836, - 838,5,145,0,0,837,829,1,0,0,0,837,838,1,0,0,0,838,839,1,0,0,0,839,840, - 5,64,0,0,840,841,3,154,77,0,841,896,1,0,0,0,842,848,3,154,77,0,843,845, - 5,126,0,0,844,846,3,108,54,0,845,844,1,0,0,0,845,846,1,0,0,0,846,847, - 1,0,0,0,847,849,5,145,0,0,848,843,1,0,0,0,848,849,1,0,0,0,849,850,1,0, - 0,0,850,852,5,126,0,0,851,853,5,23,0,0,852,851,1,0,0,0,852,853,1,0,0, - 0,853,855,1,0,0,0,854,856,3,112,56,0,855,854,1,0,0,0,855,856,1,0,0,0, - 856,857,1,0,0,0,857,858,5,145,0,0,858,896,1,0,0,0,859,896,3,118,59,0, - 860,896,3,162,81,0,861,896,3,144,72,0,862,863,5,114,0,0,863,896,3,110, - 55,19,864,865,5,56,0,0,865,896,3,110,55,13,866,867,3,134,67,0,867,868, - 5,116,0,0,868,870,1,0,0,0,869,866,1,0,0,0,869,870,1,0,0,0,870,871,1,0, - 0,0,871,896,5,108,0,0,872,873,5,126,0,0,873,874,3,38,19,0,874,875,5,145, - 0,0,875,896,1,0,0,0,876,877,5,126,0,0,877,878,3,110,55,0,878,879,5,145, - 0,0,879,896,1,0,0,0,880,881,5,126,0,0,881,882,3,108,54,0,882,883,5,145, - 0,0,883,896,1,0,0,0,884,886,5,125,0,0,885,887,3,108,54,0,886,885,1,0, - 0,0,886,887,1,0,0,0,887,888,1,0,0,0,888,896,5,144,0,0,889,891,5,124,0, - 0,890,892,3,34,17,0,891,890,1,0,0,0,891,892,1,0,0,0,892,893,1,0,0,0,893, - 896,5,143,0,0,894,896,3,126,63,0,895,746,1,0,0,0,895,766,1,0,0,0,895, - 773,1,0,0,0,895,775,1,0,0,0,895,779,1,0,0,0,895,790,1,0,0,0,895,792,1, - 0,0,0,895,800,1,0,0,0,895,822,1,0,0,0,895,842,1,0,0,0,895,859,1,0,0,0, - 895,860,1,0,0,0,895,861,1,0,0,0,895,862,1,0,0,0,895,864,1,0,0,0,895,869, - 1,0,0,0,895,872,1,0,0,0,895,876,1,0,0,0,895,880,1,0,0,0,895,884,1,0,0, - 0,895,889,1,0,0,0,895,894,1,0,0,0,896,1001,1,0,0,0,897,901,10,18,0,0, - 898,902,5,108,0,0,899,902,5,147,0,0,900,902,5,134,0,0,901,898,1,0,0,0, - 901,899,1,0,0,0,901,900,1,0,0,0,902,903,1,0,0,0,903,1000,3,110,55,19, - 904,908,10,17,0,0,905,909,5,135,0,0,906,909,5,114,0,0,907,909,5,113,0, - 0,908,905,1,0,0,0,908,906,1,0,0,0,908,907,1,0,0,0,909,910,1,0,0,0,910, - 1000,3,110,55,18,911,936,10,16,0,0,912,937,5,117,0,0,913,937,5,118,0, - 0,914,937,5,129,0,0,915,937,5,127,0,0,916,937,5,128,0,0,917,937,5,119, - 0,0,918,937,5,120,0,0,919,921,5,56,0,0,920,919,1,0,0,0,920,921,1,0,0, - 0,921,922,1,0,0,0,922,924,5,40,0,0,923,925,5,14,0,0,924,923,1,0,0,0,924, - 925,1,0,0,0,925,937,1,0,0,0,926,928,5,56,0,0,927,926,1,0,0,0,927,928, - 1,0,0,0,928,929,1,0,0,0,929,937,7,10,0,0,930,937,5,141,0,0,931,937,5, - 142,0,0,932,937,5,131,0,0,933,937,5,122,0,0,934,937,5,123,0,0,935,937, - 5,130,0,0,936,912,1,0,0,0,936,913,1,0,0,0,936,914,1,0,0,0,936,915,1,0, - 0,0,936,916,1,0,0,0,936,917,1,0,0,0,936,918,1,0,0,0,936,920,1,0,0,0,936, - 927,1,0,0,0,936,930,1,0,0,0,936,931,1,0,0,0,936,932,1,0,0,0,936,933,1, - 0,0,0,936,934,1,0,0,0,936,935,1,0,0,0,937,938,1,0,0,0,938,1000,3,110, - 55,17,939,940,10,14,0,0,940,941,5,133,0,0,941,1000,3,110,55,15,942,943, - 10,12,0,0,943,944,5,2,0,0,944,1000,3,110,55,13,945,946,10,11,0,0,946, - 947,5,61,0,0,947,1000,3,110,55,12,948,950,10,10,0,0,949,951,5,56,0,0, - 950,949,1,0,0,0,950,951,1,0,0,0,951,952,1,0,0,0,952,953,5,9,0,0,953,954, - 3,110,55,0,954,955,5,2,0,0,955,956,3,110,55,11,956,1000,1,0,0,0,957,958, - 10,9,0,0,958,959,5,136,0,0,959,960,3,110,55,0,960,961,5,111,0,0,961,962, - 3,110,55,9,962,1000,1,0,0,0,963,964,10,25,0,0,964,965,5,125,0,0,965,966, - 3,110,55,0,966,967,5,144,0,0,967,1000,1,0,0,0,968,969,10,24,0,0,969,970, - 5,116,0,0,970,1000,5,104,0,0,971,972,10,23,0,0,972,973,5,116,0,0,973, - 1000,3,154,77,0,974,975,10,22,0,0,975,976,5,132,0,0,976,977,5,125,0,0, - 977,978,3,110,55,0,978,979,5,144,0,0,979,1000,1,0,0,0,980,981,10,21,0, - 0,981,982,5,132,0,0,982,1000,5,104,0,0,983,984,10,20,0,0,984,985,5,132, - 0,0,985,1000,3,154,77,0,986,987,10,15,0,0,987,989,5,44,0,0,988,990,5, - 56,0,0,989,988,1,0,0,0,989,990,1,0,0,0,990,991,1,0,0,0,991,1000,5,57, - 0,0,992,997,10,8,0,0,993,994,5,6,0,0,994,998,3,154,77,0,995,996,5,6,0, - 0,996,998,5,106,0,0,997,993,1,0,0,0,997,995,1,0,0,0,998,1000,1,0,0,0, - 999,897,1,0,0,0,999,904,1,0,0,0,999,911,1,0,0,0,999,939,1,0,0,0,999,942, - 1,0,0,0,999,945,1,0,0,0,999,948,1,0,0,0,999,957,1,0,0,0,999,963,1,0,0, - 0,999,968,1,0,0,0,999,971,1,0,0,0,999,974,1,0,0,0,999,980,1,0,0,0,999, - 983,1,0,0,0,999,986,1,0,0,0,999,992,1,0,0,0,1000,1003,1,0,0,0,1001,999, - 1,0,0,0,1001,1002,1,0,0,0,1002,111,1,0,0,0,1003,1001,1,0,0,0,1004,1009, - 3,114,57,0,1005,1006,5,112,0,0,1006,1008,3,114,57,0,1007,1005,1,0,0,0, - 1008,1011,1,0,0,0,1009,1007,1,0,0,0,1009,1010,1,0,0,0,1010,1013,1,0,0, - 0,1011,1009,1,0,0,0,1012,1014,5,112,0,0,1013,1012,1,0,0,0,1013,1014,1, - 0,0,0,1014,113,1,0,0,0,1015,1018,3,116,58,0,1016,1018,3,110,55,0,1017, - 1015,1,0,0,0,1017,1016,1,0,0,0,1018,115,1,0,0,0,1019,1020,5,126,0,0,1020, - 1025,3,154,77,0,1021,1022,5,112,0,0,1022,1024,3,154,77,0,1023,1021,1, - 0,0,0,1024,1027,1,0,0,0,1025,1023,1,0,0,0,1025,1026,1,0,0,0,1026,1029, - 1,0,0,0,1027,1025,1,0,0,0,1028,1030,5,112,0,0,1029,1028,1,0,0,0,1029, - 1030,1,0,0,0,1030,1031,1,0,0,0,1031,1032,5,145,0,0,1032,1045,1,0,0,0, - 1033,1038,3,154,77,0,1034,1035,5,112,0,0,1035,1037,3,154,77,0,1036,1034, - 1,0,0,0,1037,1040,1,0,0,0,1038,1036,1,0,0,0,1038,1039,1,0,0,0,1039,1042, - 1,0,0,0,1040,1038,1,0,0,0,1041,1043,5,112,0,0,1042,1041,1,0,0,0,1042, - 1043,1,0,0,0,1043,1045,1,0,0,0,1044,1019,1,0,0,0,1044,1033,1,0,0,0,1045, - 1046,1,0,0,0,1046,1047,5,107,0,0,1047,1048,3,110,55,0,1048,117,1,0,0, - 0,1049,1050,5,128,0,0,1050,1054,3,154,77,0,1051,1053,3,120,60,0,1052, - 1051,1,0,0,0,1053,1056,1,0,0,0,1054,1052,1,0,0,0,1054,1055,1,0,0,0,1055, - 1057,1,0,0,0,1056,1054,1,0,0,0,1057,1058,5,147,0,0,1058,1059,5,120,0, - 0,1059,1078,1,0,0,0,1060,1061,5,128,0,0,1061,1065,3,154,77,0,1062,1064, - 3,120,60,0,1063,1062,1,0,0,0,1064,1067,1,0,0,0,1065,1063,1,0,0,0,1065, - 1066,1,0,0,0,1066,1068,1,0,0,0,1067,1065,1,0,0,0,1068,1070,5,120,0,0, - 1069,1071,3,118,59,0,1070,1069,1,0,0,0,1070,1071,1,0,0,0,1071,1072,1, - 0,0,0,1072,1073,5,128,0,0,1073,1074,5,147,0,0,1074,1075,3,154,77,0,1075, - 1076,5,120,0,0,1076,1078,1,0,0,0,1077,1049,1,0,0,0,1077,1060,1,0,0,0, - 1078,119,1,0,0,0,1079,1080,3,154,77,0,1080,1081,5,118,0,0,1081,1082,3, - 160,80,0,1082,1091,1,0,0,0,1083,1084,3,154,77,0,1084,1085,5,118,0,0,1085, - 1086,5,124,0,0,1086,1087,3,110,55,0,1087,1088,5,143,0,0,1088,1091,1,0, - 0,0,1089,1091,3,154,77,0,1090,1079,1,0,0,0,1090,1083,1,0,0,0,1090,1089, - 1,0,0,0,1091,121,1,0,0,0,1092,1097,3,124,62,0,1093,1094,5,112,0,0,1094, - 1096,3,124,62,0,1095,1093,1,0,0,0,1096,1099,1,0,0,0,1097,1095,1,0,0,0, - 1097,1098,1,0,0,0,1098,1101,1,0,0,0,1099,1097,1,0,0,0,1100,1102,5,112, - 0,0,1101,1100,1,0,0,0,1101,1102,1,0,0,0,1102,123,1,0,0,0,1103,1104,3, - 154,77,0,1104,1105,5,6,0,0,1105,1106,5,126,0,0,1106,1107,3,38,19,0,1107, - 1108,5,145,0,0,1108,1114,1,0,0,0,1109,1110,3,110,55,0,1110,1111,5,6,0, - 0,1111,1112,3,154,77,0,1112,1114,1,0,0,0,1113,1103,1,0,0,0,1113,1109, - 1,0,0,0,1114,125,1,0,0,0,1115,1123,3,158,79,0,1116,1117,3,134,67,0,1117, - 1118,5,116,0,0,1118,1120,1,0,0,0,1119,1116,1,0,0,0,1119,1120,1,0,0,0, - 1120,1121,1,0,0,0,1121,1123,3,128,64,0,1122,1115,1,0,0,0,1122,1119,1, - 0,0,0,1123,127,1,0,0,0,1124,1129,3,154,77,0,1125,1126,5,116,0,0,1126, - 1128,3,154,77,0,1127,1125,1,0,0,0,1128,1131,1,0,0,0,1129,1127,1,0,0,0, - 1129,1130,1,0,0,0,1130,129,1,0,0,0,1131,1129,1,0,0,0,1132,1133,6,65,-1, - 0,1133,1142,3,134,67,0,1134,1142,3,132,66,0,1135,1136,5,126,0,0,1136, - 1137,3,38,19,0,1137,1138,5,145,0,0,1138,1142,1,0,0,0,1139,1142,3,118, - 59,0,1140,1142,3,158,79,0,1141,1132,1,0,0,0,1141,1134,1,0,0,0,1141,1135, - 1,0,0,0,1141,1139,1,0,0,0,1141,1140,1,0,0,0,1142,1151,1,0,0,0,1143,1147, - 10,3,0,0,1144,1148,3,152,76,0,1145,1146,5,6,0,0,1146,1148,3,154,77,0, - 1147,1144,1,0,0,0,1147,1145,1,0,0,0,1148,1150,1,0,0,0,1149,1143,1,0,0, - 0,1150,1153,1,0,0,0,1151,1149,1,0,0,0,1151,1152,1,0,0,0,1152,131,1,0, - 0,0,1153,1151,1,0,0,0,1154,1155,3,154,77,0,1155,1157,5,126,0,0,1156,1158, - 3,136,68,0,1157,1156,1,0,0,0,1157,1158,1,0,0,0,1158,1159,1,0,0,0,1159, - 1160,5,145,0,0,1160,133,1,0,0,0,1161,1162,3,138,69,0,1162,1163,5,116, - 0,0,1163,1165,1,0,0,0,1164,1161,1,0,0,0,1164,1165,1,0,0,0,1165,1166,1, - 0,0,0,1166,1167,3,154,77,0,1167,135,1,0,0,0,1168,1173,3,110,55,0,1169, - 1170,5,112,0,0,1170,1172,3,110,55,0,1171,1169,1,0,0,0,1172,1175,1,0,0, - 0,1173,1171,1,0,0,0,1173,1174,1,0,0,0,1174,1177,1,0,0,0,1175,1173,1,0, - 0,0,1176,1178,5,112,0,0,1177,1176,1,0,0,0,1177,1178,1,0,0,0,1178,137, - 1,0,0,0,1179,1180,3,154,77,0,1180,139,1,0,0,0,1181,1190,5,102,0,0,1182, - 1183,5,116,0,0,1183,1190,7,11,0,0,1184,1185,5,104,0,0,1185,1187,5,116, - 0,0,1186,1188,7,11,0,0,1187,1186,1,0,0,0,1187,1188,1,0,0,0,1188,1190, - 1,0,0,0,1189,1181,1,0,0,0,1189,1182,1,0,0,0,1189,1184,1,0,0,0,1190,141, - 1,0,0,0,1191,1193,7,12,0,0,1192,1191,1,0,0,0,1192,1193,1,0,0,0,1193,1200, - 1,0,0,0,1194,1201,3,140,70,0,1195,1201,5,103,0,0,1196,1201,5,104,0,0, - 1197,1201,5,105,0,0,1198,1201,5,41,0,0,1199,1201,5,55,0,0,1200,1194,1, - 0,0,0,1200,1195,1,0,0,0,1200,1196,1,0,0,0,1200,1197,1,0,0,0,1200,1198, - 1,0,0,0,1200,1199,1,0,0,0,1201,143,1,0,0,0,1202,1206,3,142,71,0,1203, - 1206,5,106,0,0,1204,1206,5,57,0,0,1205,1202,1,0,0,0,1205,1203,1,0,0,0, - 1205,1204,1,0,0,0,1206,145,1,0,0,0,1207,1208,7,13,0,0,1208,147,1,0,0, - 0,1209,1210,7,14,0,0,1210,149,1,0,0,0,1211,1212,7,15,0,0,1212,151,1,0, - 0,0,1213,1216,5,101,0,0,1214,1216,3,150,75,0,1215,1213,1,0,0,0,1215,1214, - 1,0,0,0,1216,153,1,0,0,0,1217,1221,5,101,0,0,1218,1221,3,146,73,0,1219, - 1221,3,148,74,0,1220,1217,1,0,0,0,1220,1218,1,0,0,0,1220,1219,1,0,0,0, - 1221,155,1,0,0,0,1222,1223,3,160,80,0,1223,1224,5,118,0,0,1224,1225,3, - 142,71,0,1225,157,1,0,0,0,1226,1227,5,124,0,0,1227,1228,3,154,77,0,1228, - 1229,5,143,0,0,1229,159,1,0,0,0,1230,1233,5,106,0,0,1231,1233,3,162,81, - 0,1232,1230,1,0,0,0,1232,1231,1,0,0,0,1233,161,1,0,0,0,1234,1238,5,138, - 0,0,1235,1237,3,164,82,0,1236,1235,1,0,0,0,1237,1240,1,0,0,0,1238,1236, - 1,0,0,0,1238,1239,1,0,0,0,1239,1241,1,0,0,0,1240,1238,1,0,0,0,1241,1242, - 5,140,0,0,1242,163,1,0,0,0,1243,1244,5,153,0,0,1244,1245,3,110,55,0,1245, - 1246,5,143,0,0,1246,1249,1,0,0,0,1247,1249,5,152,0,0,1248,1243,1,0,0, - 0,1248,1247,1,0,0,0,1249,165,1,0,0,0,1250,1254,5,139,0,0,1251,1253,3, - 168,84,0,1252,1251,1,0,0,0,1253,1256,1,0,0,0,1254,1252,1,0,0,0,1254,1255, - 1,0,0,0,1255,1257,1,0,0,0,1256,1254,1,0,0,0,1257,1258,5,0,0,1,1258,167, - 1,0,0,0,1259,1260,5,155,0,0,1260,1261,3,110,55,0,1261,1262,5,143,0,0, - 1262,1265,1,0,0,0,1263,1265,5,154,0,0,1264,1259,1,0,0,0,1264,1263,1,0, - 0,0,1265,169,1,0,0,0,162,173,180,189,196,200,212,216,219,228,236,243, - 247,253,258,266,273,279,291,299,313,317,322,332,341,344,348,351,355,358, - 361,364,367,371,375,378,381,384,388,391,400,406,427,444,461,467,473,484, - 486,497,500,506,514,520,522,526,531,534,537,541,545,548,550,553,557,561, - 564,566,568,573,584,590,597,602,606,610,616,618,625,633,636,639,658,672, - 688,692,703,707,718,722,729,733,740,744,749,758,762,786,803,809,812,815, - 825,831,834,837,845,848,852,855,869,886,891,895,901,908,920,924,927,936, - 950,989,997,999,1001,1009,1013,1017,1025,1029,1038,1042,1044,1054,1065, - 1070,1077,1090,1097,1101,1113,1119,1122,1129,1141,1147,1151,1157,1164, - 1173,1177,1187,1189,1192,1200,1205,1215,1220,1232,1238,1248,1254,1264 + 7,84,2,85,7,85,2,86,7,86,2,87,7,87,1,0,5,0,178,8,0,10,0,12,0,181,9,0, + 1,0,1,0,1,1,1,1,3,1,187,8,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,3,3,196,8,3,1, + 4,1,4,1,4,5,4,201,8,4,10,4,12,4,204,9,4,1,4,3,4,207,8,4,1,5,1,5,1,5,1, + 5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,221,8,5,1,6,1,6,3,6,225,8,6,1,6, + 3,6,228,8,6,1,7,1,7,3,7,232,8,7,1,7,3,7,235,8,7,1,8,1,8,1,8,1,8,1,8,3, + 8,242,8,8,1,8,1,8,3,8,246,8,8,1,8,1,8,1,9,1,9,1,9,5,9,253,8,9,10,9,12, + 9,256,9,9,1,9,1,9,3,9,260,8,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10, + 269,8,10,1,11,1,11,1,11,1,11,1,11,1,11,3,11,277,8,11,1,12,1,12,1,12,1, + 12,1,12,3,12,284,8,12,1,12,1,12,3,12,288,8,12,1,12,1,12,1,12,1,12,3,12, + 294,8,12,1,12,1,12,1,12,3,12,299,8,12,1,13,1,13,1,13,1,13,1,13,1,13,3, + 13,307,8,13,1,13,1,13,1,13,1,13,1,13,3,13,314,8,13,1,14,1,14,1,14,1,14, + 3,14,320,8,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,3,16, + 332,8,16,1,17,1,17,1,18,1,18,5,18,338,8,18,10,18,12,18,341,9,18,1,18, + 1,18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,5,20,352,8,20,10,20,12,20,355, + 9,20,1,20,3,20,358,8,20,1,21,1,21,1,21,3,21,363,8,21,1,21,1,21,1,22,1, + 22,1,22,1,22,5,22,371,8,22,10,22,12,22,374,9,22,1,23,1,23,1,23,1,23,1, + 23,1,23,3,23,382,8,23,1,24,3,24,385,8,24,1,24,1,24,3,24,389,8,24,1,24, + 3,24,392,8,24,1,24,1,24,3,24,396,8,24,1,24,3,24,399,8,24,1,24,3,24,402, + 8,24,1,24,3,24,405,8,24,1,24,3,24,408,8,24,1,24,1,24,3,24,412,8,24,1, + 24,1,24,3,24,416,8,24,1,24,3,24,419,8,24,1,24,3,24,422,8,24,1,24,3,24, + 425,8,24,1,24,1,24,3,24,429,8,24,1,24,3,24,432,8,24,1,25,1,25,1,25,1, + 26,1,26,1,26,1,26,3,26,441,8,26,1,27,1,27,1,27,1,28,3,28,447,8,28,1,28, + 1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, + 1,29,1,29,5,29,466,8,29,10,29,12,29,469,9,29,1,30,1,30,1,30,1,31,1,31, + 1,31,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,3,32,485,8,32,1,33,1,33, + 1,33,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,3,36, + 502,8,36,1,36,1,36,1,36,1,36,3,36,508,8,36,1,36,1,36,1,36,1,36,3,36,514, + 8,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,525,8,36,3,36, + 527,8,36,1,37,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39,3,39,538,8,39,1, + 39,3,39,541,8,39,1,39,1,39,1,39,1,39,3,39,547,8,39,1,39,1,39,1,39,1,39, + 1,39,1,39,3,39,555,8,39,1,39,1,39,1,39,1,39,5,39,561,8,39,10,39,12,39, + 564,9,39,1,40,3,40,567,8,40,1,40,1,40,1,40,3,40,572,8,40,1,40,3,40,575, + 8,40,1,40,3,40,578,8,40,1,40,1,40,3,40,582,8,40,1,40,1,40,3,40,586,8, + 40,1,40,3,40,589,8,40,3,40,591,8,40,1,40,3,40,594,8,40,1,40,1,40,3,40, + 598,8,40,1,40,1,40,3,40,602,8,40,1,40,3,40,605,8,40,3,40,607,8,40,3,40, + 609,8,40,1,41,1,41,1,41,3,41,614,8,41,1,42,1,42,1,42,1,42,1,42,1,42,1, + 42,1,42,1,42,3,42,625,8,42,1,43,1,43,1,43,1,43,3,43,631,8,43,1,44,1,44, + 1,44,5,44,636,8,44,10,44,12,44,639,9,44,1,45,1,45,3,45,643,8,45,1,45, + 1,45,3,45,647,8,45,1,45,1,45,3,45,651,8,45,1,46,1,46,1,46,1,46,3,46,657, + 8,46,3,46,659,8,46,1,47,1,47,1,47,5,47,664,8,47,10,47,12,47,667,9,47, + 1,48,1,48,1,48,1,48,1,49,3,49,674,8,49,1,49,3,49,677,8,49,1,49,3,49,680, + 8,49,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,53,1,53, + 1,53,1,53,1,53,1,53,3,53,699,8,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54, + 1,54,1,54,1,54,1,54,1,54,3,54,713,8,54,1,55,1,55,1,55,1,56,1,56,1,56, + 1,56,1,56,1,56,1,56,1,56,1,56,5,56,727,8,56,10,56,12,56,730,9,56,1,56, + 3,56,733,8,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,5,56,742,8,56,10,56, + 12,56,745,9,56,1,56,3,56,748,8,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56, + 5,56,757,8,56,10,56,12,56,760,9,56,1,56,3,56,763,8,56,1,56,1,56,1,56, + 1,56,1,56,3,56,770,8,56,1,56,1,56,3,56,774,8,56,1,57,1,57,1,57,5,57,779, + 8,57,10,57,12,57,782,9,57,1,57,3,57,785,8,57,1,58,1,58,1,58,3,58,790, + 8,58,1,58,1,58,1,58,1,58,1,58,4,58,797,8,58,11,58,12,58,798,1,58,1,58, + 3,58,803,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,827,8,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,3,58,844,8,58,1,58,1,58,1,58,1,58,3,58,850,8,58,1,58,3,58,853,8, + 58,1,58,3,58,856,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,866, + 8,58,1,58,1,58,1,58,1,58,3,58,872,8,58,1,58,3,58,875,8,58,1,58,3,58,878, + 8,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,886,8,58,1,58,3,58,889,8,58,1, + 58,1,58,3,58,893,8,58,1,58,3,58,896,8,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,3,58,910,8,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,927,8,58,1,58, + 1,58,1,58,3,58,932,8,58,1,58,1,58,3,58,936,8,58,1,58,1,58,1,58,1,58,3, + 58,942,8,58,1,58,1,58,1,58,1,58,1,58,3,58,949,8,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,3,58,961,8,58,1,58,1,58,3,58,965,8,58,1, + 58,3,58,968,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,977,8,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,991,8,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,1030,8,58,1,58,1,58, + 1,58,1,58,1,58,1,58,3,58,1038,8,58,5,58,1040,8,58,10,58,12,58,1043,9, + 58,1,59,1,59,1,59,5,59,1048,8,59,10,59,12,59,1051,9,59,1,59,3,59,1054, + 8,59,1,60,1,60,3,60,1058,8,60,1,61,1,61,1,61,1,61,5,61,1064,8,61,10,61, + 12,61,1067,9,61,1,61,3,61,1070,8,61,1,61,1,61,1,61,1,61,1,61,5,61,1077, + 8,61,10,61,12,61,1080,9,61,1,61,3,61,1083,8,61,3,61,1085,8,61,1,61,1, + 61,1,61,1,62,1,62,1,62,5,62,1093,8,62,10,62,12,62,1096,9,62,1,62,1,62, + 1,62,1,62,1,62,1,62,5,62,1104,8,62,10,62,12,62,1107,9,62,1,62,1,62,1, + 62,1,62,1,62,1,62,3,62,1115,8,62,1,62,1,62,1,62,1,62,1,62,3,62,1122,8, + 62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,3,63,1135,8, + 63,1,64,1,64,1,64,5,64,1140,8,64,10,64,12,64,1143,9,64,1,64,3,64,1146, + 8,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,3,65,1158,8,65, + 1,66,1,66,1,66,1,66,3,66,1164,8,66,1,66,3,66,1167,8,66,1,67,1,67,1,67, + 5,67,1172,8,67,10,67,12,67,1175,9,67,1,68,1,68,1,68,1,68,1,68,1,68,1, + 68,1,68,1,68,3,68,1186,8,68,1,68,1,68,1,68,1,68,3,68,1192,8,68,5,68,1194, + 8,68,10,68,12,68,1197,9,68,1,69,1,69,1,69,3,69,1202,8,69,1,69,1,69,1, + 70,1,70,1,70,3,70,1209,8,70,1,70,1,70,1,71,1,71,1,71,5,71,1216,8,71,10, + 71,12,71,1219,9,71,1,71,3,71,1222,8,71,1,72,1,72,1,73,1,73,1,73,1,73, + 1,73,1,73,3,73,1232,8,73,3,73,1234,8,73,1,74,3,74,1237,8,74,1,74,1,74, + 1,74,1,74,1,74,1,74,3,74,1245,8,74,1,75,1,75,1,75,3,75,1250,8,75,1,76, + 1,76,1,77,1,77,1,78,1,78,1,79,1,79,3,79,1260,8,79,1,80,1,80,1,80,3,80, + 1265,8,80,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,83,1,83,3,83,1277, + 8,83,1,84,1,84,5,84,1281,8,84,10,84,12,84,1284,9,84,1,84,1,84,1,85,1, + 85,1,85,1,85,1,85,3,85,1293,8,85,1,86,1,86,5,86,1297,8,86,10,86,12,86, + 1300,9,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,3,87,1309,8,87,1,87,0,3, + 78,116,136,88,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,132,134,136,138,140,142,144,146,148,150,152,154,156,158, + 160,162,164,166,168,170,172,174,0,16,2,0,18,18,74,74,2,0,44,44,51,51, + 3,0,1,1,4,4,8,8,4,0,1,1,3,4,8,8,80,80,2,0,51,51,73,73,2,0,1,1,4,4,2,0, + 7,7,22,23,2,0,30,30,49,49,2,0,71,71,76,76,3,0,10,10,50,50,90,90,2,0,41, + 41,53,53,1,0,107,108,2,0,118,118,139,139,7,0,21,21,38,38,55,56,70,70, + 78,78,97,97,103,103,16,0,1,13,15,20,22,28,30,30,32,37,39,42,44,51,53, + 54,58,58,60,69,71,77,79,83,85,92,94,96,98,99,101,102,4,0,20,20,30,30, + 39,39,48,48,1479,0,179,1,0,0,0,2,186,1,0,0,0,4,188,1,0,0,0,6,190,1,0, + 0,0,8,197,1,0,0,0,10,220,1,0,0,0,12,222,1,0,0,0,14,229,1,0,0,0,16,236, + 1,0,0,0,18,249,1,0,0,0,20,261,1,0,0,0,22,270,1,0,0,0,24,278,1,0,0,0,26, + 300,1,0,0,0,28,315,1,0,0,0,30,324,1,0,0,0,32,329,1,0,0,0,34,333,1,0,0, + 0,36,335,1,0,0,0,38,344,1,0,0,0,40,348,1,0,0,0,42,362,1,0,0,0,44,366, + 1,0,0,0,46,381,1,0,0,0,48,384,1,0,0,0,50,433,1,0,0,0,52,436,1,0,0,0,54, + 442,1,0,0,0,56,446,1,0,0,0,58,452,1,0,0,0,60,470,1,0,0,0,62,473,1,0,0, + 0,64,476,1,0,0,0,66,486,1,0,0,0,68,489,1,0,0,0,70,493,1,0,0,0,72,526, + 1,0,0,0,74,528,1,0,0,0,76,531,1,0,0,0,78,546,1,0,0,0,80,608,1,0,0,0,82, + 613,1,0,0,0,84,624,1,0,0,0,86,626,1,0,0,0,88,632,1,0,0,0,90,640,1,0,0, + 0,92,658,1,0,0,0,94,660,1,0,0,0,96,668,1,0,0,0,98,673,1,0,0,0,100,681, + 1,0,0,0,102,685,1,0,0,0,104,689,1,0,0,0,106,698,1,0,0,0,108,712,1,0,0, + 0,110,714,1,0,0,0,112,773,1,0,0,0,114,775,1,0,0,0,116,935,1,0,0,0,118, + 1044,1,0,0,0,120,1057,1,0,0,0,122,1084,1,0,0,0,124,1121,1,0,0,0,126,1134, + 1,0,0,0,128,1136,1,0,0,0,130,1157,1,0,0,0,132,1166,1,0,0,0,134,1168,1, + 0,0,0,136,1185,1,0,0,0,138,1198,1,0,0,0,140,1208,1,0,0,0,142,1212,1,0, + 0,0,144,1223,1,0,0,0,146,1233,1,0,0,0,148,1236,1,0,0,0,150,1249,1,0,0, + 0,152,1251,1,0,0,0,154,1253,1,0,0,0,156,1255,1,0,0,0,158,1259,1,0,0,0, + 160,1264,1,0,0,0,162,1266,1,0,0,0,164,1270,1,0,0,0,166,1276,1,0,0,0,168, + 1278,1,0,0,0,170,1292,1,0,0,0,172,1294,1,0,0,0,174,1308,1,0,0,0,176,178, + 3,2,1,0,177,176,1,0,0,0,178,181,1,0,0,0,179,177,1,0,0,0,179,180,1,0,0, + 0,180,182,1,0,0,0,181,179,1,0,0,0,182,183,5,0,0,1,183,1,1,0,0,0,184,187, + 3,6,3,0,185,187,3,10,5,0,186,184,1,0,0,0,186,185,1,0,0,0,187,3,1,0,0, + 0,188,189,3,116,58,0,189,5,1,0,0,0,190,191,5,52,0,0,191,195,3,160,80, + 0,192,193,5,115,0,0,193,194,5,122,0,0,194,196,3,4,2,0,195,192,1,0,0,0, + 195,196,1,0,0,0,196,7,1,0,0,0,197,202,3,160,80,0,198,199,5,116,0,0,199, + 201,3,160,80,0,200,198,1,0,0,0,201,204,1,0,0,0,202,200,1,0,0,0,202,203, + 1,0,0,0,203,206,1,0,0,0,204,202,1,0,0,0,205,207,5,116,0,0,206,205,1,0, + 0,0,206,207,1,0,0,0,207,9,1,0,0,0,208,221,3,12,6,0,209,221,3,14,7,0,210, + 221,3,18,9,0,211,221,3,20,10,0,212,221,3,22,11,0,213,221,3,26,13,0,214, + 221,3,24,12,0,215,221,3,28,14,0,216,221,3,30,15,0,217,221,3,36,18,0,218, + 221,3,32,16,0,219,221,3,34,17,0,220,208,1,0,0,0,220,209,1,0,0,0,220,210, + 1,0,0,0,220,211,1,0,0,0,220,212,1,0,0,0,220,213,1,0,0,0,220,214,1,0,0, + 0,220,215,1,0,0,0,220,216,1,0,0,0,220,217,1,0,0,0,220,218,1,0,0,0,220, + 219,1,0,0,0,221,11,1,0,0,0,222,224,5,72,0,0,223,225,3,4,2,0,224,223,1, + 0,0,0,224,225,1,0,0,0,225,227,1,0,0,0,226,228,5,150,0,0,227,226,1,0,0, + 0,227,228,1,0,0,0,228,13,1,0,0,0,229,231,5,84,0,0,230,232,3,4,2,0,231, + 230,1,0,0,0,231,232,1,0,0,0,232,234,1,0,0,0,233,235,5,150,0,0,234,233, + 1,0,0,0,234,235,1,0,0,0,235,15,1,0,0,0,236,245,5,14,0,0,237,238,5,130, + 0,0,238,241,3,160,80,0,239,240,5,115,0,0,240,242,3,160,80,0,241,239,1, + 0,0,0,241,242,1,0,0,0,242,243,1,0,0,0,243,244,5,149,0,0,244,246,1,0,0, + 0,245,237,1,0,0,0,245,246,1,0,0,0,246,247,1,0,0,0,247,248,3,36,18,0,248, + 17,1,0,0,0,249,250,5,93,0,0,250,254,3,36,18,0,251,253,3,16,8,0,252,251, + 1,0,0,0,253,256,1,0,0,0,254,252,1,0,0,0,254,255,1,0,0,0,255,259,1,0,0, + 0,256,254,1,0,0,0,257,258,5,29,0,0,258,260,3,36,18,0,259,257,1,0,0,0, + 259,260,1,0,0,0,260,19,1,0,0,0,261,262,5,40,0,0,262,263,5,130,0,0,263, + 264,3,4,2,0,264,265,5,149,0,0,265,268,3,10,5,0,266,267,5,25,0,0,267,269, + 3,10,5,0,268,266,1,0,0,0,268,269,1,0,0,0,269,21,1,0,0,0,270,271,5,100, + 0,0,271,272,5,130,0,0,272,273,3,4,2,0,273,274,5,149,0,0,274,276,3,10, + 5,0,275,277,5,150,0,0,276,275,1,0,0,0,276,277,1,0,0,0,277,23,1,0,0,0, + 278,279,5,33,0,0,279,283,5,130,0,0,280,284,3,6,3,0,281,284,3,30,15,0, + 282,284,3,4,2,0,283,280,1,0,0,0,283,281,1,0,0,0,283,282,1,0,0,0,283,284, + 1,0,0,0,284,285,1,0,0,0,285,287,5,150,0,0,286,288,3,4,2,0,287,286,1,0, + 0,0,287,288,1,0,0,0,288,289,1,0,0,0,289,293,5,150,0,0,290,294,3,6,3,0, + 291,294,3,30,15,0,292,294,3,4,2,0,293,290,1,0,0,0,293,291,1,0,0,0,293, + 292,1,0,0,0,293,294,1,0,0,0,294,295,1,0,0,0,295,296,5,149,0,0,296,298, + 3,10,5,0,297,299,5,150,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,25,1,0, + 0,0,300,301,5,33,0,0,301,302,5,130,0,0,302,303,5,52,0,0,303,306,3,160, + 80,0,304,305,5,116,0,0,305,307,3,160,80,0,306,304,1,0,0,0,306,307,1,0, + 0,0,307,308,1,0,0,0,308,309,5,42,0,0,309,310,3,4,2,0,310,311,5,149,0, + 0,311,313,3,10,5,0,312,314,5,150,0,0,313,312,1,0,0,0,313,314,1,0,0,0, + 314,27,1,0,0,0,315,316,5,31,0,0,316,317,3,160,80,0,317,319,5,130,0,0, + 318,320,3,8,4,0,319,318,1,0,0,0,319,320,1,0,0,0,320,321,1,0,0,0,321,322, + 5,149,0,0,322,323,3,36,18,0,323,29,1,0,0,0,324,325,3,4,2,0,325,326,5, + 115,0,0,326,327,5,122,0,0,327,328,3,4,2,0,328,31,1,0,0,0,329,331,3,4, + 2,0,330,332,5,150,0,0,331,330,1,0,0,0,331,332,1,0,0,0,332,33,1,0,0,0, + 333,334,5,150,0,0,334,35,1,0,0,0,335,339,5,128,0,0,336,338,3,2,1,0,337, + 336,1,0,0,0,338,341,1,0,0,0,339,337,1,0,0,0,339,340,1,0,0,0,340,342,1, + 0,0,0,341,339,1,0,0,0,342,343,5,147,0,0,343,37,1,0,0,0,344,345,3,4,2, + 0,345,346,5,115,0,0,346,347,3,4,2,0,347,39,1,0,0,0,348,353,3,38,19,0, + 349,350,5,116,0,0,350,352,3,38,19,0,351,349,1,0,0,0,352,355,1,0,0,0,353, + 351,1,0,0,0,353,354,1,0,0,0,354,357,1,0,0,0,355,353,1,0,0,0,356,358,5, + 116,0,0,357,356,1,0,0,0,357,358,1,0,0,0,358,41,1,0,0,0,359,363,3,44,22, + 0,360,363,3,48,24,0,361,363,3,124,62,0,362,359,1,0,0,0,362,360,1,0,0, + 0,362,361,1,0,0,0,363,364,1,0,0,0,364,365,5,0,0,1,365,43,1,0,0,0,366, + 372,3,46,23,0,367,368,5,95,0,0,368,369,5,1,0,0,369,371,3,46,23,0,370, + 367,1,0,0,0,371,374,1,0,0,0,372,370,1,0,0,0,372,373,1,0,0,0,373,45,1, + 0,0,0,374,372,1,0,0,0,375,382,3,48,24,0,376,377,5,130,0,0,377,378,3,44, + 22,0,378,379,5,149,0,0,379,382,1,0,0,0,380,382,3,164,82,0,381,375,1,0, + 0,0,381,376,1,0,0,0,381,380,1,0,0,0,382,47,1,0,0,0,383,385,3,50,25,0, + 384,383,1,0,0,0,384,385,1,0,0,0,385,386,1,0,0,0,386,388,5,79,0,0,387, + 389,5,24,0,0,388,387,1,0,0,0,388,389,1,0,0,0,389,391,1,0,0,0,390,392, + 3,52,26,0,391,390,1,0,0,0,391,392,1,0,0,0,392,393,1,0,0,0,393,395,3,114, + 57,0,394,396,3,54,27,0,395,394,1,0,0,0,395,396,1,0,0,0,396,398,1,0,0, + 0,397,399,3,56,28,0,398,397,1,0,0,0,398,399,1,0,0,0,399,401,1,0,0,0,400, + 402,3,60,30,0,401,400,1,0,0,0,401,402,1,0,0,0,402,404,1,0,0,0,403,405, + 3,62,31,0,404,403,1,0,0,0,404,405,1,0,0,0,405,407,1,0,0,0,406,408,3,64, + 32,0,407,406,1,0,0,0,407,408,1,0,0,0,408,411,1,0,0,0,409,410,5,102,0, + 0,410,412,7,0,0,0,411,409,1,0,0,0,411,412,1,0,0,0,412,415,1,0,0,0,413, + 414,5,102,0,0,414,416,5,89,0,0,415,413,1,0,0,0,415,416,1,0,0,0,416,418, + 1,0,0,0,417,419,3,66,33,0,418,417,1,0,0,0,418,419,1,0,0,0,419,421,1,0, + 0,0,420,422,3,58,29,0,421,420,1,0,0,0,421,422,1,0,0,0,422,424,1,0,0,0, + 423,425,3,68,34,0,424,423,1,0,0,0,424,425,1,0,0,0,425,428,1,0,0,0,426, + 429,3,72,36,0,427,429,3,74,37,0,428,426,1,0,0,0,428,427,1,0,0,0,428,429, + 1,0,0,0,429,431,1,0,0,0,430,432,3,76,38,0,431,430,1,0,0,0,431,432,1,0, + 0,0,432,49,1,0,0,0,433,434,5,102,0,0,434,435,3,128,64,0,435,51,1,0,0, + 0,436,437,5,88,0,0,437,440,5,108,0,0,438,439,5,102,0,0,439,441,5,85,0, + 0,440,438,1,0,0,0,440,441,1,0,0,0,441,53,1,0,0,0,442,443,5,34,0,0,443, + 444,3,78,39,0,444,55,1,0,0,0,445,447,7,1,0,0,446,445,1,0,0,0,446,447, + 1,0,0,0,447,448,1,0,0,0,448,449,5,5,0,0,449,450,5,47,0,0,450,451,3,114, + 57,0,451,57,1,0,0,0,452,453,5,101,0,0,453,454,3,160,80,0,454,455,5,6, + 0,0,455,456,5,130,0,0,456,457,3,98,49,0,457,467,5,149,0,0,458,459,5,116, + 0,0,459,460,3,160,80,0,460,461,5,6,0,0,461,462,5,130,0,0,462,463,3,98, + 49,0,463,464,5,149,0,0,464,466,1,0,0,0,465,458,1,0,0,0,466,469,1,0,0, + 0,467,465,1,0,0,0,467,468,1,0,0,0,468,59,1,0,0,0,469,467,1,0,0,0,470, + 471,5,69,0,0,471,472,3,116,58,0,472,61,1,0,0,0,473,474,5,99,0,0,474,475, + 3,116,58,0,475,63,1,0,0,0,476,477,5,36,0,0,477,484,5,11,0,0,478,479,7, + 0,0,0,479,480,5,130,0,0,480,481,3,114,57,0,481,482,5,149,0,0,482,485, + 1,0,0,0,483,485,3,114,57,0,484,478,1,0,0,0,484,483,1,0,0,0,485,65,1,0, + 0,0,486,487,5,37,0,0,487,488,3,116,58,0,488,67,1,0,0,0,489,490,5,64,0, + 0,490,491,5,11,0,0,491,492,3,88,44,0,492,69,1,0,0,0,493,494,5,64,0,0, + 494,495,5,11,0,0,495,496,3,114,57,0,496,71,1,0,0,0,497,498,5,54,0,0,498, + 501,3,116,58,0,499,500,5,116,0,0,500,502,3,116,58,0,501,499,1,0,0,0,501, + 502,1,0,0,0,502,507,1,0,0,0,503,504,5,102,0,0,504,508,5,85,0,0,505,506, + 5,11,0,0,506,508,3,114,57,0,507,503,1,0,0,0,507,505,1,0,0,0,507,508,1, + 0,0,0,508,527,1,0,0,0,509,510,5,54,0,0,510,513,3,116,58,0,511,512,5,102, + 0,0,512,514,5,85,0,0,513,511,1,0,0,0,513,514,1,0,0,0,514,515,1,0,0,0, + 515,516,5,61,0,0,516,517,3,116,58,0,517,527,1,0,0,0,518,519,5,54,0,0, + 519,520,3,116,58,0,520,521,5,61,0,0,521,524,3,116,58,0,522,523,5,11,0, + 0,523,525,3,114,57,0,524,522,1,0,0,0,524,525,1,0,0,0,525,527,1,0,0,0, + 526,497,1,0,0,0,526,509,1,0,0,0,526,518,1,0,0,0,527,73,1,0,0,0,528,529, + 5,61,0,0,529,530,3,116,58,0,530,75,1,0,0,0,531,532,5,81,0,0,532,533,3, + 94,47,0,533,77,1,0,0,0,534,535,6,39,-1,0,535,537,3,136,68,0,536,538,5, + 28,0,0,537,536,1,0,0,0,537,538,1,0,0,0,538,540,1,0,0,0,539,541,3,86,43, + 0,540,539,1,0,0,0,540,541,1,0,0,0,541,547,1,0,0,0,542,543,5,130,0,0,543, + 544,3,78,39,0,544,545,5,149,0,0,545,547,1,0,0,0,546,534,1,0,0,0,546,542, + 1,0,0,0,547,562,1,0,0,0,548,549,10,3,0,0,549,550,3,82,41,0,550,551,3, + 78,39,4,551,561,1,0,0,0,552,554,10,4,0,0,553,555,3,80,40,0,554,553,1, + 0,0,0,554,555,1,0,0,0,555,556,1,0,0,0,556,557,5,47,0,0,557,558,3,78,39, + 0,558,559,3,84,42,0,559,561,1,0,0,0,560,548,1,0,0,0,560,552,1,0,0,0,561, + 564,1,0,0,0,562,560,1,0,0,0,562,563,1,0,0,0,563,79,1,0,0,0,564,562,1, + 0,0,0,565,567,7,2,0,0,566,565,1,0,0,0,566,567,1,0,0,0,567,568,1,0,0,0, + 568,575,5,44,0,0,569,571,5,44,0,0,570,572,7,2,0,0,571,570,1,0,0,0,571, + 572,1,0,0,0,572,575,1,0,0,0,573,575,7,2,0,0,574,566,1,0,0,0,574,569,1, + 0,0,0,574,573,1,0,0,0,575,609,1,0,0,0,576,578,7,3,0,0,577,576,1,0,0,0, + 577,578,1,0,0,0,578,579,1,0,0,0,579,581,7,4,0,0,580,582,5,65,0,0,581, + 580,1,0,0,0,581,582,1,0,0,0,582,591,1,0,0,0,583,585,7,4,0,0,584,586,5, + 65,0,0,585,584,1,0,0,0,585,586,1,0,0,0,586,588,1,0,0,0,587,589,7,3,0, + 0,588,587,1,0,0,0,588,589,1,0,0,0,589,591,1,0,0,0,590,577,1,0,0,0,590, + 583,1,0,0,0,591,609,1,0,0,0,592,594,7,5,0,0,593,592,1,0,0,0,593,594,1, + 0,0,0,594,595,1,0,0,0,595,597,5,35,0,0,596,598,5,65,0,0,597,596,1,0,0, + 0,597,598,1,0,0,0,598,607,1,0,0,0,599,601,5,35,0,0,600,602,5,65,0,0,601, + 600,1,0,0,0,601,602,1,0,0,0,602,604,1,0,0,0,603,605,7,5,0,0,604,603,1, + 0,0,0,604,605,1,0,0,0,605,607,1,0,0,0,606,593,1,0,0,0,606,599,1,0,0,0, + 607,609,1,0,0,0,608,574,1,0,0,0,608,590,1,0,0,0,608,606,1,0,0,0,609,81, + 1,0,0,0,610,611,5,17,0,0,611,614,5,47,0,0,612,614,5,116,0,0,613,610,1, + 0,0,0,613,612,1,0,0,0,614,83,1,0,0,0,615,616,5,62,0,0,616,625,3,114,57, + 0,617,618,5,96,0,0,618,619,5,130,0,0,619,620,3,114,57,0,620,621,5,149, + 0,0,621,625,1,0,0,0,622,623,5,96,0,0,623,625,3,114,57,0,624,615,1,0,0, + 0,624,617,1,0,0,0,624,622,1,0,0,0,625,85,1,0,0,0,626,627,5,77,0,0,627, + 630,3,92,46,0,628,629,5,61,0,0,629,631,3,92,46,0,630,628,1,0,0,0,630, + 631,1,0,0,0,631,87,1,0,0,0,632,637,3,90,45,0,633,634,5,116,0,0,634,636, + 3,90,45,0,635,633,1,0,0,0,636,639,1,0,0,0,637,635,1,0,0,0,637,638,1,0, + 0,0,638,89,1,0,0,0,639,637,1,0,0,0,640,642,3,116,58,0,641,643,7,6,0,0, + 642,641,1,0,0,0,642,643,1,0,0,0,643,646,1,0,0,0,644,645,5,60,0,0,645, + 647,7,7,0,0,646,644,1,0,0,0,646,647,1,0,0,0,647,650,1,0,0,0,648,649,5, + 16,0,0,649,651,5,110,0,0,650,648,1,0,0,0,650,651,1,0,0,0,651,91,1,0,0, + 0,652,659,3,164,82,0,653,656,3,148,74,0,654,655,5,151,0,0,655,657,3,148, + 74,0,656,654,1,0,0,0,656,657,1,0,0,0,657,659,1,0,0,0,658,652,1,0,0,0, + 658,653,1,0,0,0,659,93,1,0,0,0,660,665,3,96,48,0,661,662,5,116,0,0,662, + 664,3,96,48,0,663,661,1,0,0,0,664,667,1,0,0,0,665,663,1,0,0,0,665,666, + 1,0,0,0,666,95,1,0,0,0,667,665,1,0,0,0,668,669,3,160,80,0,669,670,5,122, + 0,0,670,671,3,150,75,0,671,97,1,0,0,0,672,674,3,100,50,0,673,672,1,0, + 0,0,673,674,1,0,0,0,674,676,1,0,0,0,675,677,3,102,51,0,676,675,1,0,0, + 0,676,677,1,0,0,0,677,679,1,0,0,0,678,680,3,104,52,0,679,678,1,0,0,0, + 679,680,1,0,0,0,680,99,1,0,0,0,681,682,5,67,0,0,682,683,5,11,0,0,683, + 684,3,114,57,0,684,101,1,0,0,0,685,686,5,64,0,0,686,687,5,11,0,0,687, + 688,3,88,44,0,688,103,1,0,0,0,689,690,7,8,0,0,690,691,3,106,53,0,691, + 105,1,0,0,0,692,699,3,108,54,0,693,694,5,9,0,0,694,695,3,108,54,0,695, + 696,5,2,0,0,696,697,3,108,54,0,697,699,1,0,0,0,698,692,1,0,0,0,698,693, + 1,0,0,0,699,107,1,0,0,0,700,701,5,19,0,0,701,713,5,75,0,0,702,703,5,94, + 0,0,703,713,5,68,0,0,704,705,5,94,0,0,705,713,5,32,0,0,706,707,3,148, + 74,0,707,708,5,68,0,0,708,713,1,0,0,0,709,710,3,148,74,0,710,711,5,32, + 0,0,711,713,1,0,0,0,712,700,1,0,0,0,712,702,1,0,0,0,712,704,1,0,0,0,712, + 706,1,0,0,0,712,709,1,0,0,0,713,109,1,0,0,0,714,715,3,116,58,0,715,716, + 5,0,0,1,716,111,1,0,0,0,717,774,3,160,80,0,718,719,3,160,80,0,719,720, + 5,130,0,0,720,721,3,160,80,0,721,728,3,112,56,0,722,723,5,116,0,0,723, + 724,3,160,80,0,724,725,3,112,56,0,725,727,1,0,0,0,726,722,1,0,0,0,727, + 730,1,0,0,0,728,726,1,0,0,0,728,729,1,0,0,0,729,732,1,0,0,0,730,728,1, + 0,0,0,731,733,5,116,0,0,732,731,1,0,0,0,732,733,1,0,0,0,733,734,1,0,0, + 0,734,735,5,149,0,0,735,774,1,0,0,0,736,737,3,160,80,0,737,738,5,130, + 0,0,738,743,3,162,81,0,739,740,5,116,0,0,740,742,3,162,81,0,741,739,1, + 0,0,0,742,745,1,0,0,0,743,741,1,0,0,0,743,744,1,0,0,0,744,747,1,0,0,0, + 745,743,1,0,0,0,746,748,5,116,0,0,747,746,1,0,0,0,747,748,1,0,0,0,748, + 749,1,0,0,0,749,750,5,149,0,0,750,774,1,0,0,0,751,752,3,160,80,0,752, + 753,5,130,0,0,753,758,3,112,56,0,754,755,5,116,0,0,755,757,3,112,56,0, + 756,754,1,0,0,0,757,760,1,0,0,0,758,756,1,0,0,0,758,759,1,0,0,0,759,762, + 1,0,0,0,760,758,1,0,0,0,761,763,5,116,0,0,762,761,1,0,0,0,762,763,1,0, + 0,0,763,764,1,0,0,0,764,765,5,149,0,0,765,774,1,0,0,0,766,767,3,160,80, + 0,767,769,5,130,0,0,768,770,3,114,57,0,769,768,1,0,0,0,769,770,1,0,0, + 0,770,771,1,0,0,0,771,772,5,149,0,0,772,774,1,0,0,0,773,717,1,0,0,0,773, + 718,1,0,0,0,773,736,1,0,0,0,773,751,1,0,0,0,773,766,1,0,0,0,774,113,1, + 0,0,0,775,780,3,116,58,0,776,777,5,116,0,0,777,779,3,116,58,0,778,776, + 1,0,0,0,779,782,1,0,0,0,780,778,1,0,0,0,780,781,1,0,0,0,781,784,1,0,0, + 0,782,780,1,0,0,0,783,785,5,116,0,0,784,783,1,0,0,0,784,785,1,0,0,0,785, + 115,1,0,0,0,786,787,6,58,-1,0,787,789,5,12,0,0,788,790,3,116,58,0,789, + 788,1,0,0,0,789,790,1,0,0,0,790,796,1,0,0,0,791,792,5,98,0,0,792,793, + 3,116,58,0,793,794,5,83,0,0,794,795,3,116,58,0,795,797,1,0,0,0,796,791, + 1,0,0,0,797,798,1,0,0,0,798,796,1,0,0,0,798,799,1,0,0,0,799,802,1,0,0, + 0,800,801,5,25,0,0,801,803,3,116,58,0,802,800,1,0,0,0,802,803,1,0,0,0, + 803,804,1,0,0,0,804,805,5,26,0,0,805,936,1,0,0,0,806,807,5,13,0,0,807, + 808,5,130,0,0,808,809,3,116,58,0,809,810,5,6,0,0,810,811,3,112,56,0,811, + 812,5,149,0,0,812,936,1,0,0,0,813,814,5,20,0,0,814,936,5,110,0,0,815, + 816,5,45,0,0,816,817,3,116,58,0,817,818,3,152,76,0,818,936,1,0,0,0,819, + 820,5,82,0,0,820,821,5,130,0,0,821,822,3,116,58,0,822,823,5,34,0,0,823, + 826,3,116,58,0,824,825,5,33,0,0,825,827,3,116,58,0,826,824,1,0,0,0,826, + 827,1,0,0,0,827,828,1,0,0,0,828,829,5,149,0,0,829,936,1,0,0,0,830,831, + 5,86,0,0,831,936,5,110,0,0,832,833,5,91,0,0,833,834,5,130,0,0,834,835, + 7,9,0,0,835,836,3,166,83,0,836,837,5,34,0,0,837,838,3,116,58,0,838,839, + 5,149,0,0,839,936,1,0,0,0,840,841,3,160,80,0,841,843,5,130,0,0,842,844, + 3,114,57,0,843,842,1,0,0,0,843,844,1,0,0,0,844,845,1,0,0,0,845,846,5, + 149,0,0,846,855,1,0,0,0,847,849,5,130,0,0,848,850,5,24,0,0,849,848,1, + 0,0,0,849,850,1,0,0,0,850,852,1,0,0,0,851,853,3,118,59,0,852,851,1,0, + 0,0,852,853,1,0,0,0,853,854,1,0,0,0,854,856,5,149,0,0,855,847,1,0,0,0, + 855,856,1,0,0,0,856,857,1,0,0,0,857,858,5,66,0,0,858,859,5,130,0,0,859, + 860,3,98,49,0,860,861,5,149,0,0,861,936,1,0,0,0,862,863,3,160,80,0,863, + 865,5,130,0,0,864,866,3,114,57,0,865,864,1,0,0,0,865,866,1,0,0,0,866, + 867,1,0,0,0,867,868,5,149,0,0,868,877,1,0,0,0,869,871,5,130,0,0,870,872, + 5,24,0,0,871,870,1,0,0,0,871,872,1,0,0,0,872,874,1,0,0,0,873,875,3,118, + 59,0,874,873,1,0,0,0,874,875,1,0,0,0,875,876,1,0,0,0,876,878,5,149,0, + 0,877,869,1,0,0,0,877,878,1,0,0,0,878,879,1,0,0,0,879,880,5,66,0,0,880, + 881,3,160,80,0,881,936,1,0,0,0,882,888,3,160,80,0,883,885,5,130,0,0,884, + 886,3,114,57,0,885,884,1,0,0,0,885,886,1,0,0,0,886,887,1,0,0,0,887,889, + 5,149,0,0,888,883,1,0,0,0,888,889,1,0,0,0,889,890,1,0,0,0,890,892,5,130, + 0,0,891,893,5,24,0,0,892,891,1,0,0,0,892,893,1,0,0,0,893,895,1,0,0,0, + 894,896,3,118,59,0,895,894,1,0,0,0,895,896,1,0,0,0,896,897,1,0,0,0,897, + 898,5,149,0,0,898,936,1,0,0,0,899,936,3,124,62,0,900,936,3,168,84,0,901, + 936,3,150,75,0,902,903,5,118,0,0,903,936,3,116,58,19,904,905,5,58,0,0, + 905,936,3,116,58,13,906,907,3,140,70,0,907,908,5,120,0,0,908,910,1,0, + 0,0,909,906,1,0,0,0,909,910,1,0,0,0,910,911,1,0,0,0,911,936,5,112,0,0, + 912,913,5,130,0,0,913,914,3,44,22,0,914,915,5,149,0,0,915,936,1,0,0,0, + 916,917,5,130,0,0,917,918,3,116,58,0,918,919,5,149,0,0,919,936,1,0,0, + 0,920,921,5,130,0,0,921,922,3,114,57,0,922,923,5,149,0,0,923,936,1,0, + 0,0,924,926,5,129,0,0,925,927,3,114,57,0,926,925,1,0,0,0,926,927,1,0, + 0,0,927,928,1,0,0,0,928,936,5,148,0,0,929,931,5,128,0,0,930,932,3,40, + 20,0,931,930,1,0,0,0,931,932,1,0,0,0,932,933,1,0,0,0,933,936,5,147,0, + 0,934,936,3,132,66,0,935,786,1,0,0,0,935,806,1,0,0,0,935,813,1,0,0,0, + 935,815,1,0,0,0,935,819,1,0,0,0,935,830,1,0,0,0,935,832,1,0,0,0,935,840, + 1,0,0,0,935,862,1,0,0,0,935,882,1,0,0,0,935,899,1,0,0,0,935,900,1,0,0, + 0,935,901,1,0,0,0,935,902,1,0,0,0,935,904,1,0,0,0,935,909,1,0,0,0,935, + 912,1,0,0,0,935,916,1,0,0,0,935,920,1,0,0,0,935,924,1,0,0,0,935,929,1, + 0,0,0,935,934,1,0,0,0,936,1041,1,0,0,0,937,941,10,18,0,0,938,942,5,112, + 0,0,939,942,5,151,0,0,940,942,5,138,0,0,941,938,1,0,0,0,941,939,1,0,0, + 0,941,940,1,0,0,0,942,943,1,0,0,0,943,1040,3,116,58,19,944,948,10,17, + 0,0,945,949,5,139,0,0,946,949,5,118,0,0,947,949,5,117,0,0,948,945,1,0, + 0,0,948,946,1,0,0,0,948,947,1,0,0,0,949,950,1,0,0,0,950,1040,3,116,58, + 18,951,976,10,16,0,0,952,977,5,121,0,0,953,977,5,122,0,0,954,977,5,133, + 0,0,955,977,5,131,0,0,956,977,5,132,0,0,957,977,5,123,0,0,958,977,5,124, + 0,0,959,961,5,58,0,0,960,959,1,0,0,0,960,961,1,0,0,0,961,962,1,0,0,0, + 962,964,5,42,0,0,963,965,5,15,0,0,964,963,1,0,0,0,964,965,1,0,0,0,965, + 977,1,0,0,0,966,968,5,58,0,0,967,966,1,0,0,0,967,968,1,0,0,0,968,969, + 1,0,0,0,969,977,7,10,0,0,970,977,5,145,0,0,971,977,5,146,0,0,972,977, + 5,135,0,0,973,977,5,126,0,0,974,977,5,127,0,0,975,977,5,134,0,0,976,952, + 1,0,0,0,976,953,1,0,0,0,976,954,1,0,0,0,976,955,1,0,0,0,976,956,1,0,0, + 0,976,957,1,0,0,0,976,958,1,0,0,0,976,960,1,0,0,0,976,967,1,0,0,0,976, + 970,1,0,0,0,976,971,1,0,0,0,976,972,1,0,0,0,976,973,1,0,0,0,976,974,1, + 0,0,0,976,975,1,0,0,0,977,978,1,0,0,0,978,1040,3,116,58,17,979,980,10, + 14,0,0,980,981,5,137,0,0,981,1040,3,116,58,15,982,983,10,12,0,0,983,984, + 5,2,0,0,984,1040,3,116,58,13,985,986,10,11,0,0,986,987,5,63,0,0,987,1040, + 3,116,58,12,988,990,10,10,0,0,989,991,5,58,0,0,990,989,1,0,0,0,990,991, + 1,0,0,0,991,992,1,0,0,0,992,993,5,9,0,0,993,994,3,116,58,0,994,995,5, + 2,0,0,995,996,3,116,58,11,996,1040,1,0,0,0,997,998,10,9,0,0,998,999,5, + 140,0,0,999,1000,3,116,58,0,1000,1001,5,115,0,0,1001,1002,3,116,58,9, + 1002,1040,1,0,0,0,1003,1004,10,25,0,0,1004,1005,5,129,0,0,1005,1006,3, + 116,58,0,1006,1007,5,148,0,0,1007,1040,1,0,0,0,1008,1009,10,24,0,0,1009, + 1010,5,120,0,0,1010,1040,5,108,0,0,1011,1012,10,23,0,0,1012,1013,5,120, + 0,0,1013,1040,3,160,80,0,1014,1015,10,22,0,0,1015,1016,5,136,0,0,1016, + 1017,5,129,0,0,1017,1018,3,116,58,0,1018,1019,5,148,0,0,1019,1040,1,0, + 0,0,1020,1021,10,21,0,0,1021,1022,5,136,0,0,1022,1040,5,108,0,0,1023, + 1024,10,20,0,0,1024,1025,5,136,0,0,1025,1040,3,160,80,0,1026,1027,10, + 15,0,0,1027,1029,5,46,0,0,1028,1030,5,58,0,0,1029,1028,1,0,0,0,1029,1030, + 1,0,0,0,1030,1031,1,0,0,0,1031,1040,5,59,0,0,1032,1037,10,8,0,0,1033, + 1034,5,6,0,0,1034,1038,3,160,80,0,1035,1036,5,6,0,0,1036,1038,5,110,0, + 0,1037,1033,1,0,0,0,1037,1035,1,0,0,0,1038,1040,1,0,0,0,1039,937,1,0, + 0,0,1039,944,1,0,0,0,1039,951,1,0,0,0,1039,979,1,0,0,0,1039,982,1,0,0, + 0,1039,985,1,0,0,0,1039,988,1,0,0,0,1039,997,1,0,0,0,1039,1003,1,0,0, + 0,1039,1008,1,0,0,0,1039,1011,1,0,0,0,1039,1014,1,0,0,0,1039,1020,1,0, + 0,0,1039,1023,1,0,0,0,1039,1026,1,0,0,0,1039,1032,1,0,0,0,1040,1043,1, + 0,0,0,1041,1039,1,0,0,0,1041,1042,1,0,0,0,1042,117,1,0,0,0,1043,1041, + 1,0,0,0,1044,1049,3,120,60,0,1045,1046,5,116,0,0,1046,1048,3,120,60,0, + 1047,1045,1,0,0,0,1048,1051,1,0,0,0,1049,1047,1,0,0,0,1049,1050,1,0,0, + 0,1050,1053,1,0,0,0,1051,1049,1,0,0,0,1052,1054,5,116,0,0,1053,1052,1, + 0,0,0,1053,1054,1,0,0,0,1054,119,1,0,0,0,1055,1058,3,122,61,0,1056,1058, + 3,116,58,0,1057,1055,1,0,0,0,1057,1056,1,0,0,0,1058,121,1,0,0,0,1059, + 1060,5,130,0,0,1060,1065,3,160,80,0,1061,1062,5,116,0,0,1062,1064,3,160, + 80,0,1063,1061,1,0,0,0,1064,1067,1,0,0,0,1065,1063,1,0,0,0,1065,1066, + 1,0,0,0,1066,1069,1,0,0,0,1067,1065,1,0,0,0,1068,1070,5,116,0,0,1069, + 1068,1,0,0,0,1069,1070,1,0,0,0,1070,1071,1,0,0,0,1071,1072,5,149,0,0, + 1072,1085,1,0,0,0,1073,1078,3,160,80,0,1074,1075,5,116,0,0,1075,1077, + 3,160,80,0,1076,1074,1,0,0,0,1077,1080,1,0,0,0,1078,1076,1,0,0,0,1078, + 1079,1,0,0,0,1079,1082,1,0,0,0,1080,1078,1,0,0,0,1081,1083,5,116,0,0, + 1082,1081,1,0,0,0,1082,1083,1,0,0,0,1083,1085,1,0,0,0,1084,1059,1,0,0, + 0,1084,1073,1,0,0,0,1085,1086,1,0,0,0,1086,1087,5,111,0,0,1087,1088,3, + 116,58,0,1088,123,1,0,0,0,1089,1090,5,132,0,0,1090,1094,3,160,80,0,1091, + 1093,3,126,63,0,1092,1091,1,0,0,0,1093,1096,1,0,0,0,1094,1092,1,0,0,0, + 1094,1095,1,0,0,0,1095,1097,1,0,0,0,1096,1094,1,0,0,0,1097,1098,5,151, + 0,0,1098,1099,5,124,0,0,1099,1122,1,0,0,0,1100,1101,5,132,0,0,1101,1105, + 3,160,80,0,1102,1104,3,126,63,0,1103,1102,1,0,0,0,1104,1107,1,0,0,0,1105, + 1103,1,0,0,0,1105,1106,1,0,0,0,1106,1108,1,0,0,0,1107,1105,1,0,0,0,1108, + 1114,5,124,0,0,1109,1115,3,124,62,0,1110,1111,5,128,0,0,1111,1112,3,116, + 58,0,1112,1113,5,147,0,0,1113,1115,1,0,0,0,1114,1109,1,0,0,0,1114,1110, + 1,0,0,0,1114,1115,1,0,0,0,1115,1116,1,0,0,0,1116,1117,5,132,0,0,1117, + 1118,5,151,0,0,1118,1119,3,160,80,0,1119,1120,5,124,0,0,1120,1122,1,0, + 0,0,1121,1089,1,0,0,0,1121,1100,1,0,0,0,1122,125,1,0,0,0,1123,1124,3, + 160,80,0,1124,1125,5,122,0,0,1125,1126,3,166,83,0,1126,1135,1,0,0,0,1127, + 1128,3,160,80,0,1128,1129,5,122,0,0,1129,1130,5,128,0,0,1130,1131,3,116, + 58,0,1131,1132,5,147,0,0,1132,1135,1,0,0,0,1133,1135,3,160,80,0,1134, + 1123,1,0,0,0,1134,1127,1,0,0,0,1134,1133,1,0,0,0,1135,127,1,0,0,0,1136, + 1141,3,130,65,0,1137,1138,5,116,0,0,1138,1140,3,130,65,0,1139,1137,1, + 0,0,0,1140,1143,1,0,0,0,1141,1139,1,0,0,0,1141,1142,1,0,0,0,1142,1145, + 1,0,0,0,1143,1141,1,0,0,0,1144,1146,5,116,0,0,1145,1144,1,0,0,0,1145, + 1146,1,0,0,0,1146,129,1,0,0,0,1147,1148,3,160,80,0,1148,1149,5,6,0,0, + 1149,1150,5,130,0,0,1150,1151,3,44,22,0,1151,1152,5,149,0,0,1152,1158, + 1,0,0,0,1153,1154,3,116,58,0,1154,1155,5,6,0,0,1155,1156,3,160,80,0,1156, + 1158,1,0,0,0,1157,1147,1,0,0,0,1157,1153,1,0,0,0,1158,131,1,0,0,0,1159, + 1167,3,164,82,0,1160,1161,3,140,70,0,1161,1162,5,120,0,0,1162,1164,1, + 0,0,0,1163,1160,1,0,0,0,1163,1164,1,0,0,0,1164,1165,1,0,0,0,1165,1167, + 3,134,67,0,1166,1159,1,0,0,0,1166,1163,1,0,0,0,1167,133,1,0,0,0,1168, + 1173,3,160,80,0,1169,1170,5,120,0,0,1170,1172,3,160,80,0,1171,1169,1, + 0,0,0,1172,1175,1,0,0,0,1173,1171,1,0,0,0,1173,1174,1,0,0,0,1174,135, + 1,0,0,0,1175,1173,1,0,0,0,1176,1177,6,68,-1,0,1177,1186,3,140,70,0,1178, + 1186,3,138,69,0,1179,1180,5,130,0,0,1180,1181,3,44,22,0,1181,1182,5,149, + 0,0,1182,1186,1,0,0,0,1183,1186,3,124,62,0,1184,1186,3,164,82,0,1185, + 1176,1,0,0,0,1185,1178,1,0,0,0,1185,1179,1,0,0,0,1185,1183,1,0,0,0,1185, + 1184,1,0,0,0,1186,1195,1,0,0,0,1187,1191,10,3,0,0,1188,1192,3,158,79, + 0,1189,1190,5,6,0,0,1190,1192,3,160,80,0,1191,1188,1,0,0,0,1191,1189, + 1,0,0,0,1192,1194,1,0,0,0,1193,1187,1,0,0,0,1194,1197,1,0,0,0,1195,1193, + 1,0,0,0,1195,1196,1,0,0,0,1196,137,1,0,0,0,1197,1195,1,0,0,0,1198,1199, + 3,160,80,0,1199,1201,5,130,0,0,1200,1202,3,142,71,0,1201,1200,1,0,0,0, + 1201,1202,1,0,0,0,1202,1203,1,0,0,0,1203,1204,5,149,0,0,1204,139,1,0, + 0,0,1205,1206,3,144,72,0,1206,1207,5,120,0,0,1207,1209,1,0,0,0,1208,1205, + 1,0,0,0,1208,1209,1,0,0,0,1209,1210,1,0,0,0,1210,1211,3,160,80,0,1211, + 141,1,0,0,0,1212,1217,3,116,58,0,1213,1214,5,116,0,0,1214,1216,3,116, + 58,0,1215,1213,1,0,0,0,1216,1219,1,0,0,0,1217,1215,1,0,0,0,1217,1218, + 1,0,0,0,1218,1221,1,0,0,0,1219,1217,1,0,0,0,1220,1222,5,116,0,0,1221, + 1220,1,0,0,0,1221,1222,1,0,0,0,1222,143,1,0,0,0,1223,1224,3,160,80,0, + 1224,145,1,0,0,0,1225,1234,5,106,0,0,1226,1227,5,120,0,0,1227,1234,7, + 11,0,0,1228,1229,5,108,0,0,1229,1231,5,120,0,0,1230,1232,7,11,0,0,1231, + 1230,1,0,0,0,1231,1232,1,0,0,0,1232,1234,1,0,0,0,1233,1225,1,0,0,0,1233, + 1226,1,0,0,0,1233,1228,1,0,0,0,1234,147,1,0,0,0,1235,1237,7,12,0,0,1236, + 1235,1,0,0,0,1236,1237,1,0,0,0,1237,1244,1,0,0,0,1238,1245,3,146,73,0, + 1239,1245,5,107,0,0,1240,1245,5,108,0,0,1241,1245,5,109,0,0,1242,1245, + 5,43,0,0,1243,1245,5,57,0,0,1244,1238,1,0,0,0,1244,1239,1,0,0,0,1244, + 1240,1,0,0,0,1244,1241,1,0,0,0,1244,1242,1,0,0,0,1244,1243,1,0,0,0,1245, + 149,1,0,0,0,1246,1250,3,148,74,0,1247,1250,5,110,0,0,1248,1250,5,59,0, + 0,1249,1246,1,0,0,0,1249,1247,1,0,0,0,1249,1248,1,0,0,0,1250,151,1,0, + 0,0,1251,1252,7,13,0,0,1252,153,1,0,0,0,1253,1254,7,14,0,0,1254,155,1, + 0,0,0,1255,1256,7,15,0,0,1256,157,1,0,0,0,1257,1260,5,105,0,0,1258,1260, + 3,156,78,0,1259,1257,1,0,0,0,1259,1258,1,0,0,0,1260,159,1,0,0,0,1261, + 1265,5,105,0,0,1262,1265,3,152,76,0,1263,1265,3,154,77,0,1264,1261,1, + 0,0,0,1264,1262,1,0,0,0,1264,1263,1,0,0,0,1265,161,1,0,0,0,1266,1267, + 3,166,83,0,1267,1268,5,122,0,0,1268,1269,3,148,74,0,1269,163,1,0,0,0, + 1270,1271,5,128,0,0,1271,1272,3,160,80,0,1272,1273,5,147,0,0,1273,165, + 1,0,0,0,1274,1277,5,110,0,0,1275,1277,3,168,84,0,1276,1274,1,0,0,0,1276, + 1275,1,0,0,0,1277,167,1,0,0,0,1278,1282,5,142,0,0,1279,1281,3,170,85, + 0,1280,1279,1,0,0,0,1281,1284,1,0,0,0,1282,1280,1,0,0,0,1282,1283,1,0, + 0,0,1283,1285,1,0,0,0,1284,1282,1,0,0,0,1285,1286,5,144,0,0,1286,169, + 1,0,0,0,1287,1288,5,157,0,0,1288,1289,3,116,58,0,1289,1290,5,147,0,0, + 1290,1293,1,0,0,0,1291,1293,5,156,0,0,1292,1287,1,0,0,0,1292,1291,1,0, + 0,0,1293,171,1,0,0,0,1294,1298,5,143,0,0,1295,1297,3,174,87,0,1296,1295, + 1,0,0,0,1297,1300,1,0,0,0,1298,1296,1,0,0,0,1298,1299,1,0,0,0,1299,1301, + 1,0,0,0,1300,1298,1,0,0,0,1301,1302,5,0,0,1,1302,173,1,0,0,0,1303,1304, + 5,159,0,0,1304,1305,3,116,58,0,1305,1306,5,147,0,0,1306,1309,1,0,0,0, + 1307,1309,5,158,0,0,1308,1303,1,0,0,0,1308,1307,1,0,0,0,1309,175,1,0, + 0,0,168,179,186,195,202,206,220,224,227,231,234,241,245,254,259,268,276, + 283,287,293,298,306,313,319,331,339,353,357,362,372,381,384,388,391,395, + 398,401,404,407,411,415,418,421,424,428,431,440,446,467,484,501,507,513, + 524,526,537,540,546,554,560,562,566,571,574,577,581,585,588,590,593,597, + 601,604,606,608,613,624,630,637,642,646,650,656,658,665,673,676,679,698, + 712,728,732,743,747,758,762,769,773,780,784,789,798,802,826,843,849,852, + 855,865,871,874,877,885,888,892,895,909,926,931,935,941,948,960,964,967, + 976,990,1029,1037,1039,1041,1049,1053,1057,1065,1069,1078,1082,1084,1094, + 1105,1114,1121,1134,1141,1145,1157,1163,1166,1173,1185,1191,1195,1201, + 1208,1217,1221,1231,1233,1236,1244,1249,1259,1264,1276,1282,1292,1298, + 1308 }; staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0])); @@ -678,20 +697,20 @@ HogQLParser::ProgramContext* HogQLParser::program() { }); try { enterOuterAlt(_localctx, 1); - setState(173); + setState(179); _errHandler->sync(this); _la = _input->LA(1); while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -2) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106351341731839) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 263297) != 0)) { - setState(170); + ((1ULL << _la) & -536887298) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493105500848127) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 4212759) != 0)) { + setState(176); declaration(); - setState(175); + setState(181); _errHandler->sync(this); _la = _input->LA(1); } - setState(176); + setState(182); match(HogQLParser::EOF); } @@ -743,12 +762,12 @@ HogQLParser::DeclarationContext* HogQLParser::declaration() { exitRule(); }); try { - setState(180); + setState(186); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::LET: { enterOuterAlt(_localctx, 1); - setState(178); + setState(184); varDecl(); break; } @@ -833,6 +852,7 @@ HogQLParser::DeclarationContext* HogQLParser::declaration() { case HogQLParser::SETTINGS: case HogQLParser::SUBSTRING: case HogQLParser::THEN: + case HogQLParser::THROW: case HogQLParser::TIES: case HogQLParser::TIMESTAMP: case HogQLParser::TO: @@ -841,6 +861,7 @@ HogQLParser::DeclarationContext* HogQLParser::declaration() { case HogQLParser::TRAILING: case HogQLParser::TRIM: case HogQLParser::TRUNCATE: + case HogQLParser::TRY: case HogQLParser::UNBOUNDED: case HogQLParser::UNION: case HogQLParser::USING: @@ -868,7 +889,7 @@ HogQLParser::DeclarationContext* HogQLParser::declaration() { case HogQLParser::QUOTE_SINGLE_TEMPLATE: case HogQLParser::SEMICOLON: { enterOuterAlt(_localctx, 2); - setState(179); + setState(185); statement(); break; } @@ -923,7 +944,7 @@ HogQLParser::ExpressionContext* HogQLParser::expression() { }); try { enterOuterAlt(_localctx, 1); - setState(182); + setState(188); columnExpr(0); } @@ -989,20 +1010,20 @@ HogQLParser::VarDeclContext* HogQLParser::varDecl() { }); try { enterOuterAlt(_localctx, 1); - setState(184); + setState(190); match(HogQLParser::LET); - setState(185); + setState(191); identifier(); - setState(189); + setState(195); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COLON) { - setState(186); + setState(192); match(HogQLParser::COLON); - setState(187); + setState(193); match(HogQLParser::EQ_SINGLE); - setState(188); + setState(194); expression(); } @@ -1066,28 +1087,28 @@ HogQLParser::IdentifierListContext* HogQLParser::identifierList() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(191); + setState(197); identifier(); - setState(196); + setState(202); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 3, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(192); + setState(198); match(HogQLParser::COMMA); - setState(193); + setState(199); identifier(); } - setState(198); + setState(204); _errHandler->sync(this); alt = getInterpreter()->adaptivePredict(_input, 3, _ctx); } - setState(200); + setState(206); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(199); + setState(205); match(HogQLParser::COMMA); } @@ -1111,6 +1132,14 @@ HogQLParser::ReturnStmtContext* HogQLParser::StatementContext::returnStmt() { return getRuleContext(0); } +HogQLParser::ThrowStmtContext* HogQLParser::StatementContext::throwStmt() { + return getRuleContext(0); +} + +HogQLParser::TryCatchStmtContext* HogQLParser::StatementContext::tryCatchStmt() { + return getRuleContext(0); +} + HogQLParser::IfStmtContext* HogQLParser::StatementContext::ifStmt() { return getRuleContext(0); } @@ -1172,75 +1201,89 @@ HogQLParser::StatementContext* HogQLParser::statement() { exitRule(); }); try { - setState(212); + setState(220); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 5, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(202); + setState(208); returnStmt(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(203); - ifStmt(); + setState(209); + throwStmt(); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(204); - whileStmt(); + setState(210); + tryCatchStmt(); break; } case 4: { enterOuterAlt(_localctx, 4); - setState(205); - forInStmt(); + setState(211); + ifStmt(); break; } case 5: { enterOuterAlt(_localctx, 5); - setState(206); - forStmt(); + setState(212); + whileStmt(); break; } case 6: { enterOuterAlt(_localctx, 6); - setState(207); - funcStmt(); + setState(213); + forInStmt(); break; } case 7: { enterOuterAlt(_localctx, 7); - setState(208); - varAssignment(); + setState(214); + forStmt(); break; } case 8: { enterOuterAlt(_localctx, 8); - setState(209); - block(); + setState(215); + funcStmt(); break; } case 9: { enterOuterAlt(_localctx, 9); - setState(210); - exprStmt(); + setState(216); + varAssignment(); break; } case 10: { enterOuterAlt(_localctx, 10); - setState(211); + setState(217); + block(); + break; + } + + case 11: { + enterOuterAlt(_localctx, 11); + setState(218); + exprStmt(); + break; + } + + case 12: { + enterOuterAlt(_localctx, 12); + setState(219); emptyStmt(); break; } @@ -1303,14 +1346,14 @@ HogQLParser::ReturnStmtContext* HogQLParser::returnStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(214); + setState(222); match(HogQLParser::RETURN); - setState(216); + setState(224); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 6, _ctx)) { case 1: { - setState(215); + setState(223); expression(); break; } @@ -1318,12 +1361,12 @@ HogQLParser::ReturnStmtContext* HogQLParser::returnStmt() { default: break; } - setState(219); + setState(227); _errHandler->sync(this); switch (getInterpreter()->adaptivePredict(_input, 7, _ctx)) { case 1: { - setState(218); + setState(226); match(HogQLParser::SEMICOLON); break; } @@ -1342,6 +1385,279 @@ HogQLParser::ReturnStmtContext* HogQLParser::returnStmt() { return _localctx; } +//----------------- ThrowStmtContext ------------------------------------------------------------------ + +HogQLParser::ThrowStmtContext::ThrowStmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* HogQLParser::ThrowStmtContext::THROW() { + return getToken(HogQLParser::THROW, 0); +} + +HogQLParser::ExpressionContext* HogQLParser::ThrowStmtContext::expression() { + return getRuleContext(0); +} + +tree::TerminalNode* HogQLParser::ThrowStmtContext::SEMICOLON() { + return getToken(HogQLParser::SEMICOLON, 0); +} + + +size_t HogQLParser::ThrowStmtContext::getRuleIndex() const { + return HogQLParser::RuleThrowStmt; +} + + +std::any HogQLParser::ThrowStmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitThrowStmt(this); + else + return visitor->visitChildren(this); +} + +HogQLParser::ThrowStmtContext* HogQLParser::throwStmt() { + ThrowStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 14, HogQLParser::RuleThrowStmt); + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(229); + match(HogQLParser::THROW); + setState(231); + _errHandler->sync(this); + + switch (getInterpreter()->adaptivePredict(_input, 8, _ctx)) { + case 1: { + setState(230); + expression(); + break; + } + + default: + break; + } + setState(234); + _errHandler->sync(this); + + switch (getInterpreter()->adaptivePredict(_input, 9, _ctx)) { + case 1: { + setState(233); + match(HogQLParser::SEMICOLON); + break; + } + + default: + break; + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- CatchBlockContext ------------------------------------------------------------------ + +HogQLParser::CatchBlockContext::CatchBlockContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* HogQLParser::CatchBlockContext::CATCH() { + return getToken(HogQLParser::CATCH, 0); +} + +HogQLParser::BlockContext* HogQLParser::CatchBlockContext::block() { + return getRuleContext(0); +} + +tree::TerminalNode* HogQLParser::CatchBlockContext::LPAREN() { + return getToken(HogQLParser::LPAREN, 0); +} + +tree::TerminalNode* HogQLParser::CatchBlockContext::RPAREN() { + return getToken(HogQLParser::RPAREN, 0); +} + +std::vector HogQLParser::CatchBlockContext::identifier() { + return getRuleContexts(); +} + +HogQLParser::IdentifierContext* HogQLParser::CatchBlockContext::identifier(size_t i) { + return getRuleContext(i); +} + +tree::TerminalNode* HogQLParser::CatchBlockContext::COLON() { + return getToken(HogQLParser::COLON, 0); +} + + +size_t HogQLParser::CatchBlockContext::getRuleIndex() const { + return HogQLParser::RuleCatchBlock; +} + + +std::any HogQLParser::CatchBlockContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitCatchBlock(this); + else + return visitor->visitChildren(this); +} + +HogQLParser::CatchBlockContext* HogQLParser::catchBlock() { + CatchBlockContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 16, HogQLParser::RuleCatchBlock); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(236); + match(HogQLParser::CATCH); + setState(245); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == HogQLParser::LPAREN) { + setState(237); + match(HogQLParser::LPAREN); + setState(238); + antlrcpp::downCast(_localctx)->catchVar = identifier(); + setState(241); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == HogQLParser::COLON) { + setState(239); + match(HogQLParser::COLON); + setState(240); + antlrcpp::downCast(_localctx)->catchType = identifier(); + } + setState(243); + match(HogQLParser::RPAREN); + } + setState(247); + antlrcpp::downCast(_localctx)->catchStmt = block(); + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + +//----------------- TryCatchStmtContext ------------------------------------------------------------------ + +HogQLParser::TryCatchStmtContext::TryCatchStmtContext(ParserRuleContext *parent, size_t invokingState) + : ParserRuleContext(parent, invokingState) { +} + +tree::TerminalNode* HogQLParser::TryCatchStmtContext::TRY() { + return getToken(HogQLParser::TRY, 0); +} + +std::vector HogQLParser::TryCatchStmtContext::block() { + return getRuleContexts(); +} + +HogQLParser::BlockContext* HogQLParser::TryCatchStmtContext::block(size_t i) { + return getRuleContext(i); +} + +std::vector HogQLParser::TryCatchStmtContext::catchBlock() { + return getRuleContexts(); +} + +HogQLParser::CatchBlockContext* HogQLParser::TryCatchStmtContext::catchBlock(size_t i) { + return getRuleContext(i); +} + +tree::TerminalNode* HogQLParser::TryCatchStmtContext::FINALLY() { + return getToken(HogQLParser::FINALLY, 0); +} + + +size_t HogQLParser::TryCatchStmtContext::getRuleIndex() const { + return HogQLParser::RuleTryCatchStmt; +} + + +std::any HogQLParser::TryCatchStmtContext::accept(tree::ParseTreeVisitor *visitor) { + if (auto parserVisitor = dynamic_cast(visitor)) + return parserVisitor->visitTryCatchStmt(this); + else + return visitor->visitChildren(this); +} + +HogQLParser::TryCatchStmtContext* HogQLParser::tryCatchStmt() { + TryCatchStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); + enterRule(_localctx, 18, HogQLParser::RuleTryCatchStmt); + size_t _la = 0; + +#if __cplusplus > 201703L + auto onExit = finally([=, this] { +#else + auto onExit = finally([=] { +#endif + exitRule(); + }); + try { + enterOuterAlt(_localctx, 1); + setState(249); + match(HogQLParser::TRY); + setState(250); + antlrcpp::downCast(_localctx)->tryStmt = block(); + setState(254); + _errHandler->sync(this); + _la = _input->LA(1); + while (_la == HogQLParser::CATCH) { + setState(251); + catchBlock(); + setState(256); + _errHandler->sync(this); + _la = _input->LA(1); + } + setState(259); + _errHandler->sync(this); + + _la = _input->LA(1); + if (_la == HogQLParser::FINALLY) { + setState(257); + match(HogQLParser::FINALLY); + setState(258); + antlrcpp::downCast(_localctx)->finallyStmt = block(); + } + + } + catch (RecognitionException &e) { + _errHandler->reportError(this, e); + _localctx->exception = std::current_exception(); + _errHandler->recover(this, _localctx->exception); + } + + return _localctx; +} + //----------------- IfStmtContext ------------------------------------------------------------------ HogQLParser::IfStmtContext::IfStmtContext(ParserRuleContext *parent, size_t invokingState) @@ -1391,7 +1707,7 @@ std::any HogQLParser::IfStmtContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::IfStmtContext* HogQLParser::ifStmt() { IfStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 14, HogQLParser::RuleIfStmt); + enterRule(_localctx, 20, HogQLParser::RuleIfStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1402,24 +1718,24 @@ HogQLParser::IfStmtContext* HogQLParser::ifStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(221); + setState(261); match(HogQLParser::IF); - setState(222); + setState(262); match(HogQLParser::LPAREN); - setState(223); + setState(263); expression(); - setState(224); + setState(264); match(HogQLParser::RPAREN); - setState(225); + setState(265); statement(); - setState(228); + setState(268); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 8, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 14, _ctx)) { case 1: { - setState(226); + setState(266); match(HogQLParser::ELSE); - setState(227); + setState(267); statement(); break; } @@ -1483,7 +1799,7 @@ std::any HogQLParser::WhileStmtContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::WhileStmtContext* HogQLParser::whileStmt() { WhileStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 16, HogQLParser::RuleWhileStmt); + enterRule(_localctx, 22, HogQLParser::RuleWhileStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1494,22 +1810,22 @@ HogQLParser::WhileStmtContext* HogQLParser::whileStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(230); + setState(270); match(HogQLParser::WHILE); - setState(231); + setState(271); match(HogQLParser::LPAREN); - setState(232); + setState(272); expression(); - setState(233); + setState(273); match(HogQLParser::RPAREN); - setState(234); + setState(274); statement(); - setState(236); + setState(276); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 9, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 15, _ctx)) { case 1: { - setState(235); + setState(275); match(HogQLParser::SEMICOLON); break; } @@ -1597,7 +1913,7 @@ std::any HogQLParser::ForStmtContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::ForStmtContext* HogQLParser::forStmt() { ForStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 18, HogQLParser::RuleForStmt); + enterRule(_localctx, 24, HogQLParser::RuleForStmt); size_t _la = 0; #if __cplusplus > 201703L @@ -1609,28 +1925,28 @@ HogQLParser::ForStmtContext* HogQLParser::forStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(238); + setState(278); match(HogQLParser::FOR); - setState(239); + setState(279); match(HogQLParser::LPAREN); - setState(243); + setState(283); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 10, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 16, _ctx)) { case 1: { - setState(240); + setState(280); antlrcpp::downCast(_localctx)->initializerVarDeclr = varDecl(); break; } case 2: { - setState(241); + setState(281); antlrcpp::downCast(_localctx)->initializerVarAssignment = varAssignment(); break; } case 3: { - setState(242); + setState(282); antlrcpp::downCast(_localctx)->initializerExpression = expression(); break; } @@ -1638,39 +1954,39 @@ HogQLParser::ForStmtContext* HogQLParser::forStmt() { default: break; } - setState(245); + setState(285); match(HogQLParser::SEMICOLON); - setState(247); + setState(287); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(246); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(286); antlrcpp::downCast(_localctx)->condition = expression(); } - setState(249); + setState(289); match(HogQLParser::SEMICOLON); - setState(253); + setState(293); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 12, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 18, _ctx)) { case 1: { - setState(250); + setState(290); antlrcpp::downCast(_localctx)->incrementVarDeclr = varDecl(); break; } case 2: { - setState(251); + setState(291); antlrcpp::downCast(_localctx)->incrementVarAssignment = varAssignment(); break; } case 3: { - setState(252); + setState(292); antlrcpp::downCast(_localctx)->incrementExpression = expression(); break; } @@ -1678,16 +1994,16 @@ HogQLParser::ForStmtContext* HogQLParser::forStmt() { default: break; } - setState(255); + setState(295); match(HogQLParser::RPAREN); - setState(256); + setState(296); statement(); - setState(258); + setState(298); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 13, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 19, _ctx)) { case 1: { - setState(257); + setState(297); match(HogQLParser::SEMICOLON); break; } @@ -1771,7 +2087,7 @@ std::any HogQLParser::ForInStmtContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::ForInStmtContext* HogQLParser::forInStmt() { ForInStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 20, HogQLParser::RuleForInStmt); + enterRule(_localctx, 26, HogQLParser::RuleForInStmt); size_t _la = 0; #if __cplusplus > 201703L @@ -1783,38 +2099,38 @@ HogQLParser::ForInStmtContext* HogQLParser::forInStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(260); + setState(300); match(HogQLParser::FOR); - setState(261); + setState(301); match(HogQLParser::LPAREN); - setState(262); + setState(302); match(HogQLParser::LET); - setState(263); + setState(303); identifier(); - setState(266); + setState(306); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(264); + setState(304); match(HogQLParser::COMMA); - setState(265); + setState(305); identifier(); } - setState(268); + setState(308); match(HogQLParser::IN); - setState(269); + setState(309); expression(); - setState(270); + setState(310); match(HogQLParser::RPAREN); - setState(271); + setState(311); statement(); - setState(273); + setState(313); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 15, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 21, _ctx)) { case 1: { - setState(272); + setState(312); match(HogQLParser::SEMICOLON); break; } @@ -1878,7 +2194,7 @@ std::any HogQLParser::FuncStmtContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::FuncStmtContext* HogQLParser::funcStmt() { FuncStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 22, HogQLParser::RuleFuncStmt); + enterRule(_localctx, 28, HogQLParser::RuleFuncStmt); size_t _la = 0; #if __cplusplus > 201703L @@ -1890,25 +2206,25 @@ HogQLParser::FuncStmtContext* HogQLParser::funcStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(275); + setState(315); match(HogQLParser::FN); - setState(276); + setState(316); identifier(); - setState(277); + setState(317); match(HogQLParser::LPAREN); - setState(279); + setState(319); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -181272084561788930) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 201863462911) != 0)) { - setState(278); + ((1ULL << _la) & -725088338784043010) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 3229277487103) != 0)) { + setState(318); identifierList(); } - setState(281); + setState(321); match(HogQLParser::RPAREN); - setState(282); + setState(322); block(); } @@ -1958,7 +2274,7 @@ std::any HogQLParser::VarAssignmentContext::accept(tree::ParseTreeVisitor *visit HogQLParser::VarAssignmentContext* HogQLParser::varAssignment() { VarAssignmentContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 24, HogQLParser::RuleVarAssignment); + enterRule(_localctx, 30, HogQLParser::RuleVarAssignment); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -1969,13 +2285,13 @@ HogQLParser::VarAssignmentContext* HogQLParser::varAssignment() { }); try { enterOuterAlt(_localctx, 1); - setState(284); + setState(324); expression(); - setState(285); + setState(325); match(HogQLParser::COLON); - setState(286); + setState(326); match(HogQLParser::EQ_SINGLE); - setState(287); + setState(327); expression(); } @@ -2017,7 +2333,7 @@ std::any HogQLParser::ExprStmtContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::ExprStmtContext* HogQLParser::exprStmt() { ExprStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 26, HogQLParser::RuleExprStmt); + enterRule(_localctx, 32, HogQLParser::RuleExprStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2028,14 +2344,14 @@ HogQLParser::ExprStmtContext* HogQLParser::exprStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(289); + setState(329); expression(); - setState(291); + setState(331); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 17, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 23, _ctx)) { case 1: { - setState(290); + setState(330); match(HogQLParser::SEMICOLON); break; } @@ -2079,7 +2395,7 @@ std::any HogQLParser::EmptyStmtContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::EmptyStmtContext* HogQLParser::emptyStmt() { EmptyStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 28, HogQLParser::RuleEmptyStmt); + enterRule(_localctx, 34, HogQLParser::RuleEmptyStmt); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2090,7 +2406,7 @@ HogQLParser::EmptyStmtContext* HogQLParser::emptyStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(293); + setState(333); match(HogQLParser::SEMICOLON); } @@ -2140,7 +2456,7 @@ std::any HogQLParser::BlockContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::BlockContext* HogQLParser::block() { BlockContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 30, HogQLParser::RuleBlock); + enterRule(_localctx, 36, HogQLParser::RuleBlock); size_t _la = 0; #if __cplusplus > 201703L @@ -2152,22 +2468,22 @@ HogQLParser::BlockContext* HogQLParser::block() { }); try { enterOuterAlt(_localctx, 1); - setState(295); + setState(335); match(HogQLParser::LBRACE); - setState(299); + setState(339); _errHandler->sync(this); _la = _input->LA(1); while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -2) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106351341731839) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 263297) != 0)) { - setState(296); + ((1ULL << _la) & -536887298) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493105500848127) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 4212759) != 0)) { + setState(336); declaration(); - setState(301); + setState(341); _errHandler->sync(this); _la = _input->LA(1); } - setState(302); + setState(342); match(HogQLParser::RBRACE); } @@ -2213,7 +2529,7 @@ std::any HogQLParser::KvPairContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::KvPairContext* HogQLParser::kvPair() { KvPairContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 32, HogQLParser::RuleKvPair); + enterRule(_localctx, 38, HogQLParser::RuleKvPair); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2224,11 +2540,11 @@ HogQLParser::KvPairContext* HogQLParser::kvPair() { }); try { enterOuterAlt(_localctx, 1); - setState(304); + setState(344); expression(); - setState(305); + setState(345); match(HogQLParser::COLON); - setState(306); + setState(346); expression(); } @@ -2278,7 +2594,7 @@ std::any HogQLParser::KvPairListContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::KvPairListContext* HogQLParser::kvPairList() { KvPairListContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 34, HogQLParser::RuleKvPairList); + enterRule(_localctx, 40, HogQLParser::RuleKvPairList); size_t _la = 0; #if __cplusplus > 201703L @@ -2291,28 +2607,28 @@ HogQLParser::KvPairListContext* HogQLParser::kvPairList() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(308); + setState(348); kvPair(); - setState(313); + setState(353); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 19, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 25, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(309); + setState(349); match(HogQLParser::COMMA); - setState(310); + setState(350); kvPair(); } - setState(315); + setState(355); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 19, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 25, _ctx); } - setState(317); + setState(357); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(316); + setState(356); match(HogQLParser::COMMA); } @@ -2363,7 +2679,7 @@ std::any HogQLParser::SelectContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::SelectContext* HogQLParser::select() { SelectContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 36, HogQLParser::RuleSelect); + enterRule(_localctx, 42, HogQLParser::RuleSelect); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2374,23 +2690,23 @@ HogQLParser::SelectContext* HogQLParser::select() { }); try { enterOuterAlt(_localctx, 1); - setState(322); + setState(362); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 21, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 27, _ctx)) { case 1: { - setState(319); + setState(359); selectUnionStmt(); break; } case 2: { - setState(320); + setState(360); selectStmt(); break; } case 3: { - setState(321); + setState(361); hogqlxTagElement(); break; } @@ -2398,7 +2714,7 @@ HogQLParser::SelectContext* HogQLParser::select() { default: break; } - setState(324); + setState(364); match(HogQLParser::EOF); } @@ -2456,7 +2772,7 @@ std::any HogQLParser::SelectUnionStmtContext::accept(tree::ParseTreeVisitor *vis HogQLParser::SelectUnionStmtContext* HogQLParser::selectUnionStmt() { SelectUnionStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 38, HogQLParser::RuleSelectUnionStmt); + enterRule(_localctx, 44, HogQLParser::RuleSelectUnionStmt); size_t _la = 0; #if __cplusplus > 201703L @@ -2468,19 +2784,19 @@ HogQLParser::SelectUnionStmtContext* HogQLParser::selectUnionStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(326); + setState(366); selectStmtWithParens(); - setState(332); + setState(372); _errHandler->sync(this); _la = _input->LA(1); while (_la == HogQLParser::UNION) { - setState(327); + setState(367); match(HogQLParser::UNION); - setState(328); + setState(368); match(HogQLParser::ALL); - setState(329); + setState(369); selectStmtWithParens(); - setState(334); + setState(374); _errHandler->sync(this); _la = _input->LA(1); } @@ -2536,7 +2852,7 @@ std::any HogQLParser::SelectStmtWithParensContext::accept(tree::ParseTreeVisitor HogQLParser::SelectStmtWithParensContext* HogQLParser::selectStmtWithParens() { SelectStmtWithParensContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 40, HogQLParser::RuleSelectStmtWithParens); + enterRule(_localctx, 46, HogQLParser::RuleSelectStmtWithParens); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2546,31 +2862,31 @@ HogQLParser::SelectStmtWithParensContext* HogQLParser::selectStmtWithParens() { exitRule(); }); try { - setState(341); + setState(381); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::SELECT: case HogQLParser::WITH: { enterOuterAlt(_localctx, 1); - setState(335); + setState(375); selectStmt(); break; } case HogQLParser::LPAREN: { enterOuterAlt(_localctx, 2); - setState(336); + setState(376); match(HogQLParser::LPAREN); - setState(337); + setState(377); selectUnionStmt(); - setState(338); + setState(378); match(HogQLParser::RPAREN); break; } case HogQLParser::LBRACE: { enterOuterAlt(_localctx, 3); - setState(340); + setState(380); placeholder(); break; } @@ -2694,7 +3010,7 @@ std::any HogQLParser::SelectStmtContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::SelectStmtContext* HogQLParser::selectStmt() { SelectStmtContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 42, HogQLParser::RuleSelectStmt); + enterRule(_localctx, 48, HogQLParser::RuleSelectStmt); size_t _la = 0; #if __cplusplus > 201703L @@ -2706,22 +3022,22 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() { }); try { enterOuterAlt(_localctx, 1); - setState(344); + setState(384); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::WITH) { - setState(343); + setState(383); antlrcpp::downCast(_localctx)->with = withClause(); } - setState(346); + setState(386); match(HogQLParser::SELECT); - setState(348); + setState(388); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 25, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 31, _ctx)) { case 1: { - setState(347); + setState(387); match(HogQLParser::DISTINCT); break; } @@ -2729,12 +3045,12 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() { default: break; } - setState(351); + setState(391); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 26, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 32, _ctx)) { case 1: { - setState(350); + setState(390); topClause(); break; } @@ -2742,57 +3058,57 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() { default: break; } - setState(353); + setState(393); antlrcpp::downCast(_localctx)->columns = columnExprList(); - setState(355); + setState(395); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::FROM) { - setState(354); + setState(394); antlrcpp::downCast(_localctx)->from = fromClause(); } - setState(358); + setState(398); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 567347999932448) != 0)) { - setState(357); + ((1ULL << _la) & 2269391999729696) != 0)) { + setState(397); arrayJoinClause(); } - setState(361); + setState(401); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::PREWHERE) { - setState(360); + setState(400); prewhereClause(); } - setState(364); + setState(404); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::WHERE) { - setState(363); + setState(403); antlrcpp::downCast(_localctx)->where = whereClause(); } - setState(367); + setState(407); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::GROUP) { - setState(366); + setState(406); groupByClause(); } - setState(371); + setState(411); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 32, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 38, _ctx)) { case 1: { - setState(369); + setState(409); match(HogQLParser::WITH); - setState(370); + setState(410); _la = _input->LA(1); if (!(_la == HogQLParser::CUBE @@ -2809,51 +3125,51 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() { default: break; } - setState(375); + setState(415); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::WITH) { - setState(373); + setState(413); match(HogQLParser::WITH); - setState(374); + setState(414); match(HogQLParser::TOTALS); } - setState(378); + setState(418); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::HAVING) { - setState(377); + setState(417); havingClause(); } - setState(381); + setState(421); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::WINDOW) { - setState(380); + setState(420); windowClause(); } - setState(384); + setState(424); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::ORDER) { - setState(383); + setState(423); orderByClause(); } - setState(388); + setState(428); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::LIMIT: { - setState(386); + setState(426); limitAndOffsetClause(); break; } case HogQLParser::OFFSET: { - setState(387); + setState(427); offsetOnlyClause(); break; } @@ -2868,12 +3184,12 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() { default: break; } - setState(391); + setState(431); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::SETTINGS) { - setState(390); + setState(430); settingsClause(); } @@ -2916,7 +3232,7 @@ std::any HogQLParser::WithClauseContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::WithClauseContext* HogQLParser::withClause() { WithClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 44, HogQLParser::RuleWithClause); + enterRule(_localctx, 50, HogQLParser::RuleWithClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2927,9 +3243,9 @@ HogQLParser::WithClauseContext* HogQLParser::withClause() { }); try { enterOuterAlt(_localctx, 1); - setState(393); + setState(433); match(HogQLParser::WITH); - setState(394); + setState(434); withExprList(); } @@ -2979,7 +3295,7 @@ std::any HogQLParser::TopClauseContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::TopClauseContext* HogQLParser::topClause() { TopClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 46, HogQLParser::RuleTopClause); + enterRule(_localctx, 52, HogQLParser::RuleTopClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -2990,18 +3306,18 @@ HogQLParser::TopClauseContext* HogQLParser::topClause() { }); try { enterOuterAlt(_localctx, 1); - setState(396); + setState(436); match(HogQLParser::TOP); - setState(397); + setState(437); match(HogQLParser::DECIMAL_LITERAL); - setState(400); + setState(440); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 39, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 45, _ctx)) { case 1: { - setState(398); + setState(438); match(HogQLParser::WITH); - setState(399); + setState(439); match(HogQLParser::TIES); break; } @@ -3049,7 +3365,7 @@ std::any HogQLParser::FromClauseContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::FromClauseContext* HogQLParser::fromClause() { FromClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 48, HogQLParser::RuleFromClause); + enterRule(_localctx, 54, HogQLParser::RuleFromClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3060,9 +3376,9 @@ HogQLParser::FromClauseContext* HogQLParser::fromClause() { }); try { enterOuterAlt(_localctx, 1); - setState(402); + setState(442); match(HogQLParser::FROM); - setState(403); + setState(443); joinExpr(0); } @@ -3116,7 +3432,7 @@ std::any HogQLParser::ArrayJoinClauseContext::accept(tree::ParseTreeVisitor *vis HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() { ArrayJoinClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 50, HogQLParser::RuleArrayJoinClause); + enterRule(_localctx, 56, HogQLParser::RuleArrayJoinClause); size_t _la = 0; #if __cplusplus > 201703L @@ -3128,14 +3444,14 @@ HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() { }); try { enterOuterAlt(_localctx, 1); - setState(406); + setState(446); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::INNER || _la == HogQLParser::LEFT) { - setState(405); + setState(445); _la = _input->LA(1); if (!(_la == HogQLParser::INNER @@ -3147,11 +3463,11 @@ HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() { consume(); } } - setState(408); + setState(448); match(HogQLParser::ARRAY); - setState(409); + setState(449); match(HogQLParser::JOIN); - setState(410); + setState(450); columnExprList(); } @@ -3237,7 +3553,7 @@ std::any HogQLParser::WindowClauseContext::accept(tree::ParseTreeVisitor *visito HogQLParser::WindowClauseContext* HogQLParser::windowClause() { WindowClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 52, HogQLParser::RuleWindowClause); + enterRule(_localctx, 58, HogQLParser::RuleWindowClause); size_t _la = 0; #if __cplusplus > 201703L @@ -3249,35 +3565,35 @@ HogQLParser::WindowClauseContext* HogQLParser::windowClause() { }); try { enterOuterAlt(_localctx, 1); - setState(412); + setState(452); match(HogQLParser::WINDOW); - setState(413); + setState(453); identifier(); - setState(414); + setState(454); match(HogQLParser::AS); - setState(415); + setState(455); match(HogQLParser::LPAREN); - setState(416); + setState(456); windowExpr(); - setState(417); + setState(457); match(HogQLParser::RPAREN); - setState(427); + setState(467); _errHandler->sync(this); _la = _input->LA(1); while (_la == HogQLParser::COMMA) { - setState(418); + setState(458); match(HogQLParser::COMMA); - setState(419); + setState(459); identifier(); - setState(420); + setState(460); match(HogQLParser::AS); - setState(421); + setState(461); match(HogQLParser::LPAREN); - setState(422); + setState(462); windowExpr(); - setState(423); + setState(463); match(HogQLParser::RPAREN); - setState(429); + setState(469); _errHandler->sync(this); _la = _input->LA(1); } @@ -3321,7 +3637,7 @@ std::any HogQLParser::PrewhereClauseContext::accept(tree::ParseTreeVisitor *visi HogQLParser::PrewhereClauseContext* HogQLParser::prewhereClause() { PrewhereClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 54, HogQLParser::RulePrewhereClause); + enterRule(_localctx, 60, HogQLParser::RulePrewhereClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3332,9 +3648,9 @@ HogQLParser::PrewhereClauseContext* HogQLParser::prewhereClause() { }); try { enterOuterAlt(_localctx, 1); - setState(430); + setState(470); match(HogQLParser::PREWHERE); - setState(431); + setState(471); columnExpr(0); } @@ -3376,7 +3692,7 @@ std::any HogQLParser::WhereClauseContext::accept(tree::ParseTreeVisitor *visitor HogQLParser::WhereClauseContext* HogQLParser::whereClause() { WhereClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 56, HogQLParser::RuleWhereClause); + enterRule(_localctx, 62, HogQLParser::RuleWhereClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3387,9 +3703,9 @@ HogQLParser::WhereClauseContext* HogQLParser::whereClause() { }); try { enterOuterAlt(_localctx, 1); - setState(433); + setState(473); match(HogQLParser::WHERE); - setState(434); + setState(474); columnExpr(0); } @@ -3451,7 +3767,7 @@ std::any HogQLParser::GroupByClauseContext::accept(tree::ParseTreeVisitor *visit HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() { GroupByClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 58, HogQLParser::RuleGroupByClause); + enterRule(_localctx, 64, HogQLParser::RuleGroupByClause); size_t _la = 0; #if __cplusplus > 201703L @@ -3463,15 +3779,15 @@ HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() { }); try { enterOuterAlt(_localctx, 1); - setState(436); + setState(476); match(HogQLParser::GROUP); - setState(437); + setState(477); match(HogQLParser::BY); - setState(444); + setState(484); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 42, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 48, _ctx)) { case 1: { - setState(438); + setState(478); _la = _input->LA(1); if (!(_la == HogQLParser::CUBE @@ -3482,17 +3798,17 @@ HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() { _errHandler->reportMatch(this); consume(); } - setState(439); + setState(479); match(HogQLParser::LPAREN); - setState(440); + setState(480); columnExprList(); - setState(441); + setState(481); match(HogQLParser::RPAREN); break; } case 2: { - setState(443); + setState(483); columnExprList(); break; } @@ -3540,7 +3856,7 @@ std::any HogQLParser::HavingClauseContext::accept(tree::ParseTreeVisitor *visito HogQLParser::HavingClauseContext* HogQLParser::havingClause() { HavingClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 60, HogQLParser::RuleHavingClause); + enterRule(_localctx, 66, HogQLParser::RuleHavingClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3551,9 +3867,9 @@ HogQLParser::HavingClauseContext* HogQLParser::havingClause() { }); try { enterOuterAlt(_localctx, 1); - setState(446); + setState(486); match(HogQLParser::HAVING); - setState(447); + setState(487); columnExpr(0); } @@ -3599,7 +3915,7 @@ std::any HogQLParser::OrderByClauseContext::accept(tree::ParseTreeVisitor *visit HogQLParser::OrderByClauseContext* HogQLParser::orderByClause() { OrderByClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 62, HogQLParser::RuleOrderByClause); + enterRule(_localctx, 68, HogQLParser::RuleOrderByClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3610,11 +3926,11 @@ HogQLParser::OrderByClauseContext* HogQLParser::orderByClause() { }); try { enterOuterAlt(_localctx, 1); - setState(449); + setState(489); match(HogQLParser::ORDER); - setState(450); + setState(490); match(HogQLParser::BY); - setState(451); + setState(491); orderExprList(); } @@ -3660,7 +3976,7 @@ std::any HogQLParser::ProjectionOrderByClauseContext::accept(tree::ParseTreeVisi HogQLParser::ProjectionOrderByClauseContext* HogQLParser::projectionOrderByClause() { ProjectionOrderByClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 64, HogQLParser::RuleProjectionOrderByClause); + enterRule(_localctx, 70, HogQLParser::RuleProjectionOrderByClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3671,11 +3987,11 @@ HogQLParser::ProjectionOrderByClauseContext* HogQLParser::projectionOrderByClaus }); try { enterOuterAlt(_localctx, 1); - setState(453); + setState(493); match(HogQLParser::ORDER); - setState(454); + setState(494); match(HogQLParser::BY); - setState(455); + setState(495); columnExprList(); } @@ -3745,7 +4061,7 @@ std::any HogQLParser::LimitAndOffsetClauseContext::accept(tree::ParseTreeVisitor HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() { LimitAndOffsetClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 66, HogQLParser::RuleLimitAndOffsetClause); + enterRule(_localctx, 72, HogQLParser::RuleLimitAndOffsetClause); size_t _la = 0; #if __cplusplus > 201703L @@ -3756,40 +4072,40 @@ HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() { exitRule(); }); try { - setState(486); + setState(526); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 47, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 53, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(457); + setState(497); match(HogQLParser::LIMIT); - setState(458); + setState(498); columnExpr(0); - setState(461); + setState(501); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(459); + setState(499); match(HogQLParser::COMMA); - setState(460); + setState(500); columnExpr(0); } - setState(467); + setState(507); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::WITH: { - setState(463); + setState(503); match(HogQLParser::WITH); - setState(464); + setState(504); match(HogQLParser::TIES); break; } case HogQLParser::BY: { - setState(465); + setState(505); match(HogQLParser::BY); - setState(466); + setState(506); columnExprList(); break; } @@ -3809,45 +4125,45 @@ HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() { case 2: { enterOuterAlt(_localctx, 2); - setState(469); + setState(509); match(HogQLParser::LIMIT); - setState(470); + setState(510); columnExpr(0); - setState(473); + setState(513); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::WITH) { - setState(471); + setState(511); match(HogQLParser::WITH); - setState(472); + setState(512); match(HogQLParser::TIES); } - setState(475); + setState(515); match(HogQLParser::OFFSET); - setState(476); + setState(516); columnExpr(0); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(478); + setState(518); match(HogQLParser::LIMIT); - setState(479); + setState(519); columnExpr(0); - setState(480); + setState(520); match(HogQLParser::OFFSET); - setState(481); + setState(521); columnExpr(0); - setState(484); + setState(524); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::BY) { - setState(482); + setState(522); match(HogQLParser::BY); - setState(483); + setState(523); columnExprList(); } break; @@ -3896,7 +4212,7 @@ std::any HogQLParser::OffsetOnlyClauseContext::accept(tree::ParseTreeVisitor *vi HogQLParser::OffsetOnlyClauseContext* HogQLParser::offsetOnlyClause() { OffsetOnlyClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 68, HogQLParser::RuleOffsetOnlyClause); + enterRule(_localctx, 74, HogQLParser::RuleOffsetOnlyClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3907,9 +4223,9 @@ HogQLParser::OffsetOnlyClauseContext* HogQLParser::offsetOnlyClause() { }); try { enterOuterAlt(_localctx, 1); - setState(488); + setState(528); match(HogQLParser::OFFSET); - setState(489); + setState(529); columnExpr(0); } @@ -3951,7 +4267,7 @@ std::any HogQLParser::SettingsClauseContext::accept(tree::ParseTreeVisitor *visi HogQLParser::SettingsClauseContext* HogQLParser::settingsClause() { SettingsClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 70, HogQLParser::RuleSettingsClause); + enterRule(_localctx, 76, HogQLParser::RuleSettingsClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -3962,9 +4278,9 @@ HogQLParser::SettingsClauseContext* HogQLParser::settingsClause() { }); try { enterOuterAlt(_localctx, 1); - setState(491); + setState(531); match(HogQLParser::SETTINGS); - setState(492); + setState(532); settingExprList(); } @@ -4103,8 +4419,8 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) { HogQLParser::JoinExprContext *_localctx = _tracker.createInstance(_ctx, parentState); HogQLParser::JoinExprContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 72; - enterRecursionRule(_localctx, 72, HogQLParser::RuleJoinExpr, precedence); + size_t startState = 78; + enterRecursionRule(_localctx, 78, HogQLParser::RuleJoinExpr, precedence); size_t _la = 0; @@ -4118,22 +4434,22 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(506); + setState(546); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 50, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 56, _ctx)) { case 1: { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(495); + setState(535); tableExpr(0); - setState(497); + setState(537); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 48, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 54, _ctx)) { case 1: { - setState(496); + setState(536); match(HogQLParser::FINAL); break; } @@ -4141,12 +4457,12 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) { default: break; } - setState(500); + setState(540); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 49, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 55, _ctx)) { case 1: { - setState(499); + setState(539); sampleClause(); break; } @@ -4161,11 +4477,11 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(502); + setState(542); match(HogQLParser::LPAREN); - setState(503); + setState(543); joinExpr(0); - setState(504); + setState(544); match(HogQLParser::RPAREN); break; } @@ -4174,27 +4490,27 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) { break; } _ctx->stop = _input->LT(-1); - setState(522); + setState(562); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 53, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 59, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { if (!_parseListeners.empty()) triggerExitRuleEvent(); previousContext = _localctx; - setState(520); + setState(560); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 52, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 58, _ctx)) { case 1: { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleJoinExpr); - setState(508); + setState(548); if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(509); + setState(549); joinOpCross(); - setState(510); + setState(550); joinExpr(4); break; } @@ -4203,25 +4519,25 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleJoinExpr); - setState(512); + setState(552); if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)"); - setState(514); + setState(554); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 567356589867290) != 0) || _la == HogQLParser::RIGHT + ((1ULL << _la) & 2269426359468314) != 0) || _la == HogQLParser::RIGHT || _la == HogQLParser::SEMI) { - setState(513); + setState(553); joinOp(); } - setState(516); + setState(556); match(HogQLParser::JOIN); - setState(517); + setState(557); joinExpr(0); - setState(518); + setState(558); joinConstraintClause(); break; } @@ -4230,9 +4546,9 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) { break; } } - setState(524); + setState(564); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 53, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 59, _ctx); } } catch (RecognitionException &e) { @@ -4357,7 +4673,7 @@ std::any HogQLParser::JoinOpLeftRightContext::accept(tree::ParseTreeVisitor *vis } HogQLParser::JoinOpContext* HogQLParser::joinOp() { JoinOpContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 74, HogQLParser::RuleJoinOp); + enterRule(_localctx, 80, HogQLParser::RuleJoinOp); size_t _la = 0; #if __cplusplus > 201703L @@ -4368,23 +4684,23 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { exitRule(); }); try { - setState(568); + setState(608); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 67, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 73, _ctx)) { case 1: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 1); - setState(534); + setState(574); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 56, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 62, _ctx)) { case 1: { - setState(526); + setState(566); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 274) != 0)) { - setState(525); + setState(565); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 274) != 0))) { @@ -4395,21 +4711,21 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { consume(); } } - setState(528); + setState(568); match(HogQLParser::INNER); break; } case 2: { - setState(529); + setState(569); match(HogQLParser::INNER); - setState(531); + setState(571); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 274) != 0)) { - setState(530); + setState(570); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 274) != 0))) { @@ -4424,7 +4740,7 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { } case 3: { - setState(533); + setState(573); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 274) != 0))) { @@ -4446,17 +4762,17 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { case 2: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 2); - setState(550); + setState(590); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 61, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 67, _ctx)) { case 1: { - setState(537); + setState(577); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) { - setState(536); + setState(576); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) { @@ -4467,7 +4783,7 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { consume(); } } - setState(539); + setState(579); _la = _input->LA(1); if (!(_la == HogQLParser::LEFT @@ -4478,19 +4794,19 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { _errHandler->reportMatch(this); consume(); } - setState(541); + setState(581); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::OUTER) { - setState(540); + setState(580); match(HogQLParser::OUTER); } break; } case 2: { - setState(543); + setState(583); _la = _input->LA(1); if (!(_la == HogQLParser::LEFT @@ -4501,21 +4817,21 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { _errHandler->reportMatch(this); consume(); } - setState(545); + setState(585); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::OUTER) { - setState(544); + setState(584); match(HogQLParser::OUTER); } - setState(548); + setState(588); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) { - setState(547); + setState(587); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && ((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) { @@ -4538,18 +4854,18 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { case 3: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 3); - setState(566); + setState(606); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 66, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 72, _ctx)) { case 1: { - setState(553); + setState(593); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::ALL || _la == HogQLParser::ANY) { - setState(552); + setState(592); _la = _input->LA(1); if (!(_la == HogQLParser::ALL @@ -4561,38 +4877,38 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() { consume(); } } - setState(555); + setState(595); match(HogQLParser::FULL); - setState(557); + setState(597); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::OUTER) { - setState(556); + setState(596); match(HogQLParser::OUTER); } break; } case 2: { - setState(559); + setState(599); match(HogQLParser::FULL); - setState(561); + setState(601); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::OUTER) { - setState(560); + setState(600); match(HogQLParser::OUTER); } - setState(564); + setState(604); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::ALL || _la == HogQLParser::ANY) { - setState(563); + setState(603); _la = _input->LA(1); if (!(_la == HogQLParser::ALL @@ -4660,7 +4976,7 @@ std::any HogQLParser::JoinOpCrossContext::accept(tree::ParseTreeVisitor *visitor HogQLParser::JoinOpCrossContext* HogQLParser::joinOpCross() { JoinOpCrossContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 76, HogQLParser::RuleJoinOpCross); + enterRule(_localctx, 82, HogQLParser::RuleJoinOpCross); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4670,21 +4986,21 @@ HogQLParser::JoinOpCrossContext* HogQLParser::joinOpCross() { exitRule(); }); try { - setState(573); + setState(613); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::CROSS: { enterOuterAlt(_localctx, 1); - setState(570); + setState(610); match(HogQLParser::CROSS); - setState(571); + setState(611); match(HogQLParser::JOIN); break; } case HogQLParser::COMMA: { enterOuterAlt(_localctx, 2); - setState(572); + setState(612); match(HogQLParser::COMMA); break; } @@ -4744,7 +5060,7 @@ std::any HogQLParser::JoinConstraintClauseContext::accept(tree::ParseTreeVisitor HogQLParser::JoinConstraintClauseContext* HogQLParser::joinConstraintClause() { JoinConstraintClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 78, HogQLParser::RuleJoinConstraintClause); + enterRule(_localctx, 84, HogQLParser::RuleJoinConstraintClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4754,36 +5070,36 @@ HogQLParser::JoinConstraintClauseContext* HogQLParser::joinConstraintClause() { exitRule(); }); try { - setState(584); + setState(624); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 69, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 75, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(575); + setState(615); match(HogQLParser::ON); - setState(576); + setState(616); columnExprList(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(577); + setState(617); match(HogQLParser::USING); - setState(578); + setState(618); match(HogQLParser::LPAREN); - setState(579); + setState(619); columnExprList(); - setState(580); + setState(620); match(HogQLParser::RPAREN); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(582); + setState(622); match(HogQLParser::USING); - setState(583); + setState(623); columnExprList(); break; } @@ -4839,7 +5155,7 @@ std::any HogQLParser::SampleClauseContext::accept(tree::ParseTreeVisitor *visito HogQLParser::SampleClauseContext* HogQLParser::sampleClause() { SampleClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 80, HogQLParser::RuleSampleClause); + enterRule(_localctx, 86, HogQLParser::RuleSampleClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -4850,18 +5166,18 @@ HogQLParser::SampleClauseContext* HogQLParser::sampleClause() { }); try { enterOuterAlt(_localctx, 1); - setState(586); + setState(626); match(HogQLParser::SAMPLE); - setState(587); + setState(627); ratioExpr(); - setState(590); + setState(630); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 70, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 76, _ctx)) { case 1: { - setState(588); + setState(628); match(HogQLParser::OFFSET); - setState(589); + setState(629); ratioExpr(); break; } @@ -4917,7 +5233,7 @@ std::any HogQLParser::OrderExprListContext::accept(tree::ParseTreeVisitor *visit HogQLParser::OrderExprListContext* HogQLParser::orderExprList() { OrderExprListContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 82, HogQLParser::RuleOrderExprList); + enterRule(_localctx, 88, HogQLParser::RuleOrderExprList); size_t _la = 0; #if __cplusplus > 201703L @@ -4929,17 +5245,17 @@ HogQLParser::OrderExprListContext* HogQLParser::orderExprList() { }); try { enterOuterAlt(_localctx, 1); - setState(592); + setState(632); orderExpr(); - setState(597); + setState(637); _errHandler->sync(this); _la = _input->LA(1); while (_la == HogQLParser::COMMA) { - setState(593); + setState(633); match(HogQLParser::COMMA); - setState(594); + setState(634); orderExpr(); - setState(599); + setState(639); _errHandler->sync(this); _la = _input->LA(1); } @@ -5011,7 +5327,7 @@ std::any HogQLParser::OrderExprContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::OrderExprContext* HogQLParser::orderExpr() { OrderExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 84, HogQLParser::RuleOrderExpr); + enterRule(_localctx, 90, HogQLParser::RuleOrderExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -5023,18 +5339,18 @@ HogQLParser::OrderExprContext* HogQLParser::orderExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(600); + setState(640); columnExpr(0); - setState(602); + setState(642); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 6291584) != 0)) { - setState(601); + ((1ULL << _la) & 12583040) != 0)) { + setState(641); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 6291584) != 0))) { + ((1ULL << _la) & 12583040) != 0))) { _errHandler->recoverInline(this); } else { @@ -5042,14 +5358,14 @@ HogQLParser::OrderExprContext* HogQLParser::orderExpr() { consume(); } } - setState(606); + setState(646); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::NULLS) { - setState(604); + setState(644); match(HogQLParser::NULLS); - setState(605); + setState(645); _la = _input->LA(1); if (!(_la == HogQLParser::FIRST @@ -5061,14 +5377,14 @@ HogQLParser::OrderExprContext* HogQLParser::orderExpr() { consume(); } } - setState(610); + setState(650); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COLLATE) { - setState(608); + setState(648); match(HogQLParser::COLLATE); - setState(609); + setState(649); match(HogQLParser::STRING_LITERAL); } @@ -5119,7 +5435,7 @@ std::any HogQLParser::RatioExprContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::RatioExprContext* HogQLParser::ratioExpr() { RatioExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 86, HogQLParser::RuleRatioExpr); + enterRule(_localctx, 92, HogQLParser::RuleRatioExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5129,12 +5445,12 @@ HogQLParser::RatioExprContext* HogQLParser::ratioExpr() { exitRule(); }); try { - setState(618); + setState(658); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::LBRACE: { enterOuterAlt(_localctx, 1); - setState(612); + setState(652); placeholder(); break; } @@ -5149,16 +5465,16 @@ HogQLParser::RatioExprContext* HogQLParser::ratioExpr() { case HogQLParser::DOT: case HogQLParser::PLUS: { enterOuterAlt(_localctx, 2); - setState(613); + setState(653); numberLiteral(); - setState(616); + setState(656); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 75, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 81, _ctx)) { case 1: { - setState(614); + setState(654); match(HogQLParser::SLASH); - setState(615); + setState(655); numberLiteral(); break; } @@ -5220,7 +5536,7 @@ std::any HogQLParser::SettingExprListContext::accept(tree::ParseTreeVisitor *vis HogQLParser::SettingExprListContext* HogQLParser::settingExprList() { SettingExprListContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 88, HogQLParser::RuleSettingExprList); + enterRule(_localctx, 94, HogQLParser::RuleSettingExprList); size_t _la = 0; #if __cplusplus > 201703L @@ -5232,17 +5548,17 @@ HogQLParser::SettingExprListContext* HogQLParser::settingExprList() { }); try { enterOuterAlt(_localctx, 1); - setState(620); + setState(660); settingExpr(); - setState(625); + setState(665); _errHandler->sync(this); _la = _input->LA(1); while (_la == HogQLParser::COMMA) { - setState(621); + setState(661); match(HogQLParser::COMMA); - setState(622); + setState(662); settingExpr(); - setState(627); + setState(667); _errHandler->sync(this); _la = _input->LA(1); } @@ -5290,7 +5606,7 @@ std::any HogQLParser::SettingExprContext::accept(tree::ParseTreeVisitor *visitor HogQLParser::SettingExprContext* HogQLParser::settingExpr() { SettingExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 90, HogQLParser::RuleSettingExpr); + enterRule(_localctx, 96, HogQLParser::RuleSettingExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5301,11 +5617,11 @@ HogQLParser::SettingExprContext* HogQLParser::settingExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(628); + setState(668); identifier(); - setState(629); + setState(669); match(HogQLParser::EQ_SINGLE); - setState(630); + setState(670); literal(); } @@ -5351,7 +5667,7 @@ std::any HogQLParser::WindowExprContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::WindowExprContext* HogQLParser::windowExpr() { WindowExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 92, HogQLParser::RuleWindowExpr); + enterRule(_localctx, 98, HogQLParser::RuleWindowExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -5363,30 +5679,30 @@ HogQLParser::WindowExprContext* HogQLParser::windowExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(633); + setState(673); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::PARTITION) { - setState(632); + setState(672); winPartitionByClause(); } - setState(636); + setState(676); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::ORDER) { - setState(635); + setState(675); winOrderByClause(); } - setState(639); + setState(679); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::RANGE || _la == HogQLParser::ROWS) { - setState(638); + setState(678); winFrameClause(); } @@ -5433,7 +5749,7 @@ std::any HogQLParser::WinPartitionByClauseContext::accept(tree::ParseTreeVisitor HogQLParser::WinPartitionByClauseContext* HogQLParser::winPartitionByClause() { WinPartitionByClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 94, HogQLParser::RuleWinPartitionByClause); + enterRule(_localctx, 100, HogQLParser::RuleWinPartitionByClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5444,11 +5760,11 @@ HogQLParser::WinPartitionByClauseContext* HogQLParser::winPartitionByClause() { }); try { enterOuterAlt(_localctx, 1); - setState(641); + setState(681); match(HogQLParser::PARTITION); - setState(642); + setState(682); match(HogQLParser::BY); - setState(643); + setState(683); columnExprList(); } @@ -5494,7 +5810,7 @@ std::any HogQLParser::WinOrderByClauseContext::accept(tree::ParseTreeVisitor *vi HogQLParser::WinOrderByClauseContext* HogQLParser::winOrderByClause() { WinOrderByClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 96, HogQLParser::RuleWinOrderByClause); + enterRule(_localctx, 102, HogQLParser::RuleWinOrderByClause); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5505,11 +5821,11 @@ HogQLParser::WinOrderByClauseContext* HogQLParser::winOrderByClause() { }); try { enterOuterAlt(_localctx, 1); - setState(645); + setState(685); match(HogQLParser::ORDER); - setState(646); + setState(686); match(HogQLParser::BY); - setState(647); + setState(687); orderExprList(); } @@ -5555,7 +5871,7 @@ std::any HogQLParser::WinFrameClauseContext::accept(tree::ParseTreeVisitor *visi HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() { WinFrameClauseContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 98, HogQLParser::RuleWinFrameClause); + enterRule(_localctx, 104, HogQLParser::RuleWinFrameClause); size_t _la = 0; #if __cplusplus > 201703L @@ -5567,7 +5883,7 @@ HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() { }); try { enterOuterAlt(_localctx, 1); - setState(649); + setState(689); _la = _input->LA(1); if (!(_la == HogQLParser::RANGE @@ -5578,7 +5894,7 @@ HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() { _errHandler->reportMatch(this); consume(); } - setState(650); + setState(690); winFrameExtend(); } @@ -5650,7 +5966,7 @@ std::any HogQLParser::FrameBetweenContext::accept(tree::ParseTreeVisitor *visito } HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() { WinFrameExtendContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 100, HogQLParser::RuleWinFrameExtend); + enterRule(_localctx, 106, HogQLParser::RuleWinFrameExtend); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5660,7 +5976,7 @@ HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() { exitRule(); }); try { - setState(658); + setState(698); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::CURRENT: @@ -5676,7 +5992,7 @@ HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() { case HogQLParser::PLUS: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 1); - setState(652); + setState(692); winFrameBound(); break; } @@ -5684,13 +6000,13 @@ HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() { case HogQLParser::BETWEEN: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 2); - setState(653); + setState(693); match(HogQLParser::BETWEEN); - setState(654); + setState(694); winFrameBound(); - setState(655); + setState(695); match(HogQLParser::AND); - setState(656); + setState(696); winFrameBound(); break; } @@ -5754,7 +6070,7 @@ std::any HogQLParser::WinFrameBoundContext::accept(tree::ParseTreeVisitor *visit HogQLParser::WinFrameBoundContext* HogQLParser::winFrameBound() { WinFrameBoundContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 102, HogQLParser::RuleWinFrameBound); + enterRule(_localctx, 108, HogQLParser::RuleWinFrameBound); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5765,45 +6081,45 @@ HogQLParser::WinFrameBoundContext* HogQLParser::winFrameBound() { }); try { enterOuterAlt(_localctx, 1); - setState(672); + setState(712); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 82, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 88, _ctx)) { case 1: { - setState(660); + setState(700); match(HogQLParser::CURRENT); - setState(661); + setState(701); match(HogQLParser::ROW); break; } case 2: { - setState(662); + setState(702); match(HogQLParser::UNBOUNDED); - setState(663); + setState(703); match(HogQLParser::PRECEDING); break; } case 3: { - setState(664); + setState(704); match(HogQLParser::UNBOUNDED); - setState(665); + setState(705); match(HogQLParser::FOLLOWING); break; } case 4: { - setState(666); + setState(706); numberLiteral(); - setState(667); + setState(707); match(HogQLParser::PRECEDING); break; } case 5: { - setState(669); + setState(709); numberLiteral(); - setState(670); + setState(710); match(HogQLParser::FOLLOWING); break; } @@ -5851,7 +6167,7 @@ std::any HogQLParser::ExprContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::ExprContext* HogQLParser::expr() { ExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 104, HogQLParser::RuleExpr); + enterRule(_localctx, 110, HogQLParser::RuleExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -5862,9 +6178,9 @@ HogQLParser::ExprContext* HogQLParser::expr() { }); try { enterOuterAlt(_localctx, 1); - setState(674); + setState(714); columnExpr(0); - setState(675); + setState(715); match(HogQLParser::EOF); } @@ -6057,7 +6373,7 @@ std::any HogQLParser::ColumnTypeExprEnumContext::accept(tree::ParseTreeVisitor * } HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() { ColumnTypeExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 106, HogQLParser::RuleColumnTypeExpr); + enterRule(_localctx, 112, HogQLParser::RuleColumnTypeExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -6069,13 +6385,13 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() { }); try { size_t alt; - setState(733); + setState(773); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 90, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 96, _ctx)) { case 1: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 1); - setState(677); + setState(717); identifier(); break; } @@ -6083,39 +6399,39 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() { case 2: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 2); - setState(678); + setState(718); identifier(); - setState(679); + setState(719); match(HogQLParser::LPAREN); - setState(680); + setState(720); identifier(); - setState(681); + setState(721); columnTypeExpr(); - setState(688); + setState(728); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 83, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 89, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(682); + setState(722); match(HogQLParser::COMMA); - setState(683); + setState(723); identifier(); - setState(684); + setState(724); columnTypeExpr(); } - setState(690); + setState(730); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 83, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 89, _ctx); } - setState(692); + setState(732); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(691); + setState(731); match(HogQLParser::COMMA); } - setState(694); + setState(734); match(HogQLParser::RPAREN); break; } @@ -6123,35 +6439,35 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() { case 3: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 3); - setState(696); + setState(736); identifier(); - setState(697); + setState(737); match(HogQLParser::LPAREN); - setState(698); + setState(738); enumValue(); - setState(703); + setState(743); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 85, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 91, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(699); + setState(739); match(HogQLParser::COMMA); - setState(700); + setState(740); enumValue(); } - setState(705); + setState(745); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 85, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 91, _ctx); } - setState(707); + setState(747); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(706); + setState(746); match(HogQLParser::COMMA); } - setState(709); + setState(749); match(HogQLParser::RPAREN); break; } @@ -6159,35 +6475,35 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() { case 4: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 4); - setState(711); + setState(751); identifier(); - setState(712); + setState(752); match(HogQLParser::LPAREN); - setState(713); + setState(753); columnTypeExpr(); - setState(718); + setState(758); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 87, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 93, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(714); + setState(754); match(HogQLParser::COMMA); - setState(715); + setState(755); columnTypeExpr(); } - setState(720); + setState(760); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 87, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 93, _ctx); } - setState(722); + setState(762); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(721); + setState(761); match(HogQLParser::COMMA); } - setState(724); + setState(764); match(HogQLParser::RPAREN); break; } @@ -6195,22 +6511,22 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() { case 5: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 5); - setState(726); + setState(766); identifier(); - setState(727); + setState(767); match(HogQLParser::LPAREN); - setState(729); + setState(769); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(728); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(768); columnExprList(); } - setState(731); + setState(771); match(HogQLParser::RPAREN); break; } @@ -6266,7 +6582,7 @@ std::any HogQLParser::ColumnExprListContext::accept(tree::ParseTreeVisitor *visi HogQLParser::ColumnExprListContext* HogQLParser::columnExprList() { ColumnExprListContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 108, HogQLParser::RuleColumnExprList); + enterRule(_localctx, 114, HogQLParser::RuleColumnExprList); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -6278,28 +6594,28 @@ HogQLParser::ColumnExprListContext* HogQLParser::columnExprList() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(735); + setState(775); columnExpr(0); - setState(740); + setState(780); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 91, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 97, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(736); + setState(776); match(HogQLParser::COMMA); - setState(737); + setState(777); columnExpr(0); } - setState(742); + setState(782); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 91, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 97, _ctx); } - setState(744); + setState(784); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 92, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 98, _ctx)) { case 1: { - setState(743); + setState(783); match(HogQLParser::COMMA); break; } @@ -7438,8 +7754,8 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { HogQLParser::ColumnExprContext *_localctx = _tracker.createInstance(_ctx, parentState); HogQLParser::ColumnExprContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 110; - enterRecursionRule(_localctx, 110, HogQLParser::RuleColumnExpr, precedence); + size_t startState = 116; + enterRecursionRule(_localctx, 116, HogQLParser::RuleColumnExpr, precedence); size_t _la = 0; @@ -7453,22 +7769,22 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(895); + setState(935); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 112, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 118, _ctx)) { case 1: { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(747); + setState(787); match(HogQLParser::CASE); - setState(749); + setState(789); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 93, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 99, _ctx)) { case 1: { - setState(748); + setState(788); antlrcpp::downCast(_localctx)->caseExpr = columnExpr(0); break; } @@ -7476,33 +7792,33 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: break; } - setState(756); + setState(796); _errHandler->sync(this); _la = _input->LA(1); do { - setState(751); + setState(791); match(HogQLParser::WHEN); - setState(752); + setState(792); antlrcpp::downCast(_localctx)->whenExpr = columnExpr(0); - setState(753); + setState(793); match(HogQLParser::THEN); - setState(754); + setState(794); antlrcpp::downCast(_localctx)->thenExpr = columnExpr(0); - setState(758); + setState(798); _errHandler->sync(this); _la = _input->LA(1); } while (_la == HogQLParser::WHEN); - setState(762); + setState(802); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::ELSE) { - setState(760); + setState(800); match(HogQLParser::ELSE); - setState(761); + setState(801); antlrcpp::downCast(_localctx)->elseExpr = columnExpr(0); } - setState(764); + setState(804); match(HogQLParser::END); break; } @@ -7511,17 +7827,17 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(766); + setState(806); match(HogQLParser::CAST); - setState(767); + setState(807); match(HogQLParser::LPAREN); - setState(768); + setState(808); columnExpr(0); - setState(769); + setState(809); match(HogQLParser::AS); - setState(770); + setState(810); columnTypeExpr(); - setState(771); + setState(811); match(HogQLParser::RPAREN); break; } @@ -7530,9 +7846,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(773); + setState(813); match(HogQLParser::DATE); - setState(774); + setState(814); match(HogQLParser::STRING_LITERAL); break; } @@ -7541,11 +7857,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(775); + setState(815); match(HogQLParser::INTERVAL); - setState(776); + setState(816); columnExpr(0); - setState(777); + setState(817); interval(); break; } @@ -7554,27 +7870,27 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(779); + setState(819); match(HogQLParser::SUBSTRING); - setState(780); + setState(820); match(HogQLParser::LPAREN); - setState(781); + setState(821); columnExpr(0); - setState(782); + setState(822); match(HogQLParser::FROM); - setState(783); + setState(823); columnExpr(0); - setState(786); + setState(826); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::FOR) { - setState(784); + setState(824); match(HogQLParser::FOR); - setState(785); + setState(825); columnExpr(0); } - setState(788); + setState(828); match(HogQLParser::RPAREN); break; } @@ -7583,9 +7899,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(790); + setState(830); match(HogQLParser::TIMESTAMP); - setState(791); + setState(831); match(HogQLParser::STRING_LITERAL); break; } @@ -7594,11 +7910,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(792); + setState(832); match(HogQLParser::TRIM); - setState(793); + setState(833); match(HogQLParser::LPAREN); - setState(794); + setState(834); _la = _input->LA(1); if (!(_la == HogQLParser::BOTH @@ -7609,13 +7925,13 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _errHandler->reportMatch(this); consume(); } - setState(795); + setState(835); string(); - setState(796); + setState(836); match(HogQLParser::FROM); - setState(797); + setState(837); columnExpr(0); - setState(798); + setState(838); match(HogQLParser::RPAREN); break; } @@ -7624,37 +7940,37 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(800); + setState(840); identifier(); - setState(801); + setState(841); match(HogQLParser::LPAREN); - setState(803); + setState(843); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(802); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(842); columnExprList(); } - setState(805); + setState(845); match(HogQLParser::RPAREN); - setState(815); + setState(855); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::LPAREN) { - setState(807); + setState(847); match(HogQLParser::LPAREN); - setState(809); + setState(849); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 98, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 104, _ctx)) { case 1: { - setState(808); + setState(848); match(HogQLParser::DISTINCT); break; } @@ -7662,27 +7978,27 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: break; } - setState(812); + setState(852); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(811); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(851); columnArgList(); } - setState(814); + setState(854); match(HogQLParser::RPAREN); } - setState(817); + setState(857); match(HogQLParser::OVER); - setState(818); + setState(858); match(HogQLParser::LPAREN); - setState(819); + setState(859); windowExpr(); - setState(820); + setState(860); match(HogQLParser::RPAREN); break; } @@ -7691,37 +8007,37 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(822); + setState(862); identifier(); - setState(823); + setState(863); match(HogQLParser::LPAREN); - setState(825); + setState(865); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(824); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(864); columnExprList(); } - setState(827); + setState(867); match(HogQLParser::RPAREN); - setState(837); + setState(877); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::LPAREN) { - setState(829); + setState(869); match(HogQLParser::LPAREN); - setState(831); + setState(871); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 102, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 108, _ctx)) { case 1: { - setState(830); + setState(870); match(HogQLParser::DISTINCT); break; } @@ -7729,23 +8045,23 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: break; } - setState(834); + setState(874); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(833); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(873); columnArgList(); } - setState(836); + setState(876); match(HogQLParser::RPAREN); } - setState(839); + setState(879); match(HogQLParser::OVER); - setState(840); + setState(880); identifier(); break; } @@ -7754,27 +8070,27 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(842); + setState(882); identifier(); - setState(848); + setState(888); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 106, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 112, _ctx)) { case 1: { - setState(843); + setState(883); match(HogQLParser::LPAREN); - setState(845); + setState(885); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(844); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(884); columnExprList(); } - setState(847); + setState(887); match(HogQLParser::RPAREN); break; } @@ -7782,14 +8098,14 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: break; } - setState(850); + setState(890); match(HogQLParser::LPAREN); - setState(852); + setState(892); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 107, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 113, _ctx)) { case 1: { - setState(851); + setState(891); match(HogQLParser::DISTINCT); break; } @@ -7797,18 +8113,18 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: break; } - setState(855); + setState(895); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(854); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(894); columnArgList(); } - setState(857); + setState(897); match(HogQLParser::RPAREN); break; } @@ -7817,7 +8133,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(859); + setState(899); hogqlxTagElement(); break; } @@ -7826,7 +8142,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(860); + setState(900); templateString(); break; } @@ -7835,7 +8151,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(861); + setState(901); literal(); break; } @@ -7844,9 +8160,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(862); + setState(902); match(HogQLParser::DASH); - setState(863); + setState(903); columnExpr(19); break; } @@ -7855,9 +8171,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(864); + setState(904); match(HogQLParser::NOT); - setState(865); + setState(905); columnExpr(13); break; } @@ -7866,19 +8182,19 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(869); + setState(909); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -181272084561788930) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 201863462911) != 0)) { - setState(866); + ((1ULL << _la) & -725088338784043010) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 3229277487103) != 0)) { + setState(906); tableIdentifier(); - setState(867); + setState(907); match(HogQLParser::DOT); } - setState(871); + setState(911); match(HogQLParser::ASTERISK); break; } @@ -7887,11 +8203,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(872); + setState(912); match(HogQLParser::LPAREN); - setState(873); + setState(913); selectUnionStmt(); - setState(874); + setState(914); match(HogQLParser::RPAREN); break; } @@ -7900,11 +8216,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(876); + setState(916); match(HogQLParser::LPAREN); - setState(877); + setState(917); columnExpr(0); - setState(878); + setState(918); match(HogQLParser::RPAREN); break; } @@ -7913,11 +8229,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(880); + setState(920); match(HogQLParser::LPAREN); - setState(881); + setState(921); columnExprList(); - setState(882); + setState(922); match(HogQLParser::RPAREN); break; } @@ -7926,20 +8242,20 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(884); + setState(924); match(HogQLParser::LBRACKET); - setState(886); + setState(926); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(885); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(925); columnExprList(); } - setState(888); + setState(928); match(HogQLParser::RBRACKET); break; } @@ -7948,20 +8264,20 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(889); + setState(929); match(HogQLParser::LBRACE); - setState(891); + setState(931); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(890); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(930); kvPairList(); } - setState(893); + setState(933); match(HogQLParser::RBRACE); break; } @@ -7970,7 +8286,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(894); + setState(934); columnIdentifier(); break; } @@ -7979,42 +8295,42 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { break; } _ctx->stop = _input->LT(-1); - setState(1001); + setState(1041); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 123, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 129, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { if (!_parseListeners.empty()) triggerExitRuleEvent(); previousContext = _localctx; - setState(999); + setState(1039); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 122, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 128, _ctx)) { case 1: { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(897); + setState(937); if (!(precpred(_ctx, 18))) throw FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(901); + setState(941); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::ASTERISK: { - setState(898); + setState(938); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::ASTERISK); break; } case HogQLParser::SLASH: { - setState(899); + setState(939); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::SLASH); break; } case HogQLParser::PERCENT: { - setState(900); + setState(940); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::PERCENT); break; } @@ -8022,7 +8338,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: throw NoViableAltException(this); } - setState(903); + setState(943); antlrcpp::downCast(_localctx)->right = columnExpr(19); break; } @@ -8032,26 +8348,26 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(904); + setState(944); if (!(precpred(_ctx, 17))) throw FailedPredicateException(this, "precpred(_ctx, 17)"); - setState(908); + setState(948); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::PLUS: { - setState(905); + setState(945); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::PLUS); break; } case HogQLParser::DASH: { - setState(906); + setState(946); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::DASH); break; } case HogQLParser::CONCAT: { - setState(907); + setState(947); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::CONCAT); break; } @@ -8059,7 +8375,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: throw NoViableAltException(this); } - setState(910); + setState(950); antlrcpp::downCast(_localctx)->right = columnExpr(18); break; } @@ -8069,71 +8385,71 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { _localctx = newContext; newContext->left = previousContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(911); + setState(951); if (!(precpred(_ctx, 16))) throw FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(936); + setState(976); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 118, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 124, _ctx)) { case 1: { - setState(912); + setState(952); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::EQ_DOUBLE); break; } case 2: { - setState(913); + setState(953); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::EQ_SINGLE); break; } case 3: { - setState(914); + setState(954); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT_EQ); break; } case 4: { - setState(915); + setState(955); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::LT_EQ); break; } case 5: { - setState(916); + setState(956); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::LT); break; } case 6: { - setState(917); + setState(957); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::GT_EQ); break; } case 7: { - setState(918); + setState(958); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::GT); break; } case 8: { - setState(920); + setState(960); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::NOT) { - setState(919); + setState(959); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT); } - setState(922); + setState(962); match(HogQLParser::IN); - setState(924); + setState(964); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 116, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 122, _ctx)) { case 1: { - setState(923); + setState(963); match(HogQLParser::COHORT); break; } @@ -8145,15 +8461,15 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { } case 9: { - setState(927); + setState(967); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::NOT) { - setState(926); + setState(966); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT); } - setState(929); + setState(969); _la = _input->LA(1); if (!(_la == HogQLParser::ILIKE @@ -8168,37 +8484,37 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { } case 10: { - setState(930); + setState(970); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::REGEX_SINGLE); break; } case 11: { - setState(931); + setState(971); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::REGEX_DOUBLE); break; } case 12: { - setState(932); + setState(972); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT_REGEX); break; } case 13: { - setState(933); + setState(973); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::IREGEX_SINGLE); break; } case 14: { - setState(934); + setState(974); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::IREGEX_DOUBLE); break; } case 15: { - setState(935); + setState(975); antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT_IREGEX); break; } @@ -8206,7 +8522,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { default: break; } - setState(938); + setState(978); antlrcpp::downCast(_localctx)->right = columnExpr(17); break; } @@ -8215,12 +8531,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(939); + setState(979); if (!(precpred(_ctx, 14))) throw FailedPredicateException(this, "precpred(_ctx, 14)"); - setState(940); + setState(980); match(HogQLParser::NULLISH); - setState(941); + setState(981); columnExpr(15); break; } @@ -8229,12 +8545,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(942); + setState(982); if (!(precpred(_ctx, 12))) throw FailedPredicateException(this, "precpred(_ctx, 12)"); - setState(943); + setState(983); match(HogQLParser::AND); - setState(944); + setState(984); columnExpr(13); break; } @@ -8243,12 +8559,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(945); + setState(985); if (!(precpred(_ctx, 11))) throw FailedPredicateException(this, "precpred(_ctx, 11)"); - setState(946); + setState(986); match(HogQLParser::OR); - setState(947); + setState(987); columnExpr(12); break; } @@ -8257,24 +8573,24 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(948); + setState(988); if (!(precpred(_ctx, 10))) throw FailedPredicateException(this, "precpred(_ctx, 10)"); - setState(950); + setState(990); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::NOT) { - setState(949); + setState(989); match(HogQLParser::NOT); } - setState(952); + setState(992); match(HogQLParser::BETWEEN); - setState(953); + setState(993); columnExpr(0); - setState(954); + setState(994); match(HogQLParser::AND); - setState(955); + setState(995); columnExpr(11); break; } @@ -8283,16 +8599,16 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(957); + setState(997); if (!(precpred(_ctx, 9))) throw FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(958); + setState(998); match(HogQLParser::QUERY); - setState(959); + setState(999); columnExpr(0); - setState(960); + setState(1000); match(HogQLParser::COLON); - setState(961); + setState(1001); columnExpr(9); break; } @@ -8301,14 +8617,14 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(963); + setState(1003); if (!(precpred(_ctx, 25))) throw FailedPredicateException(this, "precpred(_ctx, 25)"); - setState(964); + setState(1004); match(HogQLParser::LBRACKET); - setState(965); + setState(1005); columnExpr(0); - setState(966); + setState(1006); match(HogQLParser::RBRACKET); break; } @@ -8317,12 +8633,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(968); + setState(1008); if (!(precpred(_ctx, 24))) throw FailedPredicateException(this, "precpred(_ctx, 24)"); - setState(969); + setState(1009); match(HogQLParser::DOT); - setState(970); + setState(1010); match(HogQLParser::DECIMAL_LITERAL); break; } @@ -8331,12 +8647,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(971); + setState(1011); if (!(precpred(_ctx, 23))) throw FailedPredicateException(this, "precpred(_ctx, 23)"); - setState(972); + setState(1012); match(HogQLParser::DOT); - setState(973); + setState(1013); identifier(); break; } @@ -8345,16 +8661,16 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(974); + setState(1014); if (!(precpred(_ctx, 22))) throw FailedPredicateException(this, "precpred(_ctx, 22)"); - setState(975); + setState(1015); match(HogQLParser::NULL_PROPERTY); - setState(976); + setState(1016); match(HogQLParser::LBRACKET); - setState(977); + setState(1017); columnExpr(0); - setState(978); + setState(1018); match(HogQLParser::RBRACKET); break; } @@ -8363,12 +8679,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(980); + setState(1020); if (!(precpred(_ctx, 21))) throw FailedPredicateException(this, "precpred(_ctx, 21)"); - setState(981); + setState(1021); match(HogQLParser::NULL_PROPERTY); - setState(982); + setState(1022); match(HogQLParser::DECIMAL_LITERAL); break; } @@ -8377,12 +8693,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(983); + setState(1023); if (!(precpred(_ctx, 20))) throw FailedPredicateException(this, "precpred(_ctx, 20)"); - setState(984); + setState(1024); match(HogQLParser::NULL_PROPERTY); - setState(985); + setState(1025); identifier(); break; } @@ -8391,20 +8707,20 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(986); + setState(1026); if (!(precpred(_ctx, 15))) throw FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(987); + setState(1027); match(HogQLParser::IS); - setState(989); + setState(1029); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::NOT) { - setState(988); + setState(1028); match(HogQLParser::NOT); } - setState(991); + setState(1031); match(HogQLParser::NULL_SQL); break; } @@ -8413,24 +8729,24 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleColumnExpr); - setState(992); + setState(1032); if (!(precpred(_ctx, 8))) throw FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(997); + setState(1037); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 121, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 127, _ctx)) { case 1: { - setState(993); + setState(1033); match(HogQLParser::AS); - setState(994); + setState(1034); identifier(); break; } case 2: { - setState(995); + setState(1035); match(HogQLParser::AS); - setState(996); + setState(1036); match(HogQLParser::STRING_LITERAL); break; } @@ -8445,9 +8761,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) { break; } } - setState(1003); + setState(1043); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 123, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 129, _ctx); } } catch (RecognitionException &e) { @@ -8495,7 +8811,7 @@ std::any HogQLParser::ColumnArgListContext::accept(tree::ParseTreeVisitor *visit HogQLParser::ColumnArgListContext* HogQLParser::columnArgList() { ColumnArgListContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 112, HogQLParser::RuleColumnArgList); + enterRule(_localctx, 118, HogQLParser::RuleColumnArgList); size_t _la = 0; #if __cplusplus > 201703L @@ -8508,28 +8824,28 @@ HogQLParser::ColumnArgListContext* HogQLParser::columnArgList() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1004); + setState(1044); columnArgExpr(); - setState(1009); + setState(1049); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 124, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 130, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1005); + setState(1045); match(HogQLParser::COMMA); - setState(1006); + setState(1046); columnArgExpr(); } - setState(1011); + setState(1051); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 124, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 130, _ctx); } - setState(1013); + setState(1053); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(1012); + setState(1052); match(HogQLParser::COMMA); } @@ -8572,7 +8888,7 @@ std::any HogQLParser::ColumnArgExprContext::accept(tree::ParseTreeVisitor *visit HogQLParser::ColumnArgExprContext* HogQLParser::columnArgExpr() { ColumnArgExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 114, HogQLParser::RuleColumnArgExpr); + enterRule(_localctx, 120, HogQLParser::RuleColumnArgExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -8582,19 +8898,19 @@ HogQLParser::ColumnArgExprContext* HogQLParser::columnArgExpr() { exitRule(); }); try { - setState(1017); + setState(1057); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 126, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 132, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1015); + setState(1055); columnLambdaExpr(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1016); + setState(1056); columnExpr(0); break; } @@ -8666,7 +8982,7 @@ std::any HogQLParser::ColumnLambdaExprContext::accept(tree::ParseTreeVisitor *vi HogQLParser::ColumnLambdaExprContext* HogQLParser::columnLambdaExpr() { ColumnLambdaExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 116, HogQLParser::RuleColumnLambdaExpr); + enterRule(_localctx, 122, HogQLParser::RuleColumnLambdaExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -8679,37 +8995,37 @@ HogQLParser::ColumnLambdaExprContext* HogQLParser::columnLambdaExpr() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1044); + setState(1084); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::LPAREN: { - setState(1019); + setState(1059); match(HogQLParser::LPAREN); - setState(1020); + setState(1060); identifier(); - setState(1025); + setState(1065); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 127, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 133, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1021); + setState(1061); match(HogQLParser::COMMA); - setState(1022); + setState(1062); identifier(); } - setState(1027); + setState(1067); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 127, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 133, _ctx); } - setState(1029); + setState(1069); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(1028); + setState(1068); match(HogQLParser::COMMA); } - setState(1031); + setState(1071); match(HogQLParser::RPAREN); break; } @@ -8808,28 +9124,28 @@ HogQLParser::ColumnLambdaExprContext* HogQLParser::columnLambdaExpr() { case HogQLParser::WITH: case HogQLParser::YEAR: case HogQLParser::IDENTIFIER: { - setState(1033); + setState(1073); identifier(); - setState(1038); + setState(1078); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 129, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 135, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1034); + setState(1074); match(HogQLParser::COMMA); - setState(1035); + setState(1075); identifier(); } - setState(1040); + setState(1080); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 129, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 135, _ctx); } - setState(1042); + setState(1082); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(1041); + setState(1081); match(HogQLParser::COMMA); } break; @@ -8838,9 +9154,9 @@ HogQLParser::ColumnLambdaExprContext* HogQLParser::columnLambdaExpr() { default: throw NoViableAltException(this); } - setState(1046); + setState(1086); match(HogQLParser::ARROW); - setState(1047); + setState(1087); columnExpr(0); } @@ -8945,6 +9261,18 @@ HogQLParser::HogqlxTagElementContext* HogQLParser::HogqlxTagElementNestedContext return getRuleContext(0); } +tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::LBRACE() { + return getToken(HogQLParser::LBRACE, 0); +} + +HogQLParser::ColumnExprContext* HogQLParser::HogqlxTagElementNestedContext::columnExpr() { + return getRuleContext(0); +} + +tree::TerminalNode* HogQLParser::HogqlxTagElementNestedContext::RBRACE() { + return getToken(HogQLParser::RBRACE, 0); +} + HogQLParser::HogqlxTagElementNestedContext::HogqlxTagElementNestedContext(HogqlxTagElementContext *ctx) { copyFrom(ctx); } @@ -8956,7 +9284,7 @@ std::any HogQLParser::HogqlxTagElementNestedContext::accept(tree::ParseTreeVisit } HogQLParser::HogqlxTagElementContext* HogQLParser::hogqlxTagElement() { HogqlxTagElementContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 118, HogQLParser::RuleHogqlxTagElement); + enterRule(_localctx, 124, HogQLParser::RuleHogqlxTagElement); size_t _la = 0; #if __cplusplus > 201703L @@ -8967,31 +9295,31 @@ HogQLParser::HogqlxTagElementContext* HogQLParser::hogqlxTagElement() { exitRule(); }); try { - setState(1077); + setState(1121); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 135, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 141, _ctx)) { case 1: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 1); - setState(1049); + setState(1089); match(HogQLParser::LT); - setState(1050); + setState(1090); identifier(); - setState(1054); + setState(1094); _errHandler->sync(this); _la = _input->LA(1); while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -181272084561788930) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 201863462911) != 0)) { - setState(1051); + ((1ULL << _la) & -725088338784043010) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 3229277487103) != 0)) { + setState(1091); hogqlxTagAttribute(); - setState(1056); + setState(1096); _errHandler->sync(this); _la = _input->LA(1); } - setState(1057); + setState(1097); match(HogQLParser::SLASH); - setState(1058); + setState(1098); match(HogQLParser::GT); break; } @@ -8999,44 +9327,54 @@ HogQLParser::HogqlxTagElementContext* HogQLParser::hogqlxTagElement() { case 2: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 2); - setState(1060); + setState(1100); match(HogQLParser::LT); - setState(1061); + setState(1101); identifier(); - setState(1065); + setState(1105); _errHandler->sync(this); _la = _input->LA(1); while ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -181272084561788930) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 201863462911) != 0)) { - setState(1062); + ((1ULL << _la) & -725088338784043010) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 3229277487103) != 0)) { + setState(1102); hogqlxTagAttribute(); - setState(1067); + setState(1107); _errHandler->sync(this); _la = _input->LA(1); } - setState(1068); + setState(1108); match(HogQLParser::GT); - setState(1070); + setState(1114); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 134, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 140, _ctx)) { case 1: { - setState(1069); + setState(1109); hogqlxTagElement(); break; } + case 2: { + setState(1110); + match(HogQLParser::LBRACE); + setState(1111); + columnExpr(0); + setState(1112); + match(HogQLParser::RBRACE); + break; + } + default: break; } - setState(1072); + setState(1116); match(HogQLParser::LT); - setState(1073); + setState(1117); match(HogQLParser::SLASH); - setState(1074); + setState(1118); identifier(); - setState(1075); + setState(1119); match(HogQLParser::GT); break; } @@ -9100,7 +9438,7 @@ std::any HogQLParser::HogqlxTagAttributeContext::accept(tree::ParseTreeVisitor * HogQLParser::HogqlxTagAttributeContext* HogQLParser::hogqlxTagAttribute() { HogqlxTagAttributeContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 120, HogQLParser::RuleHogqlxTagAttribute); + enterRule(_localctx, 126, HogQLParser::RuleHogqlxTagAttribute); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9110,38 +9448,38 @@ HogQLParser::HogqlxTagAttributeContext* HogQLParser::hogqlxTagAttribute() { exitRule(); }); try { - setState(1090); + setState(1134); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 136, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 142, _ctx)) { case 1: { enterOuterAlt(_localctx, 1); - setState(1079); + setState(1123); identifier(); - setState(1080); + setState(1124); match(HogQLParser::EQ_SINGLE); - setState(1081); + setState(1125); string(); break; } case 2: { enterOuterAlt(_localctx, 2); - setState(1083); + setState(1127); identifier(); - setState(1084); + setState(1128); match(HogQLParser::EQ_SINGLE); - setState(1085); + setState(1129); match(HogQLParser::LBRACE); - setState(1086); + setState(1130); columnExpr(0); - setState(1087); + setState(1131); match(HogQLParser::RBRACE); break; } case 3: { enterOuterAlt(_localctx, 3); - setState(1089); + setState(1133); identifier(); break; } @@ -9197,7 +9535,7 @@ std::any HogQLParser::WithExprListContext::accept(tree::ParseTreeVisitor *visito HogQLParser::WithExprListContext* HogQLParser::withExprList() { WithExprListContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 122, HogQLParser::RuleWithExprList); + enterRule(_localctx, 128, HogQLParser::RuleWithExprList); size_t _la = 0; #if __cplusplus > 201703L @@ -9210,28 +9548,28 @@ HogQLParser::WithExprListContext* HogQLParser::withExprList() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1092); + setState(1136); withExpr(); - setState(1097); + setState(1141); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 137, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 143, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1093); + setState(1137); match(HogQLParser::COMMA); - setState(1094); + setState(1138); withExpr(); } - setState(1099); + setState(1143); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 137, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 143, _ctx); } - setState(1101); + setState(1145); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(1100); + setState(1144); match(HogQLParser::COMMA); } @@ -9316,7 +9654,7 @@ std::any HogQLParser::WithExprSubqueryContext::accept(tree::ParseTreeVisitor *vi } HogQLParser::WithExprContext* HogQLParser::withExpr() { WithExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 124, HogQLParser::RuleWithExpr); + enterRule(_localctx, 130, HogQLParser::RuleWithExpr); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9326,21 +9664,21 @@ HogQLParser::WithExprContext* HogQLParser::withExpr() { exitRule(); }); try { - setState(1113); + setState(1157); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 139, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 145, _ctx)) { case 1: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 1); - setState(1103); + setState(1147); identifier(); - setState(1104); + setState(1148); match(HogQLParser::AS); - setState(1105); + setState(1149); match(HogQLParser::LPAREN); - setState(1106); + setState(1150); selectUnionStmt(); - setState(1107); + setState(1151); match(HogQLParser::RPAREN); break; } @@ -9348,11 +9686,11 @@ HogQLParser::WithExprContext* HogQLParser::withExpr() { case 2: { _localctx = _tracker.createInstance(_localctx); enterOuterAlt(_localctx, 2); - setState(1109); + setState(1153); columnExpr(0); - setState(1110); + setState(1154); match(HogQLParser::AS); - setState(1111); + setState(1155); identifier(); break; } @@ -9408,7 +9746,7 @@ std::any HogQLParser::ColumnIdentifierContext::accept(tree::ParseTreeVisitor *vi HogQLParser::ColumnIdentifierContext* HogQLParser::columnIdentifier() { ColumnIdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 126, HogQLParser::RuleColumnIdentifier); + enterRule(_localctx, 132, HogQLParser::RuleColumnIdentifier); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9418,12 +9756,12 @@ HogQLParser::ColumnIdentifierContext* HogQLParser::columnIdentifier() { exitRule(); }); try { - setState(1122); + setState(1166); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::LBRACE: { enterOuterAlt(_localctx, 1); - setState(1115); + setState(1159); placeholder(); break; } @@ -9523,14 +9861,14 @@ HogQLParser::ColumnIdentifierContext* HogQLParser::columnIdentifier() { case HogQLParser::YEAR: case HogQLParser::IDENTIFIER: { enterOuterAlt(_localctx, 2); - setState(1119); + setState(1163); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 140, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 146, _ctx)) { case 1: { - setState(1116); + setState(1160); tableIdentifier(); - setState(1117); + setState(1161); match(HogQLParser::DOT); break; } @@ -9538,7 +9876,7 @@ HogQLParser::ColumnIdentifierContext* HogQLParser::columnIdentifier() { default: break; } - setState(1121); + setState(1165); nestedIdentifier(); break; } @@ -9594,7 +9932,7 @@ std::any HogQLParser::NestedIdentifierContext::accept(tree::ParseTreeVisitor *vi HogQLParser::NestedIdentifierContext* HogQLParser::nestedIdentifier() { NestedIdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 128, HogQLParser::RuleNestedIdentifier); + enterRule(_localctx, 134, HogQLParser::RuleNestedIdentifier); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -9606,21 +9944,21 @@ HogQLParser::NestedIdentifierContext* HogQLParser::nestedIdentifier() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1124); + setState(1168); identifier(); - setState(1129); + setState(1173); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 142, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 148, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1125); + setState(1169); match(HogQLParser::DOT); - setState(1126); + setState(1170); identifier(); } - setState(1131); + setState(1175); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 142, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 148, _ctx); } } @@ -9769,8 +10107,8 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { HogQLParser::TableExprContext *_localctx = _tracker.createInstance(_ctx, parentState); HogQLParser::TableExprContext *previousContext = _localctx; (void)previousContext; // Silence compiler, in case the context is not used by generated code. - size_t startState = 130; - enterRecursionRule(_localctx, 130, HogQLParser::RuleTableExpr, precedence); + size_t startState = 136; + enterRecursionRule(_localctx, 136, HogQLParser::RuleTableExpr, precedence); @@ -9784,15 +10122,15 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1141); + setState(1185); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 143, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 149, _ctx)) { case 1: { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(1133); + setState(1177); tableIdentifier(); break; } @@ -9801,7 +10139,7 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(1134); + setState(1178); tableFunctionExpr(); break; } @@ -9810,11 +10148,11 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(1135); + setState(1179); match(HogQLParser::LPAREN); - setState(1136); + setState(1180); selectUnionStmt(); - setState(1137); + setState(1181); match(HogQLParser::RPAREN); break; } @@ -9823,7 +10161,7 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(1139); + setState(1183); hogqlxTagElement(); break; } @@ -9832,7 +10170,7 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { _localctx = _tracker.createInstance(_localctx); _ctx = _localctx; previousContext = _localctx; - setState(1140); + setState(1184); placeholder(); break; } @@ -9841,9 +10179,9 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { break; } _ctx->stop = _input->LT(-1); - setState(1151); + setState(1195); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 145, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 151, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { if (!_parseListeners.empty()) @@ -9852,10 +10190,10 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState)); _localctx = newContext; pushNewRecursionContext(newContext, startState, RuleTableExpr); - setState(1143); + setState(1187); if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(1147); + setState(1191); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::DATE: @@ -9863,15 +10201,15 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { case HogQLParser::ID: case HogQLParser::KEY: case HogQLParser::IDENTIFIER: { - setState(1144); + setState(1188); alias(); break; } case HogQLParser::AS: { - setState(1145); + setState(1189); match(HogQLParser::AS); - setState(1146); + setState(1190); identifier(); break; } @@ -9880,9 +10218,9 @@ HogQLParser::TableExprContext* HogQLParser::tableExpr(int precedence) { throw NoViableAltException(this); } } - setState(1153); + setState(1197); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 145, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 151, _ctx); } } catch (RecognitionException &e) { @@ -9930,7 +10268,7 @@ std::any HogQLParser::TableFunctionExprContext::accept(tree::ParseTreeVisitor *v HogQLParser::TableFunctionExprContext* HogQLParser::tableFunctionExpr() { TableFunctionExprContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 132, HogQLParser::RuleTableFunctionExpr); + enterRule(_localctx, 138, HogQLParser::RuleTableFunctionExpr); size_t _la = 0; #if __cplusplus > 201703L @@ -9942,22 +10280,22 @@ HogQLParser::TableFunctionExprContext* HogQLParser::tableFunctionExpr() { }); try { enterOuterAlt(_localctx, 1); - setState(1154); + setState(1198); identifier(); - setState(1155); + setState(1199); match(HogQLParser::LPAREN); - setState(1157); + setState(1201); _errHandler->sync(this); _la = _input->LA(1); if ((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 128)) & 1153) != 0)) { - setState(1156); + ((1ULL << _la) & -4503602311741442) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 90493036243451903) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 128)) & 18455) != 0)) { + setState(1200); tableArgList(); } - setState(1159); + setState(1203); match(HogQLParser::RPAREN); } @@ -10003,7 +10341,7 @@ std::any HogQLParser::TableIdentifierContext::accept(tree::ParseTreeVisitor *vis HogQLParser::TableIdentifierContext* HogQLParser::tableIdentifier() { TableIdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 134, HogQLParser::RuleTableIdentifier); + enterRule(_localctx, 140, HogQLParser::RuleTableIdentifier); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10014,14 +10352,14 @@ HogQLParser::TableIdentifierContext* HogQLParser::tableIdentifier() { }); try { enterOuterAlt(_localctx, 1); - setState(1164); + setState(1208); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 147, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 153, _ctx)) { case 1: { - setState(1161); + setState(1205); databaseIdentifier(); - setState(1162); + setState(1206); match(HogQLParser::DOT); break; } @@ -10029,7 +10367,7 @@ HogQLParser::TableIdentifierContext* HogQLParser::tableIdentifier() { default: break; } - setState(1166); + setState(1210); identifier(); } @@ -10079,7 +10417,7 @@ std::any HogQLParser::TableArgListContext::accept(tree::ParseTreeVisitor *visito HogQLParser::TableArgListContext* HogQLParser::tableArgList() { TableArgListContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 136, HogQLParser::RuleTableArgList); + enterRule(_localctx, 142, HogQLParser::RuleTableArgList); size_t _la = 0; #if __cplusplus > 201703L @@ -10092,28 +10430,28 @@ HogQLParser::TableArgListContext* HogQLParser::tableArgList() { try { size_t alt; enterOuterAlt(_localctx, 1); - setState(1168); + setState(1212); columnExpr(0); - setState(1173); + setState(1217); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 148, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 154, _ctx); while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) { if (alt == 1) { - setState(1169); + setState(1213); match(HogQLParser::COMMA); - setState(1170); + setState(1214); columnExpr(0); } - setState(1175); + setState(1219); _errHandler->sync(this); - alt = getInterpreter()->adaptivePredict(_input, 148, _ctx); + alt = getInterpreter()->adaptivePredict(_input, 154, _ctx); } - setState(1177); + setState(1221); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::COMMA) { - setState(1176); + setState(1220); match(HogQLParser::COMMA); } @@ -10152,7 +10490,7 @@ std::any HogQLParser::DatabaseIdentifierContext::accept(tree::ParseTreeVisitor * HogQLParser::DatabaseIdentifierContext* HogQLParser::databaseIdentifier() { DatabaseIdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 138, HogQLParser::RuleDatabaseIdentifier); + enterRule(_localctx, 144, HogQLParser::RuleDatabaseIdentifier); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10163,7 +10501,7 @@ HogQLParser::DatabaseIdentifierContext* HogQLParser::databaseIdentifier() { }); try { enterOuterAlt(_localctx, 1); - setState(1179); + setState(1223); identifier(); } @@ -10217,7 +10555,7 @@ std::any HogQLParser::FloatingLiteralContext::accept(tree::ParseTreeVisitor *vis HogQLParser::FloatingLiteralContext* HogQLParser::floatingLiteral() { FloatingLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 140, HogQLParser::RuleFloatingLiteral); + enterRule(_localctx, 146, HogQLParser::RuleFloatingLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -10228,21 +10566,21 @@ HogQLParser::FloatingLiteralContext* HogQLParser::floatingLiteral() { exitRule(); }); try { - setState(1189); + setState(1233); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::FLOATING_LITERAL: { enterOuterAlt(_localctx, 1); - setState(1181); + setState(1225); match(HogQLParser::FLOATING_LITERAL); break; } case HogQLParser::DOT: { enterOuterAlt(_localctx, 2); - setState(1182); + setState(1226); match(HogQLParser::DOT); - setState(1183); + setState(1227); _la = _input->LA(1); if (!(_la == HogQLParser::OCTAL_LITERAL @@ -10258,16 +10596,16 @@ HogQLParser::FloatingLiteralContext* HogQLParser::floatingLiteral() { case HogQLParser::DECIMAL_LITERAL: { enterOuterAlt(_localctx, 3); - setState(1184); + setState(1228); match(HogQLParser::DECIMAL_LITERAL); - setState(1185); + setState(1229); match(HogQLParser::DOT); - setState(1187); + setState(1231); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 150, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 156, _ctx)) { case 1: { - setState(1186); + setState(1230); _la = _input->LA(1); if (!(_la == HogQLParser::OCTAL_LITERAL @@ -10354,7 +10692,7 @@ std::any HogQLParser::NumberLiteralContext::accept(tree::ParseTreeVisitor *visit HogQLParser::NumberLiteralContext* HogQLParser::numberLiteral() { NumberLiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 142, HogQLParser::RuleNumberLiteral); + enterRule(_localctx, 148, HogQLParser::RuleNumberLiteral); size_t _la = 0; #if __cplusplus > 201703L @@ -10366,14 +10704,14 @@ HogQLParser::NumberLiteralContext* HogQLParser::numberLiteral() { }); try { enterOuterAlt(_localctx, 1); - setState(1192); + setState(1236); _errHandler->sync(this); _la = _input->LA(1); if (_la == HogQLParser::DASH || _la == HogQLParser::PLUS) { - setState(1191); + setState(1235); _la = _input->LA(1); if (!(_la == HogQLParser::DASH @@ -10385,41 +10723,41 @@ HogQLParser::NumberLiteralContext* HogQLParser::numberLiteral() { consume(); } } - setState(1200); + setState(1244); _errHandler->sync(this); - switch (getInterpreter()->adaptivePredict(_input, 153, _ctx)) { + switch (getInterpreter()->adaptivePredict(_input, 159, _ctx)) { case 1: { - setState(1194); + setState(1238); floatingLiteral(); break; } case 2: { - setState(1195); + setState(1239); match(HogQLParser::OCTAL_LITERAL); break; } case 3: { - setState(1196); + setState(1240); match(HogQLParser::DECIMAL_LITERAL); break; } case 4: { - setState(1197); + setState(1241); match(HogQLParser::HEXADECIMAL_LITERAL); break; } case 5: { - setState(1198); + setState(1242); match(HogQLParser::INF); break; } case 6: { - setState(1199); + setState(1243); match(HogQLParser::NAN_SQL); break; } @@ -10471,7 +10809,7 @@ std::any HogQLParser::LiteralContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::LiteralContext* HogQLParser::literal() { LiteralContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 144, HogQLParser::RuleLiteral); + enterRule(_localctx, 150, HogQLParser::RuleLiteral); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -10481,7 +10819,7 @@ HogQLParser::LiteralContext* HogQLParser::literal() { exitRule(); }); try { - setState(1205); + setState(1249); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::INF: @@ -10494,21 +10832,21 @@ HogQLParser::LiteralContext* HogQLParser::literal() { case HogQLParser::DOT: case HogQLParser::PLUS: { enterOuterAlt(_localctx, 1); - setState(1202); + setState(1246); numberLiteral(); break; } case HogQLParser::STRING_LITERAL: { enterOuterAlt(_localctx, 2); - setState(1203); + setState(1247); match(HogQLParser::STRING_LITERAL); break; } case HogQLParser::NULL_SQL: { enterOuterAlt(_localctx, 3); - setState(1204); + setState(1248); match(HogQLParser::NULL_SQL); break; } @@ -10580,7 +10918,7 @@ std::any HogQLParser::IntervalContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::IntervalContext* HogQLParser::interval() { IntervalContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 146, HogQLParser::RuleInterval); + enterRule(_localctx, 152, HogQLParser::RuleInterval); size_t _la = 0; #if __cplusplus > 201703L @@ -10592,11 +10930,11 @@ HogQLParser::IntervalContext* HogQLParser::interval() { }); try { enterOuterAlt(_localctx, 1); - setState(1207); + setState(1251); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 27021666484748288) != 0) || ((((_la - 68) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 68)) & 2181038337) != 0))) { + ((1ULL << _la) & 108086665936896000) != 0) || ((((_la - 70) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 70)) & 8724152577) != 0))) { _errHandler->recoverInline(this); } else { @@ -10975,7 +11313,7 @@ std::any HogQLParser::KeywordContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::KeywordContext* HogQLParser::keyword() { KeywordContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 148, HogQLParser::RuleKeyword); + enterRule(_localctx, 154, HogQLParser::RuleKeyword); size_t _la = 0; #if __cplusplus > 201703L @@ -10987,11 +11325,11 @@ HogQLParser::KeywordContext* HogQLParser::keyword() { }); try { enterOuterAlt(_localctx, 1); - setState(1209); + setState(1253); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & -208293751046537218) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && - ((1ULL << (_la - 64)) & 29527896047) != 0))) { + ((1ULL << _la) & -833175004720939010) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) && + ((1ULL << (_la - 64)) & 471908466623) != 0))) { _errHandler->recoverInline(this); } else { @@ -11046,7 +11384,7 @@ std::any HogQLParser::KeywordForAliasContext::accept(tree::ParseTreeVisitor *vis HogQLParser::KeywordForAliasContext* HogQLParser::keywordForAlias() { KeywordForAliasContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 150, HogQLParser::RuleKeywordForAlias); + enterRule(_localctx, 156, HogQLParser::RuleKeywordForAlias); size_t _la = 0; #if __cplusplus > 201703L @@ -11058,10 +11396,10 @@ HogQLParser::KeywordForAliasContext* HogQLParser::keywordForAlias() { }); try { enterOuterAlt(_localctx, 1); - setState(1211); + setState(1255); _la = _input->LA(1); if (!((((_la & ~ 0x3fULL) == 0) && - ((1ULL << _la) & 70506452090880) != 0))) { + ((1ULL << _la) & 282025807314944) != 0))) { _errHandler->recoverInline(this); } else { @@ -11108,7 +11446,7 @@ std::any HogQLParser::AliasContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::AliasContext* HogQLParser::alias() { AliasContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 152, HogQLParser::RuleAlias); + enterRule(_localctx, 158, HogQLParser::RuleAlias); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11118,12 +11456,12 @@ HogQLParser::AliasContext* HogQLParser::alias() { exitRule(); }); try { - setState(1215); + setState(1259); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::IDENTIFIER: { enterOuterAlt(_localctx, 1); - setState(1213); + setState(1257); match(HogQLParser::IDENTIFIER); break; } @@ -11133,7 +11471,7 @@ HogQLParser::AliasContext* HogQLParser::alias() { case HogQLParser::ID: case HogQLParser::KEY: { enterOuterAlt(_localctx, 2); - setState(1214); + setState(1258); keywordForAlias(); break; } @@ -11185,7 +11523,7 @@ std::any HogQLParser::IdentifierContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::IdentifierContext* HogQLParser::identifier() { IdentifierContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 154, HogQLParser::RuleIdentifier); + enterRule(_localctx, 160, HogQLParser::RuleIdentifier); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11195,12 +11533,12 @@ HogQLParser::IdentifierContext* HogQLParser::identifier() { exitRule(); }); try { - setState(1220); + setState(1264); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::IDENTIFIER: { enterOuterAlt(_localctx, 1); - setState(1217); + setState(1261); match(HogQLParser::IDENTIFIER); break; } @@ -11214,7 +11552,7 @@ HogQLParser::IdentifierContext* HogQLParser::identifier() { case HogQLParser::WEEK: case HogQLParser::YEAR: { enterOuterAlt(_localctx, 2); - setState(1218); + setState(1262); interval(); break; } @@ -11305,7 +11643,7 @@ HogQLParser::IdentifierContext* HogQLParser::identifier() { case HogQLParser::WINDOW: case HogQLParser::WITH: { enterOuterAlt(_localctx, 3); - setState(1219); + setState(1263); keyword(); break; } @@ -11357,7 +11695,7 @@ std::any HogQLParser::EnumValueContext::accept(tree::ParseTreeVisitor *visitor) HogQLParser::EnumValueContext* HogQLParser::enumValue() { EnumValueContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 156, HogQLParser::RuleEnumValue); + enterRule(_localctx, 162, HogQLParser::RuleEnumValue); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11368,11 +11706,11 @@ HogQLParser::EnumValueContext* HogQLParser::enumValue() { }); try { enterOuterAlt(_localctx, 1); - setState(1222); + setState(1266); string(); - setState(1223); + setState(1267); match(HogQLParser::EQ_SINGLE); - setState(1224); + setState(1268); numberLiteral(); } @@ -11418,7 +11756,7 @@ std::any HogQLParser::PlaceholderContext::accept(tree::ParseTreeVisitor *visitor HogQLParser::PlaceholderContext* HogQLParser::placeholder() { PlaceholderContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 158, HogQLParser::RulePlaceholder); + enterRule(_localctx, 164, HogQLParser::RulePlaceholder); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11429,11 +11767,11 @@ HogQLParser::PlaceholderContext* HogQLParser::placeholder() { }); try { enterOuterAlt(_localctx, 1); - setState(1226); + setState(1270); match(HogQLParser::LBRACE); - setState(1227); + setState(1271); identifier(); - setState(1228); + setState(1272); match(HogQLParser::RBRACE); } @@ -11475,7 +11813,7 @@ std::any HogQLParser::StringContext::accept(tree::ParseTreeVisitor *visitor) { HogQLParser::StringContext* HogQLParser::string() { StringContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 160, HogQLParser::RuleString); + enterRule(_localctx, 166, HogQLParser::RuleString); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11485,19 +11823,19 @@ HogQLParser::StringContext* HogQLParser::string() { exitRule(); }); try { - setState(1232); + setState(1276); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::STRING_LITERAL: { enterOuterAlt(_localctx, 1); - setState(1230); + setState(1274); match(HogQLParser::STRING_LITERAL); break; } case HogQLParser::QUOTE_SINGLE_TEMPLATE: { enterOuterAlt(_localctx, 2); - setState(1231); + setState(1275); templateString(); break; } @@ -11553,7 +11891,7 @@ std::any HogQLParser::TemplateStringContext::accept(tree::ParseTreeVisitor *visi HogQLParser::TemplateStringContext* HogQLParser::templateString() { TemplateStringContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 162, HogQLParser::RuleTemplateString); + enterRule(_localctx, 168, HogQLParser::RuleTemplateString); size_t _la = 0; #if __cplusplus > 201703L @@ -11565,21 +11903,21 @@ HogQLParser::TemplateStringContext* HogQLParser::templateString() { }); try { enterOuterAlt(_localctx, 1); - setState(1234); + setState(1278); match(HogQLParser::QUOTE_SINGLE_TEMPLATE); - setState(1238); + setState(1282); _errHandler->sync(this); _la = _input->LA(1); while (_la == HogQLParser::STRING_TEXT || _la == HogQLParser::STRING_ESCAPE_TRIGGER) { - setState(1235); + setState(1279); stringContents(); - setState(1240); + setState(1284); _errHandler->sync(this); _la = _input->LA(1); } - setState(1241); + setState(1285); match(HogQLParser::QUOTE_SINGLE); } @@ -11629,7 +11967,7 @@ std::any HogQLParser::StringContentsContext::accept(tree::ParseTreeVisitor *visi HogQLParser::StringContentsContext* HogQLParser::stringContents() { StringContentsContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 164, HogQLParser::RuleStringContents); + enterRule(_localctx, 170, HogQLParser::RuleStringContents); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11639,23 +11977,23 @@ HogQLParser::StringContentsContext* HogQLParser::stringContents() { exitRule(); }); try { - setState(1248); + setState(1292); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::STRING_ESCAPE_TRIGGER: { enterOuterAlt(_localctx, 1); - setState(1243); + setState(1287); match(HogQLParser::STRING_ESCAPE_TRIGGER); - setState(1244); + setState(1288); columnExpr(0); - setState(1245); + setState(1289); match(HogQLParser::RBRACE); break; } case HogQLParser::STRING_TEXT: { enterOuterAlt(_localctx, 2); - setState(1247); + setState(1291); match(HogQLParser::STRING_TEXT); break; } @@ -11711,7 +12049,7 @@ std::any HogQLParser::FullTemplateStringContext::accept(tree::ParseTreeVisitor * HogQLParser::FullTemplateStringContext* HogQLParser::fullTemplateString() { FullTemplateStringContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 166, HogQLParser::RuleFullTemplateString); + enterRule(_localctx, 172, HogQLParser::RuleFullTemplateString); size_t _la = 0; #if __cplusplus > 201703L @@ -11723,21 +12061,21 @@ HogQLParser::FullTemplateStringContext* HogQLParser::fullTemplateString() { }); try { enterOuterAlt(_localctx, 1); - setState(1250); + setState(1294); match(HogQLParser::QUOTE_SINGLE_TEMPLATE_FULL); - setState(1254); + setState(1298); _errHandler->sync(this); _la = _input->LA(1); while (_la == HogQLParser::FULL_STRING_TEXT || _la == HogQLParser::FULL_STRING_ESCAPE_TRIGGER) { - setState(1251); + setState(1295); stringContentsFull(); - setState(1256); + setState(1300); _errHandler->sync(this); _la = _input->LA(1); } - setState(1257); + setState(1301); match(HogQLParser::EOF); } @@ -11787,7 +12125,7 @@ std::any HogQLParser::StringContentsFullContext::accept(tree::ParseTreeVisitor * HogQLParser::StringContentsFullContext* HogQLParser::stringContentsFull() { StringContentsFullContext *_localctx = _tracker.createInstance(_ctx, getState()); - enterRule(_localctx, 168, HogQLParser::RuleStringContentsFull); + enterRule(_localctx, 174, HogQLParser::RuleStringContentsFull); #if __cplusplus > 201703L auto onExit = finally([=, this] { @@ -11797,23 +12135,23 @@ HogQLParser::StringContentsFullContext* HogQLParser::stringContentsFull() { exitRule(); }); try { - setState(1264); + setState(1308); _errHandler->sync(this); switch (_input->LA(1)) { case HogQLParser::FULL_STRING_ESCAPE_TRIGGER: { enterOuterAlt(_localctx, 1); - setState(1259); + setState(1303); match(HogQLParser::FULL_STRING_ESCAPE_TRIGGER); - setState(1260); + setState(1304); columnExpr(0); - setState(1261); + setState(1305); match(HogQLParser::RBRACE); break; } case HogQLParser::FULL_STRING_TEXT: { enterOuterAlt(_localctx, 2); - setState(1263); + setState(1307); match(HogQLParser::FULL_STRING_TEXT); break; } @@ -11834,9 +12172,9 @@ HogQLParser::StringContentsFullContext* HogQLParser::stringContentsFull() { bool HogQLParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) { switch (ruleIndex) { - case 36: return joinExprSempred(antlrcpp::downCast(context), predicateIndex); - case 55: return columnExprSempred(antlrcpp::downCast(context), predicateIndex); - case 65: return tableExprSempred(antlrcpp::downCast(context), predicateIndex); + case 39: return joinExprSempred(antlrcpp::downCast(context), predicateIndex); + case 58: return columnExprSempred(antlrcpp::downCast(context), predicateIndex); + case 68: return tableExprSempred(antlrcpp::downCast(context), predicateIndex); default: break; diff --git a/hogql_parser/HogQLParser.h b/hogql_parser/HogQLParser.h index bfe715d1cd82c..d5a5253ad25f0 100644 --- a/hogql_parser/HogQLParser.h +++ b/hogql_parser/HogQLParser.h @@ -13,62 +13,64 @@ class HogQLParser : public antlr4::Parser { public: enum { ALL = 1, AND = 2, ANTI = 3, ANY = 4, ARRAY = 5, AS = 6, ASCENDING = 7, - ASOF = 8, BETWEEN = 9, BOTH = 10, BY = 11, CASE = 12, CAST = 13, COHORT = 14, - COLLATE = 15, CROSS = 16, CUBE = 17, CURRENT = 18, DATE = 19, DAY = 20, - DESC = 21, DESCENDING = 22, DISTINCT = 23, ELSE = 24, END = 25, EXTRACT = 26, - FINAL = 27, FIRST = 28, FN = 29, FOLLOWING = 30, FOR = 31, FROM = 32, - FULL = 33, GROUP = 34, HAVING = 35, HOUR = 36, ID = 37, IF = 38, ILIKE = 39, - IN = 40, INF = 41, INNER = 42, INTERVAL = 43, IS = 44, JOIN = 45, KEY = 46, - LAST = 47, LEADING = 48, LEFT = 49, LET = 50, LIKE = 51, LIMIT = 52, - MINUTE = 53, MONTH = 54, NAN_SQL = 55, NOT = 56, NULL_SQL = 57, NULLS = 58, - OFFSET = 59, ON = 60, OR = 61, ORDER = 62, OUTER = 63, OVER = 64, PARTITION = 65, - PRECEDING = 66, PREWHERE = 67, QUARTER = 68, RANGE = 69, RETURN = 70, - RIGHT = 71, ROLLUP = 72, ROW = 73, ROWS = 74, SAMPLE = 75, SECOND = 76, - SELECT = 77, SEMI = 78, SETTINGS = 79, SUBSTRING = 80, THEN = 81, TIES = 82, - TIMESTAMP = 83, TO = 84, TOP = 85, TOTALS = 86, TRAILING = 87, TRIM = 88, - TRUNCATE = 89, UNBOUNDED = 90, UNION = 91, USING = 92, WEEK = 93, WHEN = 94, - WHERE = 95, WHILE = 96, WINDOW = 97, WITH = 98, YEAR = 99, ESCAPE_CHAR_COMMON = 100, - IDENTIFIER = 101, FLOATING_LITERAL = 102, OCTAL_LITERAL = 103, DECIMAL_LITERAL = 104, - HEXADECIMAL_LITERAL = 105, STRING_LITERAL = 106, ARROW = 107, ASTERISK = 108, - BACKQUOTE = 109, BACKSLASH = 110, COLON = 111, COMMA = 112, CONCAT = 113, - DASH = 114, DOLLAR = 115, DOT = 116, EQ_DOUBLE = 117, EQ_SINGLE = 118, - GT_EQ = 119, GT = 120, HASH = 121, IREGEX_SINGLE = 122, IREGEX_DOUBLE = 123, - LBRACE = 124, LBRACKET = 125, LPAREN = 126, LT_EQ = 127, LT = 128, NOT_EQ = 129, - NOT_IREGEX = 130, NOT_REGEX = 131, NULL_PROPERTY = 132, NULLISH = 133, - PERCENT = 134, PLUS = 135, QUERY = 136, QUOTE_DOUBLE = 137, QUOTE_SINGLE_TEMPLATE = 138, - QUOTE_SINGLE_TEMPLATE_FULL = 139, QUOTE_SINGLE = 140, REGEX_SINGLE = 141, - REGEX_DOUBLE = 142, RBRACE = 143, RBRACKET = 144, RPAREN = 145, SEMICOLON = 146, - SLASH = 147, UNDERSCORE = 148, MULTI_LINE_COMMENT = 149, SINGLE_LINE_COMMENT = 150, - WHITESPACE = 151, STRING_TEXT = 152, STRING_ESCAPE_TRIGGER = 153, FULL_STRING_TEXT = 154, - FULL_STRING_ESCAPE_TRIGGER = 155 + ASOF = 8, BETWEEN = 9, BOTH = 10, BY = 11, CASE = 12, CAST = 13, CATCH = 14, + COHORT = 15, COLLATE = 16, CROSS = 17, CUBE = 18, CURRENT = 19, DATE = 20, + DAY = 21, DESC = 22, DESCENDING = 23, DISTINCT = 24, ELSE = 25, END = 26, + EXTRACT = 27, FINAL = 28, FINALLY = 29, FIRST = 30, FN = 31, FOLLOWING = 32, + FOR = 33, FROM = 34, FULL = 35, GROUP = 36, HAVING = 37, HOUR = 38, + ID = 39, IF = 40, ILIKE = 41, IN = 42, INF = 43, INNER = 44, INTERVAL = 45, + IS = 46, JOIN = 47, KEY = 48, LAST = 49, LEADING = 50, LEFT = 51, LET = 52, + LIKE = 53, LIMIT = 54, MINUTE = 55, MONTH = 56, NAN_SQL = 57, NOT = 58, + NULL_SQL = 59, NULLS = 60, OFFSET = 61, ON = 62, OR = 63, ORDER = 64, + OUTER = 65, OVER = 66, PARTITION = 67, PRECEDING = 68, PREWHERE = 69, + QUARTER = 70, RANGE = 71, RETURN = 72, RIGHT = 73, ROLLUP = 74, ROW = 75, + ROWS = 76, SAMPLE = 77, SECOND = 78, SELECT = 79, SEMI = 80, SETTINGS = 81, + SUBSTRING = 82, THEN = 83, THROW = 84, TIES = 85, TIMESTAMP = 86, TO = 87, + TOP = 88, TOTALS = 89, TRAILING = 90, TRIM = 91, TRUNCATE = 92, TRY = 93, + UNBOUNDED = 94, UNION = 95, USING = 96, WEEK = 97, WHEN = 98, WHERE = 99, + WHILE = 100, WINDOW = 101, WITH = 102, YEAR = 103, ESCAPE_CHAR_COMMON = 104, + IDENTIFIER = 105, FLOATING_LITERAL = 106, OCTAL_LITERAL = 107, DECIMAL_LITERAL = 108, + HEXADECIMAL_LITERAL = 109, STRING_LITERAL = 110, ARROW = 111, ASTERISK = 112, + BACKQUOTE = 113, BACKSLASH = 114, COLON = 115, COMMA = 116, CONCAT = 117, + DASH = 118, DOLLAR = 119, DOT = 120, EQ_DOUBLE = 121, EQ_SINGLE = 122, + GT_EQ = 123, GT = 124, HASH = 125, IREGEX_SINGLE = 126, IREGEX_DOUBLE = 127, + LBRACE = 128, LBRACKET = 129, LPAREN = 130, LT_EQ = 131, LT = 132, NOT_EQ = 133, + NOT_IREGEX = 134, NOT_REGEX = 135, NULL_PROPERTY = 136, NULLISH = 137, + PERCENT = 138, PLUS = 139, QUERY = 140, QUOTE_DOUBLE = 141, QUOTE_SINGLE_TEMPLATE = 142, + QUOTE_SINGLE_TEMPLATE_FULL = 143, QUOTE_SINGLE = 144, REGEX_SINGLE = 145, + REGEX_DOUBLE = 146, RBRACE = 147, RBRACKET = 148, RPAREN = 149, SEMICOLON = 150, + SLASH = 151, UNDERSCORE = 152, MULTI_LINE_COMMENT = 153, SINGLE_LINE_COMMENT = 154, + WHITESPACE = 155, STRING_TEXT = 156, STRING_ESCAPE_TRIGGER = 157, FULL_STRING_TEXT = 158, + FULL_STRING_ESCAPE_TRIGGER = 159 }; enum { RuleProgram = 0, RuleDeclaration = 1, RuleExpression = 2, RuleVarDecl = 3, - RuleIdentifierList = 4, RuleStatement = 5, RuleReturnStmt = 6, RuleIfStmt = 7, - RuleWhileStmt = 8, RuleForStmt = 9, RuleForInStmt = 10, RuleFuncStmt = 11, - RuleVarAssignment = 12, RuleExprStmt = 13, RuleEmptyStmt = 14, RuleBlock = 15, - RuleKvPair = 16, RuleKvPairList = 17, RuleSelect = 18, RuleSelectUnionStmt = 19, - RuleSelectStmtWithParens = 20, RuleSelectStmt = 21, RuleWithClause = 22, - RuleTopClause = 23, RuleFromClause = 24, RuleArrayJoinClause = 25, RuleWindowClause = 26, - RulePrewhereClause = 27, RuleWhereClause = 28, RuleGroupByClause = 29, - RuleHavingClause = 30, RuleOrderByClause = 31, RuleProjectionOrderByClause = 32, - RuleLimitAndOffsetClause = 33, RuleOffsetOnlyClause = 34, RuleSettingsClause = 35, - RuleJoinExpr = 36, RuleJoinOp = 37, RuleJoinOpCross = 38, RuleJoinConstraintClause = 39, - RuleSampleClause = 40, RuleOrderExprList = 41, RuleOrderExpr = 42, RuleRatioExpr = 43, - RuleSettingExprList = 44, RuleSettingExpr = 45, RuleWindowExpr = 46, - RuleWinPartitionByClause = 47, RuleWinOrderByClause = 48, RuleWinFrameClause = 49, - RuleWinFrameExtend = 50, RuleWinFrameBound = 51, RuleExpr = 52, RuleColumnTypeExpr = 53, - RuleColumnExprList = 54, RuleColumnExpr = 55, RuleColumnArgList = 56, - RuleColumnArgExpr = 57, RuleColumnLambdaExpr = 58, RuleHogqlxTagElement = 59, - RuleHogqlxTagAttribute = 60, RuleWithExprList = 61, RuleWithExpr = 62, - RuleColumnIdentifier = 63, RuleNestedIdentifier = 64, RuleTableExpr = 65, - RuleTableFunctionExpr = 66, RuleTableIdentifier = 67, RuleTableArgList = 68, - RuleDatabaseIdentifier = 69, RuleFloatingLiteral = 70, RuleNumberLiteral = 71, - RuleLiteral = 72, RuleInterval = 73, RuleKeyword = 74, RuleKeywordForAlias = 75, - RuleAlias = 76, RuleIdentifier = 77, RuleEnumValue = 78, RulePlaceholder = 79, - RuleString = 80, RuleTemplateString = 81, RuleStringContents = 82, RuleFullTemplateString = 83, - RuleStringContentsFull = 84 + RuleIdentifierList = 4, RuleStatement = 5, RuleReturnStmt = 6, RuleThrowStmt = 7, + RuleCatchBlock = 8, RuleTryCatchStmt = 9, RuleIfStmt = 10, RuleWhileStmt = 11, + RuleForStmt = 12, RuleForInStmt = 13, RuleFuncStmt = 14, RuleVarAssignment = 15, + RuleExprStmt = 16, RuleEmptyStmt = 17, RuleBlock = 18, RuleKvPair = 19, + RuleKvPairList = 20, RuleSelect = 21, RuleSelectUnionStmt = 22, RuleSelectStmtWithParens = 23, + RuleSelectStmt = 24, RuleWithClause = 25, RuleTopClause = 26, RuleFromClause = 27, + RuleArrayJoinClause = 28, RuleWindowClause = 29, RulePrewhereClause = 30, + RuleWhereClause = 31, RuleGroupByClause = 32, RuleHavingClause = 33, + RuleOrderByClause = 34, RuleProjectionOrderByClause = 35, RuleLimitAndOffsetClause = 36, + RuleOffsetOnlyClause = 37, RuleSettingsClause = 38, RuleJoinExpr = 39, + RuleJoinOp = 40, RuleJoinOpCross = 41, RuleJoinConstraintClause = 42, + RuleSampleClause = 43, RuleOrderExprList = 44, RuleOrderExpr = 45, RuleRatioExpr = 46, + RuleSettingExprList = 47, RuleSettingExpr = 48, RuleWindowExpr = 49, + RuleWinPartitionByClause = 50, RuleWinOrderByClause = 51, RuleWinFrameClause = 52, + RuleWinFrameExtend = 53, RuleWinFrameBound = 54, RuleExpr = 55, RuleColumnTypeExpr = 56, + RuleColumnExprList = 57, RuleColumnExpr = 58, RuleColumnArgList = 59, + RuleColumnArgExpr = 60, RuleColumnLambdaExpr = 61, RuleHogqlxTagElement = 62, + RuleHogqlxTagAttribute = 63, RuleWithExprList = 64, RuleWithExpr = 65, + RuleColumnIdentifier = 66, RuleNestedIdentifier = 67, RuleTableExpr = 68, + RuleTableFunctionExpr = 69, RuleTableIdentifier = 70, RuleTableArgList = 71, + RuleDatabaseIdentifier = 72, RuleFloatingLiteral = 73, RuleNumberLiteral = 74, + RuleLiteral = 75, RuleInterval = 76, RuleKeyword = 77, RuleKeywordForAlias = 78, + RuleAlias = 79, RuleIdentifier = 80, RuleEnumValue = 81, RulePlaceholder = 82, + RuleString = 83, RuleTemplateString = 84, RuleStringContents = 85, RuleFullTemplateString = 86, + RuleStringContentsFull = 87 }; explicit HogQLParser(antlr4::TokenStream *input); @@ -95,6 +97,9 @@ class HogQLParser : public antlr4::Parser { class IdentifierListContext; class StatementContext; class ReturnStmtContext; + class ThrowStmtContext; + class CatchBlockContext; + class TryCatchStmtContext; class IfStmtContext; class WhileStmtContext; class ForStmtContext; @@ -254,6 +259,8 @@ class HogQLParser : public antlr4::Parser { StatementContext(antlr4::ParserRuleContext *parent, size_t invokingState); virtual size_t getRuleIndex() const override; ReturnStmtContext *returnStmt(); + ThrowStmtContext *throwStmt(); + TryCatchStmtContext *tryCatchStmt(); IfStmtContext *ifStmt(); WhileStmtContext *whileStmt(); ForInStmtContext *forInStmt(); @@ -286,6 +293,63 @@ class HogQLParser : public antlr4::Parser { ReturnStmtContext* returnStmt(); + class ThrowStmtContext : public antlr4::ParserRuleContext { + public: + ThrowStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *THROW(); + ExpressionContext *expression(); + antlr4::tree::TerminalNode *SEMICOLON(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + ThrowStmtContext* throwStmt(); + + class CatchBlockContext : public antlr4::ParserRuleContext { + public: + HogQLParser::IdentifierContext *catchVar = nullptr; + HogQLParser::IdentifierContext *catchType = nullptr; + HogQLParser::BlockContext *catchStmt = nullptr; + CatchBlockContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *CATCH(); + BlockContext *block(); + antlr4::tree::TerminalNode *LPAREN(); + antlr4::tree::TerminalNode *RPAREN(); + std::vector identifier(); + IdentifierContext* identifier(size_t i); + antlr4::tree::TerminalNode *COLON(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + CatchBlockContext* catchBlock(); + + class TryCatchStmtContext : public antlr4::ParserRuleContext { + public: + HogQLParser::BlockContext *tryStmt = nullptr; + HogQLParser::BlockContext *finallyStmt = nullptr; + TryCatchStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); + virtual size_t getRuleIndex() const override; + antlr4::tree::TerminalNode *TRY(); + std::vector block(); + BlockContext* block(size_t i); + std::vector catchBlock(); + CatchBlockContext* catchBlock(size_t i); + antlr4::tree::TerminalNode *FINALLY(); + + + virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; + + }; + + TryCatchStmtContext* tryCatchStmt(); + class IfStmtContext : public antlr4::ParserRuleContext { public: IfStmtContext(antlr4::ParserRuleContext *parent, size_t invokingState); @@ -1865,6 +1929,9 @@ class HogQLParser : public antlr4::Parser { std::vector hogqlxTagAttribute(); HogqlxTagAttributeContext* hogqlxTagAttribute(size_t i); HogqlxTagElementContext *hogqlxTagElement(); + antlr4::tree::TerminalNode *LBRACE(); + ColumnExprContext *columnExpr(); + antlr4::tree::TerminalNode *RBRACE(); virtual std::any accept(antlr4::tree::ParseTreeVisitor *visitor) override; }; diff --git a/hogql_parser/HogQLParser.interp b/hogql_parser/HogQLParser.interp index 22fc706e26505..e31bf92fee7e9 100644 --- a/hogql_parser/HogQLParser.interp +++ b/hogql_parser/HogQLParser.interp @@ -106,6 +106,10 @@ null null null null +null +null +null +null '->' '*' '`' @@ -171,6 +175,7 @@ BOTH BY CASE CAST +CATCH COHORT COLLATE CROSS @@ -185,6 +190,7 @@ ELSE END EXTRACT FINAL +FINALLY FIRST FN FOLLOWING @@ -239,6 +245,7 @@ SEMI SETTINGS SUBSTRING THEN +THROW TIES TIMESTAMP TO @@ -247,6 +254,7 @@ TOTALS TRAILING TRIM TRUNCATE +TRY UNBOUNDED UNION USING @@ -322,6 +330,9 @@ varDecl identifierList statement returnStmt +throwStmt +catchBlock +tryCatchStmt ifStmt whileStmt forStmt @@ -403,4 +414,4 @@ stringContentsFull atn: -[4, 1, 155, 1267, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 1, 0, 5, 0, 172, 8, 0, 10, 0, 12, 0, 175, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 181, 8, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 190, 8, 3, 1, 4, 1, 4, 1, 4, 5, 4, 195, 8, 4, 10, 4, 12, 4, 198, 9, 4, 1, 4, 3, 4, 201, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 213, 8, 5, 1, 6, 1, 6, 3, 6, 217, 8, 6, 1, 6, 3, 6, 220, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 229, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 237, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 244, 8, 9, 1, 9, 1, 9, 3, 9, 248, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 254, 8, 9, 1, 9, 1, 9, 1, 9, 3, 9, 259, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 267, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 274, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 280, 8, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 3, 13, 292, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 5, 15, 298, 8, 15, 10, 15, 12, 15, 301, 9, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 5, 17, 312, 8, 17, 10, 17, 12, 17, 315, 9, 17, 1, 17, 3, 17, 318, 8, 17, 1, 18, 1, 18, 1, 18, 3, 18, 323, 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 331, 8, 19, 10, 19, 12, 19, 334, 9, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 342, 8, 20, 1, 21, 3, 21, 345, 8, 21, 1, 21, 1, 21, 3, 21, 349, 8, 21, 1, 21, 3, 21, 352, 8, 21, 1, 21, 1, 21, 3, 21, 356, 8, 21, 1, 21, 3, 21, 359, 8, 21, 1, 21, 3, 21, 362, 8, 21, 1, 21, 3, 21, 365, 8, 21, 1, 21, 3, 21, 368, 8, 21, 1, 21, 1, 21, 3, 21, 372, 8, 21, 1, 21, 1, 21, 3, 21, 376, 8, 21, 1, 21, 3, 21, 379, 8, 21, 1, 21, 3, 21, 382, 8, 21, 1, 21, 3, 21, 385, 8, 21, 1, 21, 1, 21, 3, 21, 389, 8, 21, 1, 21, 3, 21, 392, 8, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 401, 8, 23, 1, 24, 1, 24, 1, 24, 1, 25, 3, 25, 407, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 426, 8, 26, 10, 26, 12, 26, 429, 9, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 445, 8, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 462, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 468, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 474, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 485, 8, 33, 3, 33, 487, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 3, 36, 498, 8, 36, 1, 36, 3, 36, 501, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 507, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 515, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 521, 8, 36, 10, 36, 12, 36, 524, 9, 36, 1, 37, 3, 37, 527, 8, 37, 1, 37, 1, 37, 1, 37, 3, 37, 532, 8, 37, 1, 37, 3, 37, 535, 8, 37, 1, 37, 3, 37, 538, 8, 37, 1, 37, 1, 37, 3, 37, 542, 8, 37, 1, 37, 1, 37, 3, 37, 546, 8, 37, 1, 37, 3, 37, 549, 8, 37, 3, 37, 551, 8, 37, 1, 37, 3, 37, 554, 8, 37, 1, 37, 1, 37, 3, 37, 558, 8, 37, 1, 37, 1, 37, 3, 37, 562, 8, 37, 1, 37, 3, 37, 565, 8, 37, 3, 37, 567, 8, 37, 3, 37, 569, 8, 37, 1, 38, 1, 38, 1, 38, 3, 38, 574, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 585, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 591, 8, 40, 1, 41, 1, 41, 1, 41, 5, 41, 596, 8, 41, 10, 41, 12, 41, 599, 9, 41, 1, 42, 1, 42, 3, 42, 603, 8, 42, 1, 42, 1, 42, 3, 42, 607, 8, 42, 1, 42, 1, 42, 3, 42, 611, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 617, 8, 43, 3, 43, 619, 8, 43, 1, 44, 1, 44, 1, 44, 5, 44, 624, 8, 44, 10, 44, 12, 44, 627, 9, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 3, 46, 634, 8, 46, 1, 46, 3, 46, 637, 8, 46, 1, 46, 3, 46, 640, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 3, 50, 659, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 673, 8, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 687, 8, 53, 10, 53, 12, 53, 690, 9, 53, 1, 53, 3, 53, 693, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 702, 8, 53, 10, 53, 12, 53, 705, 9, 53, 1, 53, 3, 53, 708, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 717, 8, 53, 10, 53, 12, 53, 720, 9, 53, 1, 53, 3, 53, 723, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 730, 8, 53, 1, 53, 1, 53, 3, 53, 734, 8, 53, 1, 54, 1, 54, 1, 54, 5, 54, 739, 8, 54, 10, 54, 12, 54, 742, 9, 54, 1, 54, 3, 54, 745, 8, 54, 1, 55, 1, 55, 1, 55, 3, 55, 750, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 4, 55, 757, 8, 55, 11, 55, 12, 55, 758, 1, 55, 1, 55, 3, 55, 763, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 787, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 804, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 810, 8, 55, 1, 55, 3, 55, 813, 8, 55, 1, 55, 3, 55, 816, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 826, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 832, 8, 55, 1, 55, 3, 55, 835, 8, 55, 1, 55, 3, 55, 838, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 846, 8, 55, 1, 55, 3, 55, 849, 8, 55, 1, 55, 1, 55, 3, 55, 853, 8, 55, 1, 55, 3, 55, 856, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 870, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 887, 8, 55, 1, 55, 1, 55, 1, 55, 3, 55, 892, 8, 55, 1, 55, 1, 55, 3, 55, 896, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 902, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 909, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 921, 8, 55, 1, 55, 1, 55, 3, 55, 925, 8, 55, 1, 55, 3, 55, 928, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 937, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 951, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 990, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 998, 8, 55, 5, 55, 1000, 8, 55, 10, 55, 12, 55, 1003, 9, 55, 1, 56, 1, 56, 1, 56, 5, 56, 1008, 8, 56, 10, 56, 12, 56, 1011, 9, 56, 1, 56, 3, 56, 1014, 8, 56, 1, 57, 1, 57, 3, 57, 1018, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 5, 58, 1024, 8, 58, 10, 58, 12, 58, 1027, 9, 58, 1, 58, 3, 58, 1030, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 5, 58, 1037, 8, 58, 10, 58, 12, 58, 1040, 9, 58, 1, 58, 3, 58, 1043, 8, 58, 3, 58, 1045, 8, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 5, 59, 1053, 8, 59, 10, 59, 12, 59, 1056, 9, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1064, 8, 59, 10, 59, 12, 59, 1067, 9, 59, 1, 59, 1, 59, 3, 59, 1071, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 1078, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1091, 8, 60, 1, 61, 1, 61, 1, 61, 5, 61, 1096, 8, 61, 10, 61, 12, 61, 1099, 9, 61, 1, 61, 3, 61, 1102, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1114, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1120, 8, 63, 1, 63, 3, 63, 1123, 8, 63, 1, 64, 1, 64, 1, 64, 5, 64, 1128, 8, 64, 10, 64, 12, 64, 1131, 9, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1142, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1148, 8, 65, 5, 65, 1150, 8, 65, 10, 65, 12, 65, 1153, 9, 65, 1, 66, 1, 66, 1, 66, 3, 66, 1158, 8, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 3, 67, 1165, 8, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 5, 68, 1172, 8, 68, 10, 68, 12, 68, 1175, 9, 68, 1, 68, 3, 68, 1178, 8, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 1188, 8, 70, 3, 70, 1190, 8, 70, 1, 71, 3, 71, 1193, 8, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 1201, 8, 71, 1, 72, 1, 72, 1, 72, 3, 72, 1206, 8, 72, 1, 73, 1, 73, 1, 74, 1, 74, 1, 75, 1, 75, 1, 76, 1, 76, 3, 76, 1216, 8, 76, 1, 77, 1, 77, 1, 77, 3, 77, 1221, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 1233, 8, 80, 1, 81, 1, 81, 5, 81, 1237, 8, 81, 10, 81, 12, 81, 1240, 9, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 3, 82, 1249, 8, 82, 1, 83, 1, 83, 5, 83, 1253, 8, 83, 10, 83, 12, 83, 1256, 9, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 3, 84, 1265, 8, 84, 1, 84, 0, 3, 72, 110, 130, 85, 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, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 0, 16, 2, 0, 17, 17, 72, 72, 2, 0, 42, 42, 49, 49, 3, 0, 1, 1, 4, 4, 8, 8, 4, 0, 1, 1, 3, 4, 8, 8, 78, 78, 2, 0, 49, 49, 71, 71, 2, 0, 1, 1, 4, 4, 2, 0, 7, 7, 21, 22, 2, 0, 28, 28, 47, 47, 2, 0, 69, 69, 74, 74, 3, 0, 10, 10, 48, 48, 87, 87, 2, 0, 39, 39, 51, 51, 1, 0, 103, 104, 2, 0, 114, 114, 135, 135, 7, 0, 20, 20, 36, 36, 53, 54, 68, 68, 76, 76, 93, 93, 99, 99, 12, 0, 1, 19, 21, 28, 30, 35, 37, 40, 42, 49, 51, 52, 56, 56, 58, 67, 69, 75, 77, 92, 94, 95, 97, 98, 4, 0, 19, 19, 28, 28, 37, 37, 46, 46, 1429, 0, 173, 1, 0, 0, 0, 2, 180, 1, 0, 0, 0, 4, 182, 1, 0, 0, 0, 6, 184, 1, 0, 0, 0, 8, 191, 1, 0, 0, 0, 10, 212, 1, 0, 0, 0, 12, 214, 1, 0, 0, 0, 14, 221, 1, 0, 0, 0, 16, 230, 1, 0, 0, 0, 18, 238, 1, 0, 0, 0, 20, 260, 1, 0, 0, 0, 22, 275, 1, 0, 0, 0, 24, 284, 1, 0, 0, 0, 26, 289, 1, 0, 0, 0, 28, 293, 1, 0, 0, 0, 30, 295, 1, 0, 0, 0, 32, 304, 1, 0, 0, 0, 34, 308, 1, 0, 0, 0, 36, 322, 1, 0, 0, 0, 38, 326, 1, 0, 0, 0, 40, 341, 1, 0, 0, 0, 42, 344, 1, 0, 0, 0, 44, 393, 1, 0, 0, 0, 46, 396, 1, 0, 0, 0, 48, 402, 1, 0, 0, 0, 50, 406, 1, 0, 0, 0, 52, 412, 1, 0, 0, 0, 54, 430, 1, 0, 0, 0, 56, 433, 1, 0, 0, 0, 58, 436, 1, 0, 0, 0, 60, 446, 1, 0, 0, 0, 62, 449, 1, 0, 0, 0, 64, 453, 1, 0, 0, 0, 66, 486, 1, 0, 0, 0, 68, 488, 1, 0, 0, 0, 70, 491, 1, 0, 0, 0, 72, 506, 1, 0, 0, 0, 74, 568, 1, 0, 0, 0, 76, 573, 1, 0, 0, 0, 78, 584, 1, 0, 0, 0, 80, 586, 1, 0, 0, 0, 82, 592, 1, 0, 0, 0, 84, 600, 1, 0, 0, 0, 86, 618, 1, 0, 0, 0, 88, 620, 1, 0, 0, 0, 90, 628, 1, 0, 0, 0, 92, 633, 1, 0, 0, 0, 94, 641, 1, 0, 0, 0, 96, 645, 1, 0, 0, 0, 98, 649, 1, 0, 0, 0, 100, 658, 1, 0, 0, 0, 102, 672, 1, 0, 0, 0, 104, 674, 1, 0, 0, 0, 106, 733, 1, 0, 0, 0, 108, 735, 1, 0, 0, 0, 110, 895, 1, 0, 0, 0, 112, 1004, 1, 0, 0, 0, 114, 1017, 1, 0, 0, 0, 116, 1044, 1, 0, 0, 0, 118, 1077, 1, 0, 0, 0, 120, 1090, 1, 0, 0, 0, 122, 1092, 1, 0, 0, 0, 124, 1113, 1, 0, 0, 0, 126, 1122, 1, 0, 0, 0, 128, 1124, 1, 0, 0, 0, 130, 1141, 1, 0, 0, 0, 132, 1154, 1, 0, 0, 0, 134, 1164, 1, 0, 0, 0, 136, 1168, 1, 0, 0, 0, 138, 1179, 1, 0, 0, 0, 140, 1189, 1, 0, 0, 0, 142, 1192, 1, 0, 0, 0, 144, 1205, 1, 0, 0, 0, 146, 1207, 1, 0, 0, 0, 148, 1209, 1, 0, 0, 0, 150, 1211, 1, 0, 0, 0, 152, 1215, 1, 0, 0, 0, 154, 1220, 1, 0, 0, 0, 156, 1222, 1, 0, 0, 0, 158, 1226, 1, 0, 0, 0, 160, 1232, 1, 0, 0, 0, 162, 1234, 1, 0, 0, 0, 164, 1248, 1, 0, 0, 0, 166, 1250, 1, 0, 0, 0, 168, 1264, 1, 0, 0, 0, 170, 172, 3, 2, 1, 0, 171, 170, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 0, 0, 1, 177, 1, 1, 0, 0, 0, 178, 181, 3, 6, 3, 0, 179, 181, 3, 10, 5, 0, 180, 178, 1, 0, 0, 0, 180, 179, 1, 0, 0, 0, 181, 3, 1, 0, 0, 0, 182, 183, 3, 110, 55, 0, 183, 5, 1, 0, 0, 0, 184, 185, 5, 50, 0, 0, 185, 189, 3, 154, 77, 0, 186, 187, 5, 111, 0, 0, 187, 188, 5, 118, 0, 0, 188, 190, 3, 4, 2, 0, 189, 186, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 7, 1, 0, 0, 0, 191, 196, 3, 154, 77, 0, 192, 193, 5, 112, 0, 0, 193, 195, 3, 154, 77, 0, 194, 192, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 200, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 201, 5, 112, 0, 0, 200, 199, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 9, 1, 0, 0, 0, 202, 213, 3, 12, 6, 0, 203, 213, 3, 14, 7, 0, 204, 213, 3, 16, 8, 0, 205, 213, 3, 20, 10, 0, 206, 213, 3, 18, 9, 0, 207, 213, 3, 22, 11, 0, 208, 213, 3, 24, 12, 0, 209, 213, 3, 30, 15, 0, 210, 213, 3, 26, 13, 0, 211, 213, 3, 28, 14, 0, 212, 202, 1, 0, 0, 0, 212, 203, 1, 0, 0, 0, 212, 204, 1, 0, 0, 0, 212, 205, 1, 0, 0, 0, 212, 206, 1, 0, 0, 0, 212, 207, 1, 0, 0, 0, 212, 208, 1, 0, 0, 0, 212, 209, 1, 0, 0, 0, 212, 210, 1, 0, 0, 0, 212, 211, 1, 0, 0, 0, 213, 11, 1, 0, 0, 0, 214, 216, 5, 70, 0, 0, 215, 217, 3, 4, 2, 0, 216, 215, 1, 0, 0, 0, 216, 217, 1, 0, 0, 0, 217, 219, 1, 0, 0, 0, 218, 220, 5, 146, 0, 0, 219, 218, 1, 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 13, 1, 0, 0, 0, 221, 222, 5, 38, 0, 0, 222, 223, 5, 126, 0, 0, 223, 224, 3, 4, 2, 0, 224, 225, 5, 145, 0, 0, 225, 228, 3, 10, 5, 0, 226, 227, 5, 24, 0, 0, 227, 229, 3, 10, 5, 0, 228, 226, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 15, 1, 0, 0, 0, 230, 231, 5, 96, 0, 0, 231, 232, 5, 126, 0, 0, 232, 233, 3, 4, 2, 0, 233, 234, 5, 145, 0, 0, 234, 236, 3, 10, 5, 0, 235, 237, 5, 146, 0, 0, 236, 235, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, 237, 17, 1, 0, 0, 0, 238, 239, 5, 31, 0, 0, 239, 243, 5, 126, 0, 0, 240, 244, 3, 6, 3, 0, 241, 244, 3, 24, 12, 0, 242, 244, 3, 4, 2, 0, 243, 240, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 242, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 247, 5, 146, 0, 0, 246, 248, 3, 4, 2, 0, 247, 246, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 253, 5, 146, 0, 0, 250, 254, 3, 6, 3, 0, 251, 254, 3, 24, 12, 0, 252, 254, 3, 4, 2, 0, 253, 250, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 252, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 256, 5, 145, 0, 0, 256, 258, 3, 10, 5, 0, 257, 259, 5, 146, 0, 0, 258, 257, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 19, 1, 0, 0, 0, 260, 261, 5, 31, 0, 0, 261, 262, 5, 126, 0, 0, 262, 263, 5, 50, 0, 0, 263, 266, 3, 154, 77, 0, 264, 265, 5, 112, 0, 0, 265, 267, 3, 154, 77, 0, 266, 264, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 5, 40, 0, 0, 269, 270, 3, 4, 2, 0, 270, 271, 5, 145, 0, 0, 271, 273, 3, 10, 5, 0, 272, 274, 5, 146, 0, 0, 273, 272, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 21, 1, 0, 0, 0, 275, 276, 5, 29, 0, 0, 276, 277, 3, 154, 77, 0, 277, 279, 5, 126, 0, 0, 278, 280, 3, 8, 4, 0, 279, 278, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 282, 5, 145, 0, 0, 282, 283, 3, 30, 15, 0, 283, 23, 1, 0, 0, 0, 284, 285, 3, 4, 2, 0, 285, 286, 5, 111, 0, 0, 286, 287, 5, 118, 0, 0, 287, 288, 3, 4, 2, 0, 288, 25, 1, 0, 0, 0, 289, 291, 3, 4, 2, 0, 290, 292, 5, 146, 0, 0, 291, 290, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 27, 1, 0, 0, 0, 293, 294, 5, 146, 0, 0, 294, 29, 1, 0, 0, 0, 295, 299, 5, 124, 0, 0, 296, 298, 3, 2, 1, 0, 297, 296, 1, 0, 0, 0, 298, 301, 1, 0, 0, 0, 299, 297, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 302, 1, 0, 0, 0, 301, 299, 1, 0, 0, 0, 302, 303, 5, 143, 0, 0, 303, 31, 1, 0, 0, 0, 304, 305, 3, 4, 2, 0, 305, 306, 5, 111, 0, 0, 306, 307, 3, 4, 2, 0, 307, 33, 1, 0, 0, 0, 308, 313, 3, 32, 16, 0, 309, 310, 5, 112, 0, 0, 310, 312, 3, 32, 16, 0, 311, 309, 1, 0, 0, 0, 312, 315, 1, 0, 0, 0, 313, 311, 1, 0, 0, 0, 313, 314, 1, 0, 0, 0, 314, 317, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 316, 318, 5, 112, 0, 0, 317, 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 35, 1, 0, 0, 0, 319, 323, 3, 38, 19, 0, 320, 323, 3, 42, 21, 0, 321, 323, 3, 118, 59, 0, 322, 319, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 321, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 325, 5, 0, 0, 1, 325, 37, 1, 0, 0, 0, 326, 332, 3, 40, 20, 0, 327, 328, 5, 91, 0, 0, 328, 329, 5, 1, 0, 0, 329, 331, 3, 40, 20, 0, 330, 327, 1, 0, 0, 0, 331, 334, 1, 0, 0, 0, 332, 330, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 39, 1, 0, 0, 0, 334, 332, 1, 0, 0, 0, 335, 342, 3, 42, 21, 0, 336, 337, 5, 126, 0, 0, 337, 338, 3, 38, 19, 0, 338, 339, 5, 145, 0, 0, 339, 342, 1, 0, 0, 0, 340, 342, 3, 158, 79, 0, 341, 335, 1, 0, 0, 0, 341, 336, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, 342, 41, 1, 0, 0, 0, 343, 345, 3, 44, 22, 0, 344, 343, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 348, 5, 77, 0, 0, 347, 349, 5, 23, 0, 0, 348, 347, 1, 0, 0, 0, 348, 349, 1, 0, 0, 0, 349, 351, 1, 0, 0, 0, 350, 352, 3, 46, 23, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 355, 3, 108, 54, 0, 354, 356, 3, 48, 24, 0, 355, 354, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 358, 1, 0, 0, 0, 357, 359, 3, 50, 25, 0, 358, 357, 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 361, 1, 0, 0, 0, 360, 362, 3, 54, 27, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, 0, 363, 365, 3, 56, 28, 0, 364, 363, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 367, 1, 0, 0, 0, 366, 368, 3, 58, 29, 0, 367, 366, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 371, 1, 0, 0, 0, 369, 370, 5, 98, 0, 0, 370, 372, 7, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 375, 1, 0, 0, 0, 373, 374, 5, 98, 0, 0, 374, 376, 5, 86, 0, 0, 375, 373, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 378, 1, 0, 0, 0, 377, 379, 3, 60, 30, 0, 378, 377, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 381, 1, 0, 0, 0, 380, 382, 3, 52, 26, 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 384, 1, 0, 0, 0, 383, 385, 3, 62, 31, 0, 384, 383, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 388, 1, 0, 0, 0, 386, 389, 3, 66, 33, 0, 387, 389, 3, 68, 34, 0, 388, 386, 1, 0, 0, 0, 388, 387, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 391, 1, 0, 0, 0, 390, 392, 3, 70, 35, 0, 391, 390, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 43, 1, 0, 0, 0, 393, 394, 5, 98, 0, 0, 394, 395, 3, 122, 61, 0, 395, 45, 1, 0, 0, 0, 396, 397, 5, 85, 0, 0, 397, 400, 5, 104, 0, 0, 398, 399, 5, 98, 0, 0, 399, 401, 5, 82, 0, 0, 400, 398, 1, 0, 0, 0, 400, 401, 1, 0, 0, 0, 401, 47, 1, 0, 0, 0, 402, 403, 5, 32, 0, 0, 403, 404, 3, 72, 36, 0, 404, 49, 1, 0, 0, 0, 405, 407, 7, 1, 0, 0, 406, 405, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 409, 5, 5, 0, 0, 409, 410, 5, 45, 0, 0, 410, 411, 3, 108, 54, 0, 411, 51, 1, 0, 0, 0, 412, 413, 5, 97, 0, 0, 413, 414, 3, 154, 77, 0, 414, 415, 5, 6, 0, 0, 415, 416, 5, 126, 0, 0, 416, 417, 3, 92, 46, 0, 417, 427, 5, 145, 0, 0, 418, 419, 5, 112, 0, 0, 419, 420, 3, 154, 77, 0, 420, 421, 5, 6, 0, 0, 421, 422, 5, 126, 0, 0, 422, 423, 3, 92, 46, 0, 423, 424, 5, 145, 0, 0, 424, 426, 1, 0, 0, 0, 425, 418, 1, 0, 0, 0, 426, 429, 1, 0, 0, 0, 427, 425, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 53, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 430, 431, 5, 67, 0, 0, 431, 432, 3, 110, 55, 0, 432, 55, 1, 0, 0, 0, 433, 434, 5, 95, 0, 0, 434, 435, 3, 110, 55, 0, 435, 57, 1, 0, 0, 0, 436, 437, 5, 34, 0, 0, 437, 444, 5, 11, 0, 0, 438, 439, 7, 0, 0, 0, 439, 440, 5, 126, 0, 0, 440, 441, 3, 108, 54, 0, 441, 442, 5, 145, 0, 0, 442, 445, 1, 0, 0, 0, 443, 445, 3, 108, 54, 0, 444, 438, 1, 0, 0, 0, 444, 443, 1, 0, 0, 0, 445, 59, 1, 0, 0, 0, 446, 447, 5, 35, 0, 0, 447, 448, 3, 110, 55, 0, 448, 61, 1, 0, 0, 0, 449, 450, 5, 62, 0, 0, 450, 451, 5, 11, 0, 0, 451, 452, 3, 82, 41, 0, 452, 63, 1, 0, 0, 0, 453, 454, 5, 62, 0, 0, 454, 455, 5, 11, 0, 0, 455, 456, 3, 108, 54, 0, 456, 65, 1, 0, 0, 0, 457, 458, 5, 52, 0, 0, 458, 461, 3, 110, 55, 0, 459, 460, 5, 112, 0, 0, 460, 462, 3, 110, 55, 0, 461, 459, 1, 0, 0, 0, 461, 462, 1, 0, 0, 0, 462, 467, 1, 0, 0, 0, 463, 464, 5, 98, 0, 0, 464, 468, 5, 82, 0, 0, 465, 466, 5, 11, 0, 0, 466, 468, 3, 108, 54, 0, 467, 463, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 467, 468, 1, 0, 0, 0, 468, 487, 1, 0, 0, 0, 469, 470, 5, 52, 0, 0, 470, 473, 3, 110, 55, 0, 471, 472, 5, 98, 0, 0, 472, 474, 5, 82, 0, 0, 473, 471, 1, 0, 0, 0, 473, 474, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 476, 5, 59, 0, 0, 476, 477, 3, 110, 55, 0, 477, 487, 1, 0, 0, 0, 478, 479, 5, 52, 0, 0, 479, 480, 3, 110, 55, 0, 480, 481, 5, 59, 0, 0, 481, 484, 3, 110, 55, 0, 482, 483, 5, 11, 0, 0, 483, 485, 3, 108, 54, 0, 484, 482, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 487, 1, 0, 0, 0, 486, 457, 1, 0, 0, 0, 486, 469, 1, 0, 0, 0, 486, 478, 1, 0, 0, 0, 487, 67, 1, 0, 0, 0, 488, 489, 5, 59, 0, 0, 489, 490, 3, 110, 55, 0, 490, 69, 1, 0, 0, 0, 491, 492, 5, 79, 0, 0, 492, 493, 3, 88, 44, 0, 493, 71, 1, 0, 0, 0, 494, 495, 6, 36, -1, 0, 495, 497, 3, 130, 65, 0, 496, 498, 5, 27, 0, 0, 497, 496, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 500, 1, 0, 0, 0, 499, 501, 3, 80, 40, 0, 500, 499, 1, 0, 0, 0, 500, 501, 1, 0, 0, 0, 501, 507, 1, 0, 0, 0, 502, 503, 5, 126, 0, 0, 503, 504, 3, 72, 36, 0, 504, 505, 5, 145, 0, 0, 505, 507, 1, 0, 0, 0, 506, 494, 1, 0, 0, 0, 506, 502, 1, 0, 0, 0, 507, 522, 1, 0, 0, 0, 508, 509, 10, 3, 0, 0, 509, 510, 3, 76, 38, 0, 510, 511, 3, 72, 36, 4, 511, 521, 1, 0, 0, 0, 512, 514, 10, 4, 0, 0, 513, 515, 3, 74, 37, 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 1, 0, 0, 0, 516, 517, 5, 45, 0, 0, 517, 518, 3, 72, 36, 0, 518, 519, 3, 78, 39, 0, 519, 521, 1, 0, 0, 0, 520, 508, 1, 0, 0, 0, 520, 512, 1, 0, 0, 0, 521, 524, 1, 0, 0, 0, 522, 520, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 73, 1, 0, 0, 0, 524, 522, 1, 0, 0, 0, 525, 527, 7, 2, 0, 0, 526, 525, 1, 0, 0, 0, 526, 527, 1, 0, 0, 0, 527, 528, 1, 0, 0, 0, 528, 535, 5, 42, 0, 0, 529, 531, 5, 42, 0, 0, 530, 532, 7, 2, 0, 0, 531, 530, 1, 0, 0, 0, 531, 532, 1, 0, 0, 0, 532, 535, 1, 0, 0, 0, 533, 535, 7, 2, 0, 0, 534, 526, 1, 0, 0, 0, 534, 529, 1, 0, 0, 0, 534, 533, 1, 0, 0, 0, 535, 569, 1, 0, 0, 0, 536, 538, 7, 3, 0, 0, 537, 536, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 541, 7, 4, 0, 0, 540, 542, 5, 63, 0, 0, 541, 540, 1, 0, 0, 0, 541, 542, 1, 0, 0, 0, 542, 551, 1, 0, 0, 0, 543, 545, 7, 4, 0, 0, 544, 546, 5, 63, 0, 0, 545, 544, 1, 0, 0, 0, 545, 546, 1, 0, 0, 0, 546, 548, 1, 0, 0, 0, 547, 549, 7, 3, 0, 0, 548, 547, 1, 0, 0, 0, 548, 549, 1, 0, 0, 0, 549, 551, 1, 0, 0, 0, 550, 537, 1, 0, 0, 0, 550, 543, 1, 0, 0, 0, 551, 569, 1, 0, 0, 0, 552, 554, 7, 5, 0, 0, 553, 552, 1, 0, 0, 0, 553, 554, 1, 0, 0, 0, 554, 555, 1, 0, 0, 0, 555, 557, 5, 33, 0, 0, 556, 558, 5, 63, 0, 0, 557, 556, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 567, 1, 0, 0, 0, 559, 561, 5, 33, 0, 0, 560, 562, 5, 63, 0, 0, 561, 560, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 564, 1, 0, 0, 0, 563, 565, 7, 5, 0, 0, 564, 563, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, 565, 567, 1, 0, 0, 0, 566, 553, 1, 0, 0, 0, 566, 559, 1, 0, 0, 0, 567, 569, 1, 0, 0, 0, 568, 534, 1, 0, 0, 0, 568, 550, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 569, 75, 1, 0, 0, 0, 570, 571, 5, 16, 0, 0, 571, 574, 5, 45, 0, 0, 572, 574, 5, 112, 0, 0, 573, 570, 1, 0, 0, 0, 573, 572, 1, 0, 0, 0, 574, 77, 1, 0, 0, 0, 575, 576, 5, 60, 0, 0, 576, 585, 3, 108, 54, 0, 577, 578, 5, 92, 0, 0, 578, 579, 5, 126, 0, 0, 579, 580, 3, 108, 54, 0, 580, 581, 5, 145, 0, 0, 581, 585, 1, 0, 0, 0, 582, 583, 5, 92, 0, 0, 583, 585, 3, 108, 54, 0, 584, 575, 1, 0, 0, 0, 584, 577, 1, 0, 0, 0, 584, 582, 1, 0, 0, 0, 585, 79, 1, 0, 0, 0, 586, 587, 5, 75, 0, 0, 587, 590, 3, 86, 43, 0, 588, 589, 5, 59, 0, 0, 589, 591, 3, 86, 43, 0, 590, 588, 1, 0, 0, 0, 590, 591, 1, 0, 0, 0, 591, 81, 1, 0, 0, 0, 592, 597, 3, 84, 42, 0, 593, 594, 5, 112, 0, 0, 594, 596, 3, 84, 42, 0, 595, 593, 1, 0, 0, 0, 596, 599, 1, 0, 0, 0, 597, 595, 1, 0, 0, 0, 597, 598, 1, 0, 0, 0, 598, 83, 1, 0, 0, 0, 599, 597, 1, 0, 0, 0, 600, 602, 3, 110, 55, 0, 601, 603, 7, 6, 0, 0, 602, 601, 1, 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 606, 1, 0, 0, 0, 604, 605, 5, 58, 0, 0, 605, 607, 7, 7, 0, 0, 606, 604, 1, 0, 0, 0, 606, 607, 1, 0, 0, 0, 607, 610, 1, 0, 0, 0, 608, 609, 5, 15, 0, 0, 609, 611, 5, 106, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 85, 1, 0, 0, 0, 612, 619, 3, 158, 79, 0, 613, 616, 3, 142, 71, 0, 614, 615, 5, 147, 0, 0, 615, 617, 3, 142, 71, 0, 616, 614, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 619, 1, 0, 0, 0, 618, 612, 1, 0, 0, 0, 618, 613, 1, 0, 0, 0, 619, 87, 1, 0, 0, 0, 620, 625, 3, 90, 45, 0, 621, 622, 5, 112, 0, 0, 622, 624, 3, 90, 45, 0, 623, 621, 1, 0, 0, 0, 624, 627, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 89, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 628, 629, 3, 154, 77, 0, 629, 630, 5, 118, 0, 0, 630, 631, 3, 144, 72, 0, 631, 91, 1, 0, 0, 0, 632, 634, 3, 94, 47, 0, 633, 632, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 636, 1, 0, 0, 0, 635, 637, 3, 96, 48, 0, 636, 635, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 639, 1, 0, 0, 0, 638, 640, 3, 98, 49, 0, 639, 638, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 93, 1, 0, 0, 0, 641, 642, 5, 65, 0, 0, 642, 643, 5, 11, 0, 0, 643, 644, 3, 108, 54, 0, 644, 95, 1, 0, 0, 0, 645, 646, 5, 62, 0, 0, 646, 647, 5, 11, 0, 0, 647, 648, 3, 82, 41, 0, 648, 97, 1, 0, 0, 0, 649, 650, 7, 8, 0, 0, 650, 651, 3, 100, 50, 0, 651, 99, 1, 0, 0, 0, 652, 659, 3, 102, 51, 0, 653, 654, 5, 9, 0, 0, 654, 655, 3, 102, 51, 0, 655, 656, 5, 2, 0, 0, 656, 657, 3, 102, 51, 0, 657, 659, 1, 0, 0, 0, 658, 652, 1, 0, 0, 0, 658, 653, 1, 0, 0, 0, 659, 101, 1, 0, 0, 0, 660, 661, 5, 18, 0, 0, 661, 673, 5, 73, 0, 0, 662, 663, 5, 90, 0, 0, 663, 673, 5, 66, 0, 0, 664, 665, 5, 90, 0, 0, 665, 673, 5, 30, 0, 0, 666, 667, 3, 142, 71, 0, 667, 668, 5, 66, 0, 0, 668, 673, 1, 0, 0, 0, 669, 670, 3, 142, 71, 0, 670, 671, 5, 30, 0, 0, 671, 673, 1, 0, 0, 0, 672, 660, 1, 0, 0, 0, 672, 662, 1, 0, 0, 0, 672, 664, 1, 0, 0, 0, 672, 666, 1, 0, 0, 0, 672, 669, 1, 0, 0, 0, 673, 103, 1, 0, 0, 0, 674, 675, 3, 110, 55, 0, 675, 676, 5, 0, 0, 1, 676, 105, 1, 0, 0, 0, 677, 734, 3, 154, 77, 0, 678, 679, 3, 154, 77, 0, 679, 680, 5, 126, 0, 0, 680, 681, 3, 154, 77, 0, 681, 688, 3, 106, 53, 0, 682, 683, 5, 112, 0, 0, 683, 684, 3, 154, 77, 0, 684, 685, 3, 106, 53, 0, 685, 687, 1, 0, 0, 0, 686, 682, 1, 0, 0, 0, 687, 690, 1, 0, 0, 0, 688, 686, 1, 0, 0, 0, 688, 689, 1, 0, 0, 0, 689, 692, 1, 0, 0, 0, 690, 688, 1, 0, 0, 0, 691, 693, 5, 112, 0, 0, 692, 691, 1, 0, 0, 0, 692, 693, 1, 0, 0, 0, 693, 694, 1, 0, 0, 0, 694, 695, 5, 145, 0, 0, 695, 734, 1, 0, 0, 0, 696, 697, 3, 154, 77, 0, 697, 698, 5, 126, 0, 0, 698, 703, 3, 156, 78, 0, 699, 700, 5, 112, 0, 0, 700, 702, 3, 156, 78, 0, 701, 699, 1, 0, 0, 0, 702, 705, 1, 0, 0, 0, 703, 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 707, 1, 0, 0, 0, 705, 703, 1, 0, 0, 0, 706, 708, 5, 112, 0, 0, 707, 706, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 5, 145, 0, 0, 710, 734, 1, 0, 0, 0, 711, 712, 3, 154, 77, 0, 712, 713, 5, 126, 0, 0, 713, 718, 3, 106, 53, 0, 714, 715, 5, 112, 0, 0, 715, 717, 3, 106, 53, 0, 716, 714, 1, 0, 0, 0, 717, 720, 1, 0, 0, 0, 718, 716, 1, 0, 0, 0, 718, 719, 1, 0, 0, 0, 719, 722, 1, 0, 0, 0, 720, 718, 1, 0, 0, 0, 721, 723, 5, 112, 0, 0, 722, 721, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 724, 1, 0, 0, 0, 724, 725, 5, 145, 0, 0, 725, 734, 1, 0, 0, 0, 726, 727, 3, 154, 77, 0, 727, 729, 5, 126, 0, 0, 728, 730, 3, 108, 54, 0, 729, 728, 1, 0, 0, 0, 729, 730, 1, 0, 0, 0, 730, 731, 1, 0, 0, 0, 731, 732, 5, 145, 0, 0, 732, 734, 1, 0, 0, 0, 733, 677, 1, 0, 0, 0, 733, 678, 1, 0, 0, 0, 733, 696, 1, 0, 0, 0, 733, 711, 1, 0, 0, 0, 733, 726, 1, 0, 0, 0, 734, 107, 1, 0, 0, 0, 735, 740, 3, 110, 55, 0, 736, 737, 5, 112, 0, 0, 737, 739, 3, 110, 55, 0, 738, 736, 1, 0, 0, 0, 739, 742, 1, 0, 0, 0, 740, 738, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 744, 1, 0, 0, 0, 742, 740, 1, 0, 0, 0, 743, 745, 5, 112, 0, 0, 744, 743, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 109, 1, 0, 0, 0, 746, 747, 6, 55, -1, 0, 747, 749, 5, 12, 0, 0, 748, 750, 3, 110, 55, 0, 749, 748, 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 750, 756, 1, 0, 0, 0, 751, 752, 5, 94, 0, 0, 752, 753, 3, 110, 55, 0, 753, 754, 5, 81, 0, 0, 754, 755, 3, 110, 55, 0, 755, 757, 1, 0, 0, 0, 756, 751, 1, 0, 0, 0, 757, 758, 1, 0, 0, 0, 758, 756, 1, 0, 0, 0, 758, 759, 1, 0, 0, 0, 759, 762, 1, 0, 0, 0, 760, 761, 5, 24, 0, 0, 761, 763, 3, 110, 55, 0, 762, 760, 1, 0, 0, 0, 762, 763, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 765, 5, 25, 0, 0, 765, 896, 1, 0, 0, 0, 766, 767, 5, 13, 0, 0, 767, 768, 5, 126, 0, 0, 768, 769, 3, 110, 55, 0, 769, 770, 5, 6, 0, 0, 770, 771, 3, 106, 53, 0, 771, 772, 5, 145, 0, 0, 772, 896, 1, 0, 0, 0, 773, 774, 5, 19, 0, 0, 774, 896, 5, 106, 0, 0, 775, 776, 5, 43, 0, 0, 776, 777, 3, 110, 55, 0, 777, 778, 3, 146, 73, 0, 778, 896, 1, 0, 0, 0, 779, 780, 5, 80, 0, 0, 780, 781, 5, 126, 0, 0, 781, 782, 3, 110, 55, 0, 782, 783, 5, 32, 0, 0, 783, 786, 3, 110, 55, 0, 784, 785, 5, 31, 0, 0, 785, 787, 3, 110, 55, 0, 786, 784, 1, 0, 0, 0, 786, 787, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 789, 5, 145, 0, 0, 789, 896, 1, 0, 0, 0, 790, 791, 5, 83, 0, 0, 791, 896, 5, 106, 0, 0, 792, 793, 5, 88, 0, 0, 793, 794, 5, 126, 0, 0, 794, 795, 7, 9, 0, 0, 795, 796, 3, 160, 80, 0, 796, 797, 5, 32, 0, 0, 797, 798, 3, 110, 55, 0, 798, 799, 5, 145, 0, 0, 799, 896, 1, 0, 0, 0, 800, 801, 3, 154, 77, 0, 801, 803, 5, 126, 0, 0, 802, 804, 3, 108, 54, 0, 803, 802, 1, 0, 0, 0, 803, 804, 1, 0, 0, 0, 804, 805, 1, 0, 0, 0, 805, 806, 5, 145, 0, 0, 806, 815, 1, 0, 0, 0, 807, 809, 5, 126, 0, 0, 808, 810, 5, 23, 0, 0, 809, 808, 1, 0, 0, 0, 809, 810, 1, 0, 0, 0, 810, 812, 1, 0, 0, 0, 811, 813, 3, 112, 56, 0, 812, 811, 1, 0, 0, 0, 812, 813, 1, 0, 0, 0, 813, 814, 1, 0, 0, 0, 814, 816, 5, 145, 0, 0, 815, 807, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 818, 5, 64, 0, 0, 818, 819, 5, 126, 0, 0, 819, 820, 3, 92, 46, 0, 820, 821, 5, 145, 0, 0, 821, 896, 1, 0, 0, 0, 822, 823, 3, 154, 77, 0, 823, 825, 5, 126, 0, 0, 824, 826, 3, 108, 54, 0, 825, 824, 1, 0, 0, 0, 825, 826, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 828, 5, 145, 0, 0, 828, 837, 1, 0, 0, 0, 829, 831, 5, 126, 0, 0, 830, 832, 5, 23, 0, 0, 831, 830, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 834, 1, 0, 0, 0, 833, 835, 3, 112, 56, 0, 834, 833, 1, 0, 0, 0, 834, 835, 1, 0, 0, 0, 835, 836, 1, 0, 0, 0, 836, 838, 5, 145, 0, 0, 837, 829, 1, 0, 0, 0, 837, 838, 1, 0, 0, 0, 838, 839, 1, 0, 0, 0, 839, 840, 5, 64, 0, 0, 840, 841, 3, 154, 77, 0, 841, 896, 1, 0, 0, 0, 842, 848, 3, 154, 77, 0, 843, 845, 5, 126, 0, 0, 844, 846, 3, 108, 54, 0, 845, 844, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 847, 1, 0, 0, 0, 847, 849, 5, 145, 0, 0, 848, 843, 1, 0, 0, 0, 848, 849, 1, 0, 0, 0, 849, 850, 1, 0, 0, 0, 850, 852, 5, 126, 0, 0, 851, 853, 5, 23, 0, 0, 852, 851, 1, 0, 0, 0, 852, 853, 1, 0, 0, 0, 853, 855, 1, 0, 0, 0, 854, 856, 3, 112, 56, 0, 855, 854, 1, 0, 0, 0, 855, 856, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 858, 5, 145, 0, 0, 858, 896, 1, 0, 0, 0, 859, 896, 3, 118, 59, 0, 860, 896, 3, 162, 81, 0, 861, 896, 3, 144, 72, 0, 862, 863, 5, 114, 0, 0, 863, 896, 3, 110, 55, 19, 864, 865, 5, 56, 0, 0, 865, 896, 3, 110, 55, 13, 866, 867, 3, 134, 67, 0, 867, 868, 5, 116, 0, 0, 868, 870, 1, 0, 0, 0, 869, 866, 1, 0, 0, 0, 869, 870, 1, 0, 0, 0, 870, 871, 1, 0, 0, 0, 871, 896, 5, 108, 0, 0, 872, 873, 5, 126, 0, 0, 873, 874, 3, 38, 19, 0, 874, 875, 5, 145, 0, 0, 875, 896, 1, 0, 0, 0, 876, 877, 5, 126, 0, 0, 877, 878, 3, 110, 55, 0, 878, 879, 5, 145, 0, 0, 879, 896, 1, 0, 0, 0, 880, 881, 5, 126, 0, 0, 881, 882, 3, 108, 54, 0, 882, 883, 5, 145, 0, 0, 883, 896, 1, 0, 0, 0, 884, 886, 5, 125, 0, 0, 885, 887, 3, 108, 54, 0, 886, 885, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 888, 1, 0, 0, 0, 888, 896, 5, 144, 0, 0, 889, 891, 5, 124, 0, 0, 890, 892, 3, 34, 17, 0, 891, 890, 1, 0, 0, 0, 891, 892, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 896, 5, 143, 0, 0, 894, 896, 3, 126, 63, 0, 895, 746, 1, 0, 0, 0, 895, 766, 1, 0, 0, 0, 895, 773, 1, 0, 0, 0, 895, 775, 1, 0, 0, 0, 895, 779, 1, 0, 0, 0, 895, 790, 1, 0, 0, 0, 895, 792, 1, 0, 0, 0, 895, 800, 1, 0, 0, 0, 895, 822, 1, 0, 0, 0, 895, 842, 1, 0, 0, 0, 895, 859, 1, 0, 0, 0, 895, 860, 1, 0, 0, 0, 895, 861, 1, 0, 0, 0, 895, 862, 1, 0, 0, 0, 895, 864, 1, 0, 0, 0, 895, 869, 1, 0, 0, 0, 895, 872, 1, 0, 0, 0, 895, 876, 1, 0, 0, 0, 895, 880, 1, 0, 0, 0, 895, 884, 1, 0, 0, 0, 895, 889, 1, 0, 0, 0, 895, 894, 1, 0, 0, 0, 896, 1001, 1, 0, 0, 0, 897, 901, 10, 18, 0, 0, 898, 902, 5, 108, 0, 0, 899, 902, 5, 147, 0, 0, 900, 902, 5, 134, 0, 0, 901, 898, 1, 0, 0, 0, 901, 899, 1, 0, 0, 0, 901, 900, 1, 0, 0, 0, 902, 903, 1, 0, 0, 0, 903, 1000, 3, 110, 55, 19, 904, 908, 10, 17, 0, 0, 905, 909, 5, 135, 0, 0, 906, 909, 5, 114, 0, 0, 907, 909, 5, 113, 0, 0, 908, 905, 1, 0, 0, 0, 908, 906, 1, 0, 0, 0, 908, 907, 1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 1000, 3, 110, 55, 18, 911, 936, 10, 16, 0, 0, 912, 937, 5, 117, 0, 0, 913, 937, 5, 118, 0, 0, 914, 937, 5, 129, 0, 0, 915, 937, 5, 127, 0, 0, 916, 937, 5, 128, 0, 0, 917, 937, 5, 119, 0, 0, 918, 937, 5, 120, 0, 0, 919, 921, 5, 56, 0, 0, 920, 919, 1, 0, 0, 0, 920, 921, 1, 0, 0, 0, 921, 922, 1, 0, 0, 0, 922, 924, 5, 40, 0, 0, 923, 925, 5, 14, 0, 0, 924, 923, 1, 0, 0, 0, 924, 925, 1, 0, 0, 0, 925, 937, 1, 0, 0, 0, 926, 928, 5, 56, 0, 0, 927, 926, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 937, 7, 10, 0, 0, 930, 937, 5, 141, 0, 0, 931, 937, 5, 142, 0, 0, 932, 937, 5, 131, 0, 0, 933, 937, 5, 122, 0, 0, 934, 937, 5, 123, 0, 0, 935, 937, 5, 130, 0, 0, 936, 912, 1, 0, 0, 0, 936, 913, 1, 0, 0, 0, 936, 914, 1, 0, 0, 0, 936, 915, 1, 0, 0, 0, 936, 916, 1, 0, 0, 0, 936, 917, 1, 0, 0, 0, 936, 918, 1, 0, 0, 0, 936, 920, 1, 0, 0, 0, 936, 927, 1, 0, 0, 0, 936, 930, 1, 0, 0, 0, 936, 931, 1, 0, 0, 0, 936, 932, 1, 0, 0, 0, 936, 933, 1, 0, 0, 0, 936, 934, 1, 0, 0, 0, 936, 935, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 1000, 3, 110, 55, 17, 939, 940, 10, 14, 0, 0, 940, 941, 5, 133, 0, 0, 941, 1000, 3, 110, 55, 15, 942, 943, 10, 12, 0, 0, 943, 944, 5, 2, 0, 0, 944, 1000, 3, 110, 55, 13, 945, 946, 10, 11, 0, 0, 946, 947, 5, 61, 0, 0, 947, 1000, 3, 110, 55, 12, 948, 950, 10, 10, 0, 0, 949, 951, 5, 56, 0, 0, 950, 949, 1, 0, 0, 0, 950, 951, 1, 0, 0, 0, 951, 952, 1, 0, 0, 0, 952, 953, 5, 9, 0, 0, 953, 954, 3, 110, 55, 0, 954, 955, 5, 2, 0, 0, 955, 956, 3, 110, 55, 11, 956, 1000, 1, 0, 0, 0, 957, 958, 10, 9, 0, 0, 958, 959, 5, 136, 0, 0, 959, 960, 3, 110, 55, 0, 960, 961, 5, 111, 0, 0, 961, 962, 3, 110, 55, 9, 962, 1000, 1, 0, 0, 0, 963, 964, 10, 25, 0, 0, 964, 965, 5, 125, 0, 0, 965, 966, 3, 110, 55, 0, 966, 967, 5, 144, 0, 0, 967, 1000, 1, 0, 0, 0, 968, 969, 10, 24, 0, 0, 969, 970, 5, 116, 0, 0, 970, 1000, 5, 104, 0, 0, 971, 972, 10, 23, 0, 0, 972, 973, 5, 116, 0, 0, 973, 1000, 3, 154, 77, 0, 974, 975, 10, 22, 0, 0, 975, 976, 5, 132, 0, 0, 976, 977, 5, 125, 0, 0, 977, 978, 3, 110, 55, 0, 978, 979, 5, 144, 0, 0, 979, 1000, 1, 0, 0, 0, 980, 981, 10, 21, 0, 0, 981, 982, 5, 132, 0, 0, 982, 1000, 5, 104, 0, 0, 983, 984, 10, 20, 0, 0, 984, 985, 5, 132, 0, 0, 985, 1000, 3, 154, 77, 0, 986, 987, 10, 15, 0, 0, 987, 989, 5, 44, 0, 0, 988, 990, 5, 56, 0, 0, 989, 988, 1, 0, 0, 0, 989, 990, 1, 0, 0, 0, 990, 991, 1, 0, 0, 0, 991, 1000, 5, 57, 0, 0, 992, 997, 10, 8, 0, 0, 993, 994, 5, 6, 0, 0, 994, 998, 3, 154, 77, 0, 995, 996, 5, 6, 0, 0, 996, 998, 5, 106, 0, 0, 997, 993, 1, 0, 0, 0, 997, 995, 1, 0, 0, 0, 998, 1000, 1, 0, 0, 0, 999, 897, 1, 0, 0, 0, 999, 904, 1, 0, 0, 0, 999, 911, 1, 0, 0, 0, 999, 939, 1, 0, 0, 0, 999, 942, 1, 0, 0, 0, 999, 945, 1, 0, 0, 0, 999, 948, 1, 0, 0, 0, 999, 957, 1, 0, 0, 0, 999, 963, 1, 0, 0, 0, 999, 968, 1, 0, 0, 0, 999, 971, 1, 0, 0, 0, 999, 974, 1, 0, 0, 0, 999, 980, 1, 0, 0, 0, 999, 983, 1, 0, 0, 0, 999, 986, 1, 0, 0, 0, 999, 992, 1, 0, 0, 0, 1000, 1003, 1, 0, 0, 0, 1001, 999, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 111, 1, 0, 0, 0, 1003, 1001, 1, 0, 0, 0, 1004, 1009, 3, 114, 57, 0, 1005, 1006, 5, 112, 0, 0, 1006, 1008, 3, 114, 57, 0, 1007, 1005, 1, 0, 0, 0, 1008, 1011, 1, 0, 0, 0, 1009, 1007, 1, 0, 0, 0, 1009, 1010, 1, 0, 0, 0, 1010, 1013, 1, 0, 0, 0, 1011, 1009, 1, 0, 0, 0, 1012, 1014, 5, 112, 0, 0, 1013, 1012, 1, 0, 0, 0, 1013, 1014, 1, 0, 0, 0, 1014, 113, 1, 0, 0, 0, 1015, 1018, 3, 116, 58, 0, 1016, 1018, 3, 110, 55, 0, 1017, 1015, 1, 0, 0, 0, 1017, 1016, 1, 0, 0, 0, 1018, 115, 1, 0, 0, 0, 1019, 1020, 5, 126, 0, 0, 1020, 1025, 3, 154, 77, 0, 1021, 1022, 5, 112, 0, 0, 1022, 1024, 3, 154, 77, 0, 1023, 1021, 1, 0, 0, 0, 1024, 1027, 1, 0, 0, 0, 1025, 1023, 1, 0, 0, 0, 1025, 1026, 1, 0, 0, 0, 1026, 1029, 1, 0, 0, 0, 1027, 1025, 1, 0, 0, 0, 1028, 1030, 5, 112, 0, 0, 1029, 1028, 1, 0, 0, 0, 1029, 1030, 1, 0, 0, 0, 1030, 1031, 1, 0, 0, 0, 1031, 1032, 5, 145, 0, 0, 1032, 1045, 1, 0, 0, 0, 1033, 1038, 3, 154, 77, 0, 1034, 1035, 5, 112, 0, 0, 1035, 1037, 3, 154, 77, 0, 1036, 1034, 1, 0, 0, 0, 1037, 1040, 1, 0, 0, 0, 1038, 1036, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1042, 1, 0, 0, 0, 1040, 1038, 1, 0, 0, 0, 1041, 1043, 5, 112, 0, 0, 1042, 1041, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1045, 1, 0, 0, 0, 1044, 1019, 1, 0, 0, 0, 1044, 1033, 1, 0, 0, 0, 1045, 1046, 1, 0, 0, 0, 1046, 1047, 5, 107, 0, 0, 1047, 1048, 3, 110, 55, 0, 1048, 117, 1, 0, 0, 0, 1049, 1050, 5, 128, 0, 0, 1050, 1054, 3, 154, 77, 0, 1051, 1053, 3, 120, 60, 0, 1052, 1051, 1, 0, 0, 0, 1053, 1056, 1, 0, 0, 0, 1054, 1052, 1, 0, 0, 0, 1054, 1055, 1, 0, 0, 0, 1055, 1057, 1, 0, 0, 0, 1056, 1054, 1, 0, 0, 0, 1057, 1058, 5, 147, 0, 0, 1058, 1059, 5, 120, 0, 0, 1059, 1078, 1, 0, 0, 0, 1060, 1061, 5, 128, 0, 0, 1061, 1065, 3, 154, 77, 0, 1062, 1064, 3, 120, 60, 0, 1063, 1062, 1, 0, 0, 0, 1064, 1067, 1, 0, 0, 0, 1065, 1063, 1, 0, 0, 0, 1065, 1066, 1, 0, 0, 0, 1066, 1068, 1, 0, 0, 0, 1067, 1065, 1, 0, 0, 0, 1068, 1070, 5, 120, 0, 0, 1069, 1071, 3, 118, 59, 0, 1070, 1069, 1, 0, 0, 0, 1070, 1071, 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1073, 5, 128, 0, 0, 1073, 1074, 5, 147, 0, 0, 1074, 1075, 3, 154, 77, 0, 1075, 1076, 5, 120, 0, 0, 1076, 1078, 1, 0, 0, 0, 1077, 1049, 1, 0, 0, 0, 1077, 1060, 1, 0, 0, 0, 1078, 119, 1, 0, 0, 0, 1079, 1080, 3, 154, 77, 0, 1080, 1081, 5, 118, 0, 0, 1081, 1082, 3, 160, 80, 0, 1082, 1091, 1, 0, 0, 0, 1083, 1084, 3, 154, 77, 0, 1084, 1085, 5, 118, 0, 0, 1085, 1086, 5, 124, 0, 0, 1086, 1087, 3, 110, 55, 0, 1087, 1088, 5, 143, 0, 0, 1088, 1091, 1, 0, 0, 0, 1089, 1091, 3, 154, 77, 0, 1090, 1079, 1, 0, 0, 0, 1090, 1083, 1, 0, 0, 0, 1090, 1089, 1, 0, 0, 0, 1091, 121, 1, 0, 0, 0, 1092, 1097, 3, 124, 62, 0, 1093, 1094, 5, 112, 0, 0, 1094, 1096, 3, 124, 62, 0, 1095, 1093, 1, 0, 0, 0, 1096, 1099, 1, 0, 0, 0, 1097, 1095, 1, 0, 0, 0, 1097, 1098, 1, 0, 0, 0, 1098, 1101, 1, 0, 0, 0, 1099, 1097, 1, 0, 0, 0, 1100, 1102, 5, 112, 0, 0, 1101, 1100, 1, 0, 0, 0, 1101, 1102, 1, 0, 0, 0, 1102, 123, 1, 0, 0, 0, 1103, 1104, 3, 154, 77, 0, 1104, 1105, 5, 6, 0, 0, 1105, 1106, 5, 126, 0, 0, 1106, 1107, 3, 38, 19, 0, 1107, 1108, 5, 145, 0, 0, 1108, 1114, 1, 0, 0, 0, 1109, 1110, 3, 110, 55, 0, 1110, 1111, 5, 6, 0, 0, 1111, 1112, 3, 154, 77, 0, 1112, 1114, 1, 0, 0, 0, 1113, 1103, 1, 0, 0, 0, 1113, 1109, 1, 0, 0, 0, 1114, 125, 1, 0, 0, 0, 1115, 1123, 3, 158, 79, 0, 1116, 1117, 3, 134, 67, 0, 1117, 1118, 5, 116, 0, 0, 1118, 1120, 1, 0, 0, 0, 1119, 1116, 1, 0, 0, 0, 1119, 1120, 1, 0, 0, 0, 1120, 1121, 1, 0, 0, 0, 1121, 1123, 3, 128, 64, 0, 1122, 1115, 1, 0, 0, 0, 1122, 1119, 1, 0, 0, 0, 1123, 127, 1, 0, 0, 0, 1124, 1129, 3, 154, 77, 0, 1125, 1126, 5, 116, 0, 0, 1126, 1128, 3, 154, 77, 0, 1127, 1125, 1, 0, 0, 0, 1128, 1131, 1, 0, 0, 0, 1129, 1127, 1, 0, 0, 0, 1129, 1130, 1, 0, 0, 0, 1130, 129, 1, 0, 0, 0, 1131, 1129, 1, 0, 0, 0, 1132, 1133, 6, 65, -1, 0, 1133, 1142, 3, 134, 67, 0, 1134, 1142, 3, 132, 66, 0, 1135, 1136, 5, 126, 0, 0, 1136, 1137, 3, 38, 19, 0, 1137, 1138, 5, 145, 0, 0, 1138, 1142, 1, 0, 0, 0, 1139, 1142, 3, 118, 59, 0, 1140, 1142, 3, 158, 79, 0, 1141, 1132, 1, 0, 0, 0, 1141, 1134, 1, 0, 0, 0, 1141, 1135, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1141, 1140, 1, 0, 0, 0, 1142, 1151, 1, 0, 0, 0, 1143, 1147, 10, 3, 0, 0, 1144, 1148, 3, 152, 76, 0, 1145, 1146, 5, 6, 0, 0, 1146, 1148, 3, 154, 77, 0, 1147, 1144, 1, 0, 0, 0, 1147, 1145, 1, 0, 0, 0, 1148, 1150, 1, 0, 0, 0, 1149, 1143, 1, 0, 0, 0, 1150, 1153, 1, 0, 0, 0, 1151, 1149, 1, 0, 0, 0, 1151, 1152, 1, 0, 0, 0, 1152, 131, 1, 0, 0, 0, 1153, 1151, 1, 0, 0, 0, 1154, 1155, 3, 154, 77, 0, 1155, 1157, 5, 126, 0, 0, 1156, 1158, 3, 136, 68, 0, 1157, 1156, 1, 0, 0, 0, 1157, 1158, 1, 0, 0, 0, 1158, 1159, 1, 0, 0, 0, 1159, 1160, 5, 145, 0, 0, 1160, 133, 1, 0, 0, 0, 1161, 1162, 3, 138, 69, 0, 1162, 1163, 5, 116, 0, 0, 1163, 1165, 1, 0, 0, 0, 1164, 1161, 1, 0, 0, 0, 1164, 1165, 1, 0, 0, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1167, 3, 154, 77, 0, 1167, 135, 1, 0, 0, 0, 1168, 1173, 3, 110, 55, 0, 1169, 1170, 5, 112, 0, 0, 1170, 1172, 3, 110, 55, 0, 1171, 1169, 1, 0, 0, 0, 1172, 1175, 1, 0, 0, 0, 1173, 1171, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1177, 1, 0, 0, 0, 1175, 1173, 1, 0, 0, 0, 1176, 1178, 5, 112, 0, 0, 1177, 1176, 1, 0, 0, 0, 1177, 1178, 1, 0, 0, 0, 1178, 137, 1, 0, 0, 0, 1179, 1180, 3, 154, 77, 0, 1180, 139, 1, 0, 0, 0, 1181, 1190, 5, 102, 0, 0, 1182, 1183, 5, 116, 0, 0, 1183, 1190, 7, 11, 0, 0, 1184, 1185, 5, 104, 0, 0, 1185, 1187, 5, 116, 0, 0, 1186, 1188, 7, 11, 0, 0, 1187, 1186, 1, 0, 0, 0, 1187, 1188, 1, 0, 0, 0, 1188, 1190, 1, 0, 0, 0, 1189, 1181, 1, 0, 0, 0, 1189, 1182, 1, 0, 0, 0, 1189, 1184, 1, 0, 0, 0, 1190, 141, 1, 0, 0, 0, 1191, 1193, 7, 12, 0, 0, 1192, 1191, 1, 0, 0, 0, 1192, 1193, 1, 0, 0, 0, 1193, 1200, 1, 0, 0, 0, 1194, 1201, 3, 140, 70, 0, 1195, 1201, 5, 103, 0, 0, 1196, 1201, 5, 104, 0, 0, 1197, 1201, 5, 105, 0, 0, 1198, 1201, 5, 41, 0, 0, 1199, 1201, 5, 55, 0, 0, 1200, 1194, 1, 0, 0, 0, 1200, 1195, 1, 0, 0, 0, 1200, 1196, 1, 0, 0, 0, 1200, 1197, 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1199, 1, 0, 0, 0, 1201, 143, 1, 0, 0, 0, 1202, 1206, 3, 142, 71, 0, 1203, 1206, 5, 106, 0, 0, 1204, 1206, 5, 57, 0, 0, 1205, 1202, 1, 0, 0, 0, 1205, 1203, 1, 0, 0, 0, 1205, 1204, 1, 0, 0, 0, 1206, 145, 1, 0, 0, 0, 1207, 1208, 7, 13, 0, 0, 1208, 147, 1, 0, 0, 0, 1209, 1210, 7, 14, 0, 0, 1210, 149, 1, 0, 0, 0, 1211, 1212, 7, 15, 0, 0, 1212, 151, 1, 0, 0, 0, 1213, 1216, 5, 101, 0, 0, 1214, 1216, 3, 150, 75, 0, 1215, 1213, 1, 0, 0, 0, 1215, 1214, 1, 0, 0, 0, 1216, 153, 1, 0, 0, 0, 1217, 1221, 5, 101, 0, 0, 1218, 1221, 3, 146, 73, 0, 1219, 1221, 3, 148, 74, 0, 1220, 1217, 1, 0, 0, 0, 1220, 1218, 1, 0, 0, 0, 1220, 1219, 1, 0, 0, 0, 1221, 155, 1, 0, 0, 0, 1222, 1223, 3, 160, 80, 0, 1223, 1224, 5, 118, 0, 0, 1224, 1225, 3, 142, 71, 0, 1225, 157, 1, 0, 0, 0, 1226, 1227, 5, 124, 0, 0, 1227, 1228, 3, 154, 77, 0, 1228, 1229, 5, 143, 0, 0, 1229, 159, 1, 0, 0, 0, 1230, 1233, 5, 106, 0, 0, 1231, 1233, 3, 162, 81, 0, 1232, 1230, 1, 0, 0, 0, 1232, 1231, 1, 0, 0, 0, 1233, 161, 1, 0, 0, 0, 1234, 1238, 5, 138, 0, 0, 1235, 1237, 3, 164, 82, 0, 1236, 1235, 1, 0, 0, 0, 1237, 1240, 1, 0, 0, 0, 1238, 1236, 1, 0, 0, 0, 1238, 1239, 1, 0, 0, 0, 1239, 1241, 1, 0, 0, 0, 1240, 1238, 1, 0, 0, 0, 1241, 1242, 5, 140, 0, 0, 1242, 163, 1, 0, 0, 0, 1243, 1244, 5, 153, 0, 0, 1244, 1245, 3, 110, 55, 0, 1245, 1246, 5, 143, 0, 0, 1246, 1249, 1, 0, 0, 0, 1247, 1249, 5, 152, 0, 0, 1248, 1243, 1, 0, 0, 0, 1248, 1247, 1, 0, 0, 0, 1249, 165, 1, 0, 0, 0, 1250, 1254, 5, 139, 0, 0, 1251, 1253, 3, 168, 84, 0, 1252, 1251, 1, 0, 0, 0, 1253, 1256, 1, 0, 0, 0, 1254, 1252, 1, 0, 0, 0, 1254, 1255, 1, 0, 0, 0, 1255, 1257, 1, 0, 0, 0, 1256, 1254, 1, 0, 0, 0, 1257, 1258, 5, 0, 0, 1, 1258, 167, 1, 0, 0, 0, 1259, 1260, 5, 155, 0, 0, 1260, 1261, 3, 110, 55, 0, 1261, 1262, 5, 143, 0, 0, 1262, 1265, 1, 0, 0, 0, 1263, 1265, 5, 154, 0, 0, 1264, 1259, 1, 0, 0, 0, 1264, 1263, 1, 0, 0, 0, 1265, 169, 1, 0, 0, 0, 162, 173, 180, 189, 196, 200, 212, 216, 219, 228, 236, 243, 247, 253, 258, 266, 273, 279, 291, 299, 313, 317, 322, 332, 341, 344, 348, 351, 355, 358, 361, 364, 367, 371, 375, 378, 381, 384, 388, 391, 400, 406, 427, 444, 461, 467, 473, 484, 486, 497, 500, 506, 514, 520, 522, 526, 531, 534, 537, 541, 545, 548, 550, 553, 557, 561, 564, 566, 568, 573, 584, 590, 597, 602, 606, 610, 616, 618, 625, 633, 636, 639, 658, 672, 688, 692, 703, 707, 718, 722, 729, 733, 740, 744, 749, 758, 762, 786, 803, 809, 812, 815, 825, 831, 834, 837, 845, 848, 852, 855, 869, 886, 891, 895, 901, 908, 920, 924, 927, 936, 950, 989, 997, 999, 1001, 1009, 1013, 1017, 1025, 1029, 1038, 1042, 1044, 1054, 1065, 1070, 1077, 1090, 1097, 1101, 1113, 1119, 1122, 1129, 1141, 1147, 1151, 1157, 1164, 1173, 1177, 1187, 1189, 1192, 1200, 1205, 1215, 1220, 1232, 1238, 1248, 1254, 1264] \ No newline at end of file +[4, 1, 159, 1311, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 1, 0, 5, 0, 178, 8, 0, 10, 0, 12, 0, 181, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 187, 8, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 196, 8, 3, 1, 4, 1, 4, 1, 4, 5, 4, 201, 8, 4, 10, 4, 12, 4, 204, 9, 4, 1, 4, 3, 4, 207, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 221, 8, 5, 1, 6, 1, 6, 3, 6, 225, 8, 6, 1, 6, 3, 6, 228, 8, 6, 1, 7, 1, 7, 3, 7, 232, 8, 7, 1, 7, 3, 7, 235, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 242, 8, 8, 1, 8, 1, 8, 3, 8, 246, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 253, 8, 9, 10, 9, 12, 9, 256, 9, 9, 1, 9, 1, 9, 3, 9, 260, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 269, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 277, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 284, 8, 12, 1, 12, 1, 12, 3, 12, 288, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 294, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 299, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 307, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 314, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 320, 8, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 332, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 5, 18, 338, 8, 18, 10, 18, 12, 18, 341, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 5, 20, 352, 8, 20, 10, 20, 12, 20, 355, 9, 20, 1, 20, 3, 20, 358, 8, 20, 1, 21, 1, 21, 1, 21, 3, 21, 363, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 371, 8, 22, 10, 22, 12, 22, 374, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 382, 8, 23, 1, 24, 3, 24, 385, 8, 24, 1, 24, 1, 24, 3, 24, 389, 8, 24, 1, 24, 3, 24, 392, 8, 24, 1, 24, 1, 24, 3, 24, 396, 8, 24, 1, 24, 3, 24, 399, 8, 24, 1, 24, 3, 24, 402, 8, 24, 1, 24, 3, 24, 405, 8, 24, 1, 24, 3, 24, 408, 8, 24, 1, 24, 1, 24, 3, 24, 412, 8, 24, 1, 24, 1, 24, 3, 24, 416, 8, 24, 1, 24, 3, 24, 419, 8, 24, 1, 24, 3, 24, 422, 8, 24, 1, 24, 3, 24, 425, 8, 24, 1, 24, 1, 24, 3, 24, 429, 8, 24, 1, 24, 3, 24, 432, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 441, 8, 26, 1, 27, 1, 27, 1, 27, 1, 28, 3, 28, 447, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 466, 8, 29, 10, 29, 12, 29, 469, 9, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 485, 8, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 502, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 508, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 514, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 525, 8, 36, 3, 36, 527, 8, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 3, 39, 538, 8, 39, 1, 39, 3, 39, 541, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 547, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 555, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 561, 8, 39, 10, 39, 12, 39, 564, 9, 39, 1, 40, 3, 40, 567, 8, 40, 1, 40, 1, 40, 1, 40, 3, 40, 572, 8, 40, 1, 40, 3, 40, 575, 8, 40, 1, 40, 3, 40, 578, 8, 40, 1, 40, 1, 40, 3, 40, 582, 8, 40, 1, 40, 1, 40, 3, 40, 586, 8, 40, 1, 40, 3, 40, 589, 8, 40, 3, 40, 591, 8, 40, 1, 40, 3, 40, 594, 8, 40, 1, 40, 1, 40, 3, 40, 598, 8, 40, 1, 40, 1, 40, 3, 40, 602, 8, 40, 1, 40, 3, 40, 605, 8, 40, 3, 40, 607, 8, 40, 3, 40, 609, 8, 40, 1, 41, 1, 41, 1, 41, 3, 41, 614, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 625, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 631, 8, 43, 1, 44, 1, 44, 1, 44, 5, 44, 636, 8, 44, 10, 44, 12, 44, 639, 9, 44, 1, 45, 1, 45, 3, 45, 643, 8, 45, 1, 45, 1, 45, 3, 45, 647, 8, 45, 1, 45, 1, 45, 3, 45, 651, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 657, 8, 46, 3, 46, 659, 8, 46, 1, 47, 1, 47, 1, 47, 5, 47, 664, 8, 47, 10, 47, 12, 47, 667, 9, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 3, 49, 674, 8, 49, 1, 49, 3, 49, 677, 8, 49, 1, 49, 3, 49, 680, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 699, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 3, 54, 713, 8, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 727, 8, 56, 10, 56, 12, 56, 730, 9, 56, 1, 56, 3, 56, 733, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 742, 8, 56, 10, 56, 12, 56, 745, 9, 56, 1, 56, 3, 56, 748, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 757, 8, 56, 10, 56, 12, 56, 760, 9, 56, 1, 56, 3, 56, 763, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 770, 8, 56, 1, 56, 1, 56, 3, 56, 774, 8, 56, 1, 57, 1, 57, 1, 57, 5, 57, 779, 8, 57, 10, 57, 12, 57, 782, 9, 57, 1, 57, 3, 57, 785, 8, 57, 1, 58, 1, 58, 1, 58, 3, 58, 790, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 4, 58, 797, 8, 58, 11, 58, 12, 58, 798, 1, 58, 1, 58, 3, 58, 803, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 827, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 844, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 850, 8, 58, 1, 58, 3, 58, 853, 8, 58, 1, 58, 3, 58, 856, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 866, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 872, 8, 58, 1, 58, 3, 58, 875, 8, 58, 1, 58, 3, 58, 878, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 886, 8, 58, 1, 58, 3, 58, 889, 8, 58, 1, 58, 1, 58, 3, 58, 893, 8, 58, 1, 58, 3, 58, 896, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 910, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 927, 8, 58, 1, 58, 1, 58, 1, 58, 3, 58, 932, 8, 58, 1, 58, 1, 58, 3, 58, 936, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 942, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 949, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 961, 8, 58, 1, 58, 1, 58, 3, 58, 965, 8, 58, 1, 58, 3, 58, 968, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 977, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 991, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 1030, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 1038, 8, 58, 5, 58, 1040, 8, 58, 10, 58, 12, 58, 1043, 9, 58, 1, 59, 1, 59, 1, 59, 5, 59, 1048, 8, 59, 10, 59, 12, 59, 1051, 9, 59, 1, 59, 3, 59, 1054, 8, 59, 1, 60, 1, 60, 3, 60, 1058, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 1064, 8, 61, 10, 61, 12, 61, 1067, 9, 61, 1, 61, 3, 61, 1070, 8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 1077, 8, 61, 10, 61, 12, 61, 1080, 9, 61, 1, 61, 3, 61, 1083, 8, 61, 3, 61, 1085, 8, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 5, 62, 1093, 8, 62, 10, 62, 12, 62, 1096, 9, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 1104, 8, 62, 10, 62, 12, 62, 1107, 9, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1115, 8, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1122, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1135, 8, 63, 1, 64, 1, 64, 1, 64, 5, 64, 1140, 8, 64, 10, 64, 12, 64, 1143, 9, 64, 1, 64, 3, 64, 1146, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1158, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 1164, 8, 66, 1, 66, 3, 66, 1167, 8, 66, 1, 67, 1, 67, 1, 67, 5, 67, 1172, 8, 67, 10, 67, 12, 67, 1175, 9, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1186, 8, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1192, 8, 68, 5, 68, 1194, 8, 68, 10, 68, 12, 68, 1197, 9, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1202, 8, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 3, 70, 1209, 8, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 5, 71, 1216, 8, 71, 10, 71, 12, 71, 1219, 9, 71, 1, 71, 3, 71, 1222, 8, 71, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 3, 73, 1232, 8, 73, 3, 73, 1234, 8, 73, 1, 74, 3, 74, 1237, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1245, 8, 74, 1, 75, 1, 75, 1, 75, 3, 75, 1250, 8, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 3, 79, 1260, 8, 79, 1, 80, 1, 80, 1, 80, 3, 80, 1265, 8, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 3, 83, 1277, 8, 83, 1, 84, 1, 84, 5, 84, 1281, 8, 84, 10, 84, 12, 84, 1284, 9, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 3, 85, 1293, 8, 85, 1, 86, 1, 86, 5, 86, 1297, 8, 86, 10, 86, 12, 86, 1300, 9, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 3, 87, 1309, 8, 87, 1, 87, 0, 3, 78, 116, 136, 88, 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, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 0, 16, 2, 0, 18, 18, 74, 74, 2, 0, 44, 44, 51, 51, 3, 0, 1, 1, 4, 4, 8, 8, 4, 0, 1, 1, 3, 4, 8, 8, 80, 80, 2, 0, 51, 51, 73, 73, 2, 0, 1, 1, 4, 4, 2, 0, 7, 7, 22, 23, 2, 0, 30, 30, 49, 49, 2, 0, 71, 71, 76, 76, 3, 0, 10, 10, 50, 50, 90, 90, 2, 0, 41, 41, 53, 53, 1, 0, 107, 108, 2, 0, 118, 118, 139, 139, 7, 0, 21, 21, 38, 38, 55, 56, 70, 70, 78, 78, 97, 97, 103, 103, 16, 0, 1, 13, 15, 20, 22, 28, 30, 30, 32, 37, 39, 42, 44, 51, 53, 54, 58, 58, 60, 69, 71, 77, 79, 83, 85, 92, 94, 96, 98, 99, 101, 102, 4, 0, 20, 20, 30, 30, 39, 39, 48, 48, 1479, 0, 179, 1, 0, 0, 0, 2, 186, 1, 0, 0, 0, 4, 188, 1, 0, 0, 0, 6, 190, 1, 0, 0, 0, 8, 197, 1, 0, 0, 0, 10, 220, 1, 0, 0, 0, 12, 222, 1, 0, 0, 0, 14, 229, 1, 0, 0, 0, 16, 236, 1, 0, 0, 0, 18, 249, 1, 0, 0, 0, 20, 261, 1, 0, 0, 0, 22, 270, 1, 0, 0, 0, 24, 278, 1, 0, 0, 0, 26, 300, 1, 0, 0, 0, 28, 315, 1, 0, 0, 0, 30, 324, 1, 0, 0, 0, 32, 329, 1, 0, 0, 0, 34, 333, 1, 0, 0, 0, 36, 335, 1, 0, 0, 0, 38, 344, 1, 0, 0, 0, 40, 348, 1, 0, 0, 0, 42, 362, 1, 0, 0, 0, 44, 366, 1, 0, 0, 0, 46, 381, 1, 0, 0, 0, 48, 384, 1, 0, 0, 0, 50, 433, 1, 0, 0, 0, 52, 436, 1, 0, 0, 0, 54, 442, 1, 0, 0, 0, 56, 446, 1, 0, 0, 0, 58, 452, 1, 0, 0, 0, 60, 470, 1, 0, 0, 0, 62, 473, 1, 0, 0, 0, 64, 476, 1, 0, 0, 0, 66, 486, 1, 0, 0, 0, 68, 489, 1, 0, 0, 0, 70, 493, 1, 0, 0, 0, 72, 526, 1, 0, 0, 0, 74, 528, 1, 0, 0, 0, 76, 531, 1, 0, 0, 0, 78, 546, 1, 0, 0, 0, 80, 608, 1, 0, 0, 0, 82, 613, 1, 0, 0, 0, 84, 624, 1, 0, 0, 0, 86, 626, 1, 0, 0, 0, 88, 632, 1, 0, 0, 0, 90, 640, 1, 0, 0, 0, 92, 658, 1, 0, 0, 0, 94, 660, 1, 0, 0, 0, 96, 668, 1, 0, 0, 0, 98, 673, 1, 0, 0, 0, 100, 681, 1, 0, 0, 0, 102, 685, 1, 0, 0, 0, 104, 689, 1, 0, 0, 0, 106, 698, 1, 0, 0, 0, 108, 712, 1, 0, 0, 0, 110, 714, 1, 0, 0, 0, 112, 773, 1, 0, 0, 0, 114, 775, 1, 0, 0, 0, 116, 935, 1, 0, 0, 0, 118, 1044, 1, 0, 0, 0, 120, 1057, 1, 0, 0, 0, 122, 1084, 1, 0, 0, 0, 124, 1121, 1, 0, 0, 0, 126, 1134, 1, 0, 0, 0, 128, 1136, 1, 0, 0, 0, 130, 1157, 1, 0, 0, 0, 132, 1166, 1, 0, 0, 0, 134, 1168, 1, 0, 0, 0, 136, 1185, 1, 0, 0, 0, 138, 1198, 1, 0, 0, 0, 140, 1208, 1, 0, 0, 0, 142, 1212, 1, 0, 0, 0, 144, 1223, 1, 0, 0, 0, 146, 1233, 1, 0, 0, 0, 148, 1236, 1, 0, 0, 0, 150, 1249, 1, 0, 0, 0, 152, 1251, 1, 0, 0, 0, 154, 1253, 1, 0, 0, 0, 156, 1255, 1, 0, 0, 0, 158, 1259, 1, 0, 0, 0, 160, 1264, 1, 0, 0, 0, 162, 1266, 1, 0, 0, 0, 164, 1270, 1, 0, 0, 0, 166, 1276, 1, 0, 0, 0, 168, 1278, 1, 0, 0, 0, 170, 1292, 1, 0, 0, 0, 172, 1294, 1, 0, 0, 0, 174, 1308, 1, 0, 0, 0, 176, 178, 3, 2, 1, 0, 177, 176, 1, 0, 0, 0, 178, 181, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 182, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 182, 183, 5, 0, 0, 1, 183, 1, 1, 0, 0, 0, 184, 187, 3, 6, 3, 0, 185, 187, 3, 10, 5, 0, 186, 184, 1, 0, 0, 0, 186, 185, 1, 0, 0, 0, 187, 3, 1, 0, 0, 0, 188, 189, 3, 116, 58, 0, 189, 5, 1, 0, 0, 0, 190, 191, 5, 52, 0, 0, 191, 195, 3, 160, 80, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 122, 0, 0, 194, 196, 3, 4, 2, 0, 195, 192, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 7, 1, 0, 0, 0, 197, 202, 3, 160, 80, 0, 198, 199, 5, 116, 0, 0, 199, 201, 3, 160, 80, 0, 200, 198, 1, 0, 0, 0, 201, 204, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, 204, 202, 1, 0, 0, 0, 205, 207, 5, 116, 0, 0, 206, 205, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 9, 1, 0, 0, 0, 208, 221, 3, 12, 6, 0, 209, 221, 3, 14, 7, 0, 210, 221, 3, 18, 9, 0, 211, 221, 3, 20, 10, 0, 212, 221, 3, 22, 11, 0, 213, 221, 3, 26, 13, 0, 214, 221, 3, 24, 12, 0, 215, 221, 3, 28, 14, 0, 216, 221, 3, 30, 15, 0, 217, 221, 3, 36, 18, 0, 218, 221, 3, 32, 16, 0, 219, 221, 3, 34, 17, 0, 220, 208, 1, 0, 0, 0, 220, 209, 1, 0, 0, 0, 220, 210, 1, 0, 0, 0, 220, 211, 1, 0, 0, 0, 220, 212, 1, 0, 0, 0, 220, 213, 1, 0, 0, 0, 220, 214, 1, 0, 0, 0, 220, 215, 1, 0, 0, 0, 220, 216, 1, 0, 0, 0, 220, 217, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 220, 219, 1, 0, 0, 0, 221, 11, 1, 0, 0, 0, 222, 224, 5, 72, 0, 0, 223, 225, 3, 4, 2, 0, 224, 223, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 227, 1, 0, 0, 0, 226, 228, 5, 150, 0, 0, 227, 226, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 13, 1, 0, 0, 0, 229, 231, 5, 84, 0, 0, 230, 232, 3, 4, 2, 0, 231, 230, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 234, 1, 0, 0, 0, 233, 235, 5, 150, 0, 0, 234, 233, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 15, 1, 0, 0, 0, 236, 245, 5, 14, 0, 0, 237, 238, 5, 130, 0, 0, 238, 241, 3, 160, 80, 0, 239, 240, 5, 115, 0, 0, 240, 242, 3, 160, 80, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 244, 5, 149, 0, 0, 244, 246, 1, 0, 0, 0, 245, 237, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 248, 3, 36, 18, 0, 248, 17, 1, 0, 0, 0, 249, 250, 5, 93, 0, 0, 250, 254, 3, 36, 18, 0, 251, 253, 3, 16, 8, 0, 252, 251, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 259, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 258, 5, 29, 0, 0, 258, 260, 3, 36, 18, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 19, 1, 0, 0, 0, 261, 262, 5, 40, 0, 0, 262, 263, 5, 130, 0, 0, 263, 264, 3, 4, 2, 0, 264, 265, 5, 149, 0, 0, 265, 268, 3, 10, 5, 0, 266, 267, 5, 25, 0, 0, 267, 269, 3, 10, 5, 0, 268, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 21, 1, 0, 0, 0, 270, 271, 5, 100, 0, 0, 271, 272, 5, 130, 0, 0, 272, 273, 3, 4, 2, 0, 273, 274, 5, 149, 0, 0, 274, 276, 3, 10, 5, 0, 275, 277, 5, 150, 0, 0, 276, 275, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 23, 1, 0, 0, 0, 278, 279, 5, 33, 0, 0, 279, 283, 5, 130, 0, 0, 280, 284, 3, 6, 3, 0, 281, 284, 3, 30, 15, 0, 282, 284, 3, 4, 2, 0, 283, 280, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 283, 282, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 287, 5, 150, 0, 0, 286, 288, 3, 4, 2, 0, 287, 286, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 293, 5, 150, 0, 0, 290, 294, 3, 6, 3, 0, 291, 294, 3, 30, 15, 0, 292, 294, 3, 4, 2, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 5, 149, 0, 0, 296, 298, 3, 10, 5, 0, 297, 299, 5, 150, 0, 0, 298, 297, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 25, 1, 0, 0, 0, 300, 301, 5, 33, 0, 0, 301, 302, 5, 130, 0, 0, 302, 303, 5, 52, 0, 0, 303, 306, 3, 160, 80, 0, 304, 305, 5, 116, 0, 0, 305, 307, 3, 160, 80, 0, 306, 304, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 5, 42, 0, 0, 309, 310, 3, 4, 2, 0, 310, 311, 5, 149, 0, 0, 311, 313, 3, 10, 5, 0, 312, 314, 5, 150, 0, 0, 313, 312, 1, 0, 0, 0, 313, 314, 1, 0, 0, 0, 314, 27, 1, 0, 0, 0, 315, 316, 5, 31, 0, 0, 316, 317, 3, 160, 80, 0, 317, 319, 5, 130, 0, 0, 318, 320, 3, 8, 4, 0, 319, 318, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 321, 1, 0, 0, 0, 321, 322, 5, 149, 0, 0, 322, 323, 3, 36, 18, 0, 323, 29, 1, 0, 0, 0, 324, 325, 3, 4, 2, 0, 325, 326, 5, 115, 0, 0, 326, 327, 5, 122, 0, 0, 327, 328, 3, 4, 2, 0, 328, 31, 1, 0, 0, 0, 329, 331, 3, 4, 2, 0, 330, 332, 5, 150, 0, 0, 331, 330, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 33, 1, 0, 0, 0, 333, 334, 5, 150, 0, 0, 334, 35, 1, 0, 0, 0, 335, 339, 5, 128, 0, 0, 336, 338, 3, 2, 1, 0, 337, 336, 1, 0, 0, 0, 338, 341, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 342, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 342, 343, 5, 147, 0, 0, 343, 37, 1, 0, 0, 0, 344, 345, 3, 4, 2, 0, 345, 346, 5, 115, 0, 0, 346, 347, 3, 4, 2, 0, 347, 39, 1, 0, 0, 0, 348, 353, 3, 38, 19, 0, 349, 350, 5, 116, 0, 0, 350, 352, 3, 38, 19, 0, 351, 349, 1, 0, 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 357, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 356, 358, 5, 116, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 41, 1, 0, 0, 0, 359, 363, 3, 44, 22, 0, 360, 363, 3, 48, 24, 0, 361, 363, 3, 124, 62, 0, 362, 359, 1, 0, 0, 0, 362, 360, 1, 0, 0, 0, 362, 361, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 365, 5, 0, 0, 1, 365, 43, 1, 0, 0, 0, 366, 372, 3, 46, 23, 0, 367, 368, 5, 95, 0, 0, 368, 369, 5, 1, 0, 0, 369, 371, 3, 46, 23, 0, 370, 367, 1, 0, 0, 0, 371, 374, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 45, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 375, 382, 3, 48, 24, 0, 376, 377, 5, 130, 0, 0, 377, 378, 3, 44, 22, 0, 378, 379, 5, 149, 0, 0, 379, 382, 1, 0, 0, 0, 380, 382, 3, 164, 82, 0, 381, 375, 1, 0, 0, 0, 381, 376, 1, 0, 0, 0, 381, 380, 1, 0, 0, 0, 382, 47, 1, 0, 0, 0, 383, 385, 3, 50, 25, 0, 384, 383, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 388, 5, 79, 0, 0, 387, 389, 5, 24, 0, 0, 388, 387, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 391, 1, 0, 0, 0, 390, 392, 3, 52, 26, 0, 391, 390, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 395, 3, 114, 57, 0, 394, 396, 3, 54, 27, 0, 395, 394, 1, 0, 0, 0, 395, 396, 1, 0, 0, 0, 396, 398, 1, 0, 0, 0, 397, 399, 3, 56, 28, 0, 398, 397, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 401, 1, 0, 0, 0, 400, 402, 3, 60, 30, 0, 401, 400, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 404, 1, 0, 0, 0, 403, 405, 3, 62, 31, 0, 404, 403, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 407, 1, 0, 0, 0, 406, 408, 3, 64, 32, 0, 407, 406, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 411, 1, 0, 0, 0, 409, 410, 5, 102, 0, 0, 410, 412, 7, 0, 0, 0, 411, 409, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 415, 1, 0, 0, 0, 413, 414, 5, 102, 0, 0, 414, 416, 5, 89, 0, 0, 415, 413, 1, 0, 0, 0, 415, 416, 1, 0, 0, 0, 416, 418, 1, 0, 0, 0, 417, 419, 3, 66, 33, 0, 418, 417, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 421, 1, 0, 0, 0, 420, 422, 3, 58, 29, 0, 421, 420, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 424, 1, 0, 0, 0, 423, 425, 3, 68, 34, 0, 424, 423, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 428, 1, 0, 0, 0, 426, 429, 3, 72, 36, 0, 427, 429, 3, 74, 37, 0, 428, 426, 1, 0, 0, 0, 428, 427, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 431, 1, 0, 0, 0, 430, 432, 3, 76, 38, 0, 431, 430, 1, 0, 0, 0, 431, 432, 1, 0, 0, 0, 432, 49, 1, 0, 0, 0, 433, 434, 5, 102, 0, 0, 434, 435, 3, 128, 64, 0, 435, 51, 1, 0, 0, 0, 436, 437, 5, 88, 0, 0, 437, 440, 5, 108, 0, 0, 438, 439, 5, 102, 0, 0, 439, 441, 5, 85, 0, 0, 440, 438, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 53, 1, 0, 0, 0, 442, 443, 5, 34, 0, 0, 443, 444, 3, 78, 39, 0, 444, 55, 1, 0, 0, 0, 445, 447, 7, 1, 0, 0, 446, 445, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 448, 1, 0, 0, 0, 448, 449, 5, 5, 0, 0, 449, 450, 5, 47, 0, 0, 450, 451, 3, 114, 57, 0, 451, 57, 1, 0, 0, 0, 452, 453, 5, 101, 0, 0, 453, 454, 3, 160, 80, 0, 454, 455, 5, 6, 0, 0, 455, 456, 5, 130, 0, 0, 456, 457, 3, 98, 49, 0, 457, 467, 5, 149, 0, 0, 458, 459, 5, 116, 0, 0, 459, 460, 3, 160, 80, 0, 460, 461, 5, 6, 0, 0, 461, 462, 5, 130, 0, 0, 462, 463, 3, 98, 49, 0, 463, 464, 5, 149, 0, 0, 464, 466, 1, 0, 0, 0, 465, 458, 1, 0, 0, 0, 466, 469, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 467, 468, 1, 0, 0, 0, 468, 59, 1, 0, 0, 0, 469, 467, 1, 0, 0, 0, 470, 471, 5, 69, 0, 0, 471, 472, 3, 116, 58, 0, 472, 61, 1, 0, 0, 0, 473, 474, 5, 99, 0, 0, 474, 475, 3, 116, 58, 0, 475, 63, 1, 0, 0, 0, 476, 477, 5, 36, 0, 0, 477, 484, 5, 11, 0, 0, 478, 479, 7, 0, 0, 0, 479, 480, 5, 130, 0, 0, 480, 481, 3, 114, 57, 0, 481, 482, 5, 149, 0, 0, 482, 485, 1, 0, 0, 0, 483, 485, 3, 114, 57, 0, 484, 478, 1, 0, 0, 0, 484, 483, 1, 0, 0, 0, 485, 65, 1, 0, 0, 0, 486, 487, 5, 37, 0, 0, 487, 488, 3, 116, 58, 0, 488, 67, 1, 0, 0, 0, 489, 490, 5, 64, 0, 0, 490, 491, 5, 11, 0, 0, 491, 492, 3, 88, 44, 0, 492, 69, 1, 0, 0, 0, 493, 494, 5, 64, 0, 0, 494, 495, 5, 11, 0, 0, 495, 496, 3, 114, 57, 0, 496, 71, 1, 0, 0, 0, 497, 498, 5, 54, 0, 0, 498, 501, 3, 116, 58, 0, 499, 500, 5, 116, 0, 0, 500, 502, 3, 116, 58, 0, 501, 499, 1, 0, 0, 0, 501, 502, 1, 0, 0, 0, 502, 507, 1, 0, 0, 0, 503, 504, 5, 102, 0, 0, 504, 508, 5, 85, 0, 0, 505, 506, 5, 11, 0, 0, 506, 508, 3, 114, 57, 0, 507, 503, 1, 0, 0, 0, 507, 505, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 527, 1, 0, 0, 0, 509, 510, 5, 54, 0, 0, 510, 513, 3, 116, 58, 0, 511, 512, 5, 102, 0, 0, 512, 514, 5, 85, 0, 0, 513, 511, 1, 0, 0, 0, 513, 514, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 5, 61, 0, 0, 516, 517, 3, 116, 58, 0, 517, 527, 1, 0, 0, 0, 518, 519, 5, 54, 0, 0, 519, 520, 3, 116, 58, 0, 520, 521, 5, 61, 0, 0, 521, 524, 3, 116, 58, 0, 522, 523, 5, 11, 0, 0, 523, 525, 3, 114, 57, 0, 524, 522, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 527, 1, 0, 0, 0, 526, 497, 1, 0, 0, 0, 526, 509, 1, 0, 0, 0, 526, 518, 1, 0, 0, 0, 527, 73, 1, 0, 0, 0, 528, 529, 5, 61, 0, 0, 529, 530, 3, 116, 58, 0, 530, 75, 1, 0, 0, 0, 531, 532, 5, 81, 0, 0, 532, 533, 3, 94, 47, 0, 533, 77, 1, 0, 0, 0, 534, 535, 6, 39, -1, 0, 535, 537, 3, 136, 68, 0, 536, 538, 5, 28, 0, 0, 537, 536, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 540, 1, 0, 0, 0, 539, 541, 3, 86, 43, 0, 540, 539, 1, 0, 0, 0, 540, 541, 1, 0, 0, 0, 541, 547, 1, 0, 0, 0, 542, 543, 5, 130, 0, 0, 543, 544, 3, 78, 39, 0, 544, 545, 5, 149, 0, 0, 545, 547, 1, 0, 0, 0, 546, 534, 1, 0, 0, 0, 546, 542, 1, 0, 0, 0, 547, 562, 1, 0, 0, 0, 548, 549, 10, 3, 0, 0, 549, 550, 3, 82, 41, 0, 550, 551, 3, 78, 39, 4, 551, 561, 1, 0, 0, 0, 552, 554, 10, 4, 0, 0, 553, 555, 3, 80, 40, 0, 554, 553, 1, 0, 0, 0, 554, 555, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 5, 47, 0, 0, 557, 558, 3, 78, 39, 0, 558, 559, 3, 84, 42, 0, 559, 561, 1, 0, 0, 0, 560, 548, 1, 0, 0, 0, 560, 552, 1, 0, 0, 0, 561, 564, 1, 0, 0, 0, 562, 560, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 79, 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 565, 567, 7, 2, 0, 0, 566, 565, 1, 0, 0, 0, 566, 567, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 575, 5, 44, 0, 0, 569, 571, 5, 44, 0, 0, 570, 572, 7, 2, 0, 0, 571, 570, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 575, 1, 0, 0, 0, 573, 575, 7, 2, 0, 0, 574, 566, 1, 0, 0, 0, 574, 569, 1, 0, 0, 0, 574, 573, 1, 0, 0, 0, 575, 609, 1, 0, 0, 0, 576, 578, 7, 3, 0, 0, 577, 576, 1, 0, 0, 0, 577, 578, 1, 0, 0, 0, 578, 579, 1, 0, 0, 0, 579, 581, 7, 4, 0, 0, 580, 582, 5, 65, 0, 0, 581, 580, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 591, 1, 0, 0, 0, 583, 585, 7, 4, 0, 0, 584, 586, 5, 65, 0, 0, 585, 584, 1, 0, 0, 0, 585, 586, 1, 0, 0, 0, 586, 588, 1, 0, 0, 0, 587, 589, 7, 3, 0, 0, 588, 587, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 591, 1, 0, 0, 0, 590, 577, 1, 0, 0, 0, 590, 583, 1, 0, 0, 0, 591, 609, 1, 0, 0, 0, 592, 594, 7, 5, 0, 0, 593, 592, 1, 0, 0, 0, 593, 594, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597, 5, 35, 0, 0, 596, 598, 5, 65, 0, 0, 597, 596, 1, 0, 0, 0, 597, 598, 1, 0, 0, 0, 598, 607, 1, 0, 0, 0, 599, 601, 5, 35, 0, 0, 600, 602, 5, 65, 0, 0, 601, 600, 1, 0, 0, 0, 601, 602, 1, 0, 0, 0, 602, 604, 1, 0, 0, 0, 603, 605, 7, 5, 0, 0, 604, 603, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 607, 1, 0, 0, 0, 606, 593, 1, 0, 0, 0, 606, 599, 1, 0, 0, 0, 607, 609, 1, 0, 0, 0, 608, 574, 1, 0, 0, 0, 608, 590, 1, 0, 0, 0, 608, 606, 1, 0, 0, 0, 609, 81, 1, 0, 0, 0, 610, 611, 5, 17, 0, 0, 611, 614, 5, 47, 0, 0, 612, 614, 5, 116, 0, 0, 613, 610, 1, 0, 0, 0, 613, 612, 1, 0, 0, 0, 614, 83, 1, 0, 0, 0, 615, 616, 5, 62, 0, 0, 616, 625, 3, 114, 57, 0, 617, 618, 5, 96, 0, 0, 618, 619, 5, 130, 0, 0, 619, 620, 3, 114, 57, 0, 620, 621, 5, 149, 0, 0, 621, 625, 1, 0, 0, 0, 622, 623, 5, 96, 0, 0, 623, 625, 3, 114, 57, 0, 624, 615, 1, 0, 0, 0, 624, 617, 1, 0, 0, 0, 624, 622, 1, 0, 0, 0, 625, 85, 1, 0, 0, 0, 626, 627, 5, 77, 0, 0, 627, 630, 3, 92, 46, 0, 628, 629, 5, 61, 0, 0, 629, 631, 3, 92, 46, 0, 630, 628, 1, 0, 0, 0, 630, 631, 1, 0, 0, 0, 631, 87, 1, 0, 0, 0, 632, 637, 3, 90, 45, 0, 633, 634, 5, 116, 0, 0, 634, 636, 3, 90, 45, 0, 635, 633, 1, 0, 0, 0, 636, 639, 1, 0, 0, 0, 637, 635, 1, 0, 0, 0, 637, 638, 1, 0, 0, 0, 638, 89, 1, 0, 0, 0, 639, 637, 1, 0, 0, 0, 640, 642, 3, 116, 58, 0, 641, 643, 7, 6, 0, 0, 642, 641, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 646, 1, 0, 0, 0, 644, 645, 5, 60, 0, 0, 645, 647, 7, 7, 0, 0, 646, 644, 1, 0, 0, 0, 646, 647, 1, 0, 0, 0, 647, 650, 1, 0, 0, 0, 648, 649, 5, 16, 0, 0, 649, 651, 5, 110, 0, 0, 650, 648, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 91, 1, 0, 0, 0, 652, 659, 3, 164, 82, 0, 653, 656, 3, 148, 74, 0, 654, 655, 5, 151, 0, 0, 655, 657, 3, 148, 74, 0, 656, 654, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 659, 1, 0, 0, 0, 658, 652, 1, 0, 0, 0, 658, 653, 1, 0, 0, 0, 659, 93, 1, 0, 0, 0, 660, 665, 3, 96, 48, 0, 661, 662, 5, 116, 0, 0, 662, 664, 3, 96, 48, 0, 663, 661, 1, 0, 0, 0, 664, 667, 1, 0, 0, 0, 665, 663, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 95, 1, 0, 0, 0, 667, 665, 1, 0, 0, 0, 668, 669, 3, 160, 80, 0, 669, 670, 5, 122, 0, 0, 670, 671, 3, 150, 75, 0, 671, 97, 1, 0, 0, 0, 672, 674, 3, 100, 50, 0, 673, 672, 1, 0, 0, 0, 673, 674, 1, 0, 0, 0, 674, 676, 1, 0, 0, 0, 675, 677, 3, 102, 51, 0, 676, 675, 1, 0, 0, 0, 676, 677, 1, 0, 0, 0, 677, 679, 1, 0, 0, 0, 678, 680, 3, 104, 52, 0, 679, 678, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 99, 1, 0, 0, 0, 681, 682, 5, 67, 0, 0, 682, 683, 5, 11, 0, 0, 683, 684, 3, 114, 57, 0, 684, 101, 1, 0, 0, 0, 685, 686, 5, 64, 0, 0, 686, 687, 5, 11, 0, 0, 687, 688, 3, 88, 44, 0, 688, 103, 1, 0, 0, 0, 689, 690, 7, 8, 0, 0, 690, 691, 3, 106, 53, 0, 691, 105, 1, 0, 0, 0, 692, 699, 3, 108, 54, 0, 693, 694, 5, 9, 0, 0, 694, 695, 3, 108, 54, 0, 695, 696, 5, 2, 0, 0, 696, 697, 3, 108, 54, 0, 697, 699, 1, 0, 0, 0, 698, 692, 1, 0, 0, 0, 698, 693, 1, 0, 0, 0, 699, 107, 1, 0, 0, 0, 700, 701, 5, 19, 0, 0, 701, 713, 5, 75, 0, 0, 702, 703, 5, 94, 0, 0, 703, 713, 5, 68, 0, 0, 704, 705, 5, 94, 0, 0, 705, 713, 5, 32, 0, 0, 706, 707, 3, 148, 74, 0, 707, 708, 5, 68, 0, 0, 708, 713, 1, 0, 0, 0, 709, 710, 3, 148, 74, 0, 710, 711, 5, 32, 0, 0, 711, 713, 1, 0, 0, 0, 712, 700, 1, 0, 0, 0, 712, 702, 1, 0, 0, 0, 712, 704, 1, 0, 0, 0, 712, 706, 1, 0, 0, 0, 712, 709, 1, 0, 0, 0, 713, 109, 1, 0, 0, 0, 714, 715, 3, 116, 58, 0, 715, 716, 5, 0, 0, 1, 716, 111, 1, 0, 0, 0, 717, 774, 3, 160, 80, 0, 718, 719, 3, 160, 80, 0, 719, 720, 5, 130, 0, 0, 720, 721, 3, 160, 80, 0, 721, 728, 3, 112, 56, 0, 722, 723, 5, 116, 0, 0, 723, 724, 3, 160, 80, 0, 724, 725, 3, 112, 56, 0, 725, 727, 1, 0, 0, 0, 726, 722, 1, 0, 0, 0, 727, 730, 1, 0, 0, 0, 728, 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 732, 1, 0, 0, 0, 730, 728, 1, 0, 0, 0, 731, 733, 5, 116, 0, 0, 732, 731, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 733, 734, 1, 0, 0, 0, 734, 735, 5, 149, 0, 0, 735, 774, 1, 0, 0, 0, 736, 737, 3, 160, 80, 0, 737, 738, 5, 130, 0, 0, 738, 743, 3, 162, 81, 0, 739, 740, 5, 116, 0, 0, 740, 742, 3, 162, 81, 0, 741, 739, 1, 0, 0, 0, 742, 745, 1, 0, 0, 0, 743, 741, 1, 0, 0, 0, 743, 744, 1, 0, 0, 0, 744, 747, 1, 0, 0, 0, 745, 743, 1, 0, 0, 0, 746, 748, 5, 116, 0, 0, 747, 746, 1, 0, 0, 0, 747, 748, 1, 0, 0, 0, 748, 749, 1, 0, 0, 0, 749, 750, 5, 149, 0, 0, 750, 774, 1, 0, 0, 0, 751, 752, 3, 160, 80, 0, 752, 753, 5, 130, 0, 0, 753, 758, 3, 112, 56, 0, 754, 755, 5, 116, 0, 0, 755, 757, 3, 112, 56, 0, 756, 754, 1, 0, 0, 0, 757, 760, 1, 0, 0, 0, 758, 756, 1, 0, 0, 0, 758, 759, 1, 0, 0, 0, 759, 762, 1, 0, 0, 0, 760, 758, 1, 0, 0, 0, 761, 763, 5, 116, 0, 0, 762, 761, 1, 0, 0, 0, 762, 763, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 765, 5, 149, 0, 0, 765, 774, 1, 0, 0, 0, 766, 767, 3, 160, 80, 0, 767, 769, 5, 130, 0, 0, 768, 770, 3, 114, 57, 0, 769, 768, 1, 0, 0, 0, 769, 770, 1, 0, 0, 0, 770, 771, 1, 0, 0, 0, 771, 772, 5, 149, 0, 0, 772, 774, 1, 0, 0, 0, 773, 717, 1, 0, 0, 0, 773, 718, 1, 0, 0, 0, 773, 736, 1, 0, 0, 0, 773, 751, 1, 0, 0, 0, 773, 766, 1, 0, 0, 0, 774, 113, 1, 0, 0, 0, 775, 780, 3, 116, 58, 0, 776, 777, 5, 116, 0, 0, 777, 779, 3, 116, 58, 0, 778, 776, 1, 0, 0, 0, 779, 782, 1, 0, 0, 0, 780, 778, 1, 0, 0, 0, 780, 781, 1, 0, 0, 0, 781, 784, 1, 0, 0, 0, 782, 780, 1, 0, 0, 0, 783, 785, 5, 116, 0, 0, 784, 783, 1, 0, 0, 0, 784, 785, 1, 0, 0, 0, 785, 115, 1, 0, 0, 0, 786, 787, 6, 58, -1, 0, 787, 789, 5, 12, 0, 0, 788, 790, 3, 116, 58, 0, 789, 788, 1, 0, 0, 0, 789, 790, 1, 0, 0, 0, 790, 796, 1, 0, 0, 0, 791, 792, 5, 98, 0, 0, 792, 793, 3, 116, 58, 0, 793, 794, 5, 83, 0, 0, 794, 795, 3, 116, 58, 0, 795, 797, 1, 0, 0, 0, 796, 791, 1, 0, 0, 0, 797, 798, 1, 0, 0, 0, 798, 796, 1, 0, 0, 0, 798, 799, 1, 0, 0, 0, 799, 802, 1, 0, 0, 0, 800, 801, 5, 25, 0, 0, 801, 803, 3, 116, 58, 0, 802, 800, 1, 0, 0, 0, 802, 803, 1, 0, 0, 0, 803, 804, 1, 0, 0, 0, 804, 805, 5, 26, 0, 0, 805, 936, 1, 0, 0, 0, 806, 807, 5, 13, 0, 0, 807, 808, 5, 130, 0, 0, 808, 809, 3, 116, 58, 0, 809, 810, 5, 6, 0, 0, 810, 811, 3, 112, 56, 0, 811, 812, 5, 149, 0, 0, 812, 936, 1, 0, 0, 0, 813, 814, 5, 20, 0, 0, 814, 936, 5, 110, 0, 0, 815, 816, 5, 45, 0, 0, 816, 817, 3, 116, 58, 0, 817, 818, 3, 152, 76, 0, 818, 936, 1, 0, 0, 0, 819, 820, 5, 82, 0, 0, 820, 821, 5, 130, 0, 0, 821, 822, 3, 116, 58, 0, 822, 823, 5, 34, 0, 0, 823, 826, 3, 116, 58, 0, 824, 825, 5, 33, 0, 0, 825, 827, 3, 116, 58, 0, 826, 824, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 828, 1, 0, 0, 0, 828, 829, 5, 149, 0, 0, 829, 936, 1, 0, 0, 0, 830, 831, 5, 86, 0, 0, 831, 936, 5, 110, 0, 0, 832, 833, 5, 91, 0, 0, 833, 834, 5, 130, 0, 0, 834, 835, 7, 9, 0, 0, 835, 836, 3, 166, 83, 0, 836, 837, 5, 34, 0, 0, 837, 838, 3, 116, 58, 0, 838, 839, 5, 149, 0, 0, 839, 936, 1, 0, 0, 0, 840, 841, 3, 160, 80, 0, 841, 843, 5, 130, 0, 0, 842, 844, 3, 114, 57, 0, 843, 842, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844, 845, 1, 0, 0, 0, 845, 846, 5, 149, 0, 0, 846, 855, 1, 0, 0, 0, 847, 849, 5, 130, 0, 0, 848, 850, 5, 24, 0, 0, 849, 848, 1, 0, 0, 0, 849, 850, 1, 0, 0, 0, 850, 852, 1, 0, 0, 0, 851, 853, 3, 118, 59, 0, 852, 851, 1, 0, 0, 0, 852, 853, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854, 856, 5, 149, 0, 0, 855, 847, 1, 0, 0, 0, 855, 856, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 858, 5, 66, 0, 0, 858, 859, 5, 130, 0, 0, 859, 860, 3, 98, 49, 0, 860, 861, 5, 149, 0, 0, 861, 936, 1, 0, 0, 0, 862, 863, 3, 160, 80, 0, 863, 865, 5, 130, 0, 0, 864, 866, 3, 114, 57, 0, 865, 864, 1, 0, 0, 0, 865, 866, 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 5, 149, 0, 0, 868, 877, 1, 0, 0, 0, 869, 871, 5, 130, 0, 0, 870, 872, 5, 24, 0, 0, 871, 870, 1, 0, 0, 0, 871, 872, 1, 0, 0, 0, 872, 874, 1, 0, 0, 0, 873, 875, 3, 118, 59, 0, 874, 873, 1, 0, 0, 0, 874, 875, 1, 0, 0, 0, 875, 876, 1, 0, 0, 0, 876, 878, 5, 149, 0, 0, 877, 869, 1, 0, 0, 0, 877, 878, 1, 0, 0, 0, 878, 879, 1, 0, 0, 0, 879, 880, 5, 66, 0, 0, 880, 881, 3, 160, 80, 0, 881, 936, 1, 0, 0, 0, 882, 888, 3, 160, 80, 0, 883, 885, 5, 130, 0, 0, 884, 886, 3, 114, 57, 0, 885, 884, 1, 0, 0, 0, 885, 886, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 889, 5, 149, 0, 0, 888, 883, 1, 0, 0, 0, 888, 889, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 892, 5, 130, 0, 0, 891, 893, 5, 24, 0, 0, 892, 891, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, 896, 3, 118, 59, 0, 895, 894, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 897, 1, 0, 0, 0, 897, 898, 5, 149, 0, 0, 898, 936, 1, 0, 0, 0, 899, 936, 3, 124, 62, 0, 900, 936, 3, 168, 84, 0, 901, 936, 3, 150, 75, 0, 902, 903, 5, 118, 0, 0, 903, 936, 3, 116, 58, 19, 904, 905, 5, 58, 0, 0, 905, 936, 3, 116, 58, 13, 906, 907, 3, 140, 70, 0, 907, 908, 5, 120, 0, 0, 908, 910, 1, 0, 0, 0, 909, 906, 1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 911, 1, 0, 0, 0, 911, 936, 5, 112, 0, 0, 912, 913, 5, 130, 0, 0, 913, 914, 3, 44, 22, 0, 914, 915, 5, 149, 0, 0, 915, 936, 1, 0, 0, 0, 916, 917, 5, 130, 0, 0, 917, 918, 3, 116, 58, 0, 918, 919, 5, 149, 0, 0, 919, 936, 1, 0, 0, 0, 920, 921, 5, 130, 0, 0, 921, 922, 3, 114, 57, 0, 922, 923, 5, 149, 0, 0, 923, 936, 1, 0, 0, 0, 924, 926, 5, 129, 0, 0, 925, 927, 3, 114, 57, 0, 926, 925, 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 936, 5, 148, 0, 0, 929, 931, 5, 128, 0, 0, 930, 932, 3, 40, 20, 0, 931, 930, 1, 0, 0, 0, 931, 932, 1, 0, 0, 0, 932, 933, 1, 0, 0, 0, 933, 936, 5, 147, 0, 0, 934, 936, 3, 132, 66, 0, 935, 786, 1, 0, 0, 0, 935, 806, 1, 0, 0, 0, 935, 813, 1, 0, 0, 0, 935, 815, 1, 0, 0, 0, 935, 819, 1, 0, 0, 0, 935, 830, 1, 0, 0, 0, 935, 832, 1, 0, 0, 0, 935, 840, 1, 0, 0, 0, 935, 862, 1, 0, 0, 0, 935, 882, 1, 0, 0, 0, 935, 899, 1, 0, 0, 0, 935, 900, 1, 0, 0, 0, 935, 901, 1, 0, 0, 0, 935, 902, 1, 0, 0, 0, 935, 904, 1, 0, 0, 0, 935, 909, 1, 0, 0, 0, 935, 912, 1, 0, 0, 0, 935, 916, 1, 0, 0, 0, 935, 920, 1, 0, 0, 0, 935, 924, 1, 0, 0, 0, 935, 929, 1, 0, 0, 0, 935, 934, 1, 0, 0, 0, 936, 1041, 1, 0, 0, 0, 937, 941, 10, 18, 0, 0, 938, 942, 5, 112, 0, 0, 939, 942, 5, 151, 0, 0, 940, 942, 5, 138, 0, 0, 941, 938, 1, 0, 0, 0, 941, 939, 1, 0, 0, 0, 941, 940, 1, 0, 0, 0, 942, 943, 1, 0, 0, 0, 943, 1040, 3, 116, 58, 19, 944, 948, 10, 17, 0, 0, 945, 949, 5, 139, 0, 0, 946, 949, 5, 118, 0, 0, 947, 949, 5, 117, 0, 0, 948, 945, 1, 0, 0, 0, 948, 946, 1, 0, 0, 0, 948, 947, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 1040, 3, 116, 58, 18, 951, 976, 10, 16, 0, 0, 952, 977, 5, 121, 0, 0, 953, 977, 5, 122, 0, 0, 954, 977, 5, 133, 0, 0, 955, 977, 5, 131, 0, 0, 956, 977, 5, 132, 0, 0, 957, 977, 5, 123, 0, 0, 958, 977, 5, 124, 0, 0, 959, 961, 5, 58, 0, 0, 960, 959, 1, 0, 0, 0, 960, 961, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 964, 5, 42, 0, 0, 963, 965, 5, 15, 0, 0, 964, 963, 1, 0, 0, 0, 964, 965, 1, 0, 0, 0, 965, 977, 1, 0, 0, 0, 966, 968, 5, 58, 0, 0, 967, 966, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 969, 1, 0, 0, 0, 969, 977, 7, 10, 0, 0, 970, 977, 5, 145, 0, 0, 971, 977, 5, 146, 0, 0, 972, 977, 5, 135, 0, 0, 973, 977, 5, 126, 0, 0, 974, 977, 5, 127, 0, 0, 975, 977, 5, 134, 0, 0, 976, 952, 1, 0, 0, 0, 976, 953, 1, 0, 0, 0, 976, 954, 1, 0, 0, 0, 976, 955, 1, 0, 0, 0, 976, 956, 1, 0, 0, 0, 976, 957, 1, 0, 0, 0, 976, 958, 1, 0, 0, 0, 976, 960, 1, 0, 0, 0, 976, 967, 1, 0, 0, 0, 976, 970, 1, 0, 0, 0, 976, 971, 1, 0, 0, 0, 976, 972, 1, 0, 0, 0, 976, 973, 1, 0, 0, 0, 976, 974, 1, 0, 0, 0, 976, 975, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 1040, 3, 116, 58, 17, 979, 980, 10, 14, 0, 0, 980, 981, 5, 137, 0, 0, 981, 1040, 3, 116, 58, 15, 982, 983, 10, 12, 0, 0, 983, 984, 5, 2, 0, 0, 984, 1040, 3, 116, 58, 13, 985, 986, 10, 11, 0, 0, 986, 987, 5, 63, 0, 0, 987, 1040, 3, 116, 58, 12, 988, 990, 10, 10, 0, 0, 989, 991, 5, 58, 0, 0, 990, 989, 1, 0, 0, 0, 990, 991, 1, 0, 0, 0, 991, 992, 1, 0, 0, 0, 992, 993, 5, 9, 0, 0, 993, 994, 3, 116, 58, 0, 994, 995, 5, 2, 0, 0, 995, 996, 3, 116, 58, 11, 996, 1040, 1, 0, 0, 0, 997, 998, 10, 9, 0, 0, 998, 999, 5, 140, 0, 0, 999, 1000, 3, 116, 58, 0, 1000, 1001, 5, 115, 0, 0, 1001, 1002, 3, 116, 58, 9, 1002, 1040, 1, 0, 0, 0, 1003, 1004, 10, 25, 0, 0, 1004, 1005, 5, 129, 0, 0, 1005, 1006, 3, 116, 58, 0, 1006, 1007, 5, 148, 0, 0, 1007, 1040, 1, 0, 0, 0, 1008, 1009, 10, 24, 0, 0, 1009, 1010, 5, 120, 0, 0, 1010, 1040, 5, 108, 0, 0, 1011, 1012, 10, 23, 0, 0, 1012, 1013, 5, 120, 0, 0, 1013, 1040, 3, 160, 80, 0, 1014, 1015, 10, 22, 0, 0, 1015, 1016, 5, 136, 0, 0, 1016, 1017, 5, 129, 0, 0, 1017, 1018, 3, 116, 58, 0, 1018, 1019, 5, 148, 0, 0, 1019, 1040, 1, 0, 0, 0, 1020, 1021, 10, 21, 0, 0, 1021, 1022, 5, 136, 0, 0, 1022, 1040, 5, 108, 0, 0, 1023, 1024, 10, 20, 0, 0, 1024, 1025, 5, 136, 0, 0, 1025, 1040, 3, 160, 80, 0, 1026, 1027, 10, 15, 0, 0, 1027, 1029, 5, 46, 0, 0, 1028, 1030, 5, 58, 0, 0, 1029, 1028, 1, 0, 0, 0, 1029, 1030, 1, 0, 0, 0, 1030, 1031, 1, 0, 0, 0, 1031, 1040, 5, 59, 0, 0, 1032, 1037, 10, 8, 0, 0, 1033, 1034, 5, 6, 0, 0, 1034, 1038, 3, 160, 80, 0, 1035, 1036, 5, 6, 0, 0, 1036, 1038, 5, 110, 0, 0, 1037, 1033, 1, 0, 0, 0, 1037, 1035, 1, 0, 0, 0, 1038, 1040, 1, 0, 0, 0, 1039, 937, 1, 0, 0, 0, 1039, 944, 1, 0, 0, 0, 1039, 951, 1, 0, 0, 0, 1039, 979, 1, 0, 0, 0, 1039, 982, 1, 0, 0, 0, 1039, 985, 1, 0, 0, 0, 1039, 988, 1, 0, 0, 0, 1039, 997, 1, 0, 0, 0, 1039, 1003, 1, 0, 0, 0, 1039, 1008, 1, 0, 0, 0, 1039, 1011, 1, 0, 0, 0, 1039, 1014, 1, 0, 0, 0, 1039, 1020, 1, 0, 0, 0, 1039, 1023, 1, 0, 0, 0, 1039, 1026, 1, 0, 0, 0, 1039, 1032, 1, 0, 0, 0, 1040, 1043, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, 1042, 1, 0, 0, 0, 1042, 117, 1, 0, 0, 0, 1043, 1041, 1, 0, 0, 0, 1044, 1049, 3, 120, 60, 0, 1045, 1046, 5, 116, 0, 0, 1046, 1048, 3, 120, 60, 0, 1047, 1045, 1, 0, 0, 0, 1048, 1051, 1, 0, 0, 0, 1049, 1047, 1, 0, 0, 0, 1049, 1050, 1, 0, 0, 0, 1050, 1053, 1, 0, 0, 0, 1051, 1049, 1, 0, 0, 0, 1052, 1054, 5, 116, 0, 0, 1053, 1052, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 119, 1, 0, 0, 0, 1055, 1058, 3, 122, 61, 0, 1056, 1058, 3, 116, 58, 0, 1057, 1055, 1, 0, 0, 0, 1057, 1056, 1, 0, 0, 0, 1058, 121, 1, 0, 0, 0, 1059, 1060, 5, 130, 0, 0, 1060, 1065, 3, 160, 80, 0, 1061, 1062, 5, 116, 0, 0, 1062, 1064, 3, 160, 80, 0, 1063, 1061, 1, 0, 0, 0, 1064, 1067, 1, 0, 0, 0, 1065, 1063, 1, 0, 0, 0, 1065, 1066, 1, 0, 0, 0, 1066, 1069, 1, 0, 0, 0, 1067, 1065, 1, 0, 0, 0, 1068, 1070, 5, 116, 0, 0, 1069, 1068, 1, 0, 0, 0, 1069, 1070, 1, 0, 0, 0, 1070, 1071, 1, 0, 0, 0, 1071, 1072, 5, 149, 0, 0, 1072, 1085, 1, 0, 0, 0, 1073, 1078, 3, 160, 80, 0, 1074, 1075, 5, 116, 0, 0, 1075, 1077, 3, 160, 80, 0, 1076, 1074, 1, 0, 0, 0, 1077, 1080, 1, 0, 0, 0, 1078, 1076, 1, 0, 0, 0, 1078, 1079, 1, 0, 0, 0, 1079, 1082, 1, 0, 0, 0, 1080, 1078, 1, 0, 0, 0, 1081, 1083, 5, 116, 0, 0, 1082, 1081, 1, 0, 0, 0, 1082, 1083, 1, 0, 0, 0, 1083, 1085, 1, 0, 0, 0, 1084, 1059, 1, 0, 0, 0, 1084, 1073, 1, 0, 0, 0, 1085, 1086, 1, 0, 0, 0, 1086, 1087, 5, 111, 0, 0, 1087, 1088, 3, 116, 58, 0, 1088, 123, 1, 0, 0, 0, 1089, 1090, 5, 132, 0, 0, 1090, 1094, 3, 160, 80, 0, 1091, 1093, 3, 126, 63, 0, 1092, 1091, 1, 0, 0, 0, 1093, 1096, 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1097, 1, 0, 0, 0, 1096, 1094, 1, 0, 0, 0, 1097, 1098, 5, 151, 0, 0, 1098, 1099, 5, 124, 0, 0, 1099, 1122, 1, 0, 0, 0, 1100, 1101, 5, 132, 0, 0, 1101, 1105, 3, 160, 80, 0, 1102, 1104, 3, 126, 63, 0, 1103, 1102, 1, 0, 0, 0, 1104, 1107, 1, 0, 0, 0, 1105, 1103, 1, 0, 0, 0, 1105, 1106, 1, 0, 0, 0, 1106, 1108, 1, 0, 0, 0, 1107, 1105, 1, 0, 0, 0, 1108, 1114, 5, 124, 0, 0, 1109, 1115, 3, 124, 62, 0, 1110, 1111, 5, 128, 0, 0, 1111, 1112, 3, 116, 58, 0, 1112, 1113, 5, 147, 0, 0, 1113, 1115, 1, 0, 0, 0, 1114, 1109, 1, 0, 0, 0, 1114, 1110, 1, 0, 0, 0, 1114, 1115, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1117, 5, 132, 0, 0, 1117, 1118, 5, 151, 0, 0, 1118, 1119, 3, 160, 80, 0, 1119, 1120, 5, 124, 0, 0, 1120, 1122, 1, 0, 0, 0, 1121, 1089, 1, 0, 0, 0, 1121, 1100, 1, 0, 0, 0, 1122, 125, 1, 0, 0, 0, 1123, 1124, 3, 160, 80, 0, 1124, 1125, 5, 122, 0, 0, 1125, 1126, 3, 166, 83, 0, 1126, 1135, 1, 0, 0, 0, 1127, 1128, 3, 160, 80, 0, 1128, 1129, 5, 122, 0, 0, 1129, 1130, 5, 128, 0, 0, 1130, 1131, 3, 116, 58, 0, 1131, 1132, 5, 147, 0, 0, 1132, 1135, 1, 0, 0, 0, 1133, 1135, 3, 160, 80, 0, 1134, 1123, 1, 0, 0, 0, 1134, 1127, 1, 0, 0, 0, 1134, 1133, 1, 0, 0, 0, 1135, 127, 1, 0, 0, 0, 1136, 1141, 3, 130, 65, 0, 1137, 1138, 5, 116, 0, 0, 1138, 1140, 3, 130, 65, 0, 1139, 1137, 1, 0, 0, 0, 1140, 1143, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1141, 1142, 1, 0, 0, 0, 1142, 1145, 1, 0, 0, 0, 1143, 1141, 1, 0, 0, 0, 1144, 1146, 5, 116, 0, 0, 1145, 1144, 1, 0, 0, 0, 1145, 1146, 1, 0, 0, 0, 1146, 129, 1, 0, 0, 0, 1147, 1148, 3, 160, 80, 0, 1148, 1149, 5, 6, 0, 0, 1149, 1150, 5, 130, 0, 0, 1150, 1151, 3, 44, 22, 0, 1151, 1152, 5, 149, 0, 0, 1152, 1158, 1, 0, 0, 0, 1153, 1154, 3, 116, 58, 0, 1154, 1155, 5, 6, 0, 0, 1155, 1156, 3, 160, 80, 0, 1156, 1158, 1, 0, 0, 0, 1157, 1147, 1, 0, 0, 0, 1157, 1153, 1, 0, 0, 0, 1158, 131, 1, 0, 0, 0, 1159, 1167, 3, 164, 82, 0, 1160, 1161, 3, 140, 70, 0, 1161, 1162, 5, 120, 0, 0, 1162, 1164, 1, 0, 0, 0, 1163, 1160, 1, 0, 0, 0, 1163, 1164, 1, 0, 0, 0, 1164, 1165, 1, 0, 0, 0, 1165, 1167, 3, 134, 67, 0, 1166, 1159, 1, 0, 0, 0, 1166, 1163, 1, 0, 0, 0, 1167, 133, 1, 0, 0, 0, 1168, 1173, 3, 160, 80, 0, 1169, 1170, 5, 120, 0, 0, 1170, 1172, 3, 160, 80, 0, 1171, 1169, 1, 0, 0, 0, 1172, 1175, 1, 0, 0, 0, 1173, 1171, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 135, 1, 0, 0, 0, 1175, 1173, 1, 0, 0, 0, 1176, 1177, 6, 68, -1, 0, 1177, 1186, 3, 140, 70, 0, 1178, 1186, 3, 138, 69, 0, 1179, 1180, 5, 130, 0, 0, 1180, 1181, 3, 44, 22, 0, 1181, 1182, 5, 149, 0, 0, 1182, 1186, 1, 0, 0, 0, 1183, 1186, 3, 124, 62, 0, 1184, 1186, 3, 164, 82, 0, 1185, 1176, 1, 0, 0, 0, 1185, 1178, 1, 0, 0, 0, 1185, 1179, 1, 0, 0, 0, 1185, 1183, 1, 0, 0, 0, 1185, 1184, 1, 0, 0, 0, 1186, 1195, 1, 0, 0, 0, 1187, 1191, 10, 3, 0, 0, 1188, 1192, 3, 158, 79, 0, 1189, 1190, 5, 6, 0, 0, 1190, 1192, 3, 160, 80, 0, 1191, 1188, 1, 0, 0, 0, 1191, 1189, 1, 0, 0, 0, 1192, 1194, 1, 0, 0, 0, 1193, 1187, 1, 0, 0, 0, 1194, 1197, 1, 0, 0, 0, 1195, 1193, 1, 0, 0, 0, 1195, 1196, 1, 0, 0, 0, 1196, 137, 1, 0, 0, 0, 1197, 1195, 1, 0, 0, 0, 1198, 1199, 3, 160, 80, 0, 1199, 1201, 5, 130, 0, 0, 1200, 1202, 3, 142, 71, 0, 1201, 1200, 1, 0, 0, 0, 1201, 1202, 1, 0, 0, 0, 1202, 1203, 1, 0, 0, 0, 1203, 1204, 5, 149, 0, 0, 1204, 139, 1, 0, 0, 0, 1205, 1206, 3, 144, 72, 0, 1206, 1207, 5, 120, 0, 0, 1207, 1209, 1, 0, 0, 0, 1208, 1205, 1, 0, 0, 0, 1208, 1209, 1, 0, 0, 0, 1209, 1210, 1, 0, 0, 0, 1210, 1211, 3, 160, 80, 0, 1211, 141, 1, 0, 0, 0, 1212, 1217, 3, 116, 58, 0, 1213, 1214, 5, 116, 0, 0, 1214, 1216, 3, 116, 58, 0, 1215, 1213, 1, 0, 0, 0, 1216, 1219, 1, 0, 0, 0, 1217, 1215, 1, 0, 0, 0, 1217, 1218, 1, 0, 0, 0, 1218, 1221, 1, 0, 0, 0, 1219, 1217, 1, 0, 0, 0, 1220, 1222, 5, 116, 0, 0, 1221, 1220, 1, 0, 0, 0, 1221, 1222, 1, 0, 0, 0, 1222, 143, 1, 0, 0, 0, 1223, 1224, 3, 160, 80, 0, 1224, 145, 1, 0, 0, 0, 1225, 1234, 5, 106, 0, 0, 1226, 1227, 5, 120, 0, 0, 1227, 1234, 7, 11, 0, 0, 1228, 1229, 5, 108, 0, 0, 1229, 1231, 5, 120, 0, 0, 1230, 1232, 7, 11, 0, 0, 1231, 1230, 1, 0, 0, 0, 1231, 1232, 1, 0, 0, 0, 1232, 1234, 1, 0, 0, 0, 1233, 1225, 1, 0, 0, 0, 1233, 1226, 1, 0, 0, 0, 1233, 1228, 1, 0, 0, 0, 1234, 147, 1, 0, 0, 0, 1235, 1237, 7, 12, 0, 0, 1236, 1235, 1, 0, 0, 0, 1236, 1237, 1, 0, 0, 0, 1237, 1244, 1, 0, 0, 0, 1238, 1245, 3, 146, 73, 0, 1239, 1245, 5, 107, 0, 0, 1240, 1245, 5, 108, 0, 0, 1241, 1245, 5, 109, 0, 0, 1242, 1245, 5, 43, 0, 0, 1243, 1245, 5, 57, 0, 0, 1244, 1238, 1, 0, 0, 0, 1244, 1239, 1, 0, 0, 0, 1244, 1240, 1, 0, 0, 0, 1244, 1241, 1, 0, 0, 0, 1244, 1242, 1, 0, 0, 0, 1244, 1243, 1, 0, 0, 0, 1245, 149, 1, 0, 0, 0, 1246, 1250, 3, 148, 74, 0, 1247, 1250, 5, 110, 0, 0, 1248, 1250, 5, 59, 0, 0, 1249, 1246, 1, 0, 0, 0, 1249, 1247, 1, 0, 0, 0, 1249, 1248, 1, 0, 0, 0, 1250, 151, 1, 0, 0, 0, 1251, 1252, 7, 13, 0, 0, 1252, 153, 1, 0, 0, 0, 1253, 1254, 7, 14, 0, 0, 1254, 155, 1, 0, 0, 0, 1255, 1256, 7, 15, 0, 0, 1256, 157, 1, 0, 0, 0, 1257, 1260, 5, 105, 0, 0, 1258, 1260, 3, 156, 78, 0, 1259, 1257, 1, 0, 0, 0, 1259, 1258, 1, 0, 0, 0, 1260, 159, 1, 0, 0, 0, 1261, 1265, 5, 105, 0, 0, 1262, 1265, 3, 152, 76, 0, 1263, 1265, 3, 154, 77, 0, 1264, 1261, 1, 0, 0, 0, 1264, 1262, 1, 0, 0, 0, 1264, 1263, 1, 0, 0, 0, 1265, 161, 1, 0, 0, 0, 1266, 1267, 3, 166, 83, 0, 1267, 1268, 5, 122, 0, 0, 1268, 1269, 3, 148, 74, 0, 1269, 163, 1, 0, 0, 0, 1270, 1271, 5, 128, 0, 0, 1271, 1272, 3, 160, 80, 0, 1272, 1273, 5, 147, 0, 0, 1273, 165, 1, 0, 0, 0, 1274, 1277, 5, 110, 0, 0, 1275, 1277, 3, 168, 84, 0, 1276, 1274, 1, 0, 0, 0, 1276, 1275, 1, 0, 0, 0, 1277, 167, 1, 0, 0, 0, 1278, 1282, 5, 142, 0, 0, 1279, 1281, 3, 170, 85, 0, 1280, 1279, 1, 0, 0, 0, 1281, 1284, 1, 0, 0, 0, 1282, 1280, 1, 0, 0, 0, 1282, 1283, 1, 0, 0, 0, 1283, 1285, 1, 0, 0, 0, 1284, 1282, 1, 0, 0, 0, 1285, 1286, 5, 144, 0, 0, 1286, 169, 1, 0, 0, 0, 1287, 1288, 5, 157, 0, 0, 1288, 1289, 3, 116, 58, 0, 1289, 1290, 5, 147, 0, 0, 1290, 1293, 1, 0, 0, 0, 1291, 1293, 5, 156, 0, 0, 1292, 1287, 1, 0, 0, 0, 1292, 1291, 1, 0, 0, 0, 1293, 171, 1, 0, 0, 0, 1294, 1298, 5, 143, 0, 0, 1295, 1297, 3, 174, 87, 0, 1296, 1295, 1, 0, 0, 0, 1297, 1300, 1, 0, 0, 0, 1298, 1296, 1, 0, 0, 0, 1298, 1299, 1, 0, 0, 0, 1299, 1301, 1, 0, 0, 0, 1300, 1298, 1, 0, 0, 0, 1301, 1302, 5, 0, 0, 1, 1302, 173, 1, 0, 0, 0, 1303, 1304, 5, 159, 0, 0, 1304, 1305, 3, 116, 58, 0, 1305, 1306, 5, 147, 0, 0, 1306, 1309, 1, 0, 0, 0, 1307, 1309, 5, 158, 0, 0, 1308, 1303, 1, 0, 0, 0, 1308, 1307, 1, 0, 0, 0, 1309, 175, 1, 0, 0, 0, 168, 179, 186, 195, 202, 206, 220, 224, 227, 231, 234, 241, 245, 254, 259, 268, 276, 283, 287, 293, 298, 306, 313, 319, 331, 339, 353, 357, 362, 372, 381, 384, 388, 391, 395, 398, 401, 404, 407, 411, 415, 418, 421, 424, 428, 431, 440, 446, 467, 484, 501, 507, 513, 524, 526, 537, 540, 546, 554, 560, 562, 566, 571, 574, 577, 581, 585, 588, 590, 593, 597, 601, 604, 606, 608, 613, 624, 630, 637, 642, 646, 650, 656, 658, 665, 673, 676, 679, 698, 712, 728, 732, 743, 747, 758, 762, 769, 773, 780, 784, 789, 798, 802, 826, 843, 849, 852, 855, 865, 871, 874, 877, 885, 888, 892, 895, 909, 926, 931, 935, 941, 948, 960, 964, 967, 976, 990, 1029, 1037, 1039, 1041, 1049, 1053, 1057, 1065, 1069, 1078, 1082, 1084, 1094, 1105, 1114, 1121, 1134, 1141, 1145, 1157, 1163, 1166, 1173, 1185, 1191, 1195, 1201, 1208, 1217, 1221, 1231, 1233, 1236, 1244, 1249, 1259, 1264, 1276, 1282, 1292, 1298, 1308] \ No newline at end of file diff --git a/hogql_parser/HogQLParser.tokens b/hogql_parser/HogQLParser.tokens index 3ba82bf92c17b..320718e97710b 100644 --- a/hogql_parser/HogQLParser.tokens +++ b/hogql_parser/HogQLParser.tokens @@ -11,186 +11,190 @@ BOTH=10 BY=11 CASE=12 CAST=13 -COHORT=14 -COLLATE=15 -CROSS=16 -CUBE=17 -CURRENT=18 -DATE=19 -DAY=20 -DESC=21 -DESCENDING=22 -DISTINCT=23 -ELSE=24 -END=25 -EXTRACT=26 -FINAL=27 -FIRST=28 -FN=29 -FOLLOWING=30 -FOR=31 -FROM=32 -FULL=33 -GROUP=34 -HAVING=35 -HOUR=36 -ID=37 -IF=38 -ILIKE=39 -IN=40 -INF=41 -INNER=42 -INTERVAL=43 -IS=44 -JOIN=45 -KEY=46 -LAST=47 -LEADING=48 -LEFT=49 -LET=50 -LIKE=51 -LIMIT=52 -MINUTE=53 -MONTH=54 -NAN_SQL=55 -NOT=56 -NULL_SQL=57 -NULLS=58 -OFFSET=59 -ON=60 -OR=61 -ORDER=62 -OUTER=63 -OVER=64 -PARTITION=65 -PRECEDING=66 -PREWHERE=67 -QUARTER=68 -RANGE=69 -RETURN=70 -RIGHT=71 -ROLLUP=72 -ROW=73 -ROWS=74 -SAMPLE=75 -SECOND=76 -SELECT=77 -SEMI=78 -SETTINGS=79 -SUBSTRING=80 -THEN=81 -TIES=82 -TIMESTAMP=83 -TO=84 -TOP=85 -TOTALS=86 -TRAILING=87 -TRIM=88 -TRUNCATE=89 -UNBOUNDED=90 -UNION=91 -USING=92 -WEEK=93 -WHEN=94 -WHERE=95 -WHILE=96 -WINDOW=97 -WITH=98 -YEAR=99 -ESCAPE_CHAR_COMMON=100 -IDENTIFIER=101 -FLOATING_LITERAL=102 -OCTAL_LITERAL=103 -DECIMAL_LITERAL=104 -HEXADECIMAL_LITERAL=105 -STRING_LITERAL=106 -ARROW=107 -ASTERISK=108 -BACKQUOTE=109 -BACKSLASH=110 -COLON=111 -COMMA=112 -CONCAT=113 -DASH=114 -DOLLAR=115 -DOT=116 -EQ_DOUBLE=117 -EQ_SINGLE=118 -GT_EQ=119 -GT=120 -HASH=121 -IREGEX_SINGLE=122 -IREGEX_DOUBLE=123 -LBRACE=124 -LBRACKET=125 -LPAREN=126 -LT_EQ=127 -LT=128 -NOT_EQ=129 -NOT_IREGEX=130 -NOT_REGEX=131 -NULL_PROPERTY=132 -NULLISH=133 -PERCENT=134 -PLUS=135 -QUERY=136 -QUOTE_DOUBLE=137 -QUOTE_SINGLE_TEMPLATE=138 -QUOTE_SINGLE_TEMPLATE_FULL=139 -QUOTE_SINGLE=140 -REGEX_SINGLE=141 -REGEX_DOUBLE=142 -RBRACE=143 -RBRACKET=144 -RPAREN=145 -SEMICOLON=146 -SLASH=147 -UNDERSCORE=148 -MULTI_LINE_COMMENT=149 -SINGLE_LINE_COMMENT=150 -WHITESPACE=151 -STRING_TEXT=152 -STRING_ESCAPE_TRIGGER=153 -FULL_STRING_TEXT=154 -FULL_STRING_ESCAPE_TRIGGER=155 -'->'=107 -'*'=108 -'`'=109 -'\\'=110 -':'=111 -','=112 -'||'=113 -'-'=114 -'$'=115 -'.'=116 -'=='=117 -'='=118 -'>='=119 -'>'=120 -'#'=121 -'~*'=122 -'=~*'=123 -'{'=124 -'['=125 -'('=126 -'<='=127 -'<'=128 -'!~*'=130 -'!~'=131 -'?.'=132 -'??'=133 -'%'=134 -'+'=135 -'?'=136 -'"'=137 -'f\''=138 -'F\''=139 -'\''=140 -'~'=141 -'=~'=142 -'}'=143 -']'=144 -')'=145 -';'=146 -'/'=147 -'_'=148 +CATCH=14 +COHORT=15 +COLLATE=16 +CROSS=17 +CUBE=18 +CURRENT=19 +DATE=20 +DAY=21 +DESC=22 +DESCENDING=23 +DISTINCT=24 +ELSE=25 +END=26 +EXTRACT=27 +FINAL=28 +FINALLY=29 +FIRST=30 +FN=31 +FOLLOWING=32 +FOR=33 +FROM=34 +FULL=35 +GROUP=36 +HAVING=37 +HOUR=38 +ID=39 +IF=40 +ILIKE=41 +IN=42 +INF=43 +INNER=44 +INTERVAL=45 +IS=46 +JOIN=47 +KEY=48 +LAST=49 +LEADING=50 +LEFT=51 +LET=52 +LIKE=53 +LIMIT=54 +MINUTE=55 +MONTH=56 +NAN_SQL=57 +NOT=58 +NULL_SQL=59 +NULLS=60 +OFFSET=61 +ON=62 +OR=63 +ORDER=64 +OUTER=65 +OVER=66 +PARTITION=67 +PRECEDING=68 +PREWHERE=69 +QUARTER=70 +RANGE=71 +RETURN=72 +RIGHT=73 +ROLLUP=74 +ROW=75 +ROWS=76 +SAMPLE=77 +SECOND=78 +SELECT=79 +SEMI=80 +SETTINGS=81 +SUBSTRING=82 +THEN=83 +THROW=84 +TIES=85 +TIMESTAMP=86 +TO=87 +TOP=88 +TOTALS=89 +TRAILING=90 +TRIM=91 +TRUNCATE=92 +TRY=93 +UNBOUNDED=94 +UNION=95 +USING=96 +WEEK=97 +WHEN=98 +WHERE=99 +WHILE=100 +WINDOW=101 +WITH=102 +YEAR=103 +ESCAPE_CHAR_COMMON=104 +IDENTIFIER=105 +FLOATING_LITERAL=106 +OCTAL_LITERAL=107 +DECIMAL_LITERAL=108 +HEXADECIMAL_LITERAL=109 +STRING_LITERAL=110 +ARROW=111 +ASTERISK=112 +BACKQUOTE=113 +BACKSLASH=114 +COLON=115 +COMMA=116 +CONCAT=117 +DASH=118 +DOLLAR=119 +DOT=120 +EQ_DOUBLE=121 +EQ_SINGLE=122 +GT_EQ=123 +GT=124 +HASH=125 +IREGEX_SINGLE=126 +IREGEX_DOUBLE=127 +LBRACE=128 +LBRACKET=129 +LPAREN=130 +LT_EQ=131 +LT=132 +NOT_EQ=133 +NOT_IREGEX=134 +NOT_REGEX=135 +NULL_PROPERTY=136 +NULLISH=137 +PERCENT=138 +PLUS=139 +QUERY=140 +QUOTE_DOUBLE=141 +QUOTE_SINGLE_TEMPLATE=142 +QUOTE_SINGLE_TEMPLATE_FULL=143 +QUOTE_SINGLE=144 +REGEX_SINGLE=145 +REGEX_DOUBLE=146 +RBRACE=147 +RBRACKET=148 +RPAREN=149 +SEMICOLON=150 +SLASH=151 +UNDERSCORE=152 +MULTI_LINE_COMMENT=153 +SINGLE_LINE_COMMENT=154 +WHITESPACE=155 +STRING_TEXT=156 +STRING_ESCAPE_TRIGGER=157 +FULL_STRING_TEXT=158 +FULL_STRING_ESCAPE_TRIGGER=159 +'->'=111 +'*'=112 +'`'=113 +'\\'=114 +':'=115 +','=116 +'||'=117 +'-'=118 +'$'=119 +'.'=120 +'=='=121 +'='=122 +'>='=123 +'>'=124 +'#'=125 +'~*'=126 +'=~*'=127 +'{'=128 +'['=129 +'('=130 +'<='=131 +'<'=132 +'!~*'=134 +'!~'=135 +'?.'=136 +'??'=137 +'%'=138 +'+'=139 +'?'=140 +'"'=141 +'f\''=142 +'F\''=143 +'\''=144 +'~'=145 +'=~'=146 +'}'=147 +']'=148 +')'=149 +';'=150 +'/'=151 +'_'=152 diff --git a/hogql_parser/HogQLParserBaseVisitor.h b/hogql_parser/HogQLParserBaseVisitor.h index 6209109ea76c3..7329e835cad57 100644 --- a/hogql_parser/HogQLParserBaseVisitor.h +++ b/hogql_parser/HogQLParserBaseVisitor.h @@ -43,6 +43,18 @@ class HogQLParserBaseVisitor : public HogQLParserVisitor { return visitChildren(ctx); } + virtual std::any visitThrowStmt(HogQLParser::ThrowStmtContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitCatchBlock(HogQLParser::CatchBlockContext *ctx) override { + return visitChildren(ctx); + } + + virtual std::any visitTryCatchStmt(HogQLParser::TryCatchStmtContext *ctx) override { + return visitChildren(ctx); + } + virtual std::any visitIfStmt(HogQLParser::IfStmtContext *ctx) override { return visitChildren(ctx); } diff --git a/hogql_parser/HogQLParserVisitor.h b/hogql_parser/HogQLParserVisitor.h index cbac4ba6d71b5..8e4259a8209b1 100644 --- a/hogql_parser/HogQLParserVisitor.h +++ b/hogql_parser/HogQLParserVisitor.h @@ -33,6 +33,12 @@ class HogQLParserVisitor : public antlr4::tree::AbstractParseTreeVisitor { virtual std::any visitReturnStmt(HogQLParser::ReturnStmtContext *context) = 0; + virtual std::any visitThrowStmt(HogQLParser::ThrowStmtContext *context) = 0; + + virtual std::any visitCatchBlock(HogQLParser::CatchBlockContext *context) = 0; + + virtual std::any visitTryCatchStmt(HogQLParser::TryCatchStmtContext *context) = 0; + virtual std::any visitIfStmt(HogQLParser::IfStmtContext *context) = 0; virtual std::any visitWhileStmt(HogQLParser::WhileStmtContext *context) = 0; diff --git a/hogql_parser/parser.cpp b/hogql_parser/parser.cpp index 76b00eda0c7d0..f82dcd2bf476c 100644 --- a/hogql_parser/parser.cpp +++ b/hogql_parser/parser.cpp @@ -373,6 +373,16 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { return visit(return_stmt_ctx); } + auto throw_stmt_ctx = ctx->throwStmt(); + if (throw_stmt_ctx) { + return visit(throw_stmt_ctx); + } + + auto try_catch_stmt_ctx = ctx->tryCatchStmt(); + if (try_catch_stmt_ctx) { + return visit(try_catch_stmt_ctx); + } + auto if_stmt_ctx = ctx->ifStmt(); if (if_stmt_ctx) { return visit(if_stmt_ctx); @@ -418,7 +428,7 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { return visit(empty_stmt_ctx); } - throw ParsingError("Statement must be one of returnStmt, ifStmt, whileStmt, forStmt, forInStmt, funcStmt, " + throw ParsingError("Statement must be one of returnStmt, throwStmt, tryCatchStmt, ifStmt, whileStmt, forStmt, forInStmt, funcStmt, " "varAssignment, block, exprStmt, or emptyStmt"); } @@ -452,6 +462,104 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { return ret; } + VISIT(ThrowStmt) { + PyObject* expr; + try { + expr = visitAsPyObjectOrNone(ctx->expression()); + } catch (...) { + throw; + } + RETURN_NEW_AST_NODE("ThrowStatement", "{s:N}", "expr", expr); + } + + VISIT(CatchBlock) { + PyObject* catch_var_py; + string catch_var; + if (ctx->catchVar) { + catch_var = visitAsString(ctx->catchVar); + catch_var_py = PyUnicode_FromStringAndSize(catch_var.data(), catch_var.size()); + } else { + catch_var_py = Py_NewRef(Py_None); + } + + PyObject* catch_type_py; + string catch_type; + if (ctx->catchType) { + catch_type = visitAsString(ctx->catchType); + catch_type_py = PyUnicode_FromStringAndSize(catch_type.data(), catch_type.size()); + } else { + catch_type_py = Py_None; + Py_INCREF(catch_type_py); + } + + PyObject* catch_stmt; + try { + catch_stmt = visitAsPyObject(ctx->catchStmt); + } catch (...) { + Py_DECREF(catch_var_py); + Py_DECREF(catch_type_py); + throw; + } + PyObject* ret = PyTuple_Pack(3, catch_var_py, catch_type_py, catch_stmt); + Py_DECREF(catch_var_py); + Py_DECREF(catch_type_py); + Py_DECREF(catch_stmt); + if (!ret) { + throw PyInternalError(); + } + return ret; + } + + VISIT(TryCatchStmt) { + PyObject* try_stmt; + try { + try_stmt = visitAsPyObject(ctx->tryStmt); + } catch (...) { + throw; + } + PyObject* catches = PyList_New(0); + if (!catches) { + Py_DECREF(try_stmt); + throw PyInternalError(); + } + auto catch_block_ctxs = ctx->catchBlock(); + for (auto catch_block_ctx : catch_block_ctxs) { + PyObject* catch_block; + try { + catch_block = visitAsPyObject(catch_block_ctx); + } catch (...) { + Py_DECREF(try_stmt); + Py_DECREF(catches); + throw; + } + int append_code = PyList_Append(catches, catch_block); + Py_DECREF(catch_block); + if (append_code == -1) { + Py_DECREF(try_stmt); + Py_DECREF(catches); + throw PyInternalError(); + } + } + PyObject* finally_stmt; + try { + finally_stmt = visitAsPyObjectOrNone(ctx->finallyStmt); + } catch (...) { + Py_DECREF(try_stmt); + Py_DECREF(catches); + throw; + } + PyObject* ret = build_ast_node( + "TryCatchStatement", "{s:N,s:N,s:N}", "try_stmt", try_stmt, "catches", catches, "finally_stmt", finally_stmt + ); + if (!ret) { + Py_DECREF(try_stmt); + Py_DECREF(catches); + Py_DECREF(finally_stmt); + throw PyInternalError(); + } + return ret; + } + VISIT(IfStmt) { PyObject* expr; try { @@ -2376,8 +2484,9 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { } auto tag_element_ctx = ctx->hogqlxTagElement(); + auto column_expr_ctx = ctx->columnExpr(); auto tag_attribute_ctx = ctx->hogqlxTagAttribute(); - PyObject* attributes = PyList_New(tag_attribute_ctx.size() + (tag_element_ctx ? 1 : 0)); + PyObject* attributes = PyList_New(tag_attribute_ctx.size() + (tag_element_ctx || column_expr_ctx ? 1 : 0)); if (!attributes) throw PyInternalError(); bool found_source = false; for (size_t i = 0; i < tag_attribute_ctx.size(); i++) { @@ -2426,6 +2535,19 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor { throw PyInternalError(); } PyList_SET_ITEM(attributes, tag_attribute_ctx.size(), source_attribute); + } else if (column_expr_ctx) { + if (found_source) { + Py_DECREF(attributes); + throw SyntaxError("Nested HogQLX tags cannot have a source attribute"); + } + PyObject* source_attribute = build_ast_node( + "HogQLXAttribute", "{s:s#,s:N}", "name", "source", 6, "value", visitAsPyObject(ctx->columnExpr()) + ); + if (!source_attribute) { + Py_DECREF(attributes); + throw PyInternalError(); + } + PyList_SET_ITEM(attributes, tag_attribute_ctx.size(), source_attribute); } RETURN_NEW_AST_NODE("HogQLXTag", "{s:s#,s:N}", "kind", opening.data(), opening.size(), "attributes", attributes); diff --git a/hogql_parser/setup.py b/hogql_parser/setup.py index f5e889cf8b201..3c7bc51026aa6 100644 --- a/hogql_parser/setup.py +++ b/hogql_parser/setup.py @@ -32,7 +32,7 @@ setup( name="hogql_parser", - version="1.0.29", + version="1.0.32", url="https://github.com/PostHog/posthog/tree/master/hogql_parser", author="PostHog Inc.", author_email="hey@posthog.com", diff --git a/hogvm/__tests__/__snapshots__/catch.hoge b/hogvm/__tests__/__snapshots__/catch.hoge new file mode 100644 index 0000000000000..3fbbdda162693 --- /dev/null +++ b/hogvm/__tests__/__snapshots__/catch.hoge @@ -0,0 +1,11 @@ +["_h", 41, "FishError", 1, 9, 31, 36, 0, 32, "FishError", 2, "HogError", 3, 38, 41, "FoodError", 1, 9, 31, 36, 0, 32, +"FoodError", 2, "HogError", 3, 38, 50, 10, 32, "You forgot to feed your fish", 2, "FishError", 1, 49, 51, 39, 55, 36, 0, +32, "type", 45, 32, "FoodError", 36, 1, 11, 40, 16, 36, 0, 32, "message", 45, 32, "Problem with your food: ", 2, +"concat", 2, 2, "print", 1, 35, 39, 25, 32, "FishError", 36, 1, 11, 40, 16, 36, 0, 32, "message", 45, 32, +"Problem with your fish: ", 2, "concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 50, 10, 32, +"Your fish are hungry", 2, "FoodError", 1, 49, 51, 39, 55, 36, 0, 32, "type", 45, 32, "FoodError", 36, 1, 11, 40, 16, +36, 0, 32, "message", 45, 32, "Problem with your food: ", 2, "concat", 2, 2, "print", 1, 35, 39, 25, 32, "FishError", +36, 1, 11, 40, 16, 36, 0, 32, "message", 45, 32, "Problem with your fish: ", 2, "concat", 2, 2, "print", 1, 35, 39, 2, +35, 49, 35, 35, 50, 11, 31, 32, "Your fish are hungry", 2, "NotImplementedError", 2, 49, 51, 39, 45, 36, 0, 32, "type", +45, 32, "FoodError", 36, 1, 11, 40, 16, 36, 0, 32, "message", 45, 32, "Problem with your food: ", 2, "concat", 2, 2, +"print", 1, 35, 39, 15, 36, 0, 32, "Unknown problem: ", 2, "concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35] diff --git a/hogvm/__tests__/__snapshots__/catch.stdout b/hogvm/__tests__/__snapshots__/catch.stdout new file mode 100644 index 0000000000000..986dc7d59c64f --- /dev/null +++ b/hogvm/__tests__/__snapshots__/catch.stdout @@ -0,0 +1,3 @@ +Problem with your fish: You forgot to feed your fish +Problem with your food: Your fish are hungry +Unknown problem: NotImplementedError('Your fish are hungry') diff --git a/hogvm/__tests__/__snapshots__/catch2.hoge b/hogvm/__tests__/__snapshots__/catch2.hoge new file mode 100644 index 0000000000000..52aa53597834c --- /dev/null +++ b/hogvm/__tests__/__snapshots__/catch2.hoge @@ -0,0 +1,15 @@ +["_h", 50, 50, 50, 13, 31, 32, "You forgot to feed your fish", 32, "FishError", 2, "HogError", 3, 49, 51, 39, 32, 36, 0, +32, "type", 45, 32, "FoodError", 36, 1, 11, 40, 16, 36, 0, 32, "message", 45, 32, "Problem with your food: ", 2, +"concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 51, 39, 48, 36, 0, 32, "type", 45, 32, "FishError", 36, 1, 11, +40, 16, 36, 0, 32, "message", 45, 32, "FishError: ", 2, "concat", 2, 2, "print", 1, 35, 39, 18, 36, 0, 32, "message", +45, 32, "Error: ", 2, "concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 50, 50, 50, 13, 31, 32, +"You forgot to feed your fish", 32, "FunkyError", 2, "HogError", 3, 49, 51, 39, 32, 36, 0, 32, "type", 45, 32, +"FoodError", 36, 1, 11, 40, 16, 36, 0, 32, "message", 45, 32, "Problem with your food: ", 2, "concat", 2, 2, "print", 1, +35, 39, 2, 35, 49, 35, 35, 51, 39, 55, 36, 0, 32, "type", 45, 32, "FishError", 36, 1, 11, 40, 16, 36, 0, 32, "message", +45, 32, "FishError: ", 2, "concat", 2, 2, "print", 1, 35, 39, 25, 36, 0, 32, "message", 45, 32, ": ", 36, 0, 32, "name", +45, 32, "Error of type ", 2, "concat", 4, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 50, 50, 50, 13, 31, 32, +"You forgot to feed your fish", 32, "FishError", 2, "HogError", 3, 49, 51, 39, 32, 36, 0, 32, "type", 45, 32, +"FoodError", 36, 1, 11, 40, 16, 36, 0, 32, "message", 45, 32, "Problem with your food: ", 2, "concat", 2, 2, "print", 1, +35, 39, 2, 35, 49, 35, 35, 51, 39, 55, 36, 0, 32, "type", 45, 36, 0, 32, "message", 45, 32, ": ", 36, 0, 32, "name", 45, +32, "Error of type ", 2, "concat", 4, 2, "print", 1, 35, 39, 25, 32, "FishError", 36, 1, 11, 40, 16, 36, 0, 32, +"message", 45, 32, "FishError: ", 2, "concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35] diff --git a/hogvm/__tests__/__snapshots__/catch2.stdout b/hogvm/__tests__/__snapshots__/catch2.stdout new file mode 100644 index 0000000000000..f30ba83b8cfe0 --- /dev/null +++ b/hogvm/__tests__/__snapshots__/catch2.stdout @@ -0,0 +1,3 @@ +FishError: You forgot to feed your fish +Error of type : You forgot to feed your fish +Error of type : You forgot to feed your fish diff --git a/hogvm/__tests__/__snapshots__/exceptions.hoge b/hogvm/__tests__/__snapshots__/exceptions.hoge new file mode 100644 index 0000000000000..41aa587028ab3 --- /dev/null +++ b/hogvm/__tests__/__snapshots__/exceptions.hoge @@ -0,0 +1,14 @@ +["_h", 32, "start", 2, "print", 1, 35, 50, 10, 32, "try", 2, "print", 1, 35, 51, 39, 22, 36, 0, 32, "type", 45, 32, +" was the exception", 36, 0, 2, "concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 32, "------------------", 2, +"print", 1, 35, 32, "start", 2, "print", 1, 35, 50, 10, 32, "try", 2, "print", 1, 35, 51, 39, 17, 36, 0, 32, "type", 45, +32, "No var for error, but no error", 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 32, "------------------", 2, "print", 1, +35, 50, 16, 32, "try again", 2, "print", 1, 35, 31, 31, 2, "Error", 2, 49, 51, 39, 22, 36, 0, 32, "type", 45, 32, +" was the exception", 36, 0, 2, "concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 32, "------------------", 2, +"print", 1, 35, 50, 16, 32, "try again", 2, "print", 1, 35, 31, 31, 2, "Error", 2, 49, 51, 39, 17, 36, 0, 32, "type", +45, 32, "No var for error", 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 32, "------------------", 2, "print", 1, 35, 41, +"third", 0, 15, 32, "Throwing in third", 2, "print", 1, 35, 31, 32, "Threw in third", 2, "Error", 2, 49, 31, 38, 41, +"second", 0, 12, 32, "second", 2, "print", 1, 35, 2, "third", 0, 35, 31, 38, 41, "first", 0, 12, 32, "first", 2, +"print", 1, 35, 2, "second", 0, 35, 31, 38, 41, "base", 0, 42, 32, "base", 2, "print", 1, 35, 50, 8, 2, "first", 0, 35, +51, 39, 25, 36, 0, 32, "type", 45, 36, 0, 32, "Caught in base: ", 2, "concat", 2, 2, "print", 1, 35, 36, 0, 49, 39, 2, +35, 49, 35, 35, 31, 38, 50, 8, 2, "base", 0, 35, 51, 39, 22, 36, 0, 32, "type", 45, 36, 0, 32, "Caught in root: ", 2, +"concat", 2, 2, "print", 1, 35, 39, 2, 35, 49, 35, 35, 32, "The end", 2, "print", 1, 35] diff --git a/hogvm/__tests__/__snapshots__/exceptions.stdout b/hogvm/__tests__/__snapshots__/exceptions.stdout new file mode 100644 index 0000000000000..8c28f5abdad29 --- /dev/null +++ b/hogvm/__tests__/__snapshots__/exceptions.stdout @@ -0,0 +1,19 @@ +start +try +------------------ +start +try +------------------ +try again +Error('An error occurred') was the exception +------------------ +try again +No var for error +------------------ +base +first +second +Throwing in third +Caught in base: Error('Threw in third') +Caught in root: Error('Threw in third') +The end diff --git a/hogvm/__tests__/catch.hog b/hogvm/__tests__/catch.hog new file mode 100644 index 0000000000000..a7554cab7240d --- /dev/null +++ b/hogvm/__tests__/catch.hog @@ -0,0 +1,30 @@ +fn FishError(message) { + return HogError('FishError', message) +} +fn FoodError(message) { + return HogError('FoodError', message) +} + +try { + throw FishError('You forgot to feed your fish') +} catch (e: FoodError) { + print(f'Problem with your food: {e.message}') +} catch (e: FishError) { + print(f'Problem with your fish: {e.message}') +} + +try { + throw FoodError('Your fish are hungry') +} catch (e: FoodError) { + print(f'Problem with your food: {e.message}') +} catch (e: FishError) { + print(f'Problem with your fish: {e.message}') +} + +try { + throw NotImplementedError('Your fish are hungry') +} catch (e: FoodError) { + print(f'Problem with your food: {e.message}') +} catch { + print(f'Unknown problem: {e}') +} diff --git a/hogvm/__tests__/catch2.hog b/hogvm/__tests__/catch2.hog new file mode 100644 index 0000000000000..cd48ab951cf83 --- /dev/null +++ b/hogvm/__tests__/catch2.hog @@ -0,0 +1,35 @@ +try { + try { + throw HogError('FishError', 'You forgot to feed your fish') + } catch (e: FoodError) { + print(f'Problem with your food: {e.message}') + } +} catch (e: FishError) { + print(f'FishError: {e.message}') +} catch (e: Error) { + print(f'Error: {e.message}') +} + +try { + try { + throw HogError('FunkyError', 'You forgot to feed your fish') + } catch (e: FoodError) { + print(f'Problem with your food: {e.message}') + } +} catch (e: FishError) { + print(f'FishError: {e.message}') +} catch (e: Error) { + print(f'Error of type {e.name}: {e.message}') +} + +try { + try { + throw HogError('FishError', 'You forgot to feed your fish') + } catch (e: FoodError) { + print(f'Problem with your food: {e.message}') + } +} catch (e: Error) { + print(f'Error of type {e.name}: {e.message}') +} catch (e: FishError) { + print(f'FishError: {e.message}') +} diff --git a/hogvm/__tests__/exceptions.hog b/hogvm/__tests__/exceptions.hog new file mode 100644 index 0000000000000..462494210e290 --- /dev/null +++ b/hogvm/__tests__/exceptions.hog @@ -0,0 +1,68 @@ +print('start') +try { + print('try') +} catch (e) { + print(f'{e} was the exception') +} + + +print('------------------') + +print('start') +try { + print('try') +} catch { + print('No var for error, but no error') +} + +print('------------------') + +try { + print('try again') + throw Error() +} catch (e) { + print(f'{e} was the exception') +} + +print('------------------') + +try { + print('try again') + throw Error() +} catch { + print('No var for error') +} + +print('------------------') + +fn third() { + print('Throwing in third') + throw Error('Threw in third') +} + +fn second() { + print('second') + third() +} + +fn first() { + print('first') + second() +} + +fn base() { + print('base') + try { + first() + } catch (e) { + print(f'Caught in base: {e}') + throw e + } +} + +try { + base() +} catch (e) { + print(f'Caught in root: {e}') +} +print('The end') diff --git a/hogvm/asd.hog b/hogvm/asd.hog deleted file mode 100644 index 46d0997010f7e..0000000000000 --- a/hogvm/asd.hog +++ /dev/null @@ -1 +0,0 @@ -return [1, 2, 3][0] diff --git a/hogvm/asd.hoge b/hogvm/asd.hoge deleted file mode 100644 index a62fd0c1401dd..0000000000000 --- a/hogvm/asd.hoge +++ /dev/null @@ -1 +0,0 @@ -["_h", 33, 1, 33, 2, 33, 3, 43, 3, 33, 0, 45, 38] diff --git a/hogvm/python/debugger.py b/hogvm/python/debugger.py index 1f5bb8b684172..270c1a5233c01 100644 --- a/hogvm/python/debugger.py +++ b/hogvm/python/debugger.py @@ -7,7 +7,9 @@ debug_speed = -1 -def debugger(symbol: Any, bytecode: list, colored_bytecode: list, ip: int, stack: list, call_stack: list): +def debugger( + symbol: Any, bytecode: list, colored_bytecode: list, ip: int, stack: list, call_stack: list, throw_stack: list +): print("\033[H\033[J", end="") # noqa: T201 next_symbol = symbol @@ -17,6 +19,7 @@ def debugger(symbol: Any, bytecode: list, colored_bytecode: list, ip: int, stack pass top: list = [] + top.append(f"throw_stack: {throw_stack}") # noqa: T201 top.append(f"call_stack: {call_stack}") # noqa: T201 top.append(f"stack: {stack}") # noqa: T201 top.append(f"next: {next_symbol}") # noqa: T201 @@ -140,6 +143,8 @@ def print_symbol(symbol: Operation, ip: int, bytecode: list, stack: list, call_s return f"GET_LOCAL({bytecode[ip + 1]}, {stack[-1]})" case Operation.GET_PROPERTY: return f"GET_PROPERTY({stack[-2]}, {stack[-1]})" + case Operation.GET_PROPERTY_NULLISH: + return f"GET_PROPERTY_NULLISH({stack[-2]}, {stack[-1]})" case Operation.SET_PROPERTY: return f"SET_PROPERTY({stack[-3]}, {stack[-2]}, {stack[-1]})" case Operation.DICT: @@ -152,10 +157,20 @@ def print_symbol(symbol: Operation, ip: int, bytecode: list, stack: list, call_s return f"JUMP({'+' if bytecode[ip+1] >= 0 else ''}{bytecode[ip+1]})" case Operation.JUMP_IF_FALSE: return f"JUMP_IF_FALSE({'+' if bytecode[ip+1] >= 0 else ''}{bytecode[ip+1]}, {bool(stack[-1])})" + case Operation.JUMP_IF_STACK_NOT_NULL: + return ( + f"JUMP_IF_STACK_NOT_NULL({'+' if bytecode[ip+1] >= 0 else ''}{bytecode[ip+1]}, {bool(stack[-1])})" + ) case Operation.DECLARE_FN: return f"DECLARE_FN({bytecode[ip+1]}, args={bytecode[ip+2]}, ops={bytecode[ip+3]})" case Operation.CALL: return f"CALL({bytecode[ip+1]} {', '.join(str(stack[-i]) for i in range(bytecode[ip+2]))})" + case Operation.TRY: + return f"TRY(+{bytecode[ip+1]})" + case Operation.POP_TRY: + return "POP_TRY" + case Operation.THROW: + return f"THROW({stack[-1]})" return symbol.name except Exception as e: return f"{symbol.name}(ERROR: {e})" @@ -241,6 +256,8 @@ def color_bytecode(bytecode: list) -> list: add = ["op.SET_LOCAL", f"index: {bytecode[ip+1]}"] case Operation.GET_PROPERTY: add = ["op.GET_PROPERTY"] + case Operation.GET_PROPERTY_NULLISH: + add = ["op.GET_PROPERTY_NULLISH"] case Operation.SET_PROPERTY: add = ["op.SET_PROPERTY"] case Operation.DICT: @@ -250,15 +267,23 @@ def color_bytecode(bytecode: list) -> list: case Operation.TUPLE: add = ["op.TUPLE", f"element count: {bytecode[ip+1]}"] case Operation.JUMP: - add = ["op.JUMP", f"offset: {bytecode[ip+1]}"] + add = ["op.JUMP", f"offset: {'+' if bytecode[ip+1] >= 0 else ''}{bytecode[ip+1]}"] case Operation.JUMP_IF_FALSE: - add = ["op.JUMP_IF_FALSE", f"offset: {bytecode[ip+1]}"] + add = ["op.JUMP_IF_FALSE", f"offset: {'+' if bytecode[ip+1] >= 0 else ''}{bytecode[ip+1]}"] + case Operation.JUMP_IF_STACK_NOT_NULL: + add = ["op.JUMP_IF_STACK_NOT_NULL", f"offset: {'+' if bytecode[ip+1] >= 0 else ''}{bytecode[ip+1]}"] case Operation.DECLARE_FN: add = ["op.DECLARE_FN", f"name: {bytecode[ip+1]}", f"args: {bytecode[ip+2]}", f"ops: {bytecode[ip+3]}"] case Operation.CALL: add = ["op.CALL", f"name: {bytecode[ip+1]}", f"args: {bytecode[ip+2]}"] + case Operation.TRY: + add = ["op.TRY", f"catch: +{bytecode[ip+1]}"] + case Operation.POP_TRY: + add = ["op.POP_TRY"] + case Operation.THROW: + add = ["op.THROW"] case _: - add = ["ERROR"] + add = [f"ERROR: Unknown bytecode {symbol}"] colored.extend(add) ip += len(add) return colored diff --git a/hogvm/python/execute.py b/hogvm/python/execute.py index 909223cbb5941..c137868d026e5 100644 --- a/hogvm/python/execute.py +++ b/hogvm/python/execute.py @@ -6,11 +6,19 @@ from collections.abc import Callable from hogvm.python.debugger import debugger, color_bytecode +from hogvm.python.objects import is_hog_error from hogvm.python.operation import Operation, HOGQL_BYTECODE_IDENTIFIER from hogvm.python.stl import STL from dataclasses import dataclass -from hogvm.python.utils import HogVMException, get_nested_value, like, set_nested_value, calculate_cost +from hogvm.python.utils import ( + UncaughtHogVMException, + HogVMException, + get_nested_value, + like, + set_nested_value, + calculate_cost, +) if TYPE_CHECKING: from posthog.models import Team @@ -39,6 +47,7 @@ def execute_bytecode( stack: list = [] mem_stack: list = [] call_stack: list[tuple[int, int, int]] = [] # (ip, stack_start, arg_len) + throw_stack: list[tuple[int, int, int]] = [] # (call_stack_length, stack_length, catch_ip) declared_functions: dict[str, tuple[int, int]] = {} mem_used = 0 max_mem_used = 0 @@ -89,7 +98,7 @@ def check_timeout(): if (ops & 127) == 0: # every 128th operation check_timeout() elif debug: - debugger(symbol, bytecode, colored_bytecode, ip, stack, call_stack) + debugger(symbol, bytecode, colored_bytecode, ip, stack, call_stack, throw_stack) match symbol: case None: break @@ -260,11 +269,37 @@ def check_timeout(): if name not in STL: raise HogVMException(f"Unsupported function call: {name}") - push_stack(STL[name](args, team, stdout, timeout)) + push_stack(STL[name](args, team, stdout, timeout.total_seconds())) + case Operation.TRY: + throw_stack.append((len(call_stack), len(stack), ip + next_token())) + case Operation.POP_TRY: + if throw_stack: + throw_stack.pop() + else: + raise HogVMException("Invalid operation POP_TRY: no try block to pop") + case Operation.THROW: + exception = pop_stack() + if not is_hog_error(exception): + raise HogVMException("Can not throw: value is not of type Error") + if throw_stack: + call_stack_len, stack_len, catch_ip = throw_stack.pop() + stack = stack[0:stack_len] + mem_used -= sum(mem_stack[stack_len:]) + mem_stack = mem_stack[0:stack_len] + call_stack = call_stack[0:call_stack_len] + push_stack(exception) + ip = catch_ip + else: + raise UncaughtHogVMException( + type=exception.get("type"), + message=exception.get("message"), + payload=exception.get("payload"), + ) + if ip == last_op: break if debug: - debugger(symbol, bytecode, colored_bytecode, ip, stack, call_stack) + debugger(symbol, bytecode, colored_bytecode, ip, stack, call_stack, throw_stack) if len(stack) > 1: raise HogVMException("Invalid bytecode. More than one value left on stack") if len(stack) == 1: diff --git a/hogvm/python/objects.py b/hogvm/python/objects.py new file mode 100644 index 0000000000000..a514e7a5686d9 --- /dev/null +++ b/hogvm/python/objects.py @@ -0,0 +1,22 @@ +from typing import Any + + +def is_hog_date(obj: Any) -> bool: + return isinstance(obj, dict) and "__hogDate__" in obj and "year" in obj and "month" in obj and "day" in obj + + +def is_hog_datetime(obj: Any) -> bool: + return isinstance(obj, dict) and "__hogDateTime__" in obj and "dt" in obj and "zone" in obj + + +def is_hog_error(obj: Any) -> bool: + return isinstance(obj, dict) and "__hogError__" in obj and "type" in obj and "message" in obj + + +def new_hog_error(type: str, message: Any, payload: Any = None) -> dict: + return { + "__hogError__": True, + "type": type or "Error", + "message": message or "An error occurred", + "payload": payload, + } diff --git a/hogvm/python/operation.py b/hogvm/python/operation.py index 6f0845fe4a6e5..319a450fc37b1 100644 --- a/hogvm/python/operation.py +++ b/hogvm/python/operation.py @@ -53,3 +53,6 @@ class Operation(int, Enum): SET_PROPERTY = 46 JUMP_IF_STACK_NOT_NULL = 47 GET_PROPERTY_NULLISH = 48 + THROW = 49 + TRY = 50 + POP_TRY = 51 diff --git a/hogvm/python/stl/__init__.py b/hogvm/python/stl/__init__.py index ef4a2b71441d5..eff2a504152dd 100644 --- a/hogvm/python/stl/__init__.py +++ b/hogvm/python/stl/__init__.py @@ -22,29 +22,21 @@ is_hog_date, ) from .crypto import sha256Hex, md5Hex, sha256HmacChainHex +from ..objects import is_hog_error, new_hog_error if TYPE_CHECKING: from posthog.models import Team -def concat(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): - def _to_concat_arg(arg) -> str: - if arg is None: - return "" - if arg is True: - return "true" - if arg is False: - return "false" - return str(arg) +def concat(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): + return "".join([print_hog_string_output(arg) if arg is not None else "" for arg in args]) - return "".join([_to_concat_arg(arg) for arg in args]) - -def match(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def match(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return bool(re.search(re.compile(args[1]), args[0])) -def toString(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def toString(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): if isinstance(args[0], dict) and is_hog_datetime(args[0]): dt = datetime.datetime.fromtimestamp(args[0]["dt"], pytz.timezone(args[0]["zone"] or "UTC")) if args[0]["zone"] == "UTC": @@ -55,6 +47,12 @@ def toString(args: list[Any], team: Optional["Team"], stdout: Optional[list[str] month = args[0]["month"] day = args[0]["day"] return f"{year}-{month:02d}-{day:02d}" + elif isinstance(args[0], dict) and is_hog_error(args[0]): + return ( + f"{args[0]['name']}({toString(args[0]['message'], team, stdout, timeout)}" + + (f", {toString(args[0]['payload'], team, stdout, timeout)}" if "payload" in args[0] else "") + + ")" + ) elif args[0] is True: return "true" elif args[0] is False: @@ -65,7 +63,7 @@ def toString(args: list[Any], team: Optional["Team"], stdout: Optional[list[str] return str(args[0]) -def toInt(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def toInt(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): try: if is_hog_datetime(args[0]): return int(args[0]["dt"]) @@ -78,7 +76,7 @@ def toInt(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], return None -def toFloat(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def toFloat(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): try: if is_hog_datetime(args[0]): return float(args[0]["dt"]) @@ -94,54 +92,54 @@ def toFloat(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]] # ifNull is complied into JUMP instructions. Keeping the function here for backwards compatibility -def ifNull(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def ifNull(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): if args[0] is not None: return args[0] else: return args[1] -def length(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def length(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return len(args[0]) -def empty(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def empty(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return not bool(args[0]) -def notEmpty(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def notEmpty(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return bool(args[0]) -def _tuple(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def _tuple(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return tuple(args) -def lower(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def lower(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return args[0].lower() -def upper(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def upper(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return args[0].upper() -def reverse(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def reverse(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): return args[0][::-1] -def sleep(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def sleep(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): time.sleep(args[0]) return None -def print(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int): +def print(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float): if stdout is not None: value = " ".join(map(print_hog_string_output, args)) stdout.append(value) return -def run(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list[Any]: +def run(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list[Any]: if team is None: return [] from posthog.hogql.query import execute_hogql_query @@ -150,11 +148,11 @@ def run(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], ti return response.results -def jsonParse(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def jsonParse(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return json.loads(args[0]) -def jsonStringify(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def jsonStringify(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: marked = set() def json_safe(obj): @@ -179,57 +177,57 @@ def json_safe(obj): return json.dumps(json_safe(args[0])) -def base64Encode(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def base64Encode(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: import base64 return base64.b64encode(args[0].encode()).decode() -def base64Decode(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def base64Decode(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: import base64 return base64.b64decode(args[0].encode()).decode() -def encodeURLComponent(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def encodeURLComponent(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: import urllib.parse return urllib.parse.quote(args[0], safe="") -def decodeURLComponent(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def decodeURLComponent(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: import urllib.parse return urllib.parse.unquote(args[0]) -def replaceOne(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def replaceOne(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: return args[0].replace(args[1], args[2], 1) -def replaceAll(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def replaceAll(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: return args[0].replace(args[1], args[2]) -def trim(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def trim(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: if len(args) > 1 and len(args[1]) > 1: return "" return args[0].strip(args[1] if len(args) > 1 else None) -def trimLeft(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def trimLeft(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: if len(args) > 1 and len(args[1]) > 1: return "" return args[0].lstrip(args[1] if len(args) > 1 else None) -def trimRight(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def trimRight(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: if len(args) > 1 and len(args[1]) > 1: return "" return args[0].rstrip(args[1] if len(args) > 1 else None) -def splitByString(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def splitByString(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: separator = args[0] string = args[1] if len(args) > 2: @@ -240,25 +238,25 @@ def splitByString(args: list[Any], team: Optional["Team"], stdout: Optional[list return string.split(separator) -def generateUUIDv4(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def generateUUIDv4(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: import uuid return str(uuid.uuid4()) -def _sha256Hex(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def _sha256Hex(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: return sha256Hex(args[0]) -def _md5Hex(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def _md5Hex(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: return md5Hex(args[0]) -def _sha256HmacChainHex(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def _sha256HmacChainHex(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: return sha256HmacChainHex(args[0]) -def keys(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def keys(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: obj = args[0] if isinstance(obj, dict): return list(obj.keys()) @@ -267,7 +265,7 @@ def keys(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], t return [] -def values(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def values(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: obj = args[0] if isinstance(obj, dict): return list(obj.values()) @@ -276,7 +274,7 @@ def values(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], return [] -def arrayPushBack(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def arrayPushBack(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: arr = args[0] item = args[1] if not isinstance(arr, list): @@ -284,7 +282,7 @@ def arrayPushBack(args: list[Any], team: Optional["Team"], stdout: Optional[list return [*arr, item] -def arrayPushFront(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def arrayPushFront(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: arr = args[0] item = args[1] if not isinstance(arr, list): @@ -292,42 +290,42 @@ def arrayPushFront(args: list[Any], team: Optional["Team"], stdout: Optional[lis return [item, *arr] -def arrayPopBack(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def arrayPopBack(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: arr = args[0] if not isinstance(arr, list): return [] return arr[:-1] -def arrayPopFront(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def arrayPopFront(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: arr = args[0] if not isinstance(arr, list): return [] return arr[1:] -def arraySort(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def arraySort(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: arr = args[0] if not isinstance(arr, list): return [] return sorted(arr) -def arrayReverse(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def arrayReverse(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: arr = args[0] if not isinstance(arr, list): return [] return arr[::-1] -def arrayReverseSort(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> list: +def arrayReverseSort(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> list: arr = args[0] if not isinstance(arr, list): return [] return sorted(arr, reverse=True) -def arrayStringConcat(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> str: +def arrayStringConcat(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> str: arr = args[0] sep = args[1] if len(args) > 1 else "" if not isinstance(arr, list): @@ -335,45 +333,63 @@ def arrayStringConcat(args: list[Any], team: Optional["Team"], stdout: Optional[ return sep.join([str(s) for s in arr]) -def _now(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _now(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return now() -def _toUnixTimestamp(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _toUnixTimestamp(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return toUnixTimestamp(args[0], args[1] if len(args) > 1 else None) -def _fromUnixTimestamp(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _fromUnixTimestamp(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return fromUnixTimestamp(args[0]) -def _toUnixTimestampMilli(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _toUnixTimestampMilli(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return toUnixTimestampMilli(args[0]) -def _fromUnixTimestampMilli(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _fromUnixTimestampMilli( + args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float +) -> Any: return fromUnixTimestampMilli(args[0]) -def _toTimeZone(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _toTimeZone(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return toTimeZone(args[0], args[1]) -def _toDate(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _toDate(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return toDate(args[0]) -def _toDateTime(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _toDateTime(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: return toDateTime(args[0]) -def _formatDateTime(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: int) -> Any: +def _formatDateTime(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: if len(args) < 2: raise ValueError("formatDateTime requires at least 2 arguments") return formatDateTime(args[0], args[1], args[2] if len(args) > 2 else None) -STL: dict[str, Callable[[list[Any], Optional["Team"], list[str] | None, int], Any]] = { +def _HogError(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: + return new_hog_error(args[0], args[1], args[2] if len(args) > 2 else None) + + +def _Error(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: + return new_hog_error("Error", args[0], args[1] if len(args) > 1 else None) + + +def _RetryError(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: + return new_hog_error("RetryError", args[0], args[1] if len(args) > 1 else None) + + +def _NotImplementedError(args: list[Any], team: Optional["Team"], stdout: Optional[list[str]], timeout: float) -> Any: + return new_hog_error("NotImplementedError", args[0], args[1] if len(args) > 1 else None) + + +STL: dict[str, Callable[[list[Any], Optional["Team"], list[str] | None, float], Any]] = { "concat": concat, "match": match, "toString": toString, @@ -426,4 +442,15 @@ def _formatDateTime(args: list[Any], team: Optional["Team"], stdout: Optional[li "toDate": _toDate, "toDateTime": _toDateTime, "formatDateTime": _formatDateTime, + "HogError": _HogError, + "Error": _Error, + "RetryError": _RetryError, + "NotImplementedError": _NotImplementedError, +} + +MIN_ARGS_INCLUDING_OPTIONAL = { + "HogError": 3, + "Error": 2, + "RetryError": 2, + "NotImplementedError": 2, } diff --git a/hogvm/python/stl/date.py b/hogvm/python/stl/date.py index f3540b9daaf3d..e0c27a39bea66 100644 --- a/hogvm/python/stl/date.py +++ b/hogvm/python/stl/date.py @@ -1,15 +1,9 @@ import datetime -from typing import Optional, Any +from typing import Optional import pytz - -def is_hog_date(obj: Any) -> bool: - return isinstance(obj, dict) and "__hogDate__" in obj and "year" in obj and "month" in obj and "day" in obj - - -def is_hog_datetime(obj: Any) -> bool: - return isinstance(obj, dict) and "__hogDateTime__" in obj and "dt" in obj and "zone" in obj +from hogvm.python.objects import is_hog_date, is_hog_datetime def to_hog_date(year: int, month: int, day: int): diff --git a/hogvm/python/stl/print.py b/hogvm/python/stl/print.py index 5d8b3bd4bff7f..6c9ed0a93df20 100644 --- a/hogvm/python/stl/print.py +++ b/hogvm/python/stl/print.py @@ -1,6 +1,6 @@ import re -from hogvm.python.stl.date import is_hog_datetime, is_hog_date +from hogvm.python.objects import is_hog_datetime, is_hog_date, is_hog_error # Copied from clickhouse_driver.util.escape, adapted only from single quotes to backquotes. escape_chars_map = { @@ -40,6 +40,12 @@ def print_hog_value(obj, marked: set | None = None): return f"DateTime({float(obj['dt'])}, {escape_string(obj['zone'] or 'UTC')})" if isinstance(obj, dict) and is_hog_date(obj): return f"Date({obj['year']}, {obj['month']}, {obj['day']})" + if isinstance(obj, dict) and is_hog_error(obj): + return ( + f"{obj['type']}({print_hog_value(obj['message'])}" + + (f", {print_hog_value(obj['payload'])}" if "payload" in obj and obj["payload"] is not None else "") + + ")" + ) if isinstance(obj, list) or isinstance(obj, dict) or isinstance(obj, tuple): if id(obj) in marked: diff --git a/hogvm/python/test/test_execute.py b/hogvm/python/test/test_execute.py index f4e3d31a09645..b5c1a3d8ee2ae 100644 --- a/hogvm/python/test/test_execute.py +++ b/hogvm/python/test/test_execute.py @@ -5,6 +5,7 @@ from hogvm.python.execute import execute_bytecode, get_nested_value from hogvm.python.operation import Operation as op, HOGQL_BYTECODE_IDENTIFIER as _H +from hogvm.python.utils import UncaughtHogVMException from posthog.hogql.bytecode import create_bytecode from posthog.hogql.parser import parse_expr, parse_program @@ -643,7 +644,7 @@ def test_bytecode_arrays(self): try: self._run_program("return [1, 2, 3][0]") except Exception as e: - assert str(e) == "Hog arrays start from index 1" + assert str(e) == "Array access starts from 1" else: raise AssertionError("Expected Exception not raised") @@ -953,3 +954,24 @@ def test_bytecode_nullish(self): assert self._run_program("let a := {'b': {'d': 2}}; return a?.b?.d") == 2 assert self._run_program("let a := {'b': {'d': 2}}; return a?.b?.['c']") is None assert self._run_program("let a := {'b': {'d': 2}}; return a?.b?.['d']") == 2 + + def test_bytecode_uncaught_errors(self): + try: + self._run_program("throw Error('Not a good day')") + except UncaughtHogVMException as e: + assert str(e) == "Error('Not a good day')" + assert e.type == "Error" + assert e.message == "Not a good day" + assert e.payload is None + else: + raise AssertionError("Expected Exception not raised") + + try: + self._run_program("throw RetryError('Not a good day', {'key': 'value'})") + except UncaughtHogVMException as e: + assert str(e) == "RetryError('Not a good day')" + assert e.type == "RetryError" + assert e.message == "Not a good day" + assert e.payload == {"key": "value"} + else: + raise AssertionError("Expected Exception not raised") diff --git a/hogvm/python/utils.py b/hogvm/python/utils.py index 15e9eda4d5bde..ebb18ca751ec2 100644 --- a/hogvm/python/utils.py +++ b/hogvm/python/utils.py @@ -9,6 +9,22 @@ class HogVMException(Exception): pass +class UncaughtHogVMException(HogVMException): + type: str + message: str + payload: Any + + def __init__(self, type, message, payload): + super().__init__(message) + self.type = type + self.message = message + self.payload = payload + + def __str__(self): + msg = self.message.replace("'", "\\'") + return f"{self.type}('{msg}')" + + def like(string, pattern, flags=0): pattern = re.escape(pattern).replace("%", ".*") re_pattern = re.compile(pattern, flags) diff --git a/hogvm/typescript/package.json b/hogvm/typescript/package.json index 7689cdbd8991c..9c1c69e31b280 100644 --- a/hogvm/typescript/package.json +++ b/hogvm/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@posthog/hogvm", - "version": "1.0.27", + "version": "1.0.30", "description": "PostHog Hog Virtual Machine", "types": "dist/index.d.ts", "main": "dist/index.js", diff --git a/hogvm/typescript/src/__tests__/execute.test.ts b/hogvm/typescript/src/__tests__/execute.test.ts index f8f0f99b28500..435b7d873abfe 100644 --- a/hogvm/typescript/src/__tests__/execute.test.ts +++ b/hogvm/typescript/src/__tests__/execute.test.ts @@ -1,5 +1,6 @@ import { exec, execAsync, execSync } from '../execute' import { Operation as op } from '../operation' +import { UncaughtHogVMException } from '../utils' export function delay(ms: number): Promise { return new Promise((resolve) => { @@ -524,12 +525,13 @@ describe('hogvm execute', () => { bytecode, asyncSteps: 1, callStack: [], + throwStack: [], declaredFunctions: {}, ip: 8, maxMemUsed: 16, ops: 3, stack: [4.2], - syncDuration: 0, + syncDuration: expect.any(Number), }, }) }) @@ -545,6 +547,45 @@ describe('hogvm execute', () => { expect(exec(bytecode)).toEqual({ finished: true, result: '0.002', + state: { + asyncSteps: 0, + bytecode: [], + callStack: [], + declaredFunctions: {}, + ip: -1, + maxMemUsed: 13, + ops: 2, + stack: [], + throwStack: [], + syncDuration: expect.any(Number), + }, + }) + }) + test('exec runs at sync return', () => { + const bytecode = [ + '_h', + 33, + 0.002, // seconds to sleep + 2, + 'toString', + 1, + op.RETURN, + ] + expect(exec(bytecode)).toEqual({ + finished: true, + result: '0.002', + state: { + asyncSteps: 0, + bytecode: [], + callStack: [], + declaredFunctions: {}, + ip: -1, + maxMemUsed: 13, + ops: 3, + stack: [], + throwStack: [], + syncDuration: expect.any(Number), + }, }) }) test('test bytecode dicts', () => { @@ -1796,4 +1837,30 @@ describe('hogvm execute', () => { expect(execSync(bytecode, { functions })).toEqual('no') expect(values).toEqual(['no']) }) + + test('uncaught exceptions', () => { + // throw Error('Not a good day') + const bytecode1 = ['_h', op.NULL, op.NULL, op.STRING, 'Not a good day', op.CALL, 'Error', 3, op.THROW] + expect(() => execSync(bytecode1)).toThrow(new UncaughtHogVMException('Error', 'Not a good day', null)) + + // throw RetryError('Not a good day', {'key': 'value'}) + const bytecode2 = [ + '_h', + op.STRING, + 'key', + op.STRING, + 'value', + op.DICT, + 1, + op.STRING, + 'Not a good day', + op.CALL, + 'RetryError', + 2, + op.THROW, + ] + expect(() => execSync(bytecode2)).toThrow( + new UncaughtHogVMException('RetryError', 'Not a good day', { key: 'value' }) + ) + }) }) diff --git a/hogvm/typescript/src/execute.ts b/hogvm/typescript/src/execute.ts index 9e5fcf576b6ba..389e1ded547f2 100644 --- a/hogvm/typescript/src/execute.ts +++ b/hogvm/typescript/src/execute.ts @@ -2,7 +2,17 @@ import RE2 from 're2' import { Operation } from './operation' import { ASYNC_STL, STL } from './stl/stl' -import { calculateCost, convertHogToJS, convertJSToHog, getNestedValue, like, setNestedValue } from './utils' +import { + calculateCost, + convertHogToJS, + convertJSToHog, + getNestedValue, + HogVMException, + like, + setNestedValue, + UncaughtHogVMException, +} from './utils' +import { isHogError } from './objects' const DEFAULT_MAX_ASYNC_STEPS = 100 const DEFAULT_MAX_MEMORY = 64 * 1024 * 1024 // 64 MB @@ -16,6 +26,8 @@ export interface VMState { stack: any[] /** Call stack of the VM */ callStack: [number, number, number][] + /** Throw stack of the VM */ + throwStack: [number, number, number][] /** Declared functions of the VM */ declaredFunctions: Record /** Instruction pointer of the VM */ @@ -56,7 +68,7 @@ export function execSync(bytecode: any[], options?: ExecOptions): any { if (response.finished) { return response.result } - throw new Error('Unexpected async function call: ' + response.asyncFunctionName) + throw new HogVMException('Unexpected async function call: ' + response.asyncFunctionName) } export async function execAsync(bytecode: any[], options?: ExecOptions): Promise { @@ -81,10 +93,10 @@ export async function execAsync(bytecode: any[], options?: ExecOptions): Promise ) vmState.stack.push(result) } else { - throw new Error('Invalid async function call: ' + response.asyncFunctionName) + throw new HogVMException('Invalid async function call: ' + response.asyncFunctionName) } } else { - throw new Error('Invalid async function call') + throw new HogVMException('Invalid async function call') } } } @@ -100,7 +112,7 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { } if (!bytecode || bytecode.length === 0 || bytecode[0] !== '_h') { - throw new Error("Invalid HogQL bytecode, must start with '_h'") + throw new HogVMException("Invalid HogQL bytecode, must start with '_h'") } const startTime = Date.now() @@ -114,6 +126,7 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { const stack: any[] = vmState ? vmState.stack : [] const memStack: number[] = stack.map((s) => calculateCost(s)) const callStack: [number, number, number][] = vmState ? vmState.callStack : [] + const throwStack: [number, number, number][] = vmState ? vmState.throwStack : [] const declaredFunctions: Record = vmState ? vmState.declaredFunctions : {} let memUsed = memStack.reduce((acc, val) => acc + val, 0) let maxMemUsed = Math.max(vmState ? vmState.maxMemUsed : 0, memUsed) @@ -125,7 +138,7 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { function popStack(): any { if (stack.length === 0) { - throw new Error('Invalid HogQL bytecode, stack is empty') + throw new HogVMException('Invalid HogQL bytecode, stack is empty') } memUsed -= memStack.pop() ?? 0 return stack.pop() @@ -136,7 +149,7 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { memUsed += memStack[memStack.length - 1] maxMemUsed = Math.max(maxMemUsed, memUsed) if (memUsed > memLimit && memLimit > 0) { - throw new Error(`Memory limit of ${memLimit} bytes exceeded. Tried to allocate ${memUsed} bytes.`) + throw new HogVMException(`Memory limit of ${memLimit} bytes exceeded. Tried to allocate ${memUsed} bytes.`) } return stack.push(value) } @@ -152,14 +165,28 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { function next(): any { if (ip >= bytecode!.length - 1) { - throw new Error('Unexpected end of bytecode') + throw new HogVMException('Unexpected end of bytecode') } return bytecode![++ip] } function checkTimeout(): void { if (syncDuration + Date.now() - startTime > timeout) { - throw new Error(`Execution timed out after ${timeout / 1000} seconds. Performed ${ops} ops.`) + throw new HogVMException(`Execution timed out after ${timeout / 1000} seconds. Performed ${ops} ops.`) + } + } + function getFinishedState(): VMState { + return { + bytecode: [], + stack: [], + callStack: [], + throwStack: [], + declaredFunctions: {}, + ip: -1, + ops, + asyncSteps, + syncDuration: syncDuration + (Date.now() - startTime), + maxMemUsed, } } @@ -301,6 +328,7 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { return { result: popStack(), finished: true, + state: getFinishedState(), } satisfies ExecResult } case Operation.GET_LOCAL: @@ -383,10 +411,10 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { } else { temp = next() // args.length if (temp > stack.length) { - throw new Error('Not enough arguments on the stack') + throw new HogVMException('Not enough arguments on the stack') } if (temp > MAX_FUNCTION_ARGS_LENGTH) { - throw new Error('Too many arguments') + throw new HogVMException('Too many arguments') } const args = Array(temp) .fill(null) @@ -401,7 +429,7 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { name in ASYNC_STL) ) { if (asyncSteps >= maxAsyncSteps) { - throw new Error(`Exceeded maximum number of async steps: ${maxAsyncSteps}`) + throw new HogVMException(`Exceeded maximum number of async steps: ${maxAsyncSteps}`) } return { @@ -413,6 +441,7 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { bytecode, stack, callStack, + throwStack, declaredFunctions, ip: ip + 1, ops, @@ -424,21 +453,50 @@ export function exec(code: any[] | VMState, options?: ExecOptions): ExecResult { } else if (name in STL) { pushStack(STL[name](args, name, timeout)) } else { - throw new Error(`Unsupported function call: ${name}`) + throw new HogVMException(`Unsupported function call: ${name}`) } } break } + case Operation.TRY: + throwStack.push([callStack.length, stack.length, ip + next()]) + break + case Operation.POP_TRY: + if (throwStack.length > 0) { + throwStack.pop() + } else { + throw new HogVMException('Invalid operation POP_TRY: no try block to pop') + } + break + case Operation.THROW: { + const exception = popStack() + if (!isHogError(exception)) { + throw new HogVMException('Can not throw: value is not of type Error') + } + if (throwStack.length > 0) { + const [callStackLen, stackLen, catchIp] = throwStack.pop()! + spliceStack1(stackLen) + memUsed -= memStack.splice(stackLen).reduce((acc, val) => acc + val, 0) + callStack.splice(callStackLen) + pushStack(exception) + ip = catchIp + } else { + throw new UncaughtHogVMException(exception.type, exception.message, exception.payload) + } + break + } default: - throw new Error(`Unexpected node while running bytecode: ${bytecode[ip]}`) + throw new HogVMException(`Unexpected node while running bytecode: ${bytecode[ip]}`) } } if (stack.length > 1) { - throw new Error('Invalid bytecode. More than one value left on stack') - } else if (stack.length === 0) { - return { result: null, finished: true } satisfies ExecResult + throw new HogVMException('Invalid bytecode. More than one value left on stack') + } + + if (stack.length === 0) { + return { result: null, finished: true, state: getFinishedState() } satisfies ExecResult } - return { result: popStack() ?? null, finished: true } satisfies ExecResult + return { result: popStack() ?? null, finished: true, state: getFinishedState() } satisfies ExecResult } diff --git a/hogvm/typescript/src/objects.ts b/hogvm/typescript/src/objects.ts new file mode 100644 index 0000000000000..e9d4df023bfd9 --- /dev/null +++ b/hogvm/typescript/src/objects.ts @@ -0,0 +1,41 @@ +export interface HogDate { + __hogDate__: true + year: number + month: number + day: number +} + +export interface HogDateTime { + __hogDateTime__: true + /** Timestamp float in seconds */ + dt: number + zone: string +} + +export interface HogError { + __hogError__: true + type: string + message: string + payload?: Record +} + +export function isHogDate(obj: any): obj is HogDate { + return obj && typeof obj === 'object' && '__hogDate__' in obj && 'year' in obj && 'month' in obj && 'day' in obj +} + +export function isHogDateTime(obj: any): obj is HogDateTime { + return obj && typeof obj === 'object' && '__hogDateTime__' in obj && 'dt' in obj && 'zone' in obj +} + +export function isHogError(obj: any): obj is HogError { + return obj && typeof obj === 'object' && '__hogError__' in obj && 'type' in obj && 'message' in obj +} + +export function newHogError(type: string, message: string, payload?: Record): HogError { + return { + __hogError__: true, + type: type || 'Error', + message: message || 'An error occurred', + payload, + } +} diff --git a/hogvm/typescript/src/operation.ts b/hogvm/typescript/src/operation.ts index 19b93e2d13a3a..2f8af6d275f56 100644 --- a/hogvm/typescript/src/operation.ts +++ b/hogvm/typescript/src/operation.ts @@ -48,4 +48,7 @@ export const enum Operation { SET_PROPERTY = 46, JUMP_IF_STACK_NOT_NULL = 47, GET_PROPERTY_NULLISH = 48, + THROW = 49, + TRY = 50, + POP_TRY = 51, } diff --git a/hogvm/typescript/src/stl/date.ts b/hogvm/typescript/src/stl/date.ts index 3c9f6d2e771c5..894eb5c7b546c 100644 --- a/hogvm/typescript/src/stl/date.ts +++ b/hogvm/typescript/src/stl/date.ts @@ -1,26 +1,6 @@ import { DateTime } from 'luxon' -export interface HogDate { - __hogDate__: true - year: number - month: number - day: number -} - -export interface HogDateTime { - __hogDateTime__: true - /** Timestamp float in seconds */ - dt: number - zone: string -} - -export function isHogDate(obj: any): obj is HogDate { - return obj && obj.__hogDate__ && 'year' in obj && 'month' in obj && 'day' in obj -} - -export function isHogDateTime(obj: any): obj is HogDateTime { - return obj && obj.__hogDateTime__ && 'dt' in obj && 'zone' in obj -} +import { HogDate, HogDateTime, isHogDate, isHogDateTime } from '../objects' export function toHogDate(year: number, month: number, day: number): HogDate { return { diff --git a/hogvm/typescript/src/stl/print.ts b/hogvm/typescript/src/stl/print.ts index 4e81e6152c413..90717d490e5a5 100644 --- a/hogvm/typescript/src/stl/print.ts +++ b/hogvm/typescript/src/stl/print.ts @@ -1,4 +1,4 @@ -import { isHogDate, isHogDateTime } from './date' +import { isHogDate, isHogDateTime, isHogError } from '../objects' const escapeCharsMap: Record = { '\b': '\\b', @@ -46,7 +46,7 @@ export function printHogValue(obj: any, marked: Set | undefined = undefined marked = new Set() } if (typeof obj === 'object' && obj !== null) { - if (marked.has(obj) && !isHogDateTime(obj) && !isHogDate(obj)) { + if (marked.has(obj) && !isHogDateTime(obj) && !isHogDate(obj) && !isHogError(obj)) { return 'null' } marked.add(obj) @@ -67,6 +67,11 @@ export function printHogValue(obj: any, marked: Set | undefined = undefined if (isHogDate(obj)) { return `Date(${obj.year}, ${obj.month}, ${obj.day})` } + if (isHogError(obj)) { + return `${String(obj.type)}(${escapeString(obj.message)}${ + obj.payload ? `, ${printHogValue(obj.payload, marked)}` : '' + })` + } if (obj instanceof Map) { return `{${Array.from(obj.entries()) .map(([key, value]) => `${printHogValue(key, marked)}: ${printHogValue(value, marked)}`) diff --git a/hogvm/typescript/src/stl/stl.ts b/hogvm/typescript/src/stl/stl.ts index e6b97e8d6b61c..45e48f4170522 100644 --- a/hogvm/typescript/src/stl/stl.ts +++ b/hogvm/typescript/src/stl/stl.ts @@ -1,9 +1,11 @@ import { DateTime } from 'luxon' + +import { isHogDate, isHogDateTime, isHogError, newHogError } from '../objects' +import { md5Hex, sha256Hex, sha256HmacChainHex } from './crypto' import { + formatDateTime, fromUnixTimestamp, fromUnixTimestampMilli, - isHogDate, - isHogDateTime, now, toDate, toDateTime, @@ -12,30 +14,30 @@ import { toTimeZone, toUnixTimestamp, toUnixTimestampMilli, - formatDateTime, } from './date' -import { sha256Hex, sha256HmacChainHex, md5Hex } from './crypto' import { printHogStringOutput } from './print' +function STLToString(args: any[]): string { + if (isHogDate(args[0])) { + const month = args[0].month + const day = args[0].day + return `${args[0].year}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}` + } + if (isHogDateTime(args[0])) { + return DateTime.fromSeconds(args[0].dt, { zone: args[0].zone }).toISO() + } + return printHogStringOutput(args[0]) +} + export const STL: Record any> = { concat: (args) => { - return args.map((arg: any) => (arg === null ? '' : String(arg))).join('') + return args.map((arg: any) => (arg === null ? '' : STLToString([arg]))).join('') }, match: (args) => { const regex = new RegExp(args[1]) return regex.test(args[0]) }, - toString: (args: any[]) => { - if (isHogDate(args[0])) { - const month = args[0].month - const day = args[0].day - return `${args[0].year}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}` - } - if (isHogDateTime(args[0])) { - return DateTime.fromSeconds(args[0].dt, { zone: args[0].zone }).toISO() - } - return String(args[0]) - }, + toString: STLToString, toUUID: (args) => { return String(args[0]) }, @@ -106,11 +108,13 @@ export const STL: Record if (Array.isArray(x)) { return x.map(convert) } else if (typeof x === 'object' && x !== null) { - // Date and DateTime will not be converted to a map + // DateTime and other objects will be sanitized and not converted to a map if (x.__hogDateTime__) { return toHogDateTime(x.dt, x.zone) } else if (x.__hogDate__) { return toHogDate(x.year, x.month, x.day) + } else if (x.__hogError__) { + return newHogError(x.type, x.message, x.payload) } // All other objects will const map = new Map() @@ -145,7 +149,7 @@ export const STL: Record if (Array.isArray(x)) { return x.map((v) => convert(v, marked)) } - if (isHogDateTime(x) || isHogDate(x)) { + if (isHogDateTime(x) || isHogDate(x) || isHogError(x)) { return x } const obj: Record = {} @@ -345,6 +349,10 @@ export const STL: Record formatDateTime(args) { return formatDateTime(args[0], args[1], args[2]) }, + HogError: (args) => newHogError(args[0], args[1], args[2]), + Error: (args, name) => newHogError(name, args[0], args[1]), + RetryError: (args, name) => newHogError(name, args[0], args[1]), + NotImplementedError: (args, name) => newHogError(name, args[0], args[1]), } export const ASYNC_STL: Record Promise> = { diff --git a/hogvm/typescript/src/utils.ts b/hogvm/typescript/src/utils.ts index 6b1d88246da94..13302d10c6749 100644 --- a/hogvm/typescript/src/utils.ts +++ b/hogvm/typescript/src/utils.ts @@ -1,5 +1,28 @@ import { toHogDate, toHogDateTime } from './stl/date' +export class HogVMException extends Error { + constructor(message: string) { + super(message) + this.name = this.constructor.name + } +} + +export class UncaughtHogVMException extends HogVMException { + type: any + payload: any + + constructor(type: string, message: string, payload: any = null) { + super(message) + this.type = type + this.payload = payload + } + + toString(): string { + const msg = this.message.replaceAll("'", "\\'") + return `${this.type}('${msg}')` + } +} + /** Fixed cost per object in memory */ const COST_PER_UNIT = 8 diff --git a/mypy-baseline.txt b/mypy-baseline.txt index 7ba31e2481702..7ca3fda0ce461 100644 --- a/mypy-baseline.txt +++ b/mypy-baseline.txt @@ -256,9 +256,6 @@ posthog/models/property/util.py:0: error: Argument 1 to "append" of "list" has i posthog/models/property/util.py:0: error: Argument 1 to "append" of "list" has incompatible type "str | int"; expected "str" [arg-type] posthog/models/property/util.py:0: error: Argument 1 to "append" of "list" has incompatible type "str | int"; expected "str" [arg-type] posthog/queries/trends/util.py:0: error: Argument 1 to "translate_hogql" has incompatible type "str | None"; expected "str" [arg-type] -posthog/hogql/property.py:0: error: Argument "chain" to "Field" has incompatible type "list[str]"; expected "list[str | int]" [arg-type] -posthog/hogql/property.py:0: note: "List" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance -posthog/hogql/property.py:0: note: Consider using "Sequence" instead, which is covariant posthog/hogql/property.py:0: error: Incompatible type for lookup 'id': (got "str | int | list[str]", expected "str | int") [misc] posthog/hogql/property.py:0: error: Incompatible type for lookup 'pk': (got "str | float", expected "str | int") [misc] posthog/hogql/filters.py:0: error: Incompatible default for argument "team" (default has type "None", argument has type "Team") [assignment] @@ -596,7 +593,7 @@ posthog/api/plugin_log_entry.py:0: error: Name "timezone.datetime" is not define posthog/api/plugin_log_entry.py:0: error: Module "django.utils.timezone" does not explicitly export attribute "datetime" [attr-defined] posthog/warehouse/api/external_data_source.py:0: error: Incompatible return value type (got "tuple[ExternalDataSource, dict[str, list[tuple[str, str]]]]", expected "tuple[ExternalDataSource, list[Any]]") [return-value] posthog/warehouse/api/external_data_source.py:0: error: Incompatible return value type (got "tuple[ExternalDataSource, dict[str, list[tuple[str, str]]]]", expected "tuple[ExternalDataSource, list[Any]]") [return-value] -posthog/warehouse/api/table.py:0: error: Unsupported target for indexed assignment ("dict[str, str | bool] | str") [index] +posthog/warehouse/api/table.py:0: error: Unused "type: ignore" comment [unused-ignore] posthog/temporal/tests/batch_exports/test_snowflake_batch_export_workflow.py:0: error: Need type annotation for "_execute_calls" (hint: "_execute_calls: list[] = ...") [var-annotated] posthog/temporal/tests/batch_exports/test_snowflake_batch_export_workflow.py:0: error: Need type annotation for "_execute_async_calls" (hint: "_execute_async_calls: list[] = ...") [var-annotated] posthog/temporal/tests/batch_exports/test_snowflake_batch_export_workflow.py:0: error: Need type annotation for "_cursors" (hint: "_cursors: list[] = ...") [var-annotated] diff --git a/package.json b/package.json index df58f8681ecad..06d2becb3baff 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "pmtiles": "^2.11.0", "postcss": "^8.4.31", "postcss-preset-env": "^9.3.0", - "posthog-js": "1.149.1", + "posthog-js": "1.150.0", "posthog-js-lite": "3.0.0", "prettier": "^2.8.8", "prop-types": "^15.7.2", diff --git a/plugin-server/package.json b/plugin-server/package.json index 28c9bb1a1351e..e7fe6138781a9 100644 --- a/plugin-server/package.json +++ b/plugin-server/package.json @@ -50,7 +50,7 @@ "@google-cloud/storage": "^5.8.5", "@maxmind/geoip2-node": "^3.4.0", "@posthog/clickhouse": "^1.7.0", - "@posthog/hogvm": "^1.0.27", + "@posthog/hogvm": "^1.0.30", "@posthog/plugin-scaffold": "1.4.4", "@sentry/node": "^7.49.0", "@sentry/profiling-node": "^0.3.0", diff --git a/plugin-server/pnpm-lock.yaml b/plugin-server/pnpm-lock.yaml index ea69c6b1b7c6a..323664424efff 100644 --- a/plugin-server/pnpm-lock.yaml +++ b/plugin-server/pnpm-lock.yaml @@ -44,8 +44,8 @@ dependencies: specifier: ^1.7.0 version: 1.7.0 '@posthog/hogvm': - specifier: ^1.0.27 - version: 1.0.27(luxon@3.4.4)(re2@1.20.3) + specifier: ^1.0.30 + version: 1.0.30(luxon@3.4.4)(re2@1.20.3) '@posthog/plugin-scaffold': specifier: 1.4.4 version: 1.4.4 @@ -3110,8 +3110,8 @@ packages: engines: {node: '>=12'} dev: false - /@posthog/hogvm@1.0.27(luxon@3.4.4)(re2@1.20.3): - resolution: {integrity: sha512-tTI+Xg/SAS1cqL0VR/XI0NWV7PzL9u5y1mCdla3251zWE4LwdDJp3RPpAnNC8LWXUXjkaCF3dugVCygqtji6hg==} + /@posthog/hogvm@1.0.30(luxon@3.4.4)(re2@1.20.3): + resolution: {integrity: sha512-u501rsyskUUnFgMUZjYDfU3pBKp17CKq7aHPAgFpQVFLt1fE9KOQT/hakBjhM9OFUHpjod3SJX3NpbXhOgjz3Q==} peerDependencies: luxon: ^3.4.4 re2: ^1.21.3 diff --git a/plugin-server/src/cdp/async-function-executor.ts b/plugin-server/src/cdp/async-function-executor.ts index 062eaa9fbd52b..93dd7e285cb78 100644 --- a/plugin-server/src/cdp/async-function-executor.ts +++ b/plugin-server/src/cdp/async-function-executor.ts @@ -1,9 +1,25 @@ +import { Histogram } from 'prom-client' + import { buildIntegerMatcher } from '../config/config' import { PluginsServerConfig, ValueMatcher } from '../types' import { trackedFetch } from '../utils/fetch' import { status } from '../utils/status' import { RustyHook } from '../worker/rusty-hook' -import { HogFunctionInvocationAsyncResponse, HogFunctionInvocationResult } from './types' +import { HogFunctionInvocationAsyncRequest, HogFunctionInvocationAsyncResponse } from './types' + +export const BUCKETS_KB_WRITTEN = [0, 128, 512, 1024, 2024, 4096, 10240, Infinity] + +const histogramFetchPayloadSize = new Histogram({ + name: 'cdp_async_function_fetch_payload_size_kb', + help: 'The size in kb of the batches we are receiving from Kafka', + buckets: BUCKETS_KB_WRITTEN, +}) + +const histogramHogHooksPayloadSize = new Histogram({ + name: 'cdp_async_function_hoghooks_payload_size_kb', + help: 'The size in kb of the batches we are receiving from Kafka', + buckets: BUCKETS_KB_WRITTEN, +}) export type AsyncFunctionExecutorOptions = { sync?: boolean @@ -17,7 +33,7 @@ export class AsyncFunctionExecutor { } async execute( - request: HogFunctionInvocationResult, + request: HogFunctionInvocationAsyncRequest, options: AsyncFunctionExecutorOptions = { sync: false } ): Promise { if (!request.asyncFunctionRequest) { @@ -26,7 +42,6 @@ export class AsyncFunctionExecutor { const loggingContext = { hogFunctionId: request.hogFunctionId, - invocationId: request.id, asyncFunctionName: request.asyncFunctionRequest.name, } status.info('🦔', `[AsyncFunctionExecutor] Executing async function`, loggingContext) @@ -45,7 +60,7 @@ export class AsyncFunctionExecutor { } private async asyncFunctionFetch( - request: HogFunctionInvocationResult, + request: HogFunctionInvocationAsyncRequest, options?: AsyncFunctionExecutorOptions ): Promise { if (!request.asyncFunctionRequest) { @@ -53,6 +68,7 @@ export class AsyncFunctionExecutor { } const asyncFunctionResponse: HogFunctionInvocationAsyncResponse['asyncFunctionResponse'] = { + response: null, timings: [], } @@ -79,9 +95,17 @@ export class AsyncFunctionExecutor { // Finally overwrite the args with the sanitized ones request.asyncFunctionRequest.args = [url, { method, headers, body }] + if (body) { + histogramFetchPayloadSize.observe(body.length / 1024) + } + // If the caller hasn't forced it to be synchronous and the team has the rustyhook enabled, enqueue it if (!options?.sync && this.hogHookEnabledForTeams(request.teamId)) { - const enqueued = await this.rustyHook.enqueueForHog(request) + const hoghooksPayload = JSON.stringify(request) + + histogramHogHooksPayloadSize.observe(hoghooksPayload.length / 1024) + + const enqueued = await this.rustyHook.enqueueForHog(JSON.stringify(request)) if (enqueued) { return } @@ -106,7 +130,7 @@ export class AsyncFunctionExecutor { const duration = performance.now() - start - asyncFunctionResponse.timings.push({ + asyncFunctionResponse.timings!.push({ kind: 'async_function', duration_ms: duration, }) @@ -121,7 +145,9 @@ export class AsyncFunctionExecutor { } const response: HogFunctionInvocationAsyncResponse = { - ...request, + state: request.state, + teamId: request.teamId, + hogFunctionId: request.hogFunctionId, asyncFunctionResponse, } diff --git a/plugin-server/src/cdp/cdp-api.ts b/plugin-server/src/cdp/cdp-api.ts index 642061adef622..b0e3e2242c0aa 100644 --- a/plugin-server/src/cdp/cdp-api.ts +++ b/plugin-server/src/cdp/cdp-api.ts @@ -9,7 +9,7 @@ import { addLog, HogExecutor } from './hog-executor' import { HogFunctionManager } from './hog-function-manager' import { HogWatcher } from './hog-watcher/hog-watcher' import { HogWatcherState } from './hog-watcher/types' -import { HogFunctionInvocation, HogFunctionType } from './types' +import { HogFunctionInvocation, HogFunctionInvocationAsyncRequest, HogFunctionLogEntry, HogFunctionType } from './types' export class CdpApi { private hogExecutor: HogExecutor @@ -110,7 +110,6 @@ export class CdpApi { globals: globals, teamId: team.id, hogFunctionId: id, - logs: [], timings: [], } @@ -125,8 +124,11 @@ export class CdpApi { await this.hogFunctionManager.enrichWithIntegrations([compoundConfiguration]) let response = this.hogExecutor.execute(compoundConfiguration, invocation) + const logs: HogFunctionLogEntry[] = [] while (response.asyncFunctionRequest) { + invocation.vmState = response.invocation.vmState + const asyncFunctionRequest = response.asyncFunctionRequest if (mock_async_functions || asyncFunctionRequest.name !== 'fetch') { @@ -140,31 +142,34 @@ export class CdpApi { ) // Add the state, simulating what executeAsyncResponse would do - asyncFunctionRequest.vmState.stack.push(convertJSToHog({ status: 200, body: {} })) + invocation.vmState!.stack.push(convertJSToHog({ status: 200, body: {} })) } else { - const asyncRes = await this.asyncFunctionExecutor!.execute(response, { + const asyncInvocationRequest: HogFunctionInvocationAsyncRequest = { + state: '', // WE don't care about the state for this level of testing + teamId: team.id, + hogFunctionId: hogFunction.id, + asyncFunctionRequest, + } + const asyncRes = await this.asyncFunctionExecutor!.execute(asyncInvocationRequest, { sync: true, }) if (!asyncRes || asyncRes.asyncFunctionResponse.error) { addLog(response, 'error', 'Failed to execute async function') } - asyncFunctionRequest.vmState.stack.push( - convertJSToHog(asyncRes?.asyncFunctionResponse.response ?? null) - ) - response.timings.push(...(asyncRes?.asyncFunctionResponse.timings ?? [])) + invocation.vmState!.stack.push(convertJSToHog(asyncRes?.asyncFunctionResponse.response ?? null)) } - // Clear it so we can't ever end up in a loop - delete response.asyncFunctionRequest - - response = this.hogExecutor.execute(compoundConfiguration, response, asyncFunctionRequest.vmState) + logs.push(...response.logs) + response = this.hogExecutor.execute(compoundConfiguration, invocation) } + logs.push(...response.logs) + res.json({ status: response.finished ? 'success' : 'error', error: String(response.error), - logs: response.logs, + logs: logs, }) } catch (e) { console.error(e) diff --git a/plugin-server/src/cdp/cdp-consumers.ts b/plugin-server/src/cdp/cdp-consumers.ts index bbce8d9743506..d9f453d4b90cb 100644 --- a/plugin-server/src/cdp/cdp-consumers.ts +++ b/plugin-server/src/cdp/cdp-consumers.ts @@ -1,3 +1,4 @@ +import { captureException } from '@sentry/node' import { features, librdkafkaVersion, Message } from 'node-rdkafka' import { Counter, Histogram } from 'prom-client' @@ -14,33 +15,35 @@ import { createRdConnectionConfigFromEnvVars, createRdProducerConfigFromEnvVars import { createKafkaProducer } from '../kafka/producer' import { addSentryBreadcrumbsEventListeners } from '../main/ingestion-queues/kafka-metrics' import { runInstrumentedFunction } from '../main/utils' -import { AppMetric2Type, GroupTypeToColumnIndex, Hub, RawClickHouseEvent, TeamId, TimestampFormat } from '../types' +import { AppMetric2Type, Hub, RawClickHouseEvent, TeamId, TimestampFormat } from '../types' import { KafkaProducerWrapper } from '../utils/db/kafka-producer-wrapper' import { status } from '../utils/status' import { castTimestampOrNow } from '../utils/utils' import { RustyHook } from '../worker/rusty-hook' import { AsyncFunctionExecutor } from './async-function-executor' +import { GroupsManager } from './groups-manager' import { HogExecutor } from './hog-executor' import { HogFunctionManager } from './hog-function-manager' import { HogWatcher } from './hog-watcher/hog-watcher' import { HogWatcherState } from './hog-watcher/types' import { CdpOverflowMessage, + HogFunctionAsyncFunctionResponse, + HogFunctionInvocation, + HogFunctionInvocationAsyncRequest, HogFunctionInvocationAsyncResponse, HogFunctionInvocationGlobals, HogFunctionInvocationResult, + HogFunctionLogEntry, HogFunctionMessageToProduce, HogFunctionOverflowedGlobals, HogFunctionType, } from './types' -import { convertToCaptureEvent, convertToHogFunctionInvocationGlobals, convertToParsedClickhouseEvent } from './utils' +import { convertToCaptureEvent, convertToHogFunctionInvocationGlobals, gzipObject, unGzipObject } from './utils' // Must require as `tsc` strips unused `import` statements and just requiring this seems to init some globals require('@sentry/tracing') -// WARNING: Do not change this - it will essentially reset the consumer -const BUCKETS_KB_WRITTEN = [0, 128, 512, 1024, 5120, 10240, 20480, 51200, 102400, 204800, Infinity] - const histogramKafkaBatchSize = new Histogram({ name: 'cdp_function_executor_batch_size', help: 'The size of the batches we are receiving from Kafka', @@ -50,7 +53,7 @@ const histogramKafkaBatchSize = new Histogram({ const histogramKafkaBatchSizeKb = new Histogram({ name: 'cdp_function_executor_batch_size_kb', help: 'The size in kb of the batches we are receiving from Kafka', - buckets: BUCKETS_KB_WRITTEN, + buckets: [0, 128, 512, 1024, 5120, 10240, 20480, 51200, 102400, 204800, Infinity], }) const counterFunctionInvocation = new Counter({ @@ -76,6 +79,7 @@ abstract class CdpConsumerBase { asyncFunctionExecutor: AsyncFunctionExecutor hogExecutor: HogExecutor hogWatcher: HogWatcher + groupsManager: GroupsManager isStopping = false messagesToProduce: HogFunctionMessageToProduce[] = [] @@ -92,6 +96,7 @@ abstract class CdpConsumerBase { this.hogExecutor = new HogExecutor(this.hogFunctionManager) const rustyHook = this.hub?.rustyHook ?? new RustyHook(this.hub) this.asyncFunctionExecutor = new AsyncFunctionExecutor(this.hub, rustyHook) + this.groupsManager = new GroupsManager(this.hub) } protected async runWithHeartbeat(func: () => Promise | T): Promise { @@ -145,6 +150,8 @@ abstract class CdpConsumerBase { value: Buffer.from(JSON.stringify(x.value)), key: x.key, waitForAck: true, + }).catch((reason) => { + status.error('⚠️', `failed to produce message: ${reason}`) }) ) ) @@ -168,6 +175,19 @@ abstract class CdpConsumerBase { counterFunctionInvocation.inc({ outcome: appMetric.metric_name }, appMetric.count) } + protected logLogEntry(logEntry: HogFunctionLogEntry) { + const sanitized = { + ...logEntry, + timestamp: castTimestampOrNow(logEntry.timestamp, TimestampFormat.ClickHouse), + } + // Convert timestamps to ISO strings + this.messagesToProduce.push({ + topic: KAFKA_LOG_ENTRIES, + value: sanitized, + key: sanitized.instance_id, + }) + } + protected async processInvocationResults(results: HogFunctionInvocationResult[]): Promise { await runInstrumentedFunction({ statsKey: `cdpConsumer.handleEachBatch.produceResults`, @@ -179,25 +199,14 @@ abstract class CdpConsumerBase { result.logs = [] this.logAppMetrics({ - team_id: result.teamId, - app_source_id: result.hogFunctionId, + team_id: result.invocation.teamId, + app_source_id: result.invocation.hogFunctionId, metric_kind: result.error ? 'failure' : 'success', metric_name: result.error ? 'failed' : 'succeeded', count: 1, }) - logs.forEach((x) => { - const sanitized = { - ...x, - timestamp: castTimestampOrNow(x.timestamp, TimestampFormat.ClickHouse), - } - // Convert timestamps to ISO strings - this.messagesToProduce.push({ - topic: KAFKA_LOG_ENTRIES, - value: sanitized, - key: sanitized.instance_id, - }) - }) + logs.forEach((x) => this.logLogEntry(x)) // PostHog capture events const capturedEvents = result.capturedPostHogEvents @@ -216,7 +225,13 @@ abstract class CdpConsumerBase { } if (result.asyncFunctionRequest) { - const res = await this.runWithHeartbeat(() => this.asyncFunctionExecutor.execute(result)) + const request: HogFunctionInvocationAsyncRequest = { + state: await gzipObject(result.invocation), + teamId: result.invocation.teamId, + hogFunctionId: result.invocation.hogFunctionId, + asyncFunctionRequest: result.asyncFunctionRequest, + } + const res = await this.runWithHeartbeat(() => this.asyncFunctionExecutor.execute(request)) // NOTE: This is very temporary as it is producing the response. the response will actually be produced by the 3rd party service // Later this will actually be the _request_ which we will push to the async function topic if we make one @@ -224,7 +239,7 @@ abstract class CdpConsumerBase { this.messagesToProduce.push({ topic: KAFKA_CDP_FUNCTION_CALLBACKS, value: res, - key: res.id, + key: res.hogFunctionId, }) } } @@ -261,7 +276,7 @@ abstract class CdpConsumerBase { source: 'hog_function_callback', payload: item, }, - key: item.id, + key: item.hogFunctionId, }) // We don't report overflowed metric to appmetrics as it is sort of a meta-metric counterFunctionInvocation.inc({ outcome: 'overflowed' }) @@ -282,8 +297,25 @@ abstract class CdpConsumerBase { } } - const results = await this.runManyWithHeartbeat(asyncResponsesToRun, (item) => - this.hogExecutor.executeAsyncResponse(item) + const invocationsWithResponses: [HogFunctionInvocation, HogFunctionAsyncFunctionResponse][] = [] + + // Deserialize the compressed data + await Promise.all( + asyncResponses.map(async (item) => { + try { + const invocation = await unGzipObject(item.state) + invocationsWithResponses.push([invocation, item.asyncFunctionResponse]) + } catch (e) { + status.error('Error unzipping message', e, item.state) + captureException(e, { + extra: { hogFunctionId: item.hogFunctionId, teamId: item.teamId }, + }) + } + }) + ) + + const results = await this.runManyWithHeartbeat(invocationsWithResponses, (item) => + this.hogExecutor.executeAsyncResponse(...item) ) this.hogWatcher.currentObservations.observeResults(results) @@ -300,6 +332,9 @@ abstract class CdpConsumerBase { func: async () => { const invocations: { globals: HogFunctionInvocationGlobals; hogFunction: HogFunctionType }[] = [] + // TODO: Add a helper to hog functions to determine if they require groups or not and then only load those + await this.groupsManager.enrichGroups(invocationGlobals) + invocationGlobals.forEach((globals) => { const { matchingFunctions, nonMatchingFunctions } = this.hogExecutor.findMatchingFunctions(globals) @@ -494,28 +529,15 @@ export class CdpProcessedEventsConsumer extends CdpConsumerBase { return } - let groupTypes: GroupTypeToColumnIndex | undefined = undefined - - if ( - await this.hub.organizationManager.hasAvailableFeature( - clickHouseEvent.team_id, - 'group_analytics' - ) - ) { - // If the organization has group analytics enabled then we enrich the event with group data - groupTypes = await this.hub.groupTypeManager.fetchGroupTypes(clickHouseEvent.team_id) - } - const team = await this.hub.teamManager.fetchTeam(clickHouseEvent.team_id) if (!team) { return } events.push( convertToHogFunctionInvocationGlobals( - convertToParsedClickhouseEvent(clickHouseEvent), + clickHouseEvent, team, - this.hub.SITE_URL ?? 'http://localhost:8000', - groupTypes + this.hub.SITE_URL ?? 'http://localhost:8000' ) ) } catch (e) { @@ -557,8 +579,7 @@ export class CdpFunctionCallbackConsumer extends CdpConsumerBase { const events: HogFunctionInvocationAsyncResponse[] = [] messages.map((message) => { try { - const event = JSON.parse(message.value!.toString()) as unknown - + const event = JSON.parse(message.value!.toString()) events.push(event as HogFunctionInvocationAsyncResponse) } catch (e) { status.error('Error parsing message', e) @@ -603,6 +624,9 @@ export class CdpOverflowConsumer extends CdpConsumerBase { return await runInstrumentedFunction({ statsKey: `cdpConsumer.handleEachBatch.executeOverflowedFunctions`, func: async () => { + // TODO: Add a helper to hog functions to determine if they require groups or not and then only load those + await this.groupsManager.enrichGroups(invocationGlobals.map((x) => x.globals)) + const invocations = invocationGlobals .map((item) => item.hogFunctionIds.map((hogFunctionId) => ({ diff --git a/plugin-server/src/cdp/groups-manager.ts b/plugin-server/src/cdp/groups-manager.ts new file mode 100644 index 0000000000000..d05f22302c267 --- /dev/null +++ b/plugin-server/src/cdp/groups-manager.ts @@ -0,0 +1,181 @@ +import LRUCache from 'lru-cache' + +import { Hub, Team } from '../types' +import { PostgresUse } from '../utils/db/postgres' +import { GroupType, HogFunctionInvocationGlobals } from './types' + +export type GroupsMap = Record +export type GroupsCache = Record + +// Maps to the group type index for easy lookup like: { 'team_id:group_type': group_type_index } +type GroupIndexByTeamType = Record + +type Group = { + id: string + index: number + type: string + url: string + properties: Record + teamId?: number +} + +const GROUP_TYPES_CACHE_AGE_MS = 60 * 10 * 1000 // 10 minutes + +export class GroupsManager { + groupTypesMappingCache: LRUCache + + constructor(private hub: Hub) { + // There is only 5 per team so we can have a very high cache and a very long cooldown + this.groupTypesMappingCache = new LRUCache({ max: 1_000_000, maxAge: GROUP_TYPES_CACHE_AGE_MS }) + } + + private async filterTeamsWithGroups(teams: Team['id'][]): Promise { + const teamIds = await Promise.all( + teams.map(async (teamId) => { + if (await this.hub.organizationManager.hasAvailableFeature(teamId, 'group_analytics')) { + return teamId + } + }) + ) + + return teamIds.filter((x) => x !== undefined) as Team['id'][] + } + + private async fetchGroupTypesMapping(teams: Team['id'][]): Promise { + // Get from cache otherwise load and save + const teamsWithGroupAnalytics = await this.filterTeamsWithGroups(teams) + + // Load teams from cache where possible + // Any teams that aren't in the cache we load from the DB, and then add to the cache + + const groupTypesMapping: GroupIndexByTeamType = {} + + // Load the cached values so we definitely have them + teamsWithGroupAnalytics.forEach((teamId) => { + const cached = this.groupTypesMappingCache.get(teamId) + + if (cached) { + cached.forEach((row) => { + groupTypesMapping[`${teamId}:${row.type}`] = row.index + }) + } + }) + + const teamsToLoad = teamsWithGroupAnalytics.filter((teamId) => !this.groupTypesMappingCache.get(teamId)) + + if (teamsToLoad.length) { + const result = await this.hub.postgres.query( + PostgresUse.COMMON_READ, + `SELECT team_id, group_type, group_type_index FROM posthog_grouptypemapping WHERE team_id = ANY($1)`, + [teamsToLoad], + 'fetchGroupTypes' + ) + + const groupedByTeam: Record = result.rows.reduce((acc, row) => { + if (!acc[row.team_id]) { + acc[row.team_id] = [] + } + acc[row.team_id].push({ type: row.group_type, index: row.group_type_index }) + return acc + }, {}) + + // Save to cache + Object.entries(groupedByTeam).forEach(([teamId, groupTypes]) => { + this.groupTypesMappingCache.set(parseInt(teamId), groupTypes) + groupTypes.forEach((row) => { + groupTypesMapping[`${teamId}:${row.type}`] = row.index + }) + }) + } + + return groupTypesMapping + } + + private async fetchGroupProperties( + groups: Group[] + ): Promise< + { team_id: number; group_type_index: number; group_key: string; group_properties: Record }[] + > { + const [teamIds, groupIndexes, groupKeys] = groups.reduce( + (acc, group) => { + acc[0].push(group.teamId!) + acc[1].push(group.index) + acc[2].push(group.id) + return acc + }, + [[], [], []] as [number[], number[], string[]] + ) + + return ( + await this.hub.postgres.query( + PostgresUse.COMMON_READ, + `SELECT team_id, group_type_index, group_key, group_properties + FROM posthog_group + WHERE team_id = ANY($1) AND group_type_index = ANY($2) AND group_key = ANY($3)`, + [teamIds, groupIndexes, groupKeys], + 'fetchGroups' + ) + ).rows + } + + /** + * This function looks complex but is trying to be as optimized as possible. + * + * It iterates over the globals and creates "Group" objects, tracking them referentially in order to later load the properties. + * Once loaded, the objects are mutated in place. + */ + public async enrichGroups(items: HogFunctionInvocationGlobals[]): Promise { + const itemsNeedingGroups = items.filter((x) => !x.groups) + const byTeamType = await this.fetchGroupTypesMapping( + Array.from(new Set(itemsNeedingGroups.map((global) => global.project.id))) + ) + + const groupsByTeamTypeId: Record = {} + + itemsNeedingGroups.forEach((item) => { + const groupsProperty: Record = item.event.properties['$groups'] || {} + const groups: HogFunctionInvocationGlobals['groups'] = {} + + // Add the base group info without properties + Object.entries(groupsProperty).forEach(([groupType, groupKey]) => { + const groupIndex = byTeamType[`${item.project.id}:${groupType}`] + + if (typeof groupIndex === 'number') { + let group = groupsByTeamTypeId[`${item.project.id}:${groupIndex}:${groupKey}`] + if (!group) { + group = groupsByTeamTypeId[`${item.project.id}:${groupIndex}:${groupKey}`] = { + id: groupKey, + index: groupIndex, + type: groupType, + url: `${item.project.url}/groups/${groupIndex}/${encodeURIComponent(groupKey)}`, + properties: {}, + teamId: item.project.id, + } + } + + // Add to the groups to be enriched and the object here + groups[groupType] = group + } + }) + + item.groups = groups + }) + const groupsFromDatabase = await this.fetchGroupProperties(Object.values(groupsByTeamTypeId)) + + // Add the properties to all the groups + groupsFromDatabase.forEach((row) => { + const group = groupsByTeamTypeId[`${row.team_id}:${row.group_type_index}:${row.group_key}`] + + if (group) { + group.properties = row.group_properties + } + }) + + // Finally delete the teamId from the groupsByTeamTypeId + Object.values(groupsByTeamTypeId).forEach((group) => { + delete group.teamId + }) + + return items + } +} diff --git a/plugin-server/src/cdp/hog-executor.ts b/plugin-server/src/cdp/hog-executor.ts index debab8c702561..db04a0f76e334 100644 --- a/plugin-server/src/cdp/hog-executor.ts +++ b/plugin-server/src/cdp/hog-executor.ts @@ -1,4 +1,4 @@ -import { convertHogToJS, convertJSToHog, exec, ExecResult, VMState } from '@posthog/hogvm' +import { calculateCost, convertHogToJS, convertJSToHog, exec, ExecResult } from '@posthog/hogvm' import { DateTime } from 'luxon' import { Histogram } from 'prom-client' @@ -67,10 +67,10 @@ export const addLog = (result: HogFunctionInvocationResult, level: HogFunctionLo } result.logs.push({ - team_id: result.teamId, + team_id: result.invocation.teamId, log_source: 'hog_function', - log_source_id: result.hogFunctionId, - instance_id: result.id, + log_source_id: result.invocation.hogFunctionId, + instance_id: result.invocation.id, timestamp: now, level, message, @@ -121,6 +121,7 @@ export class HogExecutor { } } } catch (error) { + // TODO: This should be reported as a log or metric status.error('🦔', `[HogExecutor] Error filtering function`, { hogFunctionId: hogFunction.id, hogFunctionName: hogFunction.name, @@ -174,7 +175,6 @@ export class HogExecutor { globals: modifiedGlobals, teamId: hogFunction.team_id, hogFunctionId: hogFunction.id, - logs: [], timings: [], }) } @@ -182,25 +182,19 @@ export class HogExecutor { /** * Intended to be invoked as a continuation from an async function */ - executeAsyncResponse(invocation: HogFunctionInvocationAsyncResponse): HogFunctionInvocationResult { + executeAsyncResponse( + invocation: HogFunctionInvocation, + asyncFunctionResponse: HogFunctionInvocationAsyncResponse['asyncFunctionResponse'] + ): HogFunctionInvocationResult { if (!invocation.hogFunctionId) { throw new Error('No hog function id provided') } - const baseInvocation: HogFunctionInvocation = { - id: invocation.id, - globals: invocation.globals, - teamId: invocation.teamId, - hogFunctionId: invocation.hogFunctionId, - timings: invocation.asyncFunctionResponse.timings, - // Logs we always reset as we don't want to carry over logs between calls - logs: [], - } - const errorRes = (error = 'Something went wrong'): HogFunctionInvocationResult => ({ - ...baseInvocation, + invocation, finished: false, error, + logs: [], }) const hogFunction = this.hogFunctionManager.getTeamHogFunction( @@ -212,24 +206,23 @@ export class HogExecutor { return errorRes(`Hog Function with ID ${invocation.hogFunctionId} not found`) } - const { vmState } = invocation.asyncFunctionRequest ?? {} - const { asyncFunctionResponse } = invocation - - if (!vmState || !asyncFunctionResponse.response || asyncFunctionResponse.error) { - return errorRes(invocation.error ?? 'No VM state provided for async response') + if (!invocation.vmState || !asyncFunctionResponse.response || asyncFunctionResponse.error) { + return errorRes(asyncFunctionResponse.error ?? 'No VM state provided for async response') } // Add the response to the stack to continue execution - vmState.stack.push(convertJSToHog(asyncFunctionResponse.response ?? null)) + invocation.vmState.stack.push(convertJSToHog(asyncFunctionResponse.response ?? null)) + invocation.timings.push(...(asyncFunctionResponse.timings ?? [])) + + const res = this.execute(hogFunction, invocation) + + // Add any timings and logs from the async function + res.logs = [...(asyncFunctionResponse.logs ?? []), ...res.logs] - return this.execute(hogFunction, baseInvocation, vmState) + return res } - execute( - hogFunction: HogFunctionType, - invocation: HogFunctionInvocation, - state?: VMState - ): HogFunctionInvocationResult { + execute(hogFunction: HogFunctionType, invocation: HogFunctionInvocation): HogFunctionInvocationResult { const loggingContext = { hogFunctionId: hogFunction.id, hogFunctionName: hogFunction.name, @@ -239,13 +232,14 @@ export class HogExecutor { status.debug('🦔', `[HogExecutor] Executing function`, loggingContext) const result: HogFunctionInvocationResult = { - ...invocation, + invocation, asyncFunctionRequest: undefined, finished: false, capturedPostHogEvents: [], + logs: [], } - if (!state) { + if (!invocation.vmState) { addLog(result, 'debug', `Executing function`) } else { addLog(result, 'debug', `Resuming function`) @@ -267,7 +261,7 @@ export class HogExecutor { try { let hogLogs = 0 - execRes = exec(state ?? hogFunction.bytecode, { + execRes = exec(invocation.vmState ?? hogFunction.bytecode, { globals, timeout: DEFAULT_TIMEOUT_MS, // TODO: Swap this to milliseconds when the package is updated maxAsyncSteps: MAX_ASYNC_STEPS, // NOTE: This will likely be configurable in the future @@ -336,33 +330,43 @@ export class HogExecutor { hogExecutionDuration.observe(duration) result.finished = execRes.finished - result.timings.push({ + invocation.timings.push({ kind: 'hog', duration_ms: duration, }) if (!execRes.finished) { - addLog(result, 'debug', `Suspending function due to async function call '${execRes.asyncFunctionName}'`) - const args = (execRes.asyncFunctionArgs ?? []).map((arg) => convertHogToJS(arg)) - if (!execRes.state) { // NOTE: This shouldn't be possible so is more of a type sanity check throw new Error('State should be provided for async function') } + addLog( + result, + 'debug', + `Suspending function due to async function call '${execRes.asyncFunctionName}'. Payload: ${ + calculateCost(execRes.state) + calculateCost(args) + } bytes` + ) + if (execRes.asyncFunctionName) { + result.invocation.vmState = execRes.state result.asyncFunctionRequest = { name: execRes.asyncFunctionName, args: args, - vmState: execRes.state, } } else { addLog(result, 'warn', `Function was not finished but also had no async function to execute.`) } } else { - const totalDuration = result.timings.reduce((acc, timing) => acc + timing.duration_ms, 0) - - addLog(result, 'debug', `Function completed. Processing time ${totalDuration}ms`) + const totalDuration = invocation.timings.reduce((acc, timing) => acc + timing.duration_ms, 0) + const messages = [`Function completed in ${totalDuration}ms.`] + if (execRes.state) { + messages.push(`Sync: ${execRes.state.syncDuration}ms.`) + messages.push(`Mem: ${execRes.state.maxMemUsed} bytes.`) + messages.push(`Ops: ${execRes.state.ops}.`) + } + addLog(result, 'debug', messages.join(' ')) } } catch (err) { result.error = err.message diff --git a/plugin-server/src/cdp/hog-watcher/hog-watcher.ts b/plugin-server/src/cdp/hog-watcher/hog-watcher.ts index 8d531d8b36410..d8fd248d7bc44 100644 --- a/plugin-server/src/cdp/hog-watcher/hog-watcher.ts +++ b/plugin-server/src/cdp/hog-watcher/hog-watcher.ts @@ -64,7 +64,7 @@ export class HogWatcherActiveObservations { observeResults(results: HogFunctionInvocationResult[]) { results.forEach((result) => - this.addObservations(result.hogFunctionId, { + this.addObservations(result.invocation.hogFunctionId, { successes: result.finished ? 1 : 0, failures: result.error ? 1 : 0, }) @@ -75,8 +75,8 @@ export class HogWatcherActiveObservations { // NOTE: This probably wants to be done using the response status instead :thinking: responses.forEach((response) => this.addObservations(response.hogFunctionId, { - asyncFunctionSuccesses: response.error ? 0 : 1, - asyncFunctionFailures: response.error ? 1 : 0, + asyncFunctionSuccesses: response.asyncFunctionResponse.error ? 0 : 1, + asyncFunctionFailures: response.asyncFunctionResponse.error ? 1 : 0, }) ) } diff --git a/plugin-server/src/cdp/types.ts b/plugin-server/src/cdp/types.ts index ef33a540df134..9273f5a7210c3 100644 --- a/plugin-server/src/cdp/types.ts +++ b/plugin-server/src/cdp/types.ts @@ -53,16 +53,14 @@ export interface ParsedClickhouseEvent { properties: Record person_created_at?: string person_properties: Record - group0_properties: Record - group1_properties: Record - group2_properties: Record - group3_properties: Record - group4_properties: Record - group0_created_at?: string - group1_created_at?: string - group2_created_at?: string - group3_created_at?: string - group4_created_at?: string +} + +export type GroupType = { + id: string // the "key" of the group + type: string + index: number + url: string + properties: Record } export type HogFunctionInvocationGlobals = { @@ -89,16 +87,7 @@ export type HogFunctionInvocationGlobals = { url: string properties: Record } - groups?: Record< - string, - { - id: string // the "key" of the group - type: string - index: number - url: string - properties: Record - } - > + groups?: Record } export type HogFunctionInvocationGlobalsWithInputs = HogFunctionInvocationGlobals & { @@ -160,36 +149,55 @@ export interface HogFunctionTiming { duration_ms: number } +// This is the "persistent" state of a hog function invocation export type HogFunctionInvocation = { id: string globals: HogFunctionInvocationGlobals teamId: number hogFunctionId: HogFunctionType['id'] - // Logs and timings _could_ be passed in from the async function service - logs: HogFunctionLogEntry[] + // The current vmstate (set if the invocation is paused) + vmState?: VMState timings: HogFunctionTiming[] } -export type HogFunctionInvocationResult = HogFunctionInvocation & { +export type HogFunctionAsyncFunctionRequest = { + name: string + args: any[] +} + +export type HogFunctionAsyncFunctionResponse = { + /** An error message to indicate something went wrong and the invocation should be stopped */ + error?: any + /** The data to be passed to the Hog function from the response */ + response: any + timings?: HogFunctionTiming[] + logs?: HogFunctionLogEntry[] +} + +// The result of an execution +export type HogFunctionInvocationResult = { + invocation: HogFunctionInvocation finished: boolean error?: any - asyncFunctionRequest?: { - name: string - args: any[] - vmState: VMState - } + asyncFunctionRequest?: HogFunctionAsyncFunctionRequest + logs: HogFunctionLogEntry[] capturedPostHogEvents?: HogFunctionCapturedEvent[] } -export type HogFunctionInvocationAsyncResponse = HogFunctionInvocationResult & { +export type HogFunctionInvocationAsyncRequest = { + state: string // Serialized HogFunctionInvocation without the asyncFunctionRequest + teamId: number + hogFunctionId: HogFunctionType['id'] + asyncFunctionRequest?: HogFunctionAsyncFunctionRequest +} + +export type HogFunctionInvocationAsyncResponse = { + state: string // Serialized HogFunctionInvocation + teamId: number + hogFunctionId: HogFunctionType['id'] + // FOLLOWUP: do we want to type this more strictly? - asyncFunctionResponse: { - /** An error message to indicate something went wrong and the invocation should be stopped */ - error?: any - /** The data to be passed to the Hog function from the response */ - response?: any - timings: HogFunctionTiming[] - } + asyncFunctionResponse: HogFunctionAsyncFunctionResponse } // Mostly copied from frontend types diff --git a/plugin-server/src/cdp/utils.ts b/plugin-server/src/cdp/utils.ts index 7577fef2d2982..636213c27c10f 100644 --- a/plugin-server/src/cdp/utils.ts +++ b/plugin-server/src/cdp/utils.ts @@ -1,8 +1,9 @@ // NOTE: PostIngestionEvent is our context event - it should never be sent directly to an output, but rather transformed into a lightweight schema import { DateTime } from 'luxon' +import { gunzip, gzip } from 'zlib' -import { GroupTypeToColumnIndex, RawClickHouseEvent, Team } from '../types' +import { RawClickHouseEvent, Team } from '../types' import { safeClickhouseString } from '../utils/db/utils' import { clickHouseTimestampToISO, UUIDT } from '../utils/utils' import { @@ -50,33 +51,26 @@ export function convertToParsedClickhouseEvent(event: RawClickHouseEvent): Parse properties: properties, person_created_at: event.person_created_at ? clickHouseTimestampToISO(event.person_created_at) : undefined, person_properties: event.person_properties ? JSON.parse(event.person_properties) : {}, - group0_properties: event.group0_properties ? JSON.parse(event.group0_properties) : {}, - group1_properties: event.group1_properties ? JSON.parse(event.group1_properties) : {}, - group2_properties: event.group2_properties ? JSON.parse(event.group2_properties) : {}, - group3_properties: event.group3_properties ? JSON.parse(event.group3_properties) : {}, - group4_properties: event.group4_properties ? JSON.parse(event.group4_properties) : {}, - group0_created_at: event.group0_created_at ? clickHouseTimestampToISO(event.group0_created_at) : undefined, - group1_created_at: event.group1_created_at ? clickHouseTimestampToISO(event.group1_created_at) : undefined, - group2_created_at: event.group2_created_at ? clickHouseTimestampToISO(event.group2_created_at) : undefined, - group3_created_at: event.group3_created_at ? clickHouseTimestampToISO(event.group3_created_at) : undefined, - group4_created_at: event.group4_created_at ? clickHouseTimestampToISO(event.group4_created_at) : undefined, } } // that we can keep to as a contract export function convertToHogFunctionInvocationGlobals( - event: ParsedClickhouseEvent, + event: RawClickHouseEvent, team: Team, - siteUrl: string, - groupTypes?: GroupTypeToColumnIndex + siteUrl: string ): HogFunctionInvocationGlobals { + const properties = event.properties ? JSON.parse(event.properties) : {} + if (event.elements_chain) { + properties['$elements_chain'] = event.elements_chain + } + const projectUrl = `${siteUrl}/project/${team.id}` - const properties = event.properties let person: HogFunctionInvocationGlobals['person'] if (event.person_id) { - const personProperties = event.person_properties + const personProperties = event.person_properties ? JSON.parse(event.person_properties) : {} const personDisplayName = getPersonDisplayName(team, event.distinct_id, personProperties) person = { @@ -87,29 +81,8 @@ export function convertToHogFunctionInvocationGlobals( } } - let groups: HogFunctionInvocationGlobals['groups'] = undefined + const eventTimestamp = clickHouseTimestampToISO(event.timestamp) - if (groupTypes) { - groups = {} - - for (const [groupType, columnIndex] of Object.entries(groupTypes)) { - const groupKey = (properties[`$groups`] || {})[groupType] - const groupProperties = event[`group${columnIndex}_properties`] - - // TODO: Check that groupProperties always exist if the event is in that group - if (groupKey && groupProperties) { - const properties = groupProperties - - groups[groupType] = { - id: groupKey, - index: columnIndex, - type: groupType, - url: `${projectUrl}/groups/${columnIndex}/${encodeURIComponent(groupKey)}`, - properties, - } - } - } - } const context: HogFunctionInvocationGlobals = { project: { id: team.id, @@ -121,11 +94,10 @@ export function convertToHogFunctionInvocationGlobals( name: event.event!, distinct_id: event.distinct_id, properties, - timestamp: event.timestamp, - url: `${projectUrl}/events/${encodeURIComponent(event.uuid)}/${encodeURIComponent(event.timestamp)}`, + timestamp: eventTimestamp, + url: `${projectUrl}/events/${encodeURIComponent(event.uuid)}/${encodeURIComponent(eventTimestamp)}`, }, person, - groups, } return context @@ -165,3 +137,24 @@ export const convertToCaptureEvent = (event: HogFunctionCapturedEvent, team: Tea token: team.api_token, } } + +export const gzipObject = async (object: T): Promise => { + const payload = JSON.stringify(object) + const buffer = await new Promise((res, rej) => + gzip(payload, (err, result) => (err ? rej(err) : res(result))) + ) + const res = buffer.toString('base64') + + // NOTE: Base64 encoding isn't as efficient but we would need to change the kafka producer/consumers to use ucs2 or something + // as well in order to support binary data better + + return res +} + +export const unGzipObject = async (data: string): Promise => { + const res = await new Promise((res, rej) => + gunzip(Buffer.from(data, 'base64'), (err, result) => (err ? rej(err) : res(result))) + ) + + return JSON.parse(res.toString()) +} diff --git a/plugin-server/src/worker/rusty-hook.ts b/plugin-server/src/worker/rusty-hook.ts index a7fe2f3fb2f8d..2c642b9948a91 100644 --- a/plugin-server/src/worker/rusty-hook.ts +++ b/plugin-server/src/worker/rusty-hook.ts @@ -2,7 +2,6 @@ import { Webhook } from '@posthog/plugin-scaffold' import * as Sentry from '@sentry/node' import fetch from 'node-fetch' -import { HogFunctionInvocationResult } from '../cdp/types' import { buildIntegerMatcher } from '../config/config' import { PluginsServerConfig, ValueMatcher } from '../types' import { isProdEnv } from '../utils/env-utils' @@ -128,12 +127,10 @@ export class RustyHook { return true } - public async enqueueForHog(payload: HogFunctionInvocationResult): Promise { + public async enqueueForHog(payload: string): Promise { // This is a temporary copy of `enqueueIfEnabledForTeam` above for Hog fetches because the // API differs. It will likely be replaced with a Kafka topic soon. - const body = JSON.stringify(payload) - // We attempt to enqueue into the rusty-hook service until we succeed. This is deliberatly // designed to block up the consumer if rusty-hook is down or if we deploy code that // sends malformed requests. The entire purpose of rusty-hook is to reliably deliver webhooks, @@ -145,7 +142,7 @@ export class RustyHook { const response = await fetch(this.serverConfig.HOG_HOOK_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body, + body: payload, // Sure, it's not an external request, but we should have a timeout and this is as // good as any. diff --git a/plugin-server/tests/cdp/cdp-function-callbacks-consumer.test.ts b/plugin-server/tests/cdp/cdp-function-callbacks-consumer.test.ts index 24b8d9a337322..137c75d6594ac 100644 --- a/plugin-server/tests/cdp/cdp-function-callbacks-consumer.test.ts +++ b/plugin-server/tests/cdp/cdp-function-callbacks-consumer.test.ts @@ -163,7 +163,7 @@ describe('CDP Processed Events Consuner', () => { { log_source: 'hog_function', level: 'debug', - message: "Suspending function due to async function call 'fetch'", + message: "Suspending function due to async function call 'fetch'. Payload: 1140 bytes", }, { log_source: 'hog_function', @@ -188,7 +188,7 @@ describe('CDP Processed Events Consuner', () => { { log_source: 'hog_function', level: 'debug', - message: expect.stringContaining('Function completed. Processing time'), + message: expect.stringContaining('Function completed in '), }, ], }) @@ -218,7 +218,7 @@ describe('CDP Processed Events Consuner', () => { { log_source: 'hog_function', level: 'debug', - message: "Suspending function due to async function call 'fetch'", + message: "Suspending function due to async function call 'fetch'. Payload: 1140 bytes", }, { log_source: 'hog_function', @@ -233,7 +233,7 @@ describe('CDP Processed Events Consuner', () => { { log_source: 'hog_function', level: 'debug', - message: expect.stringContaining('Function completed. Processing time'), + message: expect.stringContaining('Function completed in'), }, ], }) diff --git a/plugin-server/tests/cdp/cdp-processed-events-consumer.test.ts b/plugin-server/tests/cdp/cdp-processed-events-consumer.test.ts index a5710a620cd9d..4de26bd05fca0 100644 --- a/plugin-server/tests/cdp/cdp-processed-events-consumer.test.ts +++ b/plugin-server/tests/cdp/cdp-processed-events-consumer.test.ts @@ -49,7 +49,7 @@ jest.mock('../../src/utils/db/kafka-producer-wrapper', () => { connect: jest.fn(), }, disconnect: jest.fn(), - produce: jest.fn(), + produce: jest.fn(() => Promise.resolve()), } return { KafkaProducerWrapper: jest.fn(() => mockKafkaProducer), @@ -137,7 +137,7 @@ describe('CDP Processed Events Consuner', () => { Array [ "https://example.com/posthog-webhook", Object { - "body": "{\\"event\\":{\\"uuid\\":\\"b3a1fe86-b10c-43cc-acaf-d208977608d0\\",\\"name\\":\\"$pageview\\",\\"distinct_id\\":\\"distinct_id_1\\",\\"properties\\":{\\"$lib_version\\":\\"1.0.0\\",\\"$elements_chain\\":\\"[]\\"},\\"timestamp\\":null,\\"url\\":\\"http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null\\"},\\"groups\\":null,\\"nested\\":{\\"foo\\":\\"http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null\\"},\\"person\\":null,\\"event_url\\":\\"http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null-test\\"}", + "body": "{\\"event\\":{\\"uuid\\":\\"b3a1fe86-b10c-43cc-acaf-d208977608d0\\",\\"name\\":\\"$pageview\\",\\"distinct_id\\":\\"distinct_id_1\\",\\"properties\\":{\\"$lib_version\\":\\"1.0.0\\",\\"$elements_chain\\":\\"[]\\"},\\"timestamp\\":null,\\"url\\":\\"http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null\\"},\\"groups\\":{},\\"nested\\":{\\"foo\\":\\"http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null\\"},\\"person\\":null,\\"event_url\\":\\"http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null-test\\"}", "headers": Object { "version": "v=1.0.0", }, @@ -211,61 +211,20 @@ describe('CDP Processed Events Consuner', () => { topic: 'log_entries_test', value: { log_source: 'hog_function', - message: "Suspending function due to async function call 'fetch'", + message: "Suspending function due to async function call 'fetch'. Payload: 1497 bytes", team_id: 2, }, }) const msg = decodeKafkaMessage(mockProducer.produce.mock.calls[3][0]) - // Parse body so it can match by object equality rather than exact string equality - msg.value.asyncFunctionRequest.args[1].body = JSON.parse(msg.value.asyncFunctionRequest.args[1].body) + expect(msg).toEqual({ key: expect.any(String), topic: 'cdp_function_callbacks_test', value: { - id: expect.any(String), - globals: expect.objectContaining({ - project: { id: 2, name: 'TEST PROJECT', url: 'http://localhost:8000/project/2' }, - // We assume the rest is correct - }), + state: expect.any(String), + hogFunctionId: hogFunction.id, teamId: 2, - hogFunctionId: expect.any(String), - finished: false, - logs: [], - timings: [ - { - kind: 'hog', - duration_ms: expect.any(Number), - }, - ], - asyncFunctionRequest: { - name: 'fetch', - args: [ - 'https://example.com/posthog-webhook', - { - headers: { version: 'v=1.0.0' }, - body: { - event: { - uuid: 'b3a1fe86-b10c-43cc-acaf-d208977608d0', - name: '$pageview', - distinct_id: 'distinct_id_1', - properties: { $lib_version: '1.0.0', $elements_chain: '[]' }, - timestamp: null, - url: 'http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null', - }, - groups: null, - nested: { - foo: 'http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null', - }, - person: null, - event_url: - 'http://localhost:8000/project/2/events/b3a1fe86-b10c-43cc-acaf-d208977608d0/null-test', - }, - method: 'POST', - }, - ], - vmState: expect.any(Object), - }, asyncFunctionResponse: { response: { status: 200, diff --git a/plugin-server/tests/cdp/groups-manager.test.ts b/plugin-server/tests/cdp/groups-manager.test.ts new file mode 100644 index 0000000000000..eb3d718211ce1 --- /dev/null +++ b/plugin-server/tests/cdp/groups-manager.test.ts @@ -0,0 +1,220 @@ +import { GroupsManager } from '../../src/cdp/groups-manager' +import { Hub } from '../../src/types' +import { createHogExecutionGlobals, insertHogFunction as _insertHogFunction } from './fixtures' + +describe('Groups Manager', () => { + jest.setTimeout(1000) + let groupsManager: GroupsManager + + let mockGroupTypes: { team_id: number; group_type: string; group_type_index: number }[] = [] + let mockGroups: { team_id: number; group_key: string; group_type_index: number; group_properties?: any }[] = [] + + const mockHub = { + postgres: { + query: jest.fn(), + }, + organizationManager: { + hasAvailableFeature: jest.fn(() => Promise.resolve(true)), + }, + } + + beforeEach(() => { + groupsManager = new GroupsManager(mockHub as unknown as Hub) + }) + + describe('unit tests', () => { + beforeEach(() => { + mockHub.postgres.query.mockImplementation((_, query): Promise => { + if (query.includes('posthog_grouptypemapping')) { + return Promise.resolve({ rows: mockGroupTypes }) + } + + if (query.includes('posthog_group')) { + return Promise.resolve({ rows: mockGroups }) + } + return Promise.resolve({ + rows: [], + }) + }) + + mockGroupTypes = [ + { team_id: 1, group_type: 'GroupA', group_type_index: 0 }, + { team_id: 1, group_type: 'GroupB', group_type_index: 1 }, + { team_id: 2, group_type: 'GroupA', group_type_index: 1 }, + { team_id: 2, group_type: 'GroupB', group_type_index: 2 }, + { team_id: 2, group_type: 'GroupC', group_type_index: 3 }, + ] + + mockGroups = [] + }) + + it('does nothing if no group properties found', async () => { + const globals = createHogExecutionGlobals({ + event: { + properties: { + $groups: { GroupA: 'id-1', GroupB: 'id-2' }, + }, + } as any, + }) + await groupsManager.enrichGroups([globals]) + + expect(globals.groups).toMatchInlineSnapshot(` + Object { + "GroupA": Object { + "id": "id-1", + "index": 0, + "properties": Object {}, + "type": "GroupA", + "url": "http://localhost:8000/projects/1/groups/0/id-1", + }, + "GroupB": Object { + "id": "id-2", + "index": 1, + "properties": Object {}, + "type": "GroupB", + "url": "http://localhost:8000/projects/1/groups/1/id-2", + }, + } + `) + }) + + it('enriches simple groups', async () => { + mockGroups = [ + { team_id: 1, group_type_index: 0, group_key: 'id-1', group_properties: { prop: 'value-1' } }, + { team_id: 1, group_type_index: 1, group_key: 'id-2', group_properties: { prop: 'value-2' } }, + ] + const globals = createHogExecutionGlobals({ + event: { + properties: { + $groups: { GroupA: 'id-1', GroupB: 'id-2' }, + }, + } as any, + }) + await groupsManager.enrichGroups([globals]) + + expect(globals.groups).toMatchInlineSnapshot(` + Object { + "GroupA": Object { + "id": "id-1", + "index": 0, + "properties": Object { + "prop": "value-1", + }, + "type": "GroupA", + "url": "http://localhost:8000/projects/1/groups/0/id-1", + }, + "GroupB": Object { + "id": "id-2", + "index": 1, + "properties": Object { + "prop": "value-2", + }, + "type": "GroupB", + "url": "http://localhost:8000/projects/1/groups/1/id-2", + }, + } + `) + }) + + it('enriches lots of groups', async () => { + mockGroups = [ + { team_id: 1, group_type_index: 0, group_key: 'id-1', group_properties: { prop: 'value-team-1' } }, + { team_id: 2, group_type_index: 1, group_key: 'id-1', group_properties: { prop: 'value-team-2' } }, + ] + + const items = [ + // Should get both groups enriched + createHogExecutionGlobals({ + event: { properties: { $groups: { GroupA: 'id-1', GroupB: 'id-2' } } } as any, + }), + // Should get its group enriched (via reference) + createHogExecutionGlobals({ + event: { properties: { $groups: { GroupA: 'id-1' } } } as any, + }), + // Should get the right group for its team + createHogExecutionGlobals({ + project: { id: 2 } as any, + event: { properties: { $groups: { GroupA: 'id-1' } } } as any, + }), + ] + await groupsManager.enrichGroups(items) + + expect(items[0].groups).toMatchInlineSnapshot(` + Object { + "GroupA": Object { + "id": "id-1", + "index": 0, + "properties": Object { + "prop": "value-team-1", + }, + "type": "GroupA", + "url": "http://localhost:8000/projects/1/groups/0/id-1", + }, + "GroupB": Object { + "id": "id-2", + "index": 1, + "properties": Object {}, + "type": "GroupB", + "url": "http://localhost:8000/projects/1/groups/1/id-2", + }, + } + `) + expect(items[1].groups).toMatchInlineSnapshot(` + Object { + "GroupA": Object { + "id": "id-1", + "index": 0, + "properties": Object { + "prop": "value-team-1", + }, + "type": "GroupA", + "url": "http://localhost:8000/projects/1/groups/0/id-1", + }, + } + `) + expect(items[2].groups).toMatchInlineSnapshot(` + Object { + "GroupA": Object { + "id": "id-1", + "index": 1, + "properties": Object { + "prop": "value-team-2", + }, + "type": "GroupA", + "url": "http://localhost:8000/projects/1/groups/1/id-1", + }, + } + `) + }) + }) + + it('cached group type queries', async () => { + const globals = [ + createHogExecutionGlobals({ + project: { id: 1 } as any, + event: { properties: { $groups: { GroupA: 'id-1', GroupB: 'id-2' } } } as any, + }), + createHogExecutionGlobals({ + project: { id: 2 } as any, + event: { properties: { $groups: { GroupA: 'id-1', GroupB: 'id-2' } } } as any, + }), + ] + await groupsManager.enrichGroups(globals) + expect(mockHub.postgres.query).toHaveBeenCalledTimes(2) + mockHub.postgres.query.mockClear() + + await groupsManager.enrichGroups(globals) + expect(mockHub.postgres.query).toHaveBeenCalledTimes(1) + mockHub.postgres.query.mockClear() + + globals.push( + createHogExecutionGlobals({ + project: { id: 3 } as any, + event: { properties: { $groups: { GroupA: 'id-1', GroupB: 'id-2' } } } as any, + }) + ) + + await groupsManager.enrichGroups(globals) + expect(mockHub.postgres.query).toHaveBeenCalledTimes(2) + }) +}) diff --git a/plugin-server/tests/cdp/hog-executor.test.ts b/plugin-server/tests/cdp/hog-executor.test.ts index d1cd558e92521..ba336799b87e4 100644 --- a/plugin-server/tests/cdp/hog-executor.test.ts +++ b/plugin-server/tests/cdp/hog-executor.test.ts @@ -3,7 +3,7 @@ import { DateTime } from 'luxon' import { HogExecutor } from '../../src/cdp/hog-executor' import { HogFunctionManager } from '../../src/cdp/hog-function-manager' import { - HogFunctionInvocationAsyncResponse, + HogFunctionAsyncFunctionResponse, HogFunctionInvocationResult, HogFunctionLogEntry, HogFunctionType, @@ -13,20 +13,17 @@ import { castTimestampOrNow } from '../../src/utils/utils' import { HOG_EXAMPLES, HOG_FILTERS_EXAMPLES, HOG_INPUTS_EXAMPLES } from './examples' import { createHogExecutionGlobals, createHogFunction, insertHogFunction as _insertHogFunction } from './fixtures' -const simulateMockFetchAsyncResponse = (result: HogFunctionInvocationResult): HogFunctionInvocationAsyncResponse => { +const createAsyncFunctionResponse = (): HogFunctionAsyncFunctionResponse => { return { - ...result, - asyncFunctionResponse: { - timings: [ - { - kind: 'async_function', - duration_ms: 100, - }, - ], - response: { - status: 200, - body: 'success', + timings: [ + { + kind: 'async_function', + duration_ms: 100, }, + ], + response: { + status: 200, + body: 'success', }, } } @@ -61,15 +58,19 @@ describe('Hog Executor', () => { mockFunctionManager.getTeamHogFunction.mockReturnValue(hogFunction) }) - it('can parse incoming messages correctly', () => { + it('can execute messages', () => { const globals = createHogExecutionGlobals() const results = executor .findMatchingFunctions(createHogExecutionGlobals()) .matchingFunctions.map((x) => executor.executeFunction(globals, x) as HogFunctionInvocationResult) expect(results).toHaveLength(1) expect(results[0]).toMatchObject({ - id: expect.any(String), - hogFunctionId: hogFunction.id, + invocation: { + id: expect.any(String), + hogFunctionId: hogFunction.id, + }, + finished: false, + asyncFunctionRequest: {}, }) }) @@ -83,7 +84,7 @@ describe('Hog Executor', () => { team_id: 1, log_source: 'hog_function', log_source_id: hogFunction.id, - instance_id: results[0].id, + instance_id: results[0].invocation.id, timestamp: expect.any(DateTime), level: 'debug', message: 'Executing function', @@ -92,10 +93,10 @@ describe('Hog Executor', () => { team_id: 1, log_source: 'hog_function', log_source_id: hogFunction.id, - instance_id: results[0].id, + instance_id: results[0].invocation.id, timestamp: expect.any(DateTime), level: 'debug', - message: "Suspending function due to async function call 'fetch'", + message: "Suspending function due to async function call 'fetch'. Payload: 1299 bytes", }, ]) @@ -125,7 +126,7 @@ describe('Hog Executor', () => { "{\\"foo\\":\\"***REDACTED***\\"}", "substring: ***REDACTED***", "{\\"input_1\\":\\"test\\",\\"secret_input_2\\":{\\"foo\\":\\"***REDACTED***\\"},\\"secret_input_3\\":\\"***REDACTED***\\"}", - "Function completed. Processing time 0ms", + "Function completed in 0ms. Sync: 0ms. Mem: 129 bytes. Ops: 28.", ] `) }) @@ -136,24 +137,34 @@ describe('Hog Executor', () => { .findMatchingFunctions(createHogExecutionGlobals()) .matchingFunctions.map((x) => executor.executeFunction(globals, x) as HogFunctionInvocationResult) expect(results[0]).toMatchObject({ - id: results[0].id, - globals: { - project: { id: 1, name: 'test', url: 'http://localhost:8000/projects/1' }, - event: { - uuid: 'uuid', - name: 'test', - distinct_id: 'distinct_id', - url: 'http://localhost:8000/events/1', - properties: { $lib_version: '1.2.3' }, - timestamp: '2024-06-07T12:00:00.000Z', - }, - source: { - name: 'Test hog function', - url: `http://localhost:8000/projects/1/pipeline/destinations/hog-${hogFunction.id}/configuration/`, + invocation: { + id: results[0].invocation.id, + teamId: 1, + hogFunctionId: hogFunction.id, + vmState: expect.any(Object), + globals: { + project: { id: 1, name: 'test', url: 'http://localhost:8000/projects/1' }, + event: { + uuid: 'uuid', + name: 'test', + distinct_id: 'distinct_id', + url: 'http://localhost:8000/events/1', + properties: { $lib_version: '1.2.3' }, + timestamp: '2024-06-07T12:00:00.000Z', + }, + source: { + name: 'Test hog function', + url: `http://localhost:8000/projects/1/pipeline/destinations/hog-${hogFunction.id}/configuration/`, + }, }, + timings: [ + { + kind: 'hog', + duration_ms: 0, + }, + ], }, - teamId: 1, - hogFunctionId: hogFunction.id, + asyncFunctionRequest: { name: 'fetch', args: [ @@ -177,14 +188,7 @@ describe('Hog Executor', () => { method: 'POST', }, ], - vmState: expect.any(Object), }, - timings: [ - { - kind: 'hog', - duration_ms: 0, - }, - ], }) }) @@ -197,17 +201,17 @@ describe('Hog Executor', () => { const splicedLogs = results[0].logs.splice(0, 100) logs.push(...splicedLogs) - const asyncExecResult = executor.executeAsyncResponse(simulateMockFetchAsyncResponse(results[0])) + const asyncExecResult = executor.executeAsyncResponse(results[0].invocation, createAsyncFunctionResponse()) logs.push(...asyncExecResult.logs) expect(asyncExecResult.error).toBeUndefined() expect(asyncExecResult.finished).toBe(true) expect(logs.map((log) => log.message)).toEqual([ 'Executing function', - "Suspending function due to async function call 'fetch'", + "Suspending function due to async function call 'fetch'. Payload: 1299 bytes", 'Resuming function', 'Fetch response:, {"status":200,"body":"success"}', - 'Function completed. Processing time 100ms', + 'Function completed in 100ms. Sync: 0ms. Mem: 589 bytes. Ops: 22.', ]) }) }) @@ -259,19 +263,19 @@ describe('Hog Executor', () => { expect(results).toHaveLength(1) // Run the result one time simulating a successful fetch - const asyncResult1 = executor.executeAsyncResponse(simulateMockFetchAsyncResponse(results[0])) + const asyncResult1 = executor.executeAsyncResponse(results[0].invocation, createAsyncFunctionResponse()) expect(asyncResult1.finished).toBe(false) expect(asyncResult1.error).toBe(undefined) expect(asyncResult1.asyncFunctionRequest).toBeDefined() // Run the result one more time simulating a second successful fetch - const asyncResult2 = executor.executeAsyncResponse(simulateMockFetchAsyncResponse(asyncResult1)) + const asyncResult2 = executor.executeAsyncResponse(asyncResult1.invocation, createAsyncFunctionResponse()) // This time we should see an error for hitting the loop limit expect(asyncResult2.finished).toBe(false) expect(asyncResult2.error).toEqual('Exceeded maximum number of async steps: 2') expect(asyncResult2.logs.map((log) => log.message)).toEqual([ 'Resuming function', - 'Error executing function: Error: Exceeded maximum number of async steps: 2', + 'Error executing function: HogVMException: Exceeded maximum number of async steps: 2', ]) }) }) @@ -310,7 +314,7 @@ describe('Hog Executor', () => { 'I AM FIBONACCI', 'Function exceeded maximum log entries. No more logs will be collected.', expect.stringContaining( - 'Error executing function: Error: Execution timed out after 0.1 seconds. Performed' + 'Error executing function: HogVMException: Execution timed out after 0.1 seconds. Performed' ), ]) }) diff --git a/plugin-server/tests/cdp/hog-watcher/hog-watcher.test.ts b/plugin-server/tests/cdp/hog-watcher/hog-watcher.test.ts index 52577df97bede..a36d72794ce99 100644 --- a/plugin-server/tests/cdp/hog-watcher/hog-watcher.test.ts +++ b/plugin-server/tests/cdp/hog-watcher/hog-watcher.test.ts @@ -17,17 +17,29 @@ const mockNow: jest.Mock = require('../../../src/utils/now').now as any const createResult = (id: string, finished = true, error?: string): HogFunctionInvocationResult => { return { - hogFunctionId: id, + invocation: { + id: 'invocation-id', + teamId: 2, + hogFunctionId: id, + globals: {} as any, + timings: [], + }, finished, error, - } as HogFunctionInvocationResult + logs: [], + } } const createAsyncResponse = (id: string, success = true): HogFunctionInvocationAsyncResponse => { return { + state: '', + teamId: 2, hogFunctionId: id, - error: success ? null : 'error', - } as HogFunctionInvocationAsyncResponse + asyncFunctionResponse: { + error: !success ? 'error' : null, + response: {}, + }, + } } const config = defaultConfig @@ -104,7 +116,6 @@ describe('HogWatcher', () => { const advanceTime = (ms: number) => { now += ms - console.log(`[TEST] Advancing time by ${ms}ms to ${now}`) mockNow.mockReturnValue(now) } diff --git a/plugin-server/tests/cdp/utils.test.ts b/plugin-server/tests/cdp/utils.test.ts new file mode 100644 index 0000000000000..a33cc79cf52d5 --- /dev/null +++ b/plugin-server/tests/cdp/utils.test.ts @@ -0,0 +1,14 @@ +import { gzipObject, unGzipObject } from '../../src/cdp/utils' +import { insertHogFunction as _insertHogFunction } from './fixtures' + +describe('Utils', () => { + describe('gzip compressions', () => { + it("should compress and decompress a string using gzip's sync functions", async () => { + const input = { foo: 'bar', foo2: 'bar' } + const compressed = await gzipObject(input) + expect(compressed).toHaveLength(52) + const decompressed = await unGzipObject(compressed) + expect(decompressed).toEqual(input) + }) + }) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 307e5fc0965ff..7dbe723c61e12 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -263,8 +263,8 @@ dependencies: specifier: ^9.3.0 version: 9.3.0(postcss@8.4.31) posthog-js: - specifier: 1.149.1 - version: 1.149.1 + specifier: 1.150.0 + version: 1.150.0 posthog-js-lite: specifier: 3.0.0 version: 3.0.0 @@ -17721,8 +17721,8 @@ packages: resolution: {integrity: sha512-dyajjnfzZD1tht4N7p7iwf7nBnR1MjVaVu+MKr+7gBgA39bn28wizCIJZztZPtHy4PY0YwtSGgwfBCuG/hnHgA==} dev: false - /posthog-js@1.149.1: - resolution: {integrity: sha512-n3mkDlV0vJ1QhkDkWwUzY9RIFTPbzDzbKRyjzRE4D6H2PoH3vsrR05DNujoCr3t0hqgsaO4RLXO3VlctpdkGKQ==} + /posthog-js@1.150.0: + resolution: {integrity: sha512-oTbMtVX8dsBlZrJ3/6P6l3Ivs14Q3i454Ly1Y0DfZDoxT67OMRc791uQ0rm2VCVxVGwpy7LYz+0VB14/rfrbOw==} dependencies: fflate: 0.4.8 preact: 10.23.0 diff --git a/posthog/api/action.py b/posthog/api/action.py index 816c34d2f4247..c43bf893ca7a4 100644 --- a/posthog/api/action.py +++ b/posthog/api/action.py @@ -3,13 +3,10 @@ from rest_framework import serializers, viewsets from django.db.models import Count from rest_framework import request -from rest_framework.decorators import action -from rest_framework.request import Request from rest_framework.response import Response from rest_framework.settings import api_settings from rest_framework_csv import renderers as csvrenderers -from posthog.api.plugin import PluginConfigSerializer from posthog.api.routing import TeamAndOrgViewSetMixin from posthog.api.shared import UserBasicSerializer from posthog.auth import ( @@ -19,7 +16,6 @@ from posthog.event_usage import report_user_action from posthog.models import Action from posthog.models.action.action import ACTION_STEP_MATCHING_OPTIONS -from posthog.models.plugin import PluginConfig from .forbid_destroy_model import ForbidDestroyModel from .tagged_item import TaggedItemSerializerMixin, TaggedItemViewSetMixin @@ -149,15 +145,3 @@ def list(self, request: request.Request, *args: Any, **kwargs: Any) -> Response: actions, many=True, context={"request": request} ).data # type: ignore return Response({"results": actions_list}) - - @action(methods=["GET"], detail=True) - def plugin_configs(self, request: Request, *args: Any, **kwargs: Any) -> Response: - queryset = ( - PluginConfig.objects.all() - .filter(team=self.team_id, enabled=True) - .filter(filters__contains={"actions": [{"id": str(self.get_object().id)}]}) - ) - - page = self.paginate_queryset(queryset) - serializer = PluginConfigSerializer(page, many=True, context=self.get_serializer_context()) - return self.get_paginated_response(serializer.data) diff --git a/posthog/api/alert.py b/posthog/api/alert.py index f1b368f6c2093..8560b0304e198 100644 --- a/posthog/api/alert.py +++ b/posthog/api/alert.py @@ -30,7 +30,7 @@ def validate(self, attrs): class AlertViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet): - scope_object = "alert" + scope_object = "INTERNAL" queryset = Alert.objects.all() serializer_class = AlertSerializer diff --git a/posthog/api/app_metrics2.py b/posthog/api/app_metrics2.py index a6fc2c6daef54..048413967cdbb 100644 --- a/posthog/api/app_metrics2.py +++ b/posthog/api/app_metrics2.py @@ -73,7 +73,7 @@ def fetch_app_metrics_trends( SELECT toStartOfInterval(timestamp, INTERVAL 1 {interval}) as timestamp, metric_{breakdown_by} as breakdown, - count(breakdown) as count + sum(count) as count FROM app_metrics2 WHERE team_id = %(team_id)s AND app_source = %(app_source)s @@ -179,7 +179,7 @@ def fetch_app_metric_totals( clickhouse_query = f""" SELECT metric_{breakdown_by} as breakdown, - count(breakdown) as count + sum(count) as count FROM app_metrics2 WHERE team_id = %(team_id)s AND app_source = %(app_source)s diff --git a/posthog/api/decide.py b/posthog/api/decide.py index 7a3d45480b1bf..747ba4d463f4e 100644 --- a/posthog/api/decide.py +++ b/posthog/api/decide.py @@ -318,8 +318,8 @@ def _session_recording_config_response(request: HttpRequest, team: Team) -> bool { "recordCanvas": record_canvas, # hard coded during beta while we decide on sensible values - "canvasFps": 4 if record_canvas else None, - "canvasQuality": "0.6" if record_canvas else None, + "canvasFps": 3 if record_canvas else None, + "canvasQuality": "0.4" if record_canvas else None, } ) except Exception as e: diff --git a/posthog/api/error_tracking.py b/posthog/api/error_tracking.py index bdef3cc42ee03..f12ff61af90e1 100644 --- a/posthog/api/error_tracking.py +++ b/posthog/api/error_tracking.py @@ -4,6 +4,8 @@ from posthog.api.forbid_destroy_model import ForbidDestroyModel from posthog.api.routing import TeamAndOrgViewSetMixin from posthog.models.error_tracking import ErrorTrackingGroup +from rest_framework.decorators import action +from rest_framework.response import Response class ErrorTrackingGroupSerializer(serializers.ModelSerializer): @@ -21,3 +23,10 @@ def safely_get_object(self, queryset) -> QuerySet: fingerprint = self.kwargs["pk"] group, _ = queryset.get_or_create(fingerprint=fingerprint, team=self.team) return group + + @action(methods=["POST"], detail=True) + def merge(self, request, **kwargs): + group: ErrorTrackingGroup = self.get_object() + merging_fingerprints: list[str] = request.data.get("merging_fingerprints", []) + group.merge(merging_fingerprints) + return Response({"success": True}) diff --git a/posthog/api/hog_function.py b/posthog/api/hog_function.py index 972178a875401..a9eddc7b1fae0 100644 --- a/posthog/api/hog_function.py +++ b/posthog/api/hog_function.py @@ -1,9 +1,10 @@ +import json from typing import Optional, cast import structlog from django_filters.rest_framework import DjangoFilterBackend from django.db.models import QuerySet -from rest_framework import serializers, viewsets +from rest_framework import serializers, viewsets, exceptions from rest_framework.serializers import BaseSerializer from rest_framework.decorators import action from rest_framework.request import Request @@ -50,6 +51,7 @@ class Meta: "hog", "filters", "icon_url", + "template", ] read_only_fields = fields @@ -100,9 +102,10 @@ def validate(self, attrs): attrs["team"] = team has_addon = team.organization.is_feature_available(AvailableFeature.DATA_PIPELINES) + instance = cast(Optional[HogFunction], self.context.get("instance", self.instance)) if not has_addon: - template_id = attrs.get("template_id") + template_id = attrs.get("template_id", instance.template_id if instance else None) template = HOG_FUNCTION_TEMPLATES_BY_ID.get(template_id, None) # In this case they are only allowed to create or update the function with free templates @@ -130,8 +133,6 @@ def validate(self, attrs): attrs["inputs_schema"] = template.inputs_schema attrs["hog"] = template.hog - instance = cast(Optional[HogFunction], self.context.get("instance", self.instance)) - if "inputs_schema" in attrs: attrs["inputs_schema"] = validate_inputs_schema(attrs["inputs_schema"]) @@ -213,6 +214,13 @@ def safely_get_queryset(self, queryset: QuerySet) -> QuerySet: if self.action == "list": queryset = queryset.filter(deleted=False) + if self.request.GET.get("filters"): + try: + filters = json.loads(self.request.GET["filters"]) + queryset = queryset.filter(filters__contains=filters) + except Exception: + raise exceptions.ValidationError({"filter": f"Invalid filter"}) + return queryset @action(detail=False, methods=["GET"]) diff --git a/posthog/api/test/__snapshots__/test_api_docs.ambr b/posthog/api/test/__snapshots__/test_api_docs.ambr index 40cb9985d1cb0..90efe27ae49ee 100644 --- a/posthog/api/test/__snapshots__/test_api_docs.ambr +++ b/posthog/api/test/__snapshots__/test_api_docs.ambr @@ -12,7 +12,6 @@ '/home/runner/work/posthog/posthog/ee/api/role.py: Warning [RoleMembershipViewSet]: could not derive type of path parameter "organization_id" because model "ee.models.role.RoleMembership" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".', '/home/runner/work/posthog/posthog/posthog/api/action.py: Warning [ActionViewSet]: could not derive type of path parameter "project_id" because model "posthog.models.action.action.Action" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".', '/home/runner/work/posthog/posthog/posthog/api/activity_log.py: Warning [ActivityLogViewSet]: could not derive type of path parameter "project_id" because model "posthog.models.activity_logging.activity_log.ActivityLog" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".', - '/home/runner/work/posthog/posthog/posthog/api/alert.py: Warning [AlertViewSet]: could not derive type of path parameter "project_id" because model "posthog.models.alert.Alert" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".', '/home/runner/work/posthog/posthog/posthog/api/annotation.py: Warning [AnnotationsViewSet]: could not derive type of path parameter "project_id" because model "posthog.models.annotation.Annotation" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".', "/home/runner/work/posthog/posthog/posthog/api/app_metrics.py: Error [AppMetricsViewSet]: exception raised while getting serializer. Hint: Is get_serializer_class() returning None or is get_queryset() not working without a request? Ignoring the view for now. (Exception: 'AppMetricsViewSet' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method.)", '/home/runner/work/posthog/posthog/posthog/api/app_metrics.py: Warning [AppMetricsViewSet]: could not derive type of path parameter "project_id" because model "posthog.models.plugin.PluginConfig" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".', diff --git a/posthog/api/test/test_action.py b/posthog/api/test/test_action.py index 2d162ff872ae1..3e4a0c4f56d87 100644 --- a/posthog/api/test/test_action.py +++ b/posthog/api/test/test_action.py @@ -136,9 +136,7 @@ def test_update_action(self, patch_capture, *args): action = Action.objects.create( name="user signed up", team=self.team, steps_json=[{"event": "$autocapture", "text": "sign me up!"}] ) - action.refresh_bytecode() action.save() - previous_bytecode = action.bytecode response = self.client.patch( f"/api/projects/{self.team.id}/actions/{action.pk}/", @@ -198,8 +196,6 @@ def test_update_action(self, patch_capture, *args): action.refresh_from_db() assert action.name == "user signed up 2" - assert previous_bytecode != action.bytecode - # Assert analytics are sent patch_capture.assert_called_with( user, diff --git a/posthog/api/test/test_decide.py b/posthog/api/test/test_decide.py index 352ab961c1297..bf781da00e635 100644 --- a/posthog/api/test/test_decide.py +++ b/posthog/api/test/test_decide.py @@ -356,8 +356,8 @@ def test_session_replay_config(self, *args): response = self._post_decide().json() self.assertEqual(response["sessionRecording"]["recordCanvas"], True) - self.assertEqual(response["sessionRecording"]["canvasFps"], 4) - self.assertEqual(response["sessionRecording"]["canvasQuality"], "0.6") + self.assertEqual(response["sessionRecording"]["canvasFps"], 3) + self.assertEqual(response["sessionRecording"]["canvasQuality"], "0.4") def test_exception_autocapture_opt_in(self, *args): # :TRICKY: Test for regression around caching diff --git a/posthog/api/test/test_error_tracking.py b/posthog/api/test/test_error_tracking.py index c2d6f74b45785..c8eac7f84a48c 100644 --- a/posthog/api/test/test_error_tracking.py +++ b/posthog/api/test/test_error_tracking.py @@ -37,3 +37,29 @@ def test_can_only_update_allowed_fields(self): ) group.refresh_from_db() self.assertEqual(group.fingerprint, "CustomFingerprint") + + def test_merging_of_an_existing_group(self): + fingerprint = "CustomFingerprint" + merging_fingerprints = ["NewFingerprint"] + group = ErrorTrackingGroup.objects.create(fingerprint=fingerprint, team=self.team) + + self.client.post( + f"/api/projects/{self.team.id}/error_tracking/{fingerprint}/merge", + data={"merging_fingerprints": merging_fingerprints}, + ) + + group.refresh_from_db() + self.assertEqual(group.merged_fingerprints, merging_fingerprints) + + def test_merging_when_no_group_exists(self): + fingerprint = "CustomFingerprint" + merging_fingerprints = ["NewFingerprint"] + + self.assertEqual(ErrorTrackingGroup.objects.count(), 0) + self.client.post( + f"/api/projects/{self.team.id}/error_tracking/{fingerprint}/merge", + data={"merging_fingerprints": merging_fingerprints}, + ) + self.assertEqual(ErrorTrackingGroup.objects.count(), 1) + groups = ErrorTrackingGroup.objects.only("merged_fingerprints") + self.assertEqual(groups[0].merged_fingerprints, merging_fingerprints) diff --git a/posthog/api/test/test_hog_function.py b/posthog/api/test/test_hog_function.py index 23b33ff5f91a4..57f7290cd5fc5 100644 --- a/posthog/api/test/test_hog_function.py +++ b/posthog/api/test/test_hog_function.py @@ -1,5 +1,5 @@ import json -from typing import Optional +from typing import Any, Optional from unittest.mock import ANY, patch from rest_framework import status @@ -552,3 +552,62 @@ def test_patches_status_on_enabled_update(self, *args): f"http://localhost:6738/api/projects/{self.team.id}/hog_functions/{response.json()['id']}/status", json={"state": 2}, ) + + @patch("posthog.permissions.posthoganalytics.feature_enabled", return_value=True) + def test_list_with_filters_filter(self, *args): + action1 = Action.objects.create( + team=self.team, + name="test action", + steps_json=[{"event": "$pageview", "url": "docs", "url_matching": "contains"}], + ) + + action2 = Action.objects.create( + team=self.team, + name="test action", + steps_json=[{"event": "$pageview", "url": "docs", "url_matching": "contains"}], + ) + + self.team.test_account_filters = [ + { + "key": "email", + "value": "@posthog.com", + "operator": "not_icontains", + "type": "person", + } + ] + self.team.save() + response = self.client.post( + f"/api/projects/{self.team.id}/hog_functions/", + data={ + **EXAMPLE_FULL, + "filters": { + "events": [{"id": "$pageview", "name": "$pageview", "type": "events", "order": 0}], + "actions": [ + {"id": f"{action1.id}", "name": "Test Action", "type": "actions", "order": 1}, + {"id": f"{action2.id}", "name": "Test Action 2", "type": "actions", "order": 1}, + ], + "filter_test_accounts": True, + }, + }, + ) + assert response.status_code == status.HTTP_201_CREATED, response.json() + + filters: Any = {"filter_test_accounts": True} + response = self.client.get(f"/api/projects/{self.team.id}/hog_functions/?filters={json.dumps(filters)}") + assert len(response.json()["results"]) == 1 + + filters = {"filter_test_accounts": False} + response = self.client.get(f"/api/projects/{self.team.id}/hog_functions/?filters={json.dumps(filters)}") + assert len(response.json()["results"]) == 0 + + filters = {"actions": [{"id": f"other"}]} + response = self.client.get(f"/api/projects/{self.team.id}/hog_functions/?filters={json.dumps(filters)}") + assert len(response.json()["results"]) == 0 + + filters = {"actions": [{"id": f"{action1.id}"}]} + response = self.client.get(f"/api/projects/{self.team.id}/hog_functions/?filters={json.dumps(filters)}") + assert len(response.json()["results"]) == 1 + + filters = {"actions": [{"id": f"{action2.id}"}]} + response = self.client.get(f"/api/projects/{self.team.id}/hog_functions/?filters={json.dumps(filters)}") + assert len(response.json()["results"]) == 1 diff --git a/posthog/api/test/test_query.py b/posthog/api/test/test_query.py index 5ef38ac548c2d..78339bd3f30c2 100644 --- a/posthog/api/test/test_query.py +++ b/posthog/api/test/test_query.py @@ -840,6 +840,7 @@ def test_full_hogql_query_async(self): { "query_status": { "complete": False, + "pickup_time": None, "end_time": None, "error": False, "error_message": None, diff --git a/posthog/batch_exports/models.py b/posthog/batch_exports/models.py index 2315575cf4ae1..e27e34ecd3ab7 100644 --- a/posthog/batch_exports/models.py +++ b/posthog/batch_exports/models.py @@ -31,9 +31,9 @@ class Destination(models.TextChoices): secret_fields = { "S3": {"aws_access_key_id", "aws_secret_access_key"}, - "Snowflake": set("password"), - "Postgres": set("password"), - "Redshift": set("password"), + "Snowflake": {"user", "password"}, + "Postgres": {"user", "password"}, + "Redshift": {"user", "password"}, "BigQuery": {"private_key", "private_key_id", "client_email", "token_uri"}, "HTTP": set("token"), "NoOp": set(), diff --git a/posthog/batch_exports/service.py b/posthog/batch_exports/service.py index 9ac836e261c84..83aed70018b3c 100644 --- a/posthog/batch_exports/service.py +++ b/posthog/batch_exports/service.py @@ -5,6 +5,7 @@ import structlog import temporalio +import temporalio.common from asgiref.sync import async_to_sync from temporalio.client import ( Client, @@ -636,6 +637,12 @@ def sync_batch_export(batch_export: BatchExport, created: bool): ), id=str(batch_export.id), task_queue=BATCH_EXPORTS_TASK_QUEUE, + retry_policy=temporalio.common.RetryPolicy( + initial_interval=dt.timedelta(seconds=10), + maximum_interval=dt.timedelta(seconds=60), + maximum_attempts=2, + non_retryable_error_types=["ActivityError", "ApplicationError", "CancelledError"], + ), ), spec=ScheduleSpec( start_at=batch_export.start_at, diff --git a/posthog/batch_exports/sql.py b/posthog/batch_exports/sql.py index ddab2497d228c..b61bd1d448006 100644 --- a/posthog/batch_exports/sql.py +++ b/posthog/batch_exports/sql.py @@ -21,38 +21,38 @@ FROM ( SELECT team_id, - distinct_id, + id, max(version) AS version, - argMax(person_id, person_distinct_id2.version) AS person_id, - argMax(_timestamp, person_distinct_id2.version) AS _timestamp + argMax(properties, person.version) AS properties, + argMax(_timestamp, person.version) AS _timestamp FROM - person_distinct_id2 - WHERE + person + PREWHERE team_id = {{team_id:Int64}} GROUP BY team_id, - distinct_id - ) AS pd + id + ) AS p INNER JOIN ( SELECT team_id, - id, + distinct_id, max(version) AS version, - argMax(properties, person.version) AS properties, - argMax(_timestamp, person.version) AS _timestamp + argMax(person_id, person_distinct_id2.version) AS person_id, + argMax(_timestamp, person_distinct_id2.version) AS _timestamp FROM - person - WHERE + person_distinct_id2 + PREWHERE team_id = {{team_id:Int64}} GROUP BY team_id, - id - ) AS p ON p.id = pd.person_id AND p.team_id = pd.team_id + distinct_id + ) AS pd ON p.id = pd.person_id AND p.team_id = pd.team_id WHERE pd.team_id = {{team_id:Int64}} AND p.team_id = {{team_id:Int64}} - AND (pd._timestamp >= {{interval_start:DateTime64}} AND pd._timestamp < {{interval_end:DateTime64}}) - OR (p._timestamp >= {{interval_start:DateTime64}} AND p._timestamp < {{interval_end:DateTime64}}) + AND ((pd._timestamp >= {{interval_start:DateTime64}} AND pd._timestamp < {{interval_end:DateTime64}}) + OR (p._timestamp >= {{interval_start:DateTime64}} AND p._timestamp < {{interval_end:DateTime64}})) ORDER BY _inserted_at ) diff --git a/posthog/cdp/services/icons.py b/posthog/cdp/services/icons.py index f4cd744d5acb9..462783a7ba594 100644 --- a/posthog/cdp/services/icons.py +++ b/posthog/cdp/services/icons.py @@ -1,4 +1,6 @@ +from base64 import b64encode from django.conf import settings +from django.core.cache import cache from django.http import HttpResponse import requests @@ -14,25 +16,31 @@ def list_icons(self, query: str, icon_url_base: str): if not self.supported: return [] - res = requests.get( - f"https://search.logo.dev/api/icons", - params={ - "token": settings.LOGO_DEV_TOKEN, - "query": query, - }, - ) - data = res.json() - - parsed = [ - { - "id": item["domain"], - "name": item["name"], - "url": f"{icon_url_base}{item['domain']}", - } - for item in data - ] - - return parsed + cache_key = f"@cdp/list_icons/{b64encode(query.encode()).decode()}" + data = cache.get(cache_key) + + if data is None: + res = requests.get( + f"https://search.logo.dev/api/icons", + params={ + "token": settings.LOGO_DEV_TOKEN, + "query": query, + }, + ) + data = res.json() or [] + + data = [ + { + "id": item["domain"], + "name": item["name"], + "url": f"{icon_url_base}{item['domain']}", + } + for item in res.json() or [] + ] + + cache.set(cache_key, data, 60 * 60 * 24) + + return data def get_icon_http_response(self, id: str): if not self.supported: diff --git a/posthog/cdp/templates/aws_kinesis/template_aws_kinesis.py b/posthog/cdp/templates/aws_kinesis/template_aws_kinesis.py index 4e0ef38d793b1..df41fa266ecec 100644 --- a/posthog/cdp/templates/aws_kinesis/template_aws_kinesis.py +++ b/posthog/cdp/templates/aws_kinesis/template_aws_kinesis.py @@ -8,9 +8,8 @@ description="Put data to an AWS Kinesis stream", icon_url="/static/services/aws-kinesis.png", hog=""" -fn uploadToKinesis(data) { +fn getPayload() { let region := inputs.aws_region - let endpoint := f'https://kinesis.{region}.amazonaws.com' let service := 'kinesis' let amzDate := formatDateTime(now(), '%Y%m%dT%H%i%sZ') let date := formatDateTime(now(), '%Y%m%d') @@ -18,7 +17,7 @@ let payload := jsonStringify({ 'StreamName': inputs.aws_kinesis_stream_arn, 'PartitionKey': inputs.aws_kinesis_partition_key, - 'Data': base64Encode(data), + 'Data': base64Encode(jsonStringify(inputs.payload)), }) let requestHeaders := { @@ -69,21 +68,20 @@ requestHeaders['Authorization'] := authorizationHeader - let res := fetch(endpoint, { + return { 'headers': requestHeaders, 'body': payload, 'method': 'POST' - }) - - if (res.status >= 200 and res.status < 300) { - print('Event sent successfully!') - return } +} +let res := fetch(f'https://kinesis.{inputs.aws_region}.amazonaws.com', getPayload()) + +if (res.status >= 200 and res.status < 300) { + print('Event sent successfully!') +} else { print('Error sending event:', res.status, res.body) } - -uploadToKinesis(jsonStringify(inputs.payload)) """.strip(), inputs_schema=[ { diff --git a/posthog/cdp/templates/webhook/template_webhook.py b/posthog/cdp/templates/webhook/template_webhook.py index fb7ed6e63650c..b99e7f9f31f79 100644 --- a/posthog/cdp/templates/webhook/template_webhook.py +++ b/posthog/cdp/templates/webhook/template_webhook.py @@ -6,7 +6,7 @@ id="template-webhook", name="HTTP Webhook", description="Sends a webhook templated by the incoming event data", - icon_url="/static/posthog-icon.svg?temp=true", + icon_url="/static/posthog-icon.svg", hog=""" let res := fetch(inputs.url, { 'headers': inputs.headers, diff --git a/posthog/clickhouse/client/async_task_chain.py b/posthog/clickhouse/client/async_task_chain.py index 161728fc63a6d..41c5ee411835a 100644 --- a/posthog/clickhouse/client/async_task_chain.py +++ b/posthog/clickhouse/client/async_task_chain.py @@ -5,6 +5,7 @@ from celery import chain from celery.canvas import Signature +from celery.result import EagerResult from django.db import transaction from posthog.schema import QueryStatus @@ -22,6 +23,9 @@ def kick_off_task( task_signature: Signature, ) -> None: task = task_signature.apply_async() + # During end-to-end tests, the task is executed synchronously, so we have to refresh the status. + if isinstance(task, EagerResult): + query_status = manager.get_query_status() query_status.task_id = task.id manager.store_query_status(query_status) diff --git a/posthog/clickhouse/client/execute_async.py b/posthog/clickhouse/client/execute_async.py index e3e30d52884de..14e8cb4fae06d 100644 --- a/posthog/clickhouse/client/execute_async.py +++ b/posthog/clickhouse/client/execute_async.py @@ -150,8 +150,10 @@ def execute_process_query( team = Team.objects.get(pk=team_id) sentry_sdk.set_tag("team_id", team_id) + is_staff_user = False if user_id: - user = User.objects.get(pk=user_id) + user = User.objects.only("email", "is_staff").get(pk=user_id) + is_staff_user = user.is_staff sentry_sdk.set_user({"email": user.email, "id": user_id, "username": user.email}) query_status = manager.get_query_status() @@ -159,6 +161,9 @@ def execute_process_query( if query_status.complete: return + query_status.pickup_time = datetime.datetime.now(datetime.UTC) + manager.store_query_status(query_status) + query_status.error = True # Assume error in case nothing below ends up working query_status.complete = True @@ -166,9 +171,8 @@ def execute_process_query( if trigger == "chained": tag_queries(trigger="chaining") - pickup_time = datetime.datetime.now(datetime.UTC) if query_status.start_time: - wait_duration = (pickup_time - query_status.start_time) / datetime.timedelta(seconds=1) + wait_duration = (query_status.pickup_time - query_status.start_time) / datetime.timedelta(seconds=1) QUERY_WAIT_TIME.labels(team=team_id, mode=trigger).observe(wait_duration) try: @@ -186,23 +190,22 @@ def execute_process_query( logger.info("Got results for team %s query %s", team_id, query_id) query_status.error = False query_status.results = results - query_status.end_time = datetime.datetime.now(datetime.UTC) - process_duration = (query_status.end_time - pickup_time) / datetime.timedelta(seconds=1) + process_duration = (datetime.datetime.now(datetime.UTC) - query_status.pickup_time) / datetime.timedelta( + seconds=1 + ) QUERY_PROCESS_TIME.labels(team=team_id).observe(process_duration) except CHQueryErrorTooManySimultaneousQueries: raise - except (ExposedHogQLError, ExposedCHQueryError) as err: # We can expose the error to the user + except Exception as err: query_status.results = None # Clear results in case they are faulty - query_status.error_message = str(err) - logger.exception("Error processing query for team %s query %s", team_id, query_id) - sentry_sdk.capture_exception(err) - # Do not raise here, the task itself did its job and we cannot recover - except Exception as err: # We cannot reveal anything about the error - query_status.results = None # Clear results in case they are faulty - logger.exception("Error processing query for team %s query %s", team_id, query_id) + if isinstance(err, ExposedHogQLError | ExposedCHQueryError) or is_staff_user: + # We can only expose the error message if it's a known safe error OR if the user is PostHog staff + query_status.error_message = str(err) + logger.exception("Error processing query async", team_id=team_id, query_id=query_id, exc_info=True) sentry_sdk.capture_exception(err) # Do not raise here, the task itself did its job and we cannot recover finally: + query_status.end_time = datetime.datetime.now(datetime.UTC) manager.store_query_status(query_status) diff --git a/posthog/clickhouse/client/test/test_execute_async.py b/posthog/clickhouse/client/test/test_execute_async.py index 13ebfe90964b1..14199a488f712 100644 --- a/posthog/clickhouse/client/test/test_execute_async.py +++ b/posthog/clickhouse/client/test/test_execute_async.py @@ -128,7 +128,7 @@ def test_execute_process_query(self, mock_process_query_dict, mock_redis_client) mock_process_query_dict.assert_called_once() # Assert that Redis set method was called with the correct arguments - mock_redis.set.assert_called_once() + self.assertEqual(mock_redis.set.call_count, 2) # Once on pickup, once on completion args, kwargs = mock_redis.set.call_args args_loaded = json.loads(args[1]) self.assertEqual(args_loaded["results"], [None, None, None, 1.0, "👍"]) @@ -149,6 +149,9 @@ def test_async_query_client(self): result = client.get_query_status(self.team.id, query_id) self.assertFalse(result.error, result.error_message or "") self.assertTrue(result.complete) + self.assertIsNotNone(result.start_time) + self.assertIsNotNone(result.pickup_time) + self.assertIsNotNone(result.end_time) assert result.results is not None self.assertEqual(result.results["results"], [[2]]) @@ -165,6 +168,9 @@ def test_async_query_client_errors(self): result = client.get_query_status(self.team.id, query_id) self.assertTrue(result.error) self.assertTrue(result.complete) + self.assertIsNotNone(result.start_time) + self.assertIsNotNone(result.pickup_time) + self.assertIsNotNone(result.end_time) assert result.error_message self.assertRegex(result.error_message, "no viable alternative at input") @@ -191,6 +197,9 @@ def test_async_query_server_errors(self): result = client.get_query_status(self.team.id, query_id) self.assertTrue(result.error) assert result.error_message is None + self.assertIsNotNone(result.start_time) + self.assertIsNotNone(result.pickup_time) + self.assertIsNotNone(result.end_time) def test_async_query_client_uuid(self): query = build_query("SELECT toUUID('00000000-0000-0000-0000-000000000000')") diff --git a/posthog/clickhouse/migrations/0073_update_person_batch_exports_query_for_memory.py b/posthog/clickhouse/migrations/0073_update_person_batch_exports_query_for_memory.py new file mode 100644 index 0000000000000..5e9369110bc51 --- /dev/null +++ b/posthog/clickhouse/migrations/0073_update_person_batch_exports_query_for_memory.py @@ -0,0 +1,11 @@ +from posthog.batch_exports.sql import ( + CREATE_PERSONS_BATCH_EXPORT_VIEW, +) +from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions + +operations = map( + run_sql_with_exceptions, + [ + CREATE_PERSONS_BATCH_EXPORT_VIEW, + ], +) diff --git a/posthog/clickhouse/test/__snapshots__/test_schema.ambr b/posthog/clickhouse/test/__snapshots__/test_schema.ambr index 344ac139affa4..69407e9000939 100644 --- a/posthog/clickhouse/test/__snapshots__/test_schema.ambr +++ b/posthog/clickhouse/test/__snapshots__/test_schema.ambr @@ -595,6 +595,10 @@ , $group_4 VARCHAR COMMENT 'column_materializer::$group_4' , $window_id VARCHAR COMMENT 'column_materializer::$window_id' , $session_id VARCHAR COMMENT 'column_materializer::$session_id' + , elements_chain_href String COMMENT 'column_materializer::elements_chain::href' + , elements_chain_texts Array(String) COMMENT 'column_materializer::elements_chain::texts' + , elements_chain_ids Array(String) COMMENT 'column_materializer::elements_chain::ids' + , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) COMMENT 'column_materializer::elements_chain::elements' , _timestamp DateTime @@ -2173,6 +2177,10 @@ , $group_4 VARCHAR MATERIALIZED replaceRegexpAll(JSONExtractRaw(properties, '$group_4'), '^"|"$', '') COMMENT 'column_materializer::$group_4' , $window_id VARCHAR MATERIALIZED replaceRegexpAll(JSONExtractRaw(properties, '$window_id'), '^"|"$', '') COMMENT 'column_materializer::$window_id' , $session_id VARCHAR MATERIALIZED replaceRegexpAll(JSONExtractRaw(properties, '$session_id'), '^"|"$', '') COMMENT 'column_materializer::$session_id' + , elements_chain_href String MATERIALIZED extract(elements_chain, '(?::|")href="(.*?)"') + , elements_chain_texts Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")text="(.*?)"')) + , elements_chain_ids Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")attr_id="(.*?)"')) + , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?:^|;)(a|button|form|input|select|textarea|label)(?:\.|$|:)')) , INDEX `minmax_$group_0` `$group_0` TYPE minmax GRANULARITY 1 , INDEX `minmax_$group_1` `$group_1` TYPE minmax GRANULARITY 1 , INDEX `minmax_$group_2` `$group_2` TYPE minmax GRANULARITY 1 @@ -2180,10 +2188,6 @@ , INDEX `minmax_$group_4` `$group_4` TYPE minmax GRANULARITY 1 , INDEX `minmax_$window_id` `$window_id` TYPE minmax GRANULARITY 1 , INDEX `minmax_$session_id` `$session_id` TYPE minmax GRANULARITY 1 - , elements_chain_href String MATERIALIZED extract(elements_chain, '(?::|")href="(.*?)"') - , elements_chain_texts Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")text="(.*?)"')) - , elements_chain_ids Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")attr_id="(.*?)"')) - , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?:^|;)(a|button|form|input|select|textarea|label)(?:\.|$|:)')) , _timestamp DateTime @@ -3267,6 +3271,10 @@ , $group_4 VARCHAR MATERIALIZED replaceRegexpAll(JSONExtractRaw(properties, '$group_4'), '^"|"$', '') COMMENT 'column_materializer::$group_4' , $window_id VARCHAR MATERIALIZED replaceRegexpAll(JSONExtractRaw(properties, '$window_id'), '^"|"$', '') COMMENT 'column_materializer::$window_id' , $session_id VARCHAR MATERIALIZED replaceRegexpAll(JSONExtractRaw(properties, '$session_id'), '^"|"$', '') COMMENT 'column_materializer::$session_id' + , elements_chain_href String MATERIALIZED extract(elements_chain, '(?::|")href="(.*?)"') + , elements_chain_texts Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")text="(.*?)"')) + , elements_chain_ids Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")attr_id="(.*?)"')) + , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?:^|;)(a|button|form|input|select|textarea|label)(?:\.|$|:)')) , INDEX `minmax_$group_0` `$group_0` TYPE minmax GRANULARITY 1 , INDEX `minmax_$group_1` `$group_1` TYPE minmax GRANULARITY 1 , INDEX `minmax_$group_2` `$group_2` TYPE minmax GRANULARITY 1 @@ -3274,10 +3282,6 @@ , INDEX `minmax_$group_4` `$group_4` TYPE minmax GRANULARITY 1 , INDEX `minmax_$window_id` `$window_id` TYPE minmax GRANULARITY 1 , INDEX `minmax_$session_id` `$session_id` TYPE minmax GRANULARITY 1 - , elements_chain_href String MATERIALIZED extract(elements_chain, '(?::|")href="(.*?)"') - , elements_chain_texts Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")text="(.*?)"')) - , elements_chain_ids Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|")attr_id="(.*?)"')) - , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?:^|;)(a|button|form|input|select|textarea|label)(?:\.|$|:)')) , _timestamp DateTime diff --git a/posthog/hogql/ast.py b/posthog/hogql/ast.py index 746db312e67a5..21686dd7b1b47 100644 --- a/posthog/hogql/ast.py +++ b/posthog/hogql/ast.py @@ -55,6 +55,19 @@ class ReturnStatement(Statement): expr: Optional[Expr] +@dataclass(kw_only=True) +class ThrowStatement(Statement): + expr: Expr + + +@dataclass(kw_only=True) +class TryCatchStatement(Statement): + try_stmt: Statement + # var name (e), error type (RetryError), stmt ({}) # (e: RetryError) {} + catches: list[tuple[Optional[str], Optional[str], Statement]] + finally_stmt: Optional[Statement] = None + + @dataclass(kw_only=True) class IfStatement(Statement): expr: Expr diff --git a/posthog/hogql/bytecode.py b/posthog/hogql/bytecode.py index 51bca368e146e..36d4e47e9eb72 100644 --- a/posthog/hogql/bytecode.py +++ b/posthog/hogql/bytecode.py @@ -4,7 +4,7 @@ from collections.abc import Callable from hogvm.python.execute import execute_bytecode, BytecodeResult -from hogvm.python.stl import STL +from hogvm.python.stl import STL, MIN_ARGS_INCLUDING_OPTIONAL from posthog.hogql import ast from posthog.hogql.base import AST from posthog.hogql.context import HogQLContext @@ -191,6 +191,12 @@ def visit_tuple_access(self, node: ast.TupleAccess): ] def visit_array_access(self, node: ast.ArrayAccess): + if ( + isinstance(node.property, ast.Constant) + and isinstance(node.property.value, int) + and node.property.value == 0 + ): + raise QueryError("Array access starts from 1") return [ *self.visit(node.array), *self.visit(node.property), @@ -271,9 +277,23 @@ def visit_call(self, node: ast.Call): f"Function `{node.name}` expects {len(self.functions[node.name].params)} arguments, got {len(node.args)}" ) response = [] + + if node.name in MIN_ARGS_INCLUDING_OPTIONAL and len(node.args) < MIN_ARGS_INCLUDING_OPTIONAL[node.name]: + for _ in range(len(node.args), MIN_ARGS_INCLUDING_OPTIONAL[node.name]): + response.append(Operation.NULL) + for expr in reversed(node.args): response.extend(self.visit(expr)) - response.extend([Operation.CALL, node.name, len(node.args)]) + + response.extend( + [ + Operation.CALL, + node.name, + len(node.args) + if node.name not in MIN_ARGS_INCLUDING_OPTIONAL + else MIN_ARGS_INCLUDING_OPTIONAL[node.name], + ] + ) return response def visit_program(self, node: ast.Program): @@ -307,6 +327,103 @@ def visit_return_statement(self, node: ast.ReturnStatement): response.append(Operation.RETURN) return response + def visit_throw_statement(self, node: ast.ThrowStatement): + return [*self.visit(node.expr), Operation.THROW] + + def visit_try_catch_statement(self, node: ast.TryCatchStatement): + if node.finally_stmt: + raise QueryError("finally blocks are not yet supported") + if not node.catches or len(node.catches) == 0: + raise QueryError("try statement must have at least one catch block") + + try_stmt = self.visit(node.try_stmt) + response = [] + response.extend( + [ + Operation.TRY, + len(try_stmt) + 2 + 2, + ] + ) + response.extend(try_stmt) + response.append(Operation.POP_TRY) + + set_end_positions = [] + catches_bytecode = [] + self._start_scope() + self._declare_local("e") # common error var for all blocks + catches_bytecode.extend(self.visit(ast.Field(chain=["e", "type"]))) + self._declare_local("type") # common error var for all blocks + # catches_bytecode.extend(self.visit(ast.Field(chain=['e']))) + for catch in node.catches: + catch_var = catch[0] or "e" + catch_type = catch[1] or "Error" + catch_stmt = catch[2] + + self._start_scope() + + # If we catch all + if catch_type == "Error": + if catch_var != "e": + self._declare_local(catch_var) + catches_bytecode.extend(self.visit(ast.Field(chain=["e"]))) + # Add the catch block + catches_bytecode.extend(self.visit(catch_stmt)) + catches_bytecode.extend(self._end_scope()) + # And then jump to the very end, skipping everything else + catches_bytecode.extend([Operation.JUMP, None]) + set_end_positions.append(len(catches_bytecode) - 1) + else: + # Named catch (e: RetryError) {} + compare_bytecode = self.visit( + ast.CompareOperation( + op=ast.CompareOperationOp.Eq, + left=ast.Field(chain=["type"]), + right=ast.Constant(value=catch_type), + ) + ) + catches_bytecode.extend( + [ + *compare_bytecode, + Operation.JUMP_IF_FALSE, # we add the jump position later + ] + ) + + catch_bytecode = [] + if catch_var != "e": + self._declare_local(catch_var) + catch_bytecode.extend(self.visit(ast.Field(chain=["e"]))) + catch_bytecode.extend(self.visit(catch_stmt)) + + end_scope = self._end_scope() + catch_bytecode.extend(end_scope) + + catches_bytecode.extend( + [ + len(catch_bytecode) + 2 - len(end_scope), # the jump position from earlier + *catch_bytecode, + Operation.JUMP, + None, + ] + ) + set_end_positions.append(len(catches_bytecode) - 1) + + # re-raise if nothing matched + catches_bytecode.extend( + [ + Operation.POP, # pop the type + Operation.THROW, # throw the error + ] + ) + end_scope = self._end_scope() + catches_bytecode.extend(end_scope) + + for position in set_end_positions: + catches_bytecode[position] = len(catches_bytecode) - position - len(end_scope) - 1 + + response.extend([Operation.JUMP, len(catches_bytecode)]) + response.extend(catches_bytecode) + return response + def visit_if_statement(self, node: ast.IfStatement): expr = self.visit(node.expr) then = self.visit(node.then) diff --git a/posthog/hogql/database/database.py b/posthog/hogql/database/database.py index 712ccec7bf3ec..b9e8ade16abb3 100644 --- a/posthog/hogql/database/database.py +++ b/posthog/hogql/database/database.py @@ -82,7 +82,6 @@ PersonsOnEventsMode, SessionTableVersion, ) -from posthog.utils import get_instance_region from posthog.warehouse.models.external_data_job import ExternalDataJob from posthog.warehouse.models.external_data_schema import ExternalDataSchema from posthog.warehouse.models.external_data_source import ExternalDataSource @@ -249,9 +248,7 @@ def create_hogql_database( join_function=join_with_persons_table, ) - if modifiers.sessionTableVersion == SessionTableVersion.V2 or ( - get_instance_region() == "EU" and modifiers.sessionTableVersion == SessionTableVersion.AUTO - ): + if modifiers.sessionTableVersion == SessionTableVersion.V2: raw_sessions = RawSessionsTableV2() database.raw_sessions = raw_sessions sessions = SessionsTableV2() diff --git a/posthog/hogql/database/schema/events.py b/posthog/hogql/database/schema/events.py index 1a489e5a9d90f..a0225bd334b2d 100644 --- a/posthog/hogql/database/schema/events.py +++ b/posthog/hogql/database/schema/events.py @@ -3,6 +3,7 @@ StringDatabaseField, DateTimeDatabaseField, StringJSONDatabaseField, + StringArrayDatabaseField, IntegerDatabaseField, Table, LazyJoin, @@ -114,6 +115,10 @@ class EventsTable(Table): join_table=SessionsTableV1(), join_function=join_events_table_to_sessions_table, ), + "elements_chain_href": StringDatabaseField(name="elements_chain_href"), + "elements_chain_texts": StringArrayDatabaseField(name="elements_chain_texts"), + "elements_chain_ids": StringArrayDatabaseField(name="elements_chain_ids"), + "elements_chain_elements": StringArrayDatabaseField(name="elements_chain_elements"), } def to_printed_clickhouse(self, context): diff --git a/posthog/hogql/database/test/__snapshots__/test_database.ambr b/posthog/hogql/database/test/__snapshots__/test_database.ambr index ce03813aa1004..77a2452922e7e 100644 --- a/posthog/hogql/database/test/__snapshots__/test_database.ambr +++ b/posthog/hogql/database/test/__snapshots__/test_database.ambr @@ -377,6 +377,42 @@ "schema_valid": true, "table": "sessions", "type": "lazy_table" + }, + "elements_chain_href": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_href", + "name": "elements_chain_href", + "schema_valid": true, + "table": null, + "type": "string" + }, + "elements_chain_texts": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_texts", + "name": "elements_chain_texts", + "schema_valid": true, + "table": null, + "type": "array" + }, + "elements_chain_ids": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_ids", + "name": "elements_chain_ids", + "schema_valid": true, + "table": null, + "type": "array" + }, + "elements_chain_elements": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_elements", + "name": "elements_chain_elements", + "schema_valid": true, + "table": null, + "type": "array" } }, "id": "events", @@ -712,7 +748,11 @@ "group_3", "$group_4", "group_4", - "session" + "session", + "elements_chain_href", + "elements_chain_texts", + "elements_chain_ids", + "elements_chain_elements" ], "hogql_value": "events", "name": "events", @@ -1694,6 +1734,42 @@ "schema_valid": true, "table": "sessions", "type": "lazy_table" + }, + "elements_chain_href": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_href", + "name": "elements_chain_href", + "schema_valid": true, + "table": null, + "type": "string" + }, + "elements_chain_texts": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_texts", + "name": "elements_chain_texts", + "schema_valid": true, + "table": null, + "type": "array" + }, + "elements_chain_ids": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_ids", + "name": "elements_chain_ids", + "schema_valid": true, + "table": null, + "type": "array" + }, + "elements_chain_elements": { + "chain": null, + "fields": null, + "hogql_value": "elements_chain_elements", + "name": "elements_chain_elements", + "schema_valid": true, + "table": null, + "type": "array" } }, "id": "events", @@ -2029,7 +2105,11 @@ "group_3", "$group_4", "group_4", - "session" + "session", + "elements_chain_href", + "elements_chain_texts", + "elements_chain_ids", + "elements_chain_elements" ], "hogql_value": "events", "name": "events", diff --git a/posthog/hogql/grammar/HogQLLexer.g4 b/posthog/hogql/grammar/HogQLLexer.g4 index d4e3cb65baf01..137a28d618179 100644 --- a/posthog/hogql/grammar/HogQLLexer.g4 +++ b/posthog/hogql/grammar/HogQLLexer.g4 @@ -17,6 +17,7 @@ BOTH: B O T H; BY: B Y; CASE: C A S E; CAST: C A S T; +CATCH: C A T C H; COHORT: C O H O R T; COLLATE: C O L L A T E; CROSS: C R O S S; @@ -31,6 +32,7 @@ ELSE: E L S E; END: E N D; EXTRACT: E X T R A C T; FINAL: F I N A L; +FINALLY: F I N A L L Y; FIRST: F I R S T; FN: F N; FOLLOWING: F O L L O W I N G; @@ -85,6 +87,7 @@ SEMI: S E M I; SETTINGS: S E T T I N G S; SUBSTRING: S U B S T R I N G; THEN: T H E N; +THROW: T H R O W; TIES: T I E S; TIMESTAMP: T I M E S T A M P; TO: T O; @@ -93,6 +96,7 @@ TOTALS: T O T A L S; TRAILING: T R A I L I N G; TRIM: T R I M; TRUNCATE: T R U N C A T E; +TRY: T R Y; UNBOUNDED: U N B O U N D E D; UNION: U N I O N; USING: U S I N G; diff --git a/posthog/hogql/grammar/HogQLLexer.interp b/posthog/hogql/grammar/HogQLLexer.interp index 77c0c2456d11a..fb9d54e6ec3c5 100644 --- a/posthog/hogql/grammar/HogQLLexer.interp +++ b/posthog/hogql/grammar/HogQLLexer.interp @@ -106,6 +106,10 @@ null null null null +null +null +null +null '->' '*' '`' @@ -171,6 +175,7 @@ BOTH BY CASE CAST +CATCH COHORT COLLATE CROSS @@ -185,6 +190,7 @@ ELSE END EXTRACT FINAL +FINALLY FIRST FN FOLLOWING @@ -239,6 +245,7 @@ SEMI SETTINGS SUBSTRING THEN +THROW TIES TIMESTAMP TO @@ -247,6 +254,7 @@ TOTALS TRAILING TRIM TRUNCATE +TRY UNBOUNDED UNION USING @@ -328,6 +336,7 @@ BOTH BY CASE CAST +CATCH COHORT COLLATE CROSS @@ -342,6 +351,7 @@ ELSE END EXTRACT FINAL +FINALLY FIRST FN FOLLOWING @@ -396,6 +406,7 @@ SEMI SETTINGS SUBSTRING THEN +THROW TIES TIMESTAMP TO @@ -404,6 +415,7 @@ TOTALS TRAILING TRIM TRUNCATE +TRY UNBOUNDED UNION USING @@ -512,4 +524,4 @@ IN_TEMPLATE_STRING IN_FULL_TEMPLATE_STRING atn: -[4, 0, 155, 1417, 6, -1, 6, -1, 6, -1, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 416, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 619, 8, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 3, 98, 983, 8, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 3, 99, 1012, 8, 99, 1, 100, 1, 100, 1, 100, 3, 100, 1017, 8, 100, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1023, 8, 100, 10, 100, 12, 100, 1026, 9, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1037, 8, 100, 10, 100, 12, 100, 1040, 9, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 5, 100, 1053, 8, 100, 10, 100, 12, 100, 1056, 9, 100, 1, 100, 1, 100, 3, 100, 1060, 8, 100, 1, 101, 1, 101, 1, 101, 5, 101, 1065, 8, 101, 10, 101, 12, 101, 1068, 9, 101, 1, 101, 1, 101, 3, 101, 1072, 8, 101, 1, 101, 1, 101, 3, 101, 1076, 8, 101, 1, 101, 4, 101, 1079, 8, 101, 11, 101, 12, 101, 1080, 1, 101, 1, 101, 1, 101, 3, 101, 1086, 8, 101, 1, 101, 1, 101, 3, 101, 1090, 8, 101, 1, 101, 4, 101, 1093, 8, 101, 11, 101, 12, 101, 1094, 1, 101, 1, 101, 1, 101, 5, 101, 1100, 8, 101, 10, 101, 12, 101, 1103, 9, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1108, 8, 101, 1, 101, 4, 101, 1111, 8, 101, 11, 101, 12, 101, 1112, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1120, 8, 101, 1, 101, 4, 101, 1123, 8, 101, 11, 101, 12, 101, 1124, 1, 101, 1, 101, 1, 101, 1, 101, 3, 101, 1131, 8, 101, 1, 101, 4, 101, 1134, 8, 101, 11, 101, 12, 101, 1135, 3, 101, 1138, 8, 101, 1, 102, 1, 102, 4, 102, 1142, 8, 102, 11, 102, 12, 102, 1143, 1, 103, 4, 103, 1147, 8, 103, 11, 103, 12, 103, 1148, 1, 104, 1, 104, 1, 104, 4, 104, 1154, 8, 104, 11, 104, 12, 104, 1155, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 5, 105, 1167, 8, 105, 10, 105, 12, 105, 1170, 9, 105, 1, 105, 1, 105, 1, 106, 1, 106, 1, 107, 1, 107, 1, 108, 1, 108, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 115, 1, 115, 1, 116, 1, 116, 1, 117, 1, 117, 1, 118, 1, 118, 1, 119, 1, 119, 1, 120, 1, 120, 1, 121, 1, 121, 1, 122, 1, 122, 1, 123, 1, 123, 1, 124, 1, 124, 1, 125, 1, 125, 1, 126, 1, 126, 1, 127, 1, 127, 1, 128, 1, 128, 1, 129, 1, 129, 1, 130, 1, 130, 1, 131, 1, 131, 1, 132, 1, 132, 1, 133, 1, 133, 1, 134, 1, 134, 1, 135, 1, 135, 1, 136, 1, 136, 1, 136, 1, 137, 1, 137, 1, 138, 1, 138, 1, 139, 1, 139, 1, 140, 1, 140, 1, 141, 1, 141, 1, 142, 1, 142, 1, 142, 1, 143, 1, 143, 1, 144, 1, 144, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 148, 1, 148, 1, 148, 1, 149, 1, 149, 1, 150, 1, 150, 1, 151, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 153, 1, 153, 1, 154, 1, 154, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 158, 1, 158, 1, 158, 1, 158, 3, 158, 1292, 8, 158, 1, 159, 1, 159, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 163, 1, 163, 1, 164, 1, 164, 1, 165, 1, 165, 1, 166, 1, 166, 1, 167, 1, 167, 1, 167, 1, 167, 1, 167, 1, 168, 1, 168, 1, 168, 1, 168, 1, 168, 1, 169, 1, 169, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 174, 1, 174, 1, 175, 1, 175, 1, 176, 1, 176, 1, 177, 1, 177, 1, 178, 1, 178, 1, 178, 1, 178, 5, 178, 1350, 8, 178, 10, 178, 12, 178, 1353, 9, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 178, 1, 179, 1, 179, 1, 179, 1, 179, 3, 179, 1364, 8, 179, 1, 179, 5, 179, 1367, 8, 179, 10, 179, 12, 179, 1370, 9, 179, 1, 179, 3, 179, 1373, 8, 179, 1, 179, 1, 179, 1, 180, 1, 180, 1, 180, 1, 180, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 1, 181, 4, 181, 1392, 8, 181, 11, 181, 12, 181, 1393, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 184, 4, 184, 1410, 8, 184, 11, 184, 12, 184, 1411, 1, 185, 1, 185, 1, 185, 1, 185, 1, 1351, 0, 186, 3, 1, 5, 2, 7, 3, 9, 4, 11, 5, 13, 6, 15, 7, 17, 8, 19, 9, 21, 10, 23, 11, 25, 12, 27, 13, 29, 14, 31, 15, 33, 16, 35, 17, 37, 18, 39, 19, 41, 20, 43, 21, 45, 22, 47, 23, 49, 24, 51, 25, 53, 26, 55, 27, 57, 28, 59, 29, 61, 30, 63, 31, 65, 32, 67, 33, 69, 34, 71, 35, 73, 36, 75, 37, 77, 38, 79, 39, 81, 40, 83, 41, 85, 42, 87, 43, 89, 44, 91, 45, 93, 46, 95, 47, 97, 48, 99, 49, 101, 50, 103, 51, 105, 52, 107, 53, 109, 54, 111, 55, 113, 56, 115, 57, 117, 58, 119, 59, 121, 60, 123, 61, 125, 62, 127, 63, 129, 64, 131, 65, 133, 66, 135, 67, 137, 68, 139, 69, 141, 70, 143, 71, 145, 72, 147, 73, 149, 74, 151, 75, 153, 76, 155, 77, 157, 78, 159, 79, 161, 80, 163, 81, 165, 82, 167, 83, 169, 84, 171, 85, 173, 86, 175, 87, 177, 88, 179, 89, 181, 90, 183, 91, 185, 92, 187, 93, 189, 94, 191, 95, 193, 96, 195, 97, 197, 98, 199, 99, 201, 100, 203, 101, 205, 102, 207, 103, 209, 104, 211, 105, 213, 106, 215, 0, 217, 0, 219, 0, 221, 0, 223, 0, 225, 0, 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, 0, 239, 0, 241, 0, 243, 0, 245, 0, 247, 0, 249, 0, 251, 0, 253, 0, 255, 0, 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, 0, 269, 0, 271, 0, 273, 0, 275, 107, 277, 108, 279, 109, 281, 110, 283, 111, 285, 112, 287, 113, 289, 114, 291, 115, 293, 116, 295, 117, 297, 118, 299, 119, 301, 120, 303, 121, 305, 122, 307, 123, 309, 124, 311, 125, 313, 126, 315, 127, 317, 128, 319, 129, 321, 130, 323, 131, 325, 132, 327, 133, 329, 134, 331, 135, 333, 136, 335, 137, 337, 138, 339, 139, 341, 140, 343, 141, 345, 142, 347, 143, 349, 144, 351, 145, 353, 146, 355, 147, 357, 148, 359, 149, 361, 150, 363, 151, 365, 152, 367, 153, 369, 0, 371, 154, 373, 155, 3, 0, 1, 2, 38, 2, 0, 92, 92, 96, 96, 2, 0, 34, 34, 92, 92, 2, 0, 39, 39, 92, 92, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, 2, 0, 65, 90, 97, 122, 1, 0, 48, 55, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 10, 10, 13, 13, 2, 1, 10, 10, 13, 13, 2, 0, 9, 13, 32, 32, 3, 0, 39, 39, 92, 92, 123, 123, 1, 0, 123, 123, 1453, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 275, 1, 0, 0, 0, 0, 277, 1, 0, 0, 0, 0, 279, 1, 0, 0, 0, 0, 281, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 1, 365, 1, 0, 0, 0, 1, 367, 1, 0, 0, 0, 1, 369, 1, 0, 0, 0, 2, 371, 1, 0, 0, 0, 2, 373, 1, 0, 0, 0, 3, 375, 1, 0, 0, 0, 5, 379, 1, 0, 0, 0, 7, 383, 1, 0, 0, 0, 9, 388, 1, 0, 0, 0, 11, 392, 1, 0, 0, 0, 13, 398, 1, 0, 0, 0, 15, 415, 1, 0, 0, 0, 17, 417, 1, 0, 0, 0, 19, 422, 1, 0, 0, 0, 21, 430, 1, 0, 0, 0, 23, 435, 1, 0, 0, 0, 25, 438, 1, 0, 0, 0, 27, 443, 1, 0, 0, 0, 29, 448, 1, 0, 0, 0, 31, 455, 1, 0, 0, 0, 33, 463, 1, 0, 0, 0, 35, 469, 1, 0, 0, 0, 37, 474, 1, 0, 0, 0, 39, 482, 1, 0, 0, 0, 41, 487, 1, 0, 0, 0, 43, 491, 1, 0, 0, 0, 45, 496, 1, 0, 0, 0, 47, 507, 1, 0, 0, 0, 49, 516, 1, 0, 0, 0, 51, 521, 1, 0, 0, 0, 53, 525, 1, 0, 0, 0, 55, 533, 1, 0, 0, 0, 57, 539, 1, 0, 0, 0, 59, 545, 1, 0, 0, 0, 61, 548, 1, 0, 0, 0, 63, 558, 1, 0, 0, 0, 65, 562, 1, 0, 0, 0, 67, 567, 1, 0, 0, 0, 69, 572, 1, 0, 0, 0, 71, 578, 1, 0, 0, 0, 73, 585, 1, 0, 0, 0, 75, 590, 1, 0, 0, 0, 77, 593, 1, 0, 0, 0, 79, 596, 1, 0, 0, 0, 81, 602, 1, 0, 0, 0, 83, 618, 1, 0, 0, 0, 85, 620, 1, 0, 0, 0, 87, 626, 1, 0, 0, 0, 89, 635, 1, 0, 0, 0, 91, 638, 1, 0, 0, 0, 93, 643, 1, 0, 0, 0, 95, 647, 1, 0, 0, 0, 97, 652, 1, 0, 0, 0, 99, 660, 1, 0, 0, 0, 101, 665, 1, 0, 0, 0, 103, 669, 1, 0, 0, 0, 105, 674, 1, 0, 0, 0, 107, 680, 1, 0, 0, 0, 109, 687, 1, 0, 0, 0, 111, 693, 1, 0, 0, 0, 113, 697, 1, 0, 0, 0, 115, 701, 1, 0, 0, 0, 117, 706, 1, 0, 0, 0, 119, 712, 1, 0, 0, 0, 121, 719, 1, 0, 0, 0, 123, 722, 1, 0, 0, 0, 125, 725, 1, 0, 0, 0, 127, 731, 1, 0, 0, 0, 129, 737, 1, 0, 0, 0, 131, 742, 1, 0, 0, 0, 133, 752, 1, 0, 0, 0, 135, 762, 1, 0, 0, 0, 137, 771, 1, 0, 0, 0, 139, 779, 1, 0, 0, 0, 141, 785, 1, 0, 0, 0, 143, 792, 1, 0, 0, 0, 145, 798, 1, 0, 0, 0, 147, 805, 1, 0, 0, 0, 149, 809, 1, 0, 0, 0, 151, 814, 1, 0, 0, 0, 153, 821, 1, 0, 0, 0, 155, 828, 1, 0, 0, 0, 157, 835, 1, 0, 0, 0, 159, 840, 1, 0, 0, 0, 161, 849, 1, 0, 0, 0, 163, 859, 1, 0, 0, 0, 165, 864, 1, 0, 0, 0, 167, 869, 1, 0, 0, 0, 169, 879, 1, 0, 0, 0, 171, 882, 1, 0, 0, 0, 173, 886, 1, 0, 0, 0, 175, 893, 1, 0, 0, 0, 177, 902, 1, 0, 0, 0, 179, 907, 1, 0, 0, 0, 181, 916, 1, 0, 0, 0, 183, 926, 1, 0, 0, 0, 185, 932, 1, 0, 0, 0, 187, 938, 1, 0, 0, 0, 189, 943, 1, 0, 0, 0, 191, 948, 1, 0, 0, 0, 193, 954, 1, 0, 0, 0, 195, 960, 1, 0, 0, 0, 197, 967, 1, 0, 0, 0, 199, 982, 1, 0, 0, 0, 201, 1011, 1, 0, 0, 0, 203, 1059, 1, 0, 0, 0, 205, 1137, 1, 0, 0, 0, 207, 1139, 1, 0, 0, 0, 209, 1146, 1, 0, 0, 0, 211, 1150, 1, 0, 0, 0, 213, 1157, 1, 0, 0, 0, 215, 1173, 1, 0, 0, 0, 217, 1175, 1, 0, 0, 0, 219, 1177, 1, 0, 0, 0, 221, 1179, 1, 0, 0, 0, 223, 1181, 1, 0, 0, 0, 225, 1183, 1, 0, 0, 0, 227, 1185, 1, 0, 0, 0, 229, 1187, 1, 0, 0, 0, 231, 1189, 1, 0, 0, 0, 233, 1191, 1, 0, 0, 0, 235, 1193, 1, 0, 0, 0, 237, 1195, 1, 0, 0, 0, 239, 1197, 1, 0, 0, 0, 241, 1199, 1, 0, 0, 0, 243, 1201, 1, 0, 0, 0, 245, 1203, 1, 0, 0, 0, 247, 1205, 1, 0, 0, 0, 249, 1207, 1, 0, 0, 0, 251, 1209, 1, 0, 0, 0, 253, 1211, 1, 0, 0, 0, 255, 1213, 1, 0, 0, 0, 257, 1215, 1, 0, 0, 0, 259, 1217, 1, 0, 0, 0, 261, 1219, 1, 0, 0, 0, 263, 1221, 1, 0, 0, 0, 265, 1223, 1, 0, 0, 0, 267, 1225, 1, 0, 0, 0, 269, 1227, 1, 0, 0, 0, 271, 1229, 1, 0, 0, 0, 273, 1231, 1, 0, 0, 0, 275, 1233, 1, 0, 0, 0, 277, 1236, 1, 0, 0, 0, 279, 1238, 1, 0, 0, 0, 281, 1240, 1, 0, 0, 0, 283, 1242, 1, 0, 0, 0, 285, 1244, 1, 0, 0, 0, 287, 1246, 1, 0, 0, 0, 289, 1249, 1, 0, 0, 0, 291, 1251, 1, 0, 0, 0, 293, 1253, 1, 0, 0, 0, 295, 1255, 1, 0, 0, 0, 297, 1258, 1, 0, 0, 0, 299, 1260, 1, 0, 0, 0, 301, 1263, 1, 0, 0, 0, 303, 1265, 1, 0, 0, 0, 305, 1267, 1, 0, 0, 0, 307, 1270, 1, 0, 0, 0, 309, 1274, 1, 0, 0, 0, 311, 1278, 1, 0, 0, 0, 313, 1280, 1, 0, 0, 0, 315, 1282, 1, 0, 0, 0, 317, 1285, 1, 0, 0, 0, 319, 1291, 1, 0, 0, 0, 321, 1293, 1, 0, 0, 0, 323, 1297, 1, 0, 0, 0, 325, 1300, 1, 0, 0, 0, 327, 1303, 1, 0, 0, 0, 329, 1306, 1, 0, 0, 0, 331, 1308, 1, 0, 0, 0, 333, 1310, 1, 0, 0, 0, 335, 1312, 1, 0, 0, 0, 337, 1314, 1, 0, 0, 0, 339, 1319, 1, 0, 0, 0, 341, 1324, 1, 0, 0, 0, 343, 1326, 1, 0, 0, 0, 345, 1328, 1, 0, 0, 0, 347, 1331, 1, 0, 0, 0, 349, 1335, 1, 0, 0, 0, 351, 1337, 1, 0, 0, 0, 353, 1339, 1, 0, 0, 0, 355, 1341, 1, 0, 0, 0, 357, 1343, 1, 0, 0, 0, 359, 1345, 1, 0, 0, 0, 361, 1363, 1, 0, 0, 0, 363, 1376, 1, 0, 0, 0, 365, 1391, 1, 0, 0, 0, 367, 1395, 1, 0, 0, 0, 369, 1399, 1, 0, 0, 0, 371, 1409, 1, 0, 0, 0, 373, 1413, 1, 0, 0, 0, 375, 376, 3, 215, 106, 0, 376, 377, 3, 237, 117, 0, 377, 378, 3, 237, 117, 0, 378, 4, 1, 0, 0, 0, 379, 380, 3, 215, 106, 0, 380, 381, 3, 241, 119, 0, 381, 382, 3, 221, 109, 0, 382, 6, 1, 0, 0, 0, 383, 384, 3, 215, 106, 0, 384, 385, 3, 241, 119, 0, 385, 386, 3, 253, 125, 0, 386, 387, 3, 231, 114, 0, 387, 8, 1, 0, 0, 0, 388, 389, 3, 215, 106, 0, 389, 390, 3, 241, 119, 0, 390, 391, 3, 263, 130, 0, 391, 10, 1, 0, 0, 0, 392, 393, 3, 215, 106, 0, 393, 394, 3, 249, 123, 0, 394, 395, 3, 249, 123, 0, 395, 396, 3, 215, 106, 0, 396, 397, 3, 263, 130, 0, 397, 12, 1, 0, 0, 0, 398, 399, 3, 215, 106, 0, 399, 400, 3, 251, 124, 0, 400, 14, 1, 0, 0, 0, 401, 402, 3, 215, 106, 0, 402, 403, 3, 251, 124, 0, 403, 404, 3, 219, 108, 0, 404, 416, 1, 0, 0, 0, 405, 406, 3, 215, 106, 0, 406, 407, 3, 251, 124, 0, 407, 408, 3, 219, 108, 0, 408, 409, 3, 223, 110, 0, 409, 410, 3, 241, 119, 0, 410, 411, 3, 221, 109, 0, 411, 412, 3, 231, 114, 0, 412, 413, 3, 241, 119, 0, 413, 414, 3, 227, 112, 0, 414, 416, 1, 0, 0, 0, 415, 401, 1, 0, 0, 0, 415, 405, 1, 0, 0, 0, 416, 16, 1, 0, 0, 0, 417, 418, 3, 215, 106, 0, 418, 419, 3, 251, 124, 0, 419, 420, 3, 243, 120, 0, 420, 421, 3, 225, 111, 0, 421, 18, 1, 0, 0, 0, 422, 423, 3, 217, 107, 0, 423, 424, 3, 223, 110, 0, 424, 425, 3, 253, 125, 0, 425, 426, 3, 259, 128, 0, 426, 427, 3, 223, 110, 0, 427, 428, 3, 223, 110, 0, 428, 429, 3, 241, 119, 0, 429, 20, 1, 0, 0, 0, 430, 431, 3, 217, 107, 0, 431, 432, 3, 243, 120, 0, 432, 433, 3, 253, 125, 0, 433, 434, 3, 229, 113, 0, 434, 22, 1, 0, 0, 0, 435, 436, 3, 217, 107, 0, 436, 437, 3, 263, 130, 0, 437, 24, 1, 0, 0, 0, 438, 439, 3, 219, 108, 0, 439, 440, 3, 215, 106, 0, 440, 441, 3, 251, 124, 0, 441, 442, 3, 223, 110, 0, 442, 26, 1, 0, 0, 0, 443, 444, 3, 219, 108, 0, 444, 445, 3, 215, 106, 0, 445, 446, 3, 251, 124, 0, 446, 447, 3, 253, 125, 0, 447, 28, 1, 0, 0, 0, 448, 449, 3, 219, 108, 0, 449, 450, 3, 243, 120, 0, 450, 451, 3, 229, 113, 0, 451, 452, 3, 243, 120, 0, 452, 453, 3, 249, 123, 0, 453, 454, 3, 253, 125, 0, 454, 30, 1, 0, 0, 0, 455, 456, 3, 219, 108, 0, 456, 457, 3, 243, 120, 0, 457, 458, 3, 237, 117, 0, 458, 459, 3, 237, 117, 0, 459, 460, 3, 215, 106, 0, 460, 461, 3, 253, 125, 0, 461, 462, 3, 223, 110, 0, 462, 32, 1, 0, 0, 0, 463, 464, 3, 219, 108, 0, 464, 465, 3, 249, 123, 0, 465, 466, 3, 243, 120, 0, 466, 467, 3, 251, 124, 0, 467, 468, 3, 251, 124, 0, 468, 34, 1, 0, 0, 0, 469, 470, 3, 219, 108, 0, 470, 471, 3, 255, 126, 0, 471, 472, 3, 217, 107, 0, 472, 473, 3, 223, 110, 0, 473, 36, 1, 0, 0, 0, 474, 475, 3, 219, 108, 0, 475, 476, 3, 255, 126, 0, 476, 477, 3, 249, 123, 0, 477, 478, 3, 249, 123, 0, 478, 479, 3, 223, 110, 0, 479, 480, 3, 241, 119, 0, 480, 481, 3, 253, 125, 0, 481, 38, 1, 0, 0, 0, 482, 483, 3, 221, 109, 0, 483, 484, 3, 215, 106, 0, 484, 485, 3, 253, 125, 0, 485, 486, 3, 223, 110, 0, 486, 40, 1, 0, 0, 0, 487, 488, 3, 221, 109, 0, 488, 489, 3, 215, 106, 0, 489, 490, 3, 263, 130, 0, 490, 42, 1, 0, 0, 0, 491, 492, 3, 221, 109, 0, 492, 493, 3, 223, 110, 0, 493, 494, 3, 251, 124, 0, 494, 495, 3, 219, 108, 0, 495, 44, 1, 0, 0, 0, 496, 497, 3, 221, 109, 0, 497, 498, 3, 223, 110, 0, 498, 499, 3, 251, 124, 0, 499, 500, 3, 219, 108, 0, 500, 501, 3, 223, 110, 0, 501, 502, 3, 241, 119, 0, 502, 503, 3, 221, 109, 0, 503, 504, 3, 231, 114, 0, 504, 505, 3, 241, 119, 0, 505, 506, 3, 227, 112, 0, 506, 46, 1, 0, 0, 0, 507, 508, 3, 221, 109, 0, 508, 509, 3, 231, 114, 0, 509, 510, 3, 251, 124, 0, 510, 511, 3, 253, 125, 0, 511, 512, 3, 231, 114, 0, 512, 513, 3, 241, 119, 0, 513, 514, 3, 219, 108, 0, 514, 515, 3, 253, 125, 0, 515, 48, 1, 0, 0, 0, 516, 517, 3, 223, 110, 0, 517, 518, 3, 237, 117, 0, 518, 519, 3, 251, 124, 0, 519, 520, 3, 223, 110, 0, 520, 50, 1, 0, 0, 0, 521, 522, 3, 223, 110, 0, 522, 523, 3, 241, 119, 0, 523, 524, 3, 221, 109, 0, 524, 52, 1, 0, 0, 0, 525, 526, 3, 223, 110, 0, 526, 527, 3, 261, 129, 0, 527, 528, 3, 253, 125, 0, 528, 529, 3, 249, 123, 0, 529, 530, 3, 215, 106, 0, 530, 531, 3, 219, 108, 0, 531, 532, 3, 253, 125, 0, 532, 54, 1, 0, 0, 0, 533, 534, 3, 225, 111, 0, 534, 535, 3, 231, 114, 0, 535, 536, 3, 241, 119, 0, 536, 537, 3, 215, 106, 0, 537, 538, 3, 237, 117, 0, 538, 56, 1, 0, 0, 0, 539, 540, 3, 225, 111, 0, 540, 541, 3, 231, 114, 0, 541, 542, 3, 249, 123, 0, 542, 543, 3, 251, 124, 0, 543, 544, 3, 253, 125, 0, 544, 58, 1, 0, 0, 0, 545, 546, 3, 225, 111, 0, 546, 547, 3, 241, 119, 0, 547, 60, 1, 0, 0, 0, 548, 549, 3, 225, 111, 0, 549, 550, 3, 243, 120, 0, 550, 551, 3, 237, 117, 0, 551, 552, 3, 237, 117, 0, 552, 553, 3, 243, 120, 0, 553, 554, 3, 259, 128, 0, 554, 555, 3, 231, 114, 0, 555, 556, 3, 241, 119, 0, 556, 557, 3, 227, 112, 0, 557, 62, 1, 0, 0, 0, 558, 559, 3, 225, 111, 0, 559, 560, 3, 243, 120, 0, 560, 561, 3, 249, 123, 0, 561, 64, 1, 0, 0, 0, 562, 563, 3, 225, 111, 0, 563, 564, 3, 249, 123, 0, 564, 565, 3, 243, 120, 0, 565, 566, 3, 239, 118, 0, 566, 66, 1, 0, 0, 0, 567, 568, 3, 225, 111, 0, 568, 569, 3, 255, 126, 0, 569, 570, 3, 237, 117, 0, 570, 571, 3, 237, 117, 0, 571, 68, 1, 0, 0, 0, 572, 573, 3, 227, 112, 0, 573, 574, 3, 249, 123, 0, 574, 575, 3, 243, 120, 0, 575, 576, 3, 255, 126, 0, 576, 577, 3, 245, 121, 0, 577, 70, 1, 0, 0, 0, 578, 579, 3, 229, 113, 0, 579, 580, 3, 215, 106, 0, 580, 581, 3, 257, 127, 0, 581, 582, 3, 231, 114, 0, 582, 583, 3, 241, 119, 0, 583, 584, 3, 227, 112, 0, 584, 72, 1, 0, 0, 0, 585, 586, 3, 229, 113, 0, 586, 587, 3, 243, 120, 0, 587, 588, 3, 255, 126, 0, 588, 589, 3, 249, 123, 0, 589, 74, 1, 0, 0, 0, 590, 591, 3, 231, 114, 0, 591, 592, 3, 221, 109, 0, 592, 76, 1, 0, 0, 0, 593, 594, 3, 231, 114, 0, 594, 595, 3, 225, 111, 0, 595, 78, 1, 0, 0, 0, 596, 597, 3, 231, 114, 0, 597, 598, 3, 237, 117, 0, 598, 599, 3, 231, 114, 0, 599, 600, 3, 235, 116, 0, 600, 601, 3, 223, 110, 0, 601, 80, 1, 0, 0, 0, 602, 603, 3, 231, 114, 0, 603, 604, 3, 241, 119, 0, 604, 82, 1, 0, 0, 0, 605, 606, 3, 231, 114, 0, 606, 607, 3, 241, 119, 0, 607, 608, 3, 225, 111, 0, 608, 619, 1, 0, 0, 0, 609, 610, 3, 231, 114, 0, 610, 611, 3, 241, 119, 0, 611, 612, 3, 225, 111, 0, 612, 613, 3, 231, 114, 0, 613, 614, 3, 241, 119, 0, 614, 615, 3, 231, 114, 0, 615, 616, 3, 253, 125, 0, 616, 617, 3, 263, 130, 0, 617, 619, 1, 0, 0, 0, 618, 605, 1, 0, 0, 0, 618, 609, 1, 0, 0, 0, 619, 84, 1, 0, 0, 0, 620, 621, 3, 231, 114, 0, 621, 622, 3, 241, 119, 0, 622, 623, 3, 241, 119, 0, 623, 624, 3, 223, 110, 0, 624, 625, 3, 249, 123, 0, 625, 86, 1, 0, 0, 0, 626, 627, 3, 231, 114, 0, 627, 628, 3, 241, 119, 0, 628, 629, 3, 253, 125, 0, 629, 630, 3, 223, 110, 0, 630, 631, 3, 249, 123, 0, 631, 632, 3, 257, 127, 0, 632, 633, 3, 215, 106, 0, 633, 634, 3, 237, 117, 0, 634, 88, 1, 0, 0, 0, 635, 636, 3, 231, 114, 0, 636, 637, 3, 251, 124, 0, 637, 90, 1, 0, 0, 0, 638, 639, 3, 233, 115, 0, 639, 640, 3, 243, 120, 0, 640, 641, 3, 231, 114, 0, 641, 642, 3, 241, 119, 0, 642, 92, 1, 0, 0, 0, 643, 644, 3, 235, 116, 0, 644, 645, 3, 223, 110, 0, 645, 646, 3, 263, 130, 0, 646, 94, 1, 0, 0, 0, 647, 648, 3, 237, 117, 0, 648, 649, 3, 215, 106, 0, 649, 650, 3, 251, 124, 0, 650, 651, 3, 253, 125, 0, 651, 96, 1, 0, 0, 0, 652, 653, 3, 237, 117, 0, 653, 654, 3, 223, 110, 0, 654, 655, 3, 215, 106, 0, 655, 656, 3, 221, 109, 0, 656, 657, 3, 231, 114, 0, 657, 658, 3, 241, 119, 0, 658, 659, 3, 227, 112, 0, 659, 98, 1, 0, 0, 0, 660, 661, 3, 237, 117, 0, 661, 662, 3, 223, 110, 0, 662, 663, 3, 225, 111, 0, 663, 664, 3, 253, 125, 0, 664, 100, 1, 0, 0, 0, 665, 666, 3, 237, 117, 0, 666, 667, 3, 223, 110, 0, 667, 668, 3, 253, 125, 0, 668, 102, 1, 0, 0, 0, 669, 670, 3, 237, 117, 0, 670, 671, 3, 231, 114, 0, 671, 672, 3, 235, 116, 0, 672, 673, 3, 223, 110, 0, 673, 104, 1, 0, 0, 0, 674, 675, 3, 237, 117, 0, 675, 676, 3, 231, 114, 0, 676, 677, 3, 239, 118, 0, 677, 678, 3, 231, 114, 0, 678, 679, 3, 253, 125, 0, 679, 106, 1, 0, 0, 0, 680, 681, 3, 239, 118, 0, 681, 682, 3, 231, 114, 0, 682, 683, 3, 241, 119, 0, 683, 684, 3, 255, 126, 0, 684, 685, 3, 253, 125, 0, 685, 686, 3, 223, 110, 0, 686, 108, 1, 0, 0, 0, 687, 688, 3, 239, 118, 0, 688, 689, 3, 243, 120, 0, 689, 690, 3, 241, 119, 0, 690, 691, 3, 253, 125, 0, 691, 692, 3, 229, 113, 0, 692, 110, 1, 0, 0, 0, 693, 694, 3, 241, 119, 0, 694, 695, 3, 215, 106, 0, 695, 696, 3, 241, 119, 0, 696, 112, 1, 0, 0, 0, 697, 698, 3, 241, 119, 0, 698, 699, 3, 243, 120, 0, 699, 700, 3, 253, 125, 0, 700, 114, 1, 0, 0, 0, 701, 702, 3, 241, 119, 0, 702, 703, 3, 255, 126, 0, 703, 704, 3, 237, 117, 0, 704, 705, 3, 237, 117, 0, 705, 116, 1, 0, 0, 0, 706, 707, 3, 241, 119, 0, 707, 708, 3, 255, 126, 0, 708, 709, 3, 237, 117, 0, 709, 710, 3, 237, 117, 0, 710, 711, 3, 251, 124, 0, 711, 118, 1, 0, 0, 0, 712, 713, 3, 243, 120, 0, 713, 714, 3, 225, 111, 0, 714, 715, 3, 225, 111, 0, 715, 716, 3, 251, 124, 0, 716, 717, 3, 223, 110, 0, 717, 718, 3, 253, 125, 0, 718, 120, 1, 0, 0, 0, 719, 720, 3, 243, 120, 0, 720, 721, 3, 241, 119, 0, 721, 122, 1, 0, 0, 0, 722, 723, 3, 243, 120, 0, 723, 724, 3, 249, 123, 0, 724, 124, 1, 0, 0, 0, 725, 726, 3, 243, 120, 0, 726, 727, 3, 249, 123, 0, 727, 728, 3, 221, 109, 0, 728, 729, 3, 223, 110, 0, 729, 730, 3, 249, 123, 0, 730, 126, 1, 0, 0, 0, 731, 732, 3, 243, 120, 0, 732, 733, 3, 255, 126, 0, 733, 734, 3, 253, 125, 0, 734, 735, 3, 223, 110, 0, 735, 736, 3, 249, 123, 0, 736, 128, 1, 0, 0, 0, 737, 738, 3, 243, 120, 0, 738, 739, 3, 257, 127, 0, 739, 740, 3, 223, 110, 0, 740, 741, 3, 249, 123, 0, 741, 130, 1, 0, 0, 0, 742, 743, 3, 245, 121, 0, 743, 744, 3, 215, 106, 0, 744, 745, 3, 249, 123, 0, 745, 746, 3, 253, 125, 0, 746, 747, 3, 231, 114, 0, 747, 748, 3, 253, 125, 0, 748, 749, 3, 231, 114, 0, 749, 750, 3, 243, 120, 0, 750, 751, 3, 241, 119, 0, 751, 132, 1, 0, 0, 0, 752, 753, 3, 245, 121, 0, 753, 754, 3, 249, 123, 0, 754, 755, 3, 223, 110, 0, 755, 756, 3, 219, 108, 0, 756, 757, 3, 223, 110, 0, 757, 758, 3, 221, 109, 0, 758, 759, 3, 231, 114, 0, 759, 760, 3, 241, 119, 0, 760, 761, 3, 227, 112, 0, 761, 134, 1, 0, 0, 0, 762, 763, 3, 245, 121, 0, 763, 764, 3, 249, 123, 0, 764, 765, 3, 223, 110, 0, 765, 766, 3, 259, 128, 0, 766, 767, 3, 229, 113, 0, 767, 768, 3, 223, 110, 0, 768, 769, 3, 249, 123, 0, 769, 770, 3, 223, 110, 0, 770, 136, 1, 0, 0, 0, 771, 772, 3, 247, 122, 0, 772, 773, 3, 255, 126, 0, 773, 774, 3, 215, 106, 0, 774, 775, 3, 249, 123, 0, 775, 776, 3, 253, 125, 0, 776, 777, 3, 223, 110, 0, 777, 778, 3, 249, 123, 0, 778, 138, 1, 0, 0, 0, 779, 780, 3, 249, 123, 0, 780, 781, 3, 215, 106, 0, 781, 782, 3, 241, 119, 0, 782, 783, 3, 227, 112, 0, 783, 784, 3, 223, 110, 0, 784, 140, 1, 0, 0, 0, 785, 786, 3, 249, 123, 0, 786, 787, 3, 223, 110, 0, 787, 788, 3, 253, 125, 0, 788, 789, 3, 255, 126, 0, 789, 790, 3, 249, 123, 0, 790, 791, 3, 241, 119, 0, 791, 142, 1, 0, 0, 0, 792, 793, 3, 249, 123, 0, 793, 794, 3, 231, 114, 0, 794, 795, 3, 227, 112, 0, 795, 796, 3, 229, 113, 0, 796, 797, 3, 253, 125, 0, 797, 144, 1, 0, 0, 0, 798, 799, 3, 249, 123, 0, 799, 800, 3, 243, 120, 0, 800, 801, 3, 237, 117, 0, 801, 802, 3, 237, 117, 0, 802, 803, 3, 255, 126, 0, 803, 804, 3, 245, 121, 0, 804, 146, 1, 0, 0, 0, 805, 806, 3, 249, 123, 0, 806, 807, 3, 243, 120, 0, 807, 808, 3, 259, 128, 0, 808, 148, 1, 0, 0, 0, 809, 810, 3, 249, 123, 0, 810, 811, 3, 243, 120, 0, 811, 812, 3, 259, 128, 0, 812, 813, 3, 251, 124, 0, 813, 150, 1, 0, 0, 0, 814, 815, 3, 251, 124, 0, 815, 816, 3, 215, 106, 0, 816, 817, 3, 239, 118, 0, 817, 818, 3, 245, 121, 0, 818, 819, 3, 237, 117, 0, 819, 820, 3, 223, 110, 0, 820, 152, 1, 0, 0, 0, 821, 822, 3, 251, 124, 0, 822, 823, 3, 223, 110, 0, 823, 824, 3, 219, 108, 0, 824, 825, 3, 243, 120, 0, 825, 826, 3, 241, 119, 0, 826, 827, 3, 221, 109, 0, 827, 154, 1, 0, 0, 0, 828, 829, 3, 251, 124, 0, 829, 830, 3, 223, 110, 0, 830, 831, 3, 237, 117, 0, 831, 832, 3, 223, 110, 0, 832, 833, 3, 219, 108, 0, 833, 834, 3, 253, 125, 0, 834, 156, 1, 0, 0, 0, 835, 836, 3, 251, 124, 0, 836, 837, 3, 223, 110, 0, 837, 838, 3, 239, 118, 0, 838, 839, 3, 231, 114, 0, 839, 158, 1, 0, 0, 0, 840, 841, 3, 251, 124, 0, 841, 842, 3, 223, 110, 0, 842, 843, 3, 253, 125, 0, 843, 844, 3, 253, 125, 0, 844, 845, 3, 231, 114, 0, 845, 846, 3, 241, 119, 0, 846, 847, 3, 227, 112, 0, 847, 848, 3, 251, 124, 0, 848, 160, 1, 0, 0, 0, 849, 850, 3, 251, 124, 0, 850, 851, 3, 255, 126, 0, 851, 852, 3, 217, 107, 0, 852, 853, 3, 251, 124, 0, 853, 854, 3, 253, 125, 0, 854, 855, 3, 249, 123, 0, 855, 856, 3, 231, 114, 0, 856, 857, 3, 241, 119, 0, 857, 858, 3, 227, 112, 0, 858, 162, 1, 0, 0, 0, 859, 860, 3, 253, 125, 0, 860, 861, 3, 229, 113, 0, 861, 862, 3, 223, 110, 0, 862, 863, 3, 241, 119, 0, 863, 164, 1, 0, 0, 0, 864, 865, 3, 253, 125, 0, 865, 866, 3, 231, 114, 0, 866, 867, 3, 223, 110, 0, 867, 868, 3, 251, 124, 0, 868, 166, 1, 0, 0, 0, 869, 870, 3, 253, 125, 0, 870, 871, 3, 231, 114, 0, 871, 872, 3, 239, 118, 0, 872, 873, 3, 223, 110, 0, 873, 874, 3, 251, 124, 0, 874, 875, 3, 253, 125, 0, 875, 876, 3, 215, 106, 0, 876, 877, 3, 239, 118, 0, 877, 878, 3, 245, 121, 0, 878, 168, 1, 0, 0, 0, 879, 880, 3, 253, 125, 0, 880, 881, 3, 243, 120, 0, 881, 170, 1, 0, 0, 0, 882, 883, 3, 253, 125, 0, 883, 884, 3, 243, 120, 0, 884, 885, 3, 245, 121, 0, 885, 172, 1, 0, 0, 0, 886, 887, 3, 253, 125, 0, 887, 888, 3, 243, 120, 0, 888, 889, 3, 253, 125, 0, 889, 890, 3, 215, 106, 0, 890, 891, 3, 237, 117, 0, 891, 892, 3, 251, 124, 0, 892, 174, 1, 0, 0, 0, 893, 894, 3, 253, 125, 0, 894, 895, 3, 249, 123, 0, 895, 896, 3, 215, 106, 0, 896, 897, 3, 231, 114, 0, 897, 898, 3, 237, 117, 0, 898, 899, 3, 231, 114, 0, 899, 900, 3, 241, 119, 0, 900, 901, 3, 227, 112, 0, 901, 176, 1, 0, 0, 0, 902, 903, 3, 253, 125, 0, 903, 904, 3, 249, 123, 0, 904, 905, 3, 231, 114, 0, 905, 906, 3, 239, 118, 0, 906, 178, 1, 0, 0, 0, 907, 908, 3, 253, 125, 0, 908, 909, 3, 249, 123, 0, 909, 910, 3, 255, 126, 0, 910, 911, 3, 241, 119, 0, 911, 912, 3, 219, 108, 0, 912, 913, 3, 215, 106, 0, 913, 914, 3, 253, 125, 0, 914, 915, 3, 223, 110, 0, 915, 180, 1, 0, 0, 0, 916, 917, 3, 255, 126, 0, 917, 918, 3, 241, 119, 0, 918, 919, 3, 217, 107, 0, 919, 920, 3, 243, 120, 0, 920, 921, 3, 255, 126, 0, 921, 922, 3, 241, 119, 0, 922, 923, 3, 221, 109, 0, 923, 924, 3, 223, 110, 0, 924, 925, 3, 221, 109, 0, 925, 182, 1, 0, 0, 0, 926, 927, 3, 255, 126, 0, 927, 928, 3, 241, 119, 0, 928, 929, 3, 231, 114, 0, 929, 930, 3, 243, 120, 0, 930, 931, 3, 241, 119, 0, 931, 184, 1, 0, 0, 0, 932, 933, 3, 255, 126, 0, 933, 934, 3, 251, 124, 0, 934, 935, 3, 231, 114, 0, 935, 936, 3, 241, 119, 0, 936, 937, 3, 227, 112, 0, 937, 186, 1, 0, 0, 0, 938, 939, 3, 259, 128, 0, 939, 940, 3, 223, 110, 0, 940, 941, 3, 223, 110, 0, 941, 942, 3, 235, 116, 0, 942, 188, 1, 0, 0, 0, 943, 944, 3, 259, 128, 0, 944, 945, 3, 229, 113, 0, 945, 946, 3, 223, 110, 0, 946, 947, 3, 241, 119, 0, 947, 190, 1, 0, 0, 0, 948, 949, 3, 259, 128, 0, 949, 950, 3, 229, 113, 0, 950, 951, 3, 223, 110, 0, 951, 952, 3, 249, 123, 0, 952, 953, 3, 223, 110, 0, 953, 192, 1, 0, 0, 0, 954, 955, 3, 259, 128, 0, 955, 956, 3, 229, 113, 0, 956, 957, 3, 231, 114, 0, 957, 958, 3, 237, 117, 0, 958, 959, 3, 223, 110, 0, 959, 194, 1, 0, 0, 0, 960, 961, 3, 259, 128, 0, 961, 962, 3, 231, 114, 0, 962, 963, 3, 241, 119, 0, 963, 964, 3, 221, 109, 0, 964, 965, 3, 243, 120, 0, 965, 966, 3, 259, 128, 0, 966, 196, 1, 0, 0, 0, 967, 968, 3, 259, 128, 0, 968, 969, 3, 231, 114, 0, 969, 970, 3, 253, 125, 0, 970, 971, 3, 229, 113, 0, 971, 198, 1, 0, 0, 0, 972, 973, 3, 263, 130, 0, 973, 974, 3, 223, 110, 0, 974, 975, 3, 215, 106, 0, 975, 976, 3, 249, 123, 0, 976, 983, 1, 0, 0, 0, 977, 978, 3, 263, 130, 0, 978, 979, 3, 263, 130, 0, 979, 980, 3, 263, 130, 0, 980, 981, 3, 263, 130, 0, 981, 983, 1, 0, 0, 0, 982, 972, 1, 0, 0, 0, 982, 977, 1, 0, 0, 0, 983, 200, 1, 0, 0, 0, 984, 985, 3, 281, 139, 0, 985, 986, 3, 217, 107, 0, 986, 1012, 1, 0, 0, 0, 987, 988, 3, 281, 139, 0, 988, 989, 3, 225, 111, 0, 989, 1012, 1, 0, 0, 0, 990, 991, 3, 281, 139, 0, 991, 992, 3, 249, 123, 0, 992, 1012, 1, 0, 0, 0, 993, 994, 3, 281, 139, 0, 994, 995, 3, 241, 119, 0, 995, 1012, 1, 0, 0, 0, 996, 997, 3, 281, 139, 0, 997, 998, 3, 253, 125, 0, 998, 1012, 1, 0, 0, 0, 999, 1000, 3, 281, 139, 0, 1000, 1001, 5, 48, 0, 0, 1001, 1012, 1, 0, 0, 0, 1002, 1003, 3, 281, 139, 0, 1003, 1004, 3, 215, 106, 0, 1004, 1012, 1, 0, 0, 0, 1005, 1006, 3, 281, 139, 0, 1006, 1007, 3, 257, 127, 0, 1007, 1012, 1, 0, 0, 0, 1008, 1009, 3, 281, 139, 0, 1009, 1010, 3, 281, 139, 0, 1010, 1012, 1, 0, 0, 0, 1011, 984, 1, 0, 0, 0, 1011, 987, 1, 0, 0, 0, 1011, 990, 1, 0, 0, 0, 1011, 993, 1, 0, 0, 0, 1011, 996, 1, 0, 0, 0, 1011, 999, 1, 0, 0, 0, 1011, 1002, 1, 0, 0, 0, 1011, 1005, 1, 0, 0, 0, 1011, 1008, 1, 0, 0, 0, 1012, 202, 1, 0, 0, 0, 1013, 1017, 3, 267, 132, 0, 1014, 1017, 3, 357, 177, 0, 1015, 1017, 3, 291, 144, 0, 1016, 1013, 1, 0, 0, 0, 1016, 1014, 1, 0, 0, 0, 1016, 1015, 1, 0, 0, 0, 1017, 1024, 1, 0, 0, 0, 1018, 1023, 3, 267, 132, 0, 1019, 1023, 3, 357, 177, 0, 1020, 1023, 3, 271, 134, 0, 1021, 1023, 3, 291, 144, 0, 1022, 1018, 1, 0, 0, 0, 1022, 1019, 1, 0, 0, 0, 1022, 1020, 1, 0, 0, 0, 1022, 1021, 1, 0, 0, 0, 1023, 1026, 1, 0, 0, 0, 1024, 1022, 1, 0, 0, 0, 1024, 1025, 1, 0, 0, 0, 1025, 1060, 1, 0, 0, 0, 1026, 1024, 1, 0, 0, 0, 1027, 1038, 3, 279, 138, 0, 1028, 1037, 8, 0, 0, 0, 1029, 1037, 3, 201, 99, 0, 1030, 1031, 3, 281, 139, 0, 1031, 1032, 3, 341, 169, 0, 1032, 1037, 1, 0, 0, 0, 1033, 1034, 3, 279, 138, 0, 1034, 1035, 3, 279, 138, 0, 1035, 1037, 1, 0, 0, 0, 1036, 1028, 1, 0, 0, 0, 1036, 1029, 1, 0, 0, 0, 1036, 1030, 1, 0, 0, 0, 1036, 1033, 1, 0, 0, 0, 1037, 1040, 1, 0, 0, 0, 1038, 1036, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1041, 1, 0, 0, 0, 1040, 1038, 1, 0, 0, 0, 1041, 1042, 3, 279, 138, 0, 1042, 1060, 1, 0, 0, 0, 1043, 1054, 3, 335, 166, 0, 1044, 1053, 8, 1, 0, 0, 1045, 1053, 3, 201, 99, 0, 1046, 1047, 3, 281, 139, 0, 1047, 1048, 3, 335, 166, 0, 1048, 1053, 1, 0, 0, 0, 1049, 1050, 3, 335, 166, 0, 1050, 1051, 3, 335, 166, 0, 1051, 1053, 1, 0, 0, 0, 1052, 1044, 1, 0, 0, 0, 1052, 1045, 1, 0, 0, 0, 1052, 1046, 1, 0, 0, 0, 1052, 1049, 1, 0, 0, 0, 1053, 1056, 1, 0, 0, 0, 1054, 1052, 1, 0, 0, 0, 1054, 1055, 1, 0, 0, 0, 1055, 1057, 1, 0, 0, 0, 1056, 1054, 1, 0, 0, 0, 1057, 1058, 3, 335, 166, 0, 1058, 1060, 1, 0, 0, 0, 1059, 1016, 1, 0, 0, 0, 1059, 1027, 1, 0, 0, 0, 1059, 1043, 1, 0, 0, 0, 1060, 204, 1, 0, 0, 0, 1061, 1062, 3, 211, 104, 0, 1062, 1066, 3, 293, 145, 0, 1063, 1065, 3, 273, 135, 0, 1064, 1063, 1, 0, 0, 0, 1065, 1068, 1, 0, 0, 0, 1066, 1064, 1, 0, 0, 0, 1066, 1067, 1, 0, 0, 0, 1067, 1071, 1, 0, 0, 0, 1068, 1066, 1, 0, 0, 0, 1069, 1072, 3, 245, 121, 0, 1070, 1072, 3, 223, 110, 0, 1071, 1069, 1, 0, 0, 0, 1071, 1070, 1, 0, 0, 0, 1072, 1075, 1, 0, 0, 0, 1073, 1076, 3, 331, 164, 0, 1074, 1076, 3, 289, 143, 0, 1075, 1073, 1, 0, 0, 0, 1075, 1074, 1, 0, 0, 0, 1075, 1076, 1, 0, 0, 0, 1076, 1078, 1, 0, 0, 0, 1077, 1079, 3, 271, 134, 0, 1078, 1077, 1, 0, 0, 0, 1079, 1080, 1, 0, 0, 0, 1080, 1078, 1, 0, 0, 0, 1080, 1081, 1, 0, 0, 0, 1081, 1138, 1, 0, 0, 0, 1082, 1085, 3, 211, 104, 0, 1083, 1086, 3, 245, 121, 0, 1084, 1086, 3, 223, 110, 0, 1085, 1083, 1, 0, 0, 0, 1085, 1084, 1, 0, 0, 0, 1086, 1089, 1, 0, 0, 0, 1087, 1090, 3, 331, 164, 0, 1088, 1090, 3, 289, 143, 0, 1089, 1087, 1, 0, 0, 0, 1089, 1088, 1, 0, 0, 0, 1089, 1090, 1, 0, 0, 0, 1090, 1092, 1, 0, 0, 0, 1091, 1093, 3, 271, 134, 0, 1092, 1091, 1, 0, 0, 0, 1093, 1094, 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1138, 1, 0, 0, 0, 1096, 1097, 3, 209, 103, 0, 1097, 1101, 3, 293, 145, 0, 1098, 1100, 3, 271, 134, 0, 1099, 1098, 1, 0, 0, 0, 1100, 1103, 1, 0, 0, 0, 1101, 1099, 1, 0, 0, 0, 1101, 1102, 1, 0, 0, 0, 1102, 1104, 1, 0, 0, 0, 1103, 1101, 1, 0, 0, 0, 1104, 1107, 3, 223, 110, 0, 1105, 1108, 3, 331, 164, 0, 1106, 1108, 3, 289, 143, 0, 1107, 1105, 1, 0, 0, 0, 1107, 1106, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1110, 1, 0, 0, 0, 1109, 1111, 3, 271, 134, 0, 1110, 1109, 1, 0, 0, 0, 1111, 1112, 1, 0, 0, 0, 1112, 1110, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1138, 1, 0, 0, 0, 1114, 1115, 3, 293, 145, 0, 1115, 1116, 3, 209, 103, 0, 1116, 1119, 3, 223, 110, 0, 1117, 1120, 3, 331, 164, 0, 1118, 1120, 3, 289, 143, 0, 1119, 1117, 1, 0, 0, 0, 1119, 1118, 1, 0, 0, 0, 1119, 1120, 1, 0, 0, 0, 1120, 1122, 1, 0, 0, 0, 1121, 1123, 3, 271, 134, 0, 1122, 1121, 1, 0, 0, 0, 1123, 1124, 1, 0, 0, 0, 1124, 1122, 1, 0, 0, 0, 1124, 1125, 1, 0, 0, 0, 1125, 1138, 1, 0, 0, 0, 1126, 1127, 3, 209, 103, 0, 1127, 1130, 3, 223, 110, 0, 1128, 1131, 3, 331, 164, 0, 1129, 1131, 3, 289, 143, 0, 1130, 1128, 1, 0, 0, 0, 1130, 1129, 1, 0, 0, 0, 1130, 1131, 1, 0, 0, 0, 1131, 1133, 1, 0, 0, 0, 1132, 1134, 3, 271, 134, 0, 1133, 1132, 1, 0, 0, 0, 1134, 1135, 1, 0, 0, 0, 1135, 1133, 1, 0, 0, 0, 1135, 1136, 1, 0, 0, 0, 1136, 1138, 1, 0, 0, 0, 1137, 1061, 1, 0, 0, 0, 1137, 1082, 1, 0, 0, 0, 1137, 1096, 1, 0, 0, 0, 1137, 1114, 1, 0, 0, 0, 1137, 1126, 1, 0, 0, 0, 1138, 206, 1, 0, 0, 0, 1139, 1141, 5, 48, 0, 0, 1140, 1142, 3, 269, 133, 0, 1141, 1140, 1, 0, 0, 0, 1142, 1143, 1, 0, 0, 0, 1143, 1141, 1, 0, 0, 0, 1143, 1144, 1, 0, 0, 0, 1144, 208, 1, 0, 0, 0, 1145, 1147, 3, 271, 134, 0, 1146, 1145, 1, 0, 0, 0, 1147, 1148, 1, 0, 0, 0, 1148, 1146, 1, 0, 0, 0, 1148, 1149, 1, 0, 0, 0, 1149, 210, 1, 0, 0, 0, 1150, 1151, 5, 48, 0, 0, 1151, 1153, 3, 261, 129, 0, 1152, 1154, 3, 273, 135, 0, 1153, 1152, 1, 0, 0, 0, 1154, 1155, 1, 0, 0, 0, 1155, 1153, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 212, 1, 0, 0, 0, 1157, 1168, 3, 341, 169, 0, 1158, 1167, 8, 2, 0, 0, 1159, 1167, 3, 201, 99, 0, 1160, 1161, 3, 281, 139, 0, 1161, 1162, 3, 341, 169, 0, 1162, 1167, 1, 0, 0, 0, 1163, 1164, 3, 341, 169, 0, 1164, 1165, 3, 341, 169, 0, 1165, 1167, 1, 0, 0, 0, 1166, 1158, 1, 0, 0, 0, 1166, 1159, 1, 0, 0, 0, 1166, 1160, 1, 0, 0, 0, 1166, 1163, 1, 0, 0, 0, 1167, 1170, 1, 0, 0, 0, 1168, 1166, 1, 0, 0, 0, 1168, 1169, 1, 0, 0, 0, 1169, 1171, 1, 0, 0, 0, 1170, 1168, 1, 0, 0, 0, 1171, 1172, 3, 341, 169, 0, 1172, 214, 1, 0, 0, 0, 1173, 1174, 7, 3, 0, 0, 1174, 216, 1, 0, 0, 0, 1175, 1176, 7, 4, 0, 0, 1176, 218, 1, 0, 0, 0, 1177, 1178, 7, 5, 0, 0, 1178, 220, 1, 0, 0, 0, 1179, 1180, 7, 6, 0, 0, 1180, 222, 1, 0, 0, 0, 1181, 1182, 7, 7, 0, 0, 1182, 224, 1, 0, 0, 0, 1183, 1184, 7, 8, 0, 0, 1184, 226, 1, 0, 0, 0, 1185, 1186, 7, 9, 0, 0, 1186, 228, 1, 0, 0, 0, 1187, 1188, 7, 10, 0, 0, 1188, 230, 1, 0, 0, 0, 1189, 1190, 7, 11, 0, 0, 1190, 232, 1, 0, 0, 0, 1191, 1192, 7, 12, 0, 0, 1192, 234, 1, 0, 0, 0, 1193, 1194, 7, 13, 0, 0, 1194, 236, 1, 0, 0, 0, 1195, 1196, 7, 14, 0, 0, 1196, 238, 1, 0, 0, 0, 1197, 1198, 7, 15, 0, 0, 1198, 240, 1, 0, 0, 0, 1199, 1200, 7, 16, 0, 0, 1200, 242, 1, 0, 0, 0, 1201, 1202, 7, 17, 0, 0, 1202, 244, 1, 0, 0, 0, 1203, 1204, 7, 18, 0, 0, 1204, 246, 1, 0, 0, 0, 1205, 1206, 7, 19, 0, 0, 1206, 248, 1, 0, 0, 0, 1207, 1208, 7, 20, 0, 0, 1208, 250, 1, 0, 0, 0, 1209, 1210, 7, 21, 0, 0, 1210, 252, 1, 0, 0, 0, 1211, 1212, 7, 22, 0, 0, 1212, 254, 1, 0, 0, 0, 1213, 1214, 7, 23, 0, 0, 1214, 256, 1, 0, 0, 0, 1215, 1216, 7, 24, 0, 0, 1216, 258, 1, 0, 0, 0, 1217, 1218, 7, 25, 0, 0, 1218, 260, 1, 0, 0, 0, 1219, 1220, 7, 26, 0, 0, 1220, 262, 1, 0, 0, 0, 1221, 1222, 7, 27, 0, 0, 1222, 264, 1, 0, 0, 0, 1223, 1224, 7, 28, 0, 0, 1224, 266, 1, 0, 0, 0, 1225, 1226, 7, 29, 0, 0, 1226, 268, 1, 0, 0, 0, 1227, 1228, 7, 30, 0, 0, 1228, 270, 1, 0, 0, 0, 1229, 1230, 7, 31, 0, 0, 1230, 272, 1, 0, 0, 0, 1231, 1232, 7, 32, 0, 0, 1232, 274, 1, 0, 0, 0, 1233, 1234, 5, 45, 0, 0, 1234, 1235, 5, 62, 0, 0, 1235, 276, 1, 0, 0, 0, 1236, 1237, 5, 42, 0, 0, 1237, 278, 1, 0, 0, 0, 1238, 1239, 5, 96, 0, 0, 1239, 280, 1, 0, 0, 0, 1240, 1241, 5, 92, 0, 0, 1241, 282, 1, 0, 0, 0, 1242, 1243, 5, 58, 0, 0, 1243, 284, 1, 0, 0, 0, 1244, 1245, 5, 44, 0, 0, 1245, 286, 1, 0, 0, 0, 1246, 1247, 5, 124, 0, 0, 1247, 1248, 5, 124, 0, 0, 1248, 288, 1, 0, 0, 0, 1249, 1250, 5, 45, 0, 0, 1250, 290, 1, 0, 0, 0, 1251, 1252, 5, 36, 0, 0, 1252, 292, 1, 0, 0, 0, 1253, 1254, 5, 46, 0, 0, 1254, 294, 1, 0, 0, 0, 1255, 1256, 5, 61, 0, 0, 1256, 1257, 5, 61, 0, 0, 1257, 296, 1, 0, 0, 0, 1258, 1259, 5, 61, 0, 0, 1259, 298, 1, 0, 0, 0, 1260, 1261, 5, 62, 0, 0, 1261, 1262, 5, 61, 0, 0, 1262, 300, 1, 0, 0, 0, 1263, 1264, 5, 62, 0, 0, 1264, 302, 1, 0, 0, 0, 1265, 1266, 5, 35, 0, 0, 1266, 304, 1, 0, 0, 0, 1267, 1268, 5, 126, 0, 0, 1268, 1269, 5, 42, 0, 0, 1269, 306, 1, 0, 0, 0, 1270, 1271, 5, 61, 0, 0, 1271, 1272, 5, 126, 0, 0, 1272, 1273, 5, 42, 0, 0, 1273, 308, 1, 0, 0, 0, 1274, 1275, 5, 123, 0, 0, 1275, 1276, 1, 0, 0, 0, 1276, 1277, 6, 153, 0, 0, 1277, 310, 1, 0, 0, 0, 1278, 1279, 5, 91, 0, 0, 1279, 312, 1, 0, 0, 0, 1280, 1281, 5, 40, 0, 0, 1281, 314, 1, 0, 0, 0, 1282, 1283, 5, 60, 0, 0, 1283, 1284, 5, 61, 0, 0, 1284, 316, 1, 0, 0, 0, 1285, 1286, 5, 60, 0, 0, 1286, 318, 1, 0, 0, 0, 1287, 1288, 5, 33, 0, 0, 1288, 1292, 5, 61, 0, 0, 1289, 1290, 5, 60, 0, 0, 1290, 1292, 5, 62, 0, 0, 1291, 1287, 1, 0, 0, 0, 1291, 1289, 1, 0, 0, 0, 1292, 320, 1, 0, 0, 0, 1293, 1294, 5, 33, 0, 0, 1294, 1295, 5, 126, 0, 0, 1295, 1296, 5, 42, 0, 0, 1296, 322, 1, 0, 0, 0, 1297, 1298, 5, 33, 0, 0, 1298, 1299, 5, 126, 0, 0, 1299, 324, 1, 0, 0, 0, 1300, 1301, 5, 63, 0, 0, 1301, 1302, 5, 46, 0, 0, 1302, 326, 1, 0, 0, 0, 1303, 1304, 5, 63, 0, 0, 1304, 1305, 5, 63, 0, 0, 1305, 328, 1, 0, 0, 0, 1306, 1307, 5, 37, 0, 0, 1307, 330, 1, 0, 0, 0, 1308, 1309, 5, 43, 0, 0, 1309, 332, 1, 0, 0, 0, 1310, 1311, 5, 63, 0, 0, 1311, 334, 1, 0, 0, 0, 1312, 1313, 5, 34, 0, 0, 1313, 336, 1, 0, 0, 0, 1314, 1315, 5, 102, 0, 0, 1315, 1316, 5, 39, 0, 0, 1316, 1317, 1, 0, 0, 0, 1317, 1318, 6, 167, 1, 0, 1318, 338, 1, 0, 0, 0, 1319, 1320, 5, 70, 0, 0, 1320, 1321, 5, 39, 0, 0, 1321, 1322, 1, 0, 0, 0, 1322, 1323, 6, 168, 2, 0, 1323, 340, 1, 0, 0, 0, 1324, 1325, 5, 39, 0, 0, 1325, 342, 1, 0, 0, 0, 1326, 1327, 5, 126, 0, 0, 1327, 344, 1, 0, 0, 0, 1328, 1329, 5, 61, 0, 0, 1329, 1330, 5, 126, 0, 0, 1330, 346, 1, 0, 0, 0, 1331, 1332, 5, 125, 0, 0, 1332, 1333, 1, 0, 0, 0, 1333, 1334, 6, 172, 3, 0, 1334, 348, 1, 0, 0, 0, 1335, 1336, 5, 93, 0, 0, 1336, 350, 1, 0, 0, 0, 1337, 1338, 5, 41, 0, 0, 1338, 352, 1, 0, 0, 0, 1339, 1340, 5, 59, 0, 0, 1340, 354, 1, 0, 0, 0, 1341, 1342, 5, 47, 0, 0, 1342, 356, 1, 0, 0, 0, 1343, 1344, 5, 95, 0, 0, 1344, 358, 1, 0, 0, 0, 1345, 1346, 5, 47, 0, 0, 1346, 1347, 5, 42, 0, 0, 1347, 1351, 1, 0, 0, 0, 1348, 1350, 9, 0, 0, 0, 1349, 1348, 1, 0, 0, 0, 1350, 1353, 1, 0, 0, 0, 1351, 1352, 1, 0, 0, 0, 1351, 1349, 1, 0, 0, 0, 1352, 1354, 1, 0, 0, 0, 1353, 1351, 1, 0, 0, 0, 1354, 1355, 5, 42, 0, 0, 1355, 1356, 5, 47, 0, 0, 1356, 1357, 1, 0, 0, 0, 1357, 1358, 6, 178, 4, 0, 1358, 360, 1, 0, 0, 0, 1359, 1360, 5, 45, 0, 0, 1360, 1364, 5, 45, 0, 0, 1361, 1362, 5, 47, 0, 0, 1362, 1364, 5, 47, 0, 0, 1363, 1359, 1, 0, 0, 0, 1363, 1361, 1, 0, 0, 0, 1364, 1368, 1, 0, 0, 0, 1365, 1367, 8, 33, 0, 0, 1366, 1365, 1, 0, 0, 0, 1367, 1370, 1, 0, 0, 0, 1368, 1366, 1, 0, 0, 0, 1368, 1369, 1, 0, 0, 0, 1369, 1372, 1, 0, 0, 0, 1370, 1368, 1, 0, 0, 0, 1371, 1373, 7, 34, 0, 0, 1372, 1371, 1, 0, 0, 0, 1373, 1374, 1, 0, 0, 0, 1374, 1375, 6, 179, 4, 0, 1375, 362, 1, 0, 0, 0, 1376, 1377, 7, 35, 0, 0, 1377, 1378, 1, 0, 0, 0, 1378, 1379, 6, 180, 5, 0, 1379, 364, 1, 0, 0, 0, 1380, 1392, 8, 36, 0, 0, 1381, 1392, 3, 201, 99, 0, 1382, 1383, 3, 281, 139, 0, 1383, 1384, 3, 341, 169, 0, 1384, 1392, 1, 0, 0, 0, 1385, 1386, 3, 281, 139, 0, 1386, 1387, 3, 309, 153, 0, 1387, 1392, 1, 0, 0, 0, 1388, 1389, 3, 341, 169, 0, 1389, 1390, 3, 341, 169, 0, 1390, 1392, 1, 0, 0, 0, 1391, 1380, 1, 0, 0, 0, 1391, 1381, 1, 0, 0, 0, 1391, 1382, 1, 0, 0, 0, 1391, 1385, 1, 0, 0, 0, 1391, 1388, 1, 0, 0, 0, 1392, 1393, 1, 0, 0, 0, 1393, 1391, 1, 0, 0, 0, 1393, 1394, 1, 0, 0, 0, 1394, 366, 1, 0, 0, 0, 1395, 1396, 3, 309, 153, 0, 1396, 1397, 1, 0, 0, 0, 1397, 1398, 6, 182, 0, 0, 1398, 368, 1, 0, 0, 0, 1399, 1400, 3, 341, 169, 0, 1400, 1401, 1, 0, 0, 0, 1401, 1402, 6, 183, 6, 0, 1402, 1403, 6, 183, 3, 0, 1403, 370, 1, 0, 0, 0, 1404, 1410, 8, 37, 0, 0, 1405, 1410, 3, 201, 99, 0, 1406, 1407, 3, 281, 139, 0, 1407, 1408, 3, 309, 153, 0, 1408, 1410, 1, 0, 0, 0, 1409, 1404, 1, 0, 0, 0, 1409, 1405, 1, 0, 0, 0, 1409, 1406, 1, 0, 0, 0, 1410, 1411, 1, 0, 0, 0, 1411, 1409, 1, 0, 0, 0, 1411, 1412, 1, 0, 0, 0, 1412, 372, 1, 0, 0, 0, 1413, 1414, 3, 309, 153, 0, 1414, 1415, 1, 0, 0, 0, 1415, 1416, 6, 185, 0, 0, 1416, 374, 1, 0, 0, 0, 44, 0, 1, 2, 415, 618, 982, 1011, 1016, 1022, 1024, 1036, 1038, 1052, 1054, 1059, 1066, 1071, 1075, 1080, 1085, 1089, 1094, 1101, 1107, 1112, 1119, 1124, 1130, 1135, 1137, 1143, 1148, 1155, 1166, 1168, 1291, 1351, 1363, 1368, 1372, 1391, 1393, 1409, 1411, 7, 5, 0, 0, 5, 1, 0, 5, 2, 0, 4, 0, 0, 6, 0, 0, 0, 1, 0, 7, 140, 0] \ No newline at end of file +[4, 0, 159, 1449, 6, -1, 6, -1, 6, -1, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 2, 91, 7, 91, 2, 92, 7, 92, 2, 93, 7, 93, 2, 94, 7, 94, 2, 95, 7, 95, 2, 96, 7, 96, 2, 97, 7, 97, 2, 98, 7, 98, 2, 99, 7, 99, 2, 100, 7, 100, 2, 101, 7, 101, 2, 102, 7, 102, 2, 103, 7, 103, 2, 104, 7, 104, 2, 105, 7, 105, 2, 106, 7, 106, 2, 107, 7, 107, 2, 108, 7, 108, 2, 109, 7, 109, 2, 110, 7, 110, 2, 111, 7, 111, 2, 112, 7, 112, 2, 113, 7, 113, 2, 114, 7, 114, 2, 115, 7, 115, 2, 116, 7, 116, 2, 117, 7, 117, 2, 118, 7, 118, 2, 119, 7, 119, 2, 120, 7, 120, 2, 121, 7, 121, 2, 122, 7, 122, 2, 123, 7, 123, 2, 124, 7, 124, 2, 125, 7, 125, 2, 126, 7, 126, 2, 127, 7, 127, 2, 128, 7, 128, 2, 129, 7, 129, 2, 130, 7, 130, 2, 131, 7, 131, 2, 132, 7, 132, 2, 133, 7, 133, 2, 134, 7, 134, 2, 135, 7, 135, 2, 136, 7, 136, 2, 137, 7, 137, 2, 138, 7, 138, 2, 139, 7, 139, 2, 140, 7, 140, 2, 141, 7, 141, 2, 142, 7, 142, 2, 143, 7, 143, 2, 144, 7, 144, 2, 145, 7, 145, 2, 146, 7, 146, 2, 147, 7, 147, 2, 148, 7, 148, 2, 149, 7, 149, 2, 150, 7, 150, 2, 151, 7, 151, 2, 152, 7, 152, 2, 153, 7, 153, 2, 154, 7, 154, 2, 155, 7, 155, 2, 156, 7, 156, 2, 157, 7, 157, 2, 158, 7, 158, 2, 159, 7, 159, 2, 160, 7, 160, 2, 161, 7, 161, 2, 162, 7, 162, 2, 163, 7, 163, 2, 164, 7, 164, 2, 165, 7, 165, 2, 166, 7, 166, 2, 167, 7, 167, 2, 168, 7, 168, 2, 169, 7, 169, 2, 170, 7, 170, 2, 171, 7, 171, 2, 172, 7, 172, 2, 173, 7, 173, 2, 174, 7, 174, 2, 175, 7, 175, 2, 176, 7, 176, 2, 177, 7, 177, 2, 178, 7, 178, 2, 179, 7, 179, 2, 180, 7, 180, 2, 181, 7, 181, 2, 182, 7, 182, 2, 183, 7, 183, 2, 184, 7, 184, 2, 185, 7, 185, 2, 186, 7, 186, 2, 187, 7, 187, 2, 188, 7, 188, 2, 189, 7, 189, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 424, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 641, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 1, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 88, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 89, 1, 90, 1, 90, 1, 90, 1, 90, 1, 90, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 91, 1, 92, 1, 92, 1, 92, 1, 92, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 93, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 94, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 95, 1, 96, 1, 96, 1, 96, 1, 96, 1, 96, 1, 97, 1, 97, 1, 97, 1, 97, 1, 97, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 98, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 99, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 101, 1, 101, 1, 101, 1, 101, 1, 101, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 1, 102, 3, 102, 1015, 8, 102, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 1, 103, 3, 103, 1044, 8, 103, 1, 104, 1, 104, 1, 104, 3, 104, 1049, 8, 104, 1, 104, 1, 104, 1, 104, 1, 104, 5, 104, 1055, 8, 104, 10, 104, 12, 104, 1058, 9, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 5, 104, 1069, 8, 104, 10, 104, 12, 104, 1072, 9, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 1, 104, 5, 104, 1085, 8, 104, 10, 104, 12, 104, 1088, 9, 104, 1, 104, 1, 104, 3, 104, 1092, 8, 104, 1, 105, 1, 105, 1, 105, 5, 105, 1097, 8, 105, 10, 105, 12, 105, 1100, 9, 105, 1, 105, 1, 105, 3, 105, 1104, 8, 105, 1, 105, 1, 105, 3, 105, 1108, 8, 105, 1, 105, 4, 105, 1111, 8, 105, 11, 105, 12, 105, 1112, 1, 105, 1, 105, 1, 105, 3, 105, 1118, 8, 105, 1, 105, 1, 105, 3, 105, 1122, 8, 105, 1, 105, 4, 105, 1125, 8, 105, 11, 105, 12, 105, 1126, 1, 105, 1, 105, 1, 105, 5, 105, 1132, 8, 105, 10, 105, 12, 105, 1135, 9, 105, 1, 105, 1, 105, 1, 105, 3, 105, 1140, 8, 105, 1, 105, 4, 105, 1143, 8, 105, 11, 105, 12, 105, 1144, 1, 105, 1, 105, 1, 105, 1, 105, 1, 105, 3, 105, 1152, 8, 105, 1, 105, 4, 105, 1155, 8, 105, 11, 105, 12, 105, 1156, 1, 105, 1, 105, 1, 105, 1, 105, 3, 105, 1163, 8, 105, 1, 105, 4, 105, 1166, 8, 105, 11, 105, 12, 105, 1167, 3, 105, 1170, 8, 105, 1, 106, 1, 106, 4, 106, 1174, 8, 106, 11, 106, 12, 106, 1175, 1, 107, 4, 107, 1179, 8, 107, 11, 107, 12, 107, 1180, 1, 108, 1, 108, 1, 108, 4, 108, 1186, 8, 108, 11, 108, 12, 108, 1187, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 1, 109, 5, 109, 1199, 8, 109, 10, 109, 12, 109, 1202, 9, 109, 1, 109, 1, 109, 1, 110, 1, 110, 1, 111, 1, 111, 1, 112, 1, 112, 1, 113, 1, 113, 1, 114, 1, 114, 1, 115, 1, 115, 1, 116, 1, 116, 1, 117, 1, 117, 1, 118, 1, 118, 1, 119, 1, 119, 1, 120, 1, 120, 1, 121, 1, 121, 1, 122, 1, 122, 1, 123, 1, 123, 1, 124, 1, 124, 1, 125, 1, 125, 1, 126, 1, 126, 1, 127, 1, 127, 1, 128, 1, 128, 1, 129, 1, 129, 1, 130, 1, 130, 1, 131, 1, 131, 1, 132, 1, 132, 1, 133, 1, 133, 1, 134, 1, 134, 1, 135, 1, 135, 1, 136, 1, 136, 1, 137, 1, 137, 1, 138, 1, 138, 1, 139, 1, 139, 1, 140, 1, 140, 1, 140, 1, 141, 1, 141, 1, 142, 1, 142, 1, 143, 1, 143, 1, 144, 1, 144, 1, 145, 1, 145, 1, 146, 1, 146, 1, 146, 1, 147, 1, 147, 1, 148, 1, 148, 1, 149, 1, 149, 1, 150, 1, 150, 1, 150, 1, 151, 1, 151, 1, 152, 1, 152, 1, 152, 1, 153, 1, 153, 1, 154, 1, 154, 1, 155, 1, 155, 1, 155, 1, 156, 1, 156, 1, 156, 1, 156, 1, 157, 1, 157, 1, 157, 1, 157, 1, 158, 1, 158, 1, 159, 1, 159, 1, 160, 1, 160, 1, 160, 1, 161, 1, 161, 1, 162, 1, 162, 1, 162, 1, 162, 3, 162, 1324, 8, 162, 1, 163, 1, 163, 1, 163, 1, 163, 1, 164, 1, 164, 1, 164, 1, 165, 1, 165, 1, 165, 1, 166, 1, 166, 1, 166, 1, 167, 1, 167, 1, 168, 1, 168, 1, 169, 1, 169, 1, 170, 1, 170, 1, 171, 1, 171, 1, 171, 1, 171, 1, 171, 1, 172, 1, 172, 1, 172, 1, 172, 1, 172, 1, 173, 1, 173, 1, 174, 1, 174, 1, 175, 1, 175, 1, 175, 1, 176, 1, 176, 1, 176, 1, 176, 1, 177, 1, 177, 1, 178, 1, 178, 1, 179, 1, 179, 1, 180, 1, 180, 1, 181, 1, 181, 1, 182, 1, 182, 1, 182, 1, 182, 5, 182, 1382, 8, 182, 10, 182, 12, 182, 1385, 9, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 182, 1, 183, 1, 183, 1, 183, 1, 183, 3, 183, 1396, 8, 183, 1, 183, 5, 183, 1399, 8, 183, 10, 183, 12, 183, 1402, 9, 183, 1, 183, 3, 183, 1405, 8, 183, 1, 183, 1, 183, 1, 184, 1, 184, 1, 184, 1, 184, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 1, 185, 4, 185, 1424, 8, 185, 11, 185, 12, 185, 1425, 1, 186, 1, 186, 1, 186, 1, 186, 1, 187, 1, 187, 1, 187, 1, 187, 1, 187, 1, 188, 1, 188, 1, 188, 1, 188, 1, 188, 4, 188, 1442, 8, 188, 11, 188, 12, 188, 1443, 1, 189, 1, 189, 1, 189, 1, 189, 1, 1383, 0, 190, 3, 1, 5, 2, 7, 3, 9, 4, 11, 5, 13, 6, 15, 7, 17, 8, 19, 9, 21, 10, 23, 11, 25, 12, 27, 13, 29, 14, 31, 15, 33, 16, 35, 17, 37, 18, 39, 19, 41, 20, 43, 21, 45, 22, 47, 23, 49, 24, 51, 25, 53, 26, 55, 27, 57, 28, 59, 29, 61, 30, 63, 31, 65, 32, 67, 33, 69, 34, 71, 35, 73, 36, 75, 37, 77, 38, 79, 39, 81, 40, 83, 41, 85, 42, 87, 43, 89, 44, 91, 45, 93, 46, 95, 47, 97, 48, 99, 49, 101, 50, 103, 51, 105, 52, 107, 53, 109, 54, 111, 55, 113, 56, 115, 57, 117, 58, 119, 59, 121, 60, 123, 61, 125, 62, 127, 63, 129, 64, 131, 65, 133, 66, 135, 67, 137, 68, 139, 69, 141, 70, 143, 71, 145, 72, 147, 73, 149, 74, 151, 75, 153, 76, 155, 77, 157, 78, 159, 79, 161, 80, 163, 81, 165, 82, 167, 83, 169, 84, 171, 85, 173, 86, 175, 87, 177, 88, 179, 89, 181, 90, 183, 91, 185, 92, 187, 93, 189, 94, 191, 95, 193, 96, 195, 97, 197, 98, 199, 99, 201, 100, 203, 101, 205, 102, 207, 103, 209, 104, 211, 105, 213, 106, 215, 107, 217, 108, 219, 109, 221, 110, 223, 0, 225, 0, 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, 0, 239, 0, 241, 0, 243, 0, 245, 0, 247, 0, 249, 0, 251, 0, 253, 0, 255, 0, 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, 0, 269, 0, 271, 0, 273, 0, 275, 0, 277, 0, 279, 0, 281, 0, 283, 111, 285, 112, 287, 113, 289, 114, 291, 115, 293, 116, 295, 117, 297, 118, 299, 119, 301, 120, 303, 121, 305, 122, 307, 123, 309, 124, 311, 125, 313, 126, 315, 127, 317, 128, 319, 129, 321, 130, 323, 131, 325, 132, 327, 133, 329, 134, 331, 135, 333, 136, 335, 137, 337, 138, 339, 139, 341, 140, 343, 141, 345, 142, 347, 143, 349, 144, 351, 145, 353, 146, 355, 147, 357, 148, 359, 149, 361, 150, 363, 151, 365, 152, 367, 153, 369, 154, 371, 155, 373, 156, 375, 157, 377, 0, 379, 158, 381, 159, 3, 0, 1, 2, 38, 2, 0, 92, 92, 96, 96, 2, 0, 34, 34, 92, 92, 2, 0, 39, 39, 92, 92, 2, 0, 65, 65, 97, 97, 2, 0, 66, 66, 98, 98, 2, 0, 67, 67, 99, 99, 2, 0, 68, 68, 100, 100, 2, 0, 69, 69, 101, 101, 2, 0, 70, 70, 102, 102, 2, 0, 71, 71, 103, 103, 2, 0, 72, 72, 104, 104, 2, 0, 73, 73, 105, 105, 2, 0, 74, 74, 106, 106, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 2, 0, 77, 77, 109, 109, 2, 0, 78, 78, 110, 110, 2, 0, 79, 79, 111, 111, 2, 0, 80, 80, 112, 112, 2, 0, 81, 81, 113, 113, 2, 0, 82, 82, 114, 114, 2, 0, 83, 83, 115, 115, 2, 0, 84, 84, 116, 116, 2, 0, 85, 85, 117, 117, 2, 0, 86, 86, 118, 118, 2, 0, 87, 87, 119, 119, 2, 0, 88, 88, 120, 120, 2, 0, 89, 89, 121, 121, 2, 0, 90, 90, 122, 122, 2, 0, 65, 90, 97, 122, 1, 0, 48, 55, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, 2, 0, 10, 10, 13, 13, 2, 1, 10, 10, 13, 13, 2, 0, 9, 13, 32, 32, 3, 0, 39, 39, 92, 92, 123, 123, 1, 0, 123, 123, 1485, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 0, 183, 1, 0, 0, 0, 0, 185, 1, 0, 0, 0, 0, 187, 1, 0, 0, 0, 0, 189, 1, 0, 0, 0, 0, 191, 1, 0, 0, 0, 0, 193, 1, 0, 0, 0, 0, 195, 1, 0, 0, 0, 0, 197, 1, 0, 0, 0, 0, 199, 1, 0, 0, 0, 0, 201, 1, 0, 0, 0, 0, 203, 1, 0, 0, 0, 0, 205, 1, 0, 0, 0, 0, 207, 1, 0, 0, 0, 0, 209, 1, 0, 0, 0, 0, 211, 1, 0, 0, 0, 0, 213, 1, 0, 0, 0, 0, 215, 1, 0, 0, 0, 0, 217, 1, 0, 0, 0, 0, 219, 1, 0, 0, 0, 0, 221, 1, 0, 0, 0, 0, 283, 1, 0, 0, 0, 0, 285, 1, 0, 0, 0, 0, 287, 1, 0, 0, 0, 0, 289, 1, 0, 0, 0, 0, 291, 1, 0, 0, 0, 0, 293, 1, 0, 0, 0, 0, 295, 1, 0, 0, 0, 0, 297, 1, 0, 0, 0, 0, 299, 1, 0, 0, 0, 0, 301, 1, 0, 0, 0, 0, 303, 1, 0, 0, 0, 0, 305, 1, 0, 0, 0, 0, 307, 1, 0, 0, 0, 0, 309, 1, 0, 0, 0, 0, 311, 1, 0, 0, 0, 0, 313, 1, 0, 0, 0, 0, 315, 1, 0, 0, 0, 0, 317, 1, 0, 0, 0, 0, 319, 1, 0, 0, 0, 0, 321, 1, 0, 0, 0, 0, 323, 1, 0, 0, 0, 0, 325, 1, 0, 0, 0, 0, 327, 1, 0, 0, 0, 0, 329, 1, 0, 0, 0, 0, 331, 1, 0, 0, 0, 0, 333, 1, 0, 0, 0, 0, 335, 1, 0, 0, 0, 0, 337, 1, 0, 0, 0, 0, 339, 1, 0, 0, 0, 0, 341, 1, 0, 0, 0, 0, 343, 1, 0, 0, 0, 0, 345, 1, 0, 0, 0, 0, 347, 1, 0, 0, 0, 0, 349, 1, 0, 0, 0, 0, 351, 1, 0, 0, 0, 0, 353, 1, 0, 0, 0, 0, 355, 1, 0, 0, 0, 0, 357, 1, 0, 0, 0, 0, 359, 1, 0, 0, 0, 0, 361, 1, 0, 0, 0, 0, 363, 1, 0, 0, 0, 0, 365, 1, 0, 0, 0, 0, 367, 1, 0, 0, 0, 0, 369, 1, 0, 0, 0, 0, 371, 1, 0, 0, 0, 1, 373, 1, 0, 0, 0, 1, 375, 1, 0, 0, 0, 1, 377, 1, 0, 0, 0, 2, 379, 1, 0, 0, 0, 2, 381, 1, 0, 0, 0, 3, 383, 1, 0, 0, 0, 5, 387, 1, 0, 0, 0, 7, 391, 1, 0, 0, 0, 9, 396, 1, 0, 0, 0, 11, 400, 1, 0, 0, 0, 13, 406, 1, 0, 0, 0, 15, 423, 1, 0, 0, 0, 17, 425, 1, 0, 0, 0, 19, 430, 1, 0, 0, 0, 21, 438, 1, 0, 0, 0, 23, 443, 1, 0, 0, 0, 25, 446, 1, 0, 0, 0, 27, 451, 1, 0, 0, 0, 29, 456, 1, 0, 0, 0, 31, 462, 1, 0, 0, 0, 33, 469, 1, 0, 0, 0, 35, 477, 1, 0, 0, 0, 37, 483, 1, 0, 0, 0, 39, 488, 1, 0, 0, 0, 41, 496, 1, 0, 0, 0, 43, 501, 1, 0, 0, 0, 45, 505, 1, 0, 0, 0, 47, 510, 1, 0, 0, 0, 49, 521, 1, 0, 0, 0, 51, 530, 1, 0, 0, 0, 53, 535, 1, 0, 0, 0, 55, 539, 1, 0, 0, 0, 57, 547, 1, 0, 0, 0, 59, 553, 1, 0, 0, 0, 61, 561, 1, 0, 0, 0, 63, 567, 1, 0, 0, 0, 65, 570, 1, 0, 0, 0, 67, 580, 1, 0, 0, 0, 69, 584, 1, 0, 0, 0, 71, 589, 1, 0, 0, 0, 73, 594, 1, 0, 0, 0, 75, 600, 1, 0, 0, 0, 77, 607, 1, 0, 0, 0, 79, 612, 1, 0, 0, 0, 81, 615, 1, 0, 0, 0, 83, 618, 1, 0, 0, 0, 85, 624, 1, 0, 0, 0, 87, 640, 1, 0, 0, 0, 89, 642, 1, 0, 0, 0, 91, 648, 1, 0, 0, 0, 93, 657, 1, 0, 0, 0, 95, 660, 1, 0, 0, 0, 97, 665, 1, 0, 0, 0, 99, 669, 1, 0, 0, 0, 101, 674, 1, 0, 0, 0, 103, 682, 1, 0, 0, 0, 105, 687, 1, 0, 0, 0, 107, 691, 1, 0, 0, 0, 109, 696, 1, 0, 0, 0, 111, 702, 1, 0, 0, 0, 113, 709, 1, 0, 0, 0, 115, 715, 1, 0, 0, 0, 117, 719, 1, 0, 0, 0, 119, 723, 1, 0, 0, 0, 121, 728, 1, 0, 0, 0, 123, 734, 1, 0, 0, 0, 125, 741, 1, 0, 0, 0, 127, 744, 1, 0, 0, 0, 129, 747, 1, 0, 0, 0, 131, 753, 1, 0, 0, 0, 133, 759, 1, 0, 0, 0, 135, 764, 1, 0, 0, 0, 137, 774, 1, 0, 0, 0, 139, 784, 1, 0, 0, 0, 141, 793, 1, 0, 0, 0, 143, 801, 1, 0, 0, 0, 145, 807, 1, 0, 0, 0, 147, 814, 1, 0, 0, 0, 149, 820, 1, 0, 0, 0, 151, 827, 1, 0, 0, 0, 153, 831, 1, 0, 0, 0, 155, 836, 1, 0, 0, 0, 157, 843, 1, 0, 0, 0, 159, 850, 1, 0, 0, 0, 161, 857, 1, 0, 0, 0, 163, 862, 1, 0, 0, 0, 165, 871, 1, 0, 0, 0, 167, 881, 1, 0, 0, 0, 169, 886, 1, 0, 0, 0, 171, 892, 1, 0, 0, 0, 173, 897, 1, 0, 0, 0, 175, 907, 1, 0, 0, 0, 177, 910, 1, 0, 0, 0, 179, 914, 1, 0, 0, 0, 181, 921, 1, 0, 0, 0, 183, 930, 1, 0, 0, 0, 185, 935, 1, 0, 0, 0, 187, 944, 1, 0, 0, 0, 189, 948, 1, 0, 0, 0, 191, 958, 1, 0, 0, 0, 193, 964, 1, 0, 0, 0, 195, 970, 1, 0, 0, 0, 197, 975, 1, 0, 0, 0, 199, 980, 1, 0, 0, 0, 201, 986, 1, 0, 0, 0, 203, 992, 1, 0, 0, 0, 205, 999, 1, 0, 0, 0, 207, 1014, 1, 0, 0, 0, 209, 1043, 1, 0, 0, 0, 211, 1091, 1, 0, 0, 0, 213, 1169, 1, 0, 0, 0, 215, 1171, 1, 0, 0, 0, 217, 1178, 1, 0, 0, 0, 219, 1182, 1, 0, 0, 0, 221, 1189, 1, 0, 0, 0, 223, 1205, 1, 0, 0, 0, 225, 1207, 1, 0, 0, 0, 227, 1209, 1, 0, 0, 0, 229, 1211, 1, 0, 0, 0, 231, 1213, 1, 0, 0, 0, 233, 1215, 1, 0, 0, 0, 235, 1217, 1, 0, 0, 0, 237, 1219, 1, 0, 0, 0, 239, 1221, 1, 0, 0, 0, 241, 1223, 1, 0, 0, 0, 243, 1225, 1, 0, 0, 0, 245, 1227, 1, 0, 0, 0, 247, 1229, 1, 0, 0, 0, 249, 1231, 1, 0, 0, 0, 251, 1233, 1, 0, 0, 0, 253, 1235, 1, 0, 0, 0, 255, 1237, 1, 0, 0, 0, 257, 1239, 1, 0, 0, 0, 259, 1241, 1, 0, 0, 0, 261, 1243, 1, 0, 0, 0, 263, 1245, 1, 0, 0, 0, 265, 1247, 1, 0, 0, 0, 267, 1249, 1, 0, 0, 0, 269, 1251, 1, 0, 0, 0, 271, 1253, 1, 0, 0, 0, 273, 1255, 1, 0, 0, 0, 275, 1257, 1, 0, 0, 0, 277, 1259, 1, 0, 0, 0, 279, 1261, 1, 0, 0, 0, 281, 1263, 1, 0, 0, 0, 283, 1265, 1, 0, 0, 0, 285, 1268, 1, 0, 0, 0, 287, 1270, 1, 0, 0, 0, 289, 1272, 1, 0, 0, 0, 291, 1274, 1, 0, 0, 0, 293, 1276, 1, 0, 0, 0, 295, 1278, 1, 0, 0, 0, 297, 1281, 1, 0, 0, 0, 299, 1283, 1, 0, 0, 0, 301, 1285, 1, 0, 0, 0, 303, 1287, 1, 0, 0, 0, 305, 1290, 1, 0, 0, 0, 307, 1292, 1, 0, 0, 0, 309, 1295, 1, 0, 0, 0, 311, 1297, 1, 0, 0, 0, 313, 1299, 1, 0, 0, 0, 315, 1302, 1, 0, 0, 0, 317, 1306, 1, 0, 0, 0, 319, 1310, 1, 0, 0, 0, 321, 1312, 1, 0, 0, 0, 323, 1314, 1, 0, 0, 0, 325, 1317, 1, 0, 0, 0, 327, 1323, 1, 0, 0, 0, 329, 1325, 1, 0, 0, 0, 331, 1329, 1, 0, 0, 0, 333, 1332, 1, 0, 0, 0, 335, 1335, 1, 0, 0, 0, 337, 1338, 1, 0, 0, 0, 339, 1340, 1, 0, 0, 0, 341, 1342, 1, 0, 0, 0, 343, 1344, 1, 0, 0, 0, 345, 1346, 1, 0, 0, 0, 347, 1351, 1, 0, 0, 0, 349, 1356, 1, 0, 0, 0, 351, 1358, 1, 0, 0, 0, 353, 1360, 1, 0, 0, 0, 355, 1363, 1, 0, 0, 0, 357, 1367, 1, 0, 0, 0, 359, 1369, 1, 0, 0, 0, 361, 1371, 1, 0, 0, 0, 363, 1373, 1, 0, 0, 0, 365, 1375, 1, 0, 0, 0, 367, 1377, 1, 0, 0, 0, 369, 1395, 1, 0, 0, 0, 371, 1408, 1, 0, 0, 0, 373, 1423, 1, 0, 0, 0, 375, 1427, 1, 0, 0, 0, 377, 1431, 1, 0, 0, 0, 379, 1441, 1, 0, 0, 0, 381, 1445, 1, 0, 0, 0, 383, 384, 3, 223, 110, 0, 384, 385, 3, 245, 121, 0, 385, 386, 3, 245, 121, 0, 386, 4, 1, 0, 0, 0, 387, 388, 3, 223, 110, 0, 388, 389, 3, 249, 123, 0, 389, 390, 3, 229, 113, 0, 390, 6, 1, 0, 0, 0, 391, 392, 3, 223, 110, 0, 392, 393, 3, 249, 123, 0, 393, 394, 3, 261, 129, 0, 394, 395, 3, 239, 118, 0, 395, 8, 1, 0, 0, 0, 396, 397, 3, 223, 110, 0, 397, 398, 3, 249, 123, 0, 398, 399, 3, 271, 134, 0, 399, 10, 1, 0, 0, 0, 400, 401, 3, 223, 110, 0, 401, 402, 3, 257, 127, 0, 402, 403, 3, 257, 127, 0, 403, 404, 3, 223, 110, 0, 404, 405, 3, 271, 134, 0, 405, 12, 1, 0, 0, 0, 406, 407, 3, 223, 110, 0, 407, 408, 3, 259, 128, 0, 408, 14, 1, 0, 0, 0, 409, 410, 3, 223, 110, 0, 410, 411, 3, 259, 128, 0, 411, 412, 3, 227, 112, 0, 412, 424, 1, 0, 0, 0, 413, 414, 3, 223, 110, 0, 414, 415, 3, 259, 128, 0, 415, 416, 3, 227, 112, 0, 416, 417, 3, 231, 114, 0, 417, 418, 3, 249, 123, 0, 418, 419, 3, 229, 113, 0, 419, 420, 3, 239, 118, 0, 420, 421, 3, 249, 123, 0, 421, 422, 3, 235, 116, 0, 422, 424, 1, 0, 0, 0, 423, 409, 1, 0, 0, 0, 423, 413, 1, 0, 0, 0, 424, 16, 1, 0, 0, 0, 425, 426, 3, 223, 110, 0, 426, 427, 3, 259, 128, 0, 427, 428, 3, 251, 124, 0, 428, 429, 3, 233, 115, 0, 429, 18, 1, 0, 0, 0, 430, 431, 3, 225, 111, 0, 431, 432, 3, 231, 114, 0, 432, 433, 3, 261, 129, 0, 433, 434, 3, 267, 132, 0, 434, 435, 3, 231, 114, 0, 435, 436, 3, 231, 114, 0, 436, 437, 3, 249, 123, 0, 437, 20, 1, 0, 0, 0, 438, 439, 3, 225, 111, 0, 439, 440, 3, 251, 124, 0, 440, 441, 3, 261, 129, 0, 441, 442, 3, 237, 117, 0, 442, 22, 1, 0, 0, 0, 443, 444, 3, 225, 111, 0, 444, 445, 3, 271, 134, 0, 445, 24, 1, 0, 0, 0, 446, 447, 3, 227, 112, 0, 447, 448, 3, 223, 110, 0, 448, 449, 3, 259, 128, 0, 449, 450, 3, 231, 114, 0, 450, 26, 1, 0, 0, 0, 451, 452, 3, 227, 112, 0, 452, 453, 3, 223, 110, 0, 453, 454, 3, 259, 128, 0, 454, 455, 3, 261, 129, 0, 455, 28, 1, 0, 0, 0, 456, 457, 3, 227, 112, 0, 457, 458, 3, 223, 110, 0, 458, 459, 3, 261, 129, 0, 459, 460, 3, 227, 112, 0, 460, 461, 3, 237, 117, 0, 461, 30, 1, 0, 0, 0, 462, 463, 3, 227, 112, 0, 463, 464, 3, 251, 124, 0, 464, 465, 3, 237, 117, 0, 465, 466, 3, 251, 124, 0, 466, 467, 3, 257, 127, 0, 467, 468, 3, 261, 129, 0, 468, 32, 1, 0, 0, 0, 469, 470, 3, 227, 112, 0, 470, 471, 3, 251, 124, 0, 471, 472, 3, 245, 121, 0, 472, 473, 3, 245, 121, 0, 473, 474, 3, 223, 110, 0, 474, 475, 3, 261, 129, 0, 475, 476, 3, 231, 114, 0, 476, 34, 1, 0, 0, 0, 477, 478, 3, 227, 112, 0, 478, 479, 3, 257, 127, 0, 479, 480, 3, 251, 124, 0, 480, 481, 3, 259, 128, 0, 481, 482, 3, 259, 128, 0, 482, 36, 1, 0, 0, 0, 483, 484, 3, 227, 112, 0, 484, 485, 3, 263, 130, 0, 485, 486, 3, 225, 111, 0, 486, 487, 3, 231, 114, 0, 487, 38, 1, 0, 0, 0, 488, 489, 3, 227, 112, 0, 489, 490, 3, 263, 130, 0, 490, 491, 3, 257, 127, 0, 491, 492, 3, 257, 127, 0, 492, 493, 3, 231, 114, 0, 493, 494, 3, 249, 123, 0, 494, 495, 3, 261, 129, 0, 495, 40, 1, 0, 0, 0, 496, 497, 3, 229, 113, 0, 497, 498, 3, 223, 110, 0, 498, 499, 3, 261, 129, 0, 499, 500, 3, 231, 114, 0, 500, 42, 1, 0, 0, 0, 501, 502, 3, 229, 113, 0, 502, 503, 3, 223, 110, 0, 503, 504, 3, 271, 134, 0, 504, 44, 1, 0, 0, 0, 505, 506, 3, 229, 113, 0, 506, 507, 3, 231, 114, 0, 507, 508, 3, 259, 128, 0, 508, 509, 3, 227, 112, 0, 509, 46, 1, 0, 0, 0, 510, 511, 3, 229, 113, 0, 511, 512, 3, 231, 114, 0, 512, 513, 3, 259, 128, 0, 513, 514, 3, 227, 112, 0, 514, 515, 3, 231, 114, 0, 515, 516, 3, 249, 123, 0, 516, 517, 3, 229, 113, 0, 517, 518, 3, 239, 118, 0, 518, 519, 3, 249, 123, 0, 519, 520, 3, 235, 116, 0, 520, 48, 1, 0, 0, 0, 521, 522, 3, 229, 113, 0, 522, 523, 3, 239, 118, 0, 523, 524, 3, 259, 128, 0, 524, 525, 3, 261, 129, 0, 525, 526, 3, 239, 118, 0, 526, 527, 3, 249, 123, 0, 527, 528, 3, 227, 112, 0, 528, 529, 3, 261, 129, 0, 529, 50, 1, 0, 0, 0, 530, 531, 3, 231, 114, 0, 531, 532, 3, 245, 121, 0, 532, 533, 3, 259, 128, 0, 533, 534, 3, 231, 114, 0, 534, 52, 1, 0, 0, 0, 535, 536, 3, 231, 114, 0, 536, 537, 3, 249, 123, 0, 537, 538, 3, 229, 113, 0, 538, 54, 1, 0, 0, 0, 539, 540, 3, 231, 114, 0, 540, 541, 3, 269, 133, 0, 541, 542, 3, 261, 129, 0, 542, 543, 3, 257, 127, 0, 543, 544, 3, 223, 110, 0, 544, 545, 3, 227, 112, 0, 545, 546, 3, 261, 129, 0, 546, 56, 1, 0, 0, 0, 547, 548, 3, 233, 115, 0, 548, 549, 3, 239, 118, 0, 549, 550, 3, 249, 123, 0, 550, 551, 3, 223, 110, 0, 551, 552, 3, 245, 121, 0, 552, 58, 1, 0, 0, 0, 553, 554, 3, 233, 115, 0, 554, 555, 3, 239, 118, 0, 555, 556, 3, 249, 123, 0, 556, 557, 3, 223, 110, 0, 557, 558, 3, 245, 121, 0, 558, 559, 3, 245, 121, 0, 559, 560, 3, 271, 134, 0, 560, 60, 1, 0, 0, 0, 561, 562, 3, 233, 115, 0, 562, 563, 3, 239, 118, 0, 563, 564, 3, 257, 127, 0, 564, 565, 3, 259, 128, 0, 565, 566, 3, 261, 129, 0, 566, 62, 1, 0, 0, 0, 567, 568, 3, 233, 115, 0, 568, 569, 3, 249, 123, 0, 569, 64, 1, 0, 0, 0, 570, 571, 3, 233, 115, 0, 571, 572, 3, 251, 124, 0, 572, 573, 3, 245, 121, 0, 573, 574, 3, 245, 121, 0, 574, 575, 3, 251, 124, 0, 575, 576, 3, 267, 132, 0, 576, 577, 3, 239, 118, 0, 577, 578, 3, 249, 123, 0, 578, 579, 3, 235, 116, 0, 579, 66, 1, 0, 0, 0, 580, 581, 3, 233, 115, 0, 581, 582, 3, 251, 124, 0, 582, 583, 3, 257, 127, 0, 583, 68, 1, 0, 0, 0, 584, 585, 3, 233, 115, 0, 585, 586, 3, 257, 127, 0, 586, 587, 3, 251, 124, 0, 587, 588, 3, 247, 122, 0, 588, 70, 1, 0, 0, 0, 589, 590, 3, 233, 115, 0, 590, 591, 3, 263, 130, 0, 591, 592, 3, 245, 121, 0, 592, 593, 3, 245, 121, 0, 593, 72, 1, 0, 0, 0, 594, 595, 3, 235, 116, 0, 595, 596, 3, 257, 127, 0, 596, 597, 3, 251, 124, 0, 597, 598, 3, 263, 130, 0, 598, 599, 3, 253, 125, 0, 599, 74, 1, 0, 0, 0, 600, 601, 3, 237, 117, 0, 601, 602, 3, 223, 110, 0, 602, 603, 3, 265, 131, 0, 603, 604, 3, 239, 118, 0, 604, 605, 3, 249, 123, 0, 605, 606, 3, 235, 116, 0, 606, 76, 1, 0, 0, 0, 607, 608, 3, 237, 117, 0, 608, 609, 3, 251, 124, 0, 609, 610, 3, 263, 130, 0, 610, 611, 3, 257, 127, 0, 611, 78, 1, 0, 0, 0, 612, 613, 3, 239, 118, 0, 613, 614, 3, 229, 113, 0, 614, 80, 1, 0, 0, 0, 615, 616, 3, 239, 118, 0, 616, 617, 3, 233, 115, 0, 617, 82, 1, 0, 0, 0, 618, 619, 3, 239, 118, 0, 619, 620, 3, 245, 121, 0, 620, 621, 3, 239, 118, 0, 621, 622, 3, 243, 120, 0, 622, 623, 3, 231, 114, 0, 623, 84, 1, 0, 0, 0, 624, 625, 3, 239, 118, 0, 625, 626, 3, 249, 123, 0, 626, 86, 1, 0, 0, 0, 627, 628, 3, 239, 118, 0, 628, 629, 3, 249, 123, 0, 629, 630, 3, 233, 115, 0, 630, 641, 1, 0, 0, 0, 631, 632, 3, 239, 118, 0, 632, 633, 3, 249, 123, 0, 633, 634, 3, 233, 115, 0, 634, 635, 3, 239, 118, 0, 635, 636, 3, 249, 123, 0, 636, 637, 3, 239, 118, 0, 637, 638, 3, 261, 129, 0, 638, 639, 3, 271, 134, 0, 639, 641, 1, 0, 0, 0, 640, 627, 1, 0, 0, 0, 640, 631, 1, 0, 0, 0, 641, 88, 1, 0, 0, 0, 642, 643, 3, 239, 118, 0, 643, 644, 3, 249, 123, 0, 644, 645, 3, 249, 123, 0, 645, 646, 3, 231, 114, 0, 646, 647, 3, 257, 127, 0, 647, 90, 1, 0, 0, 0, 648, 649, 3, 239, 118, 0, 649, 650, 3, 249, 123, 0, 650, 651, 3, 261, 129, 0, 651, 652, 3, 231, 114, 0, 652, 653, 3, 257, 127, 0, 653, 654, 3, 265, 131, 0, 654, 655, 3, 223, 110, 0, 655, 656, 3, 245, 121, 0, 656, 92, 1, 0, 0, 0, 657, 658, 3, 239, 118, 0, 658, 659, 3, 259, 128, 0, 659, 94, 1, 0, 0, 0, 660, 661, 3, 241, 119, 0, 661, 662, 3, 251, 124, 0, 662, 663, 3, 239, 118, 0, 663, 664, 3, 249, 123, 0, 664, 96, 1, 0, 0, 0, 665, 666, 3, 243, 120, 0, 666, 667, 3, 231, 114, 0, 667, 668, 3, 271, 134, 0, 668, 98, 1, 0, 0, 0, 669, 670, 3, 245, 121, 0, 670, 671, 3, 223, 110, 0, 671, 672, 3, 259, 128, 0, 672, 673, 3, 261, 129, 0, 673, 100, 1, 0, 0, 0, 674, 675, 3, 245, 121, 0, 675, 676, 3, 231, 114, 0, 676, 677, 3, 223, 110, 0, 677, 678, 3, 229, 113, 0, 678, 679, 3, 239, 118, 0, 679, 680, 3, 249, 123, 0, 680, 681, 3, 235, 116, 0, 681, 102, 1, 0, 0, 0, 682, 683, 3, 245, 121, 0, 683, 684, 3, 231, 114, 0, 684, 685, 3, 233, 115, 0, 685, 686, 3, 261, 129, 0, 686, 104, 1, 0, 0, 0, 687, 688, 3, 245, 121, 0, 688, 689, 3, 231, 114, 0, 689, 690, 3, 261, 129, 0, 690, 106, 1, 0, 0, 0, 691, 692, 3, 245, 121, 0, 692, 693, 3, 239, 118, 0, 693, 694, 3, 243, 120, 0, 694, 695, 3, 231, 114, 0, 695, 108, 1, 0, 0, 0, 696, 697, 3, 245, 121, 0, 697, 698, 3, 239, 118, 0, 698, 699, 3, 247, 122, 0, 699, 700, 3, 239, 118, 0, 700, 701, 3, 261, 129, 0, 701, 110, 1, 0, 0, 0, 702, 703, 3, 247, 122, 0, 703, 704, 3, 239, 118, 0, 704, 705, 3, 249, 123, 0, 705, 706, 3, 263, 130, 0, 706, 707, 3, 261, 129, 0, 707, 708, 3, 231, 114, 0, 708, 112, 1, 0, 0, 0, 709, 710, 3, 247, 122, 0, 710, 711, 3, 251, 124, 0, 711, 712, 3, 249, 123, 0, 712, 713, 3, 261, 129, 0, 713, 714, 3, 237, 117, 0, 714, 114, 1, 0, 0, 0, 715, 716, 3, 249, 123, 0, 716, 717, 3, 223, 110, 0, 717, 718, 3, 249, 123, 0, 718, 116, 1, 0, 0, 0, 719, 720, 3, 249, 123, 0, 720, 721, 3, 251, 124, 0, 721, 722, 3, 261, 129, 0, 722, 118, 1, 0, 0, 0, 723, 724, 3, 249, 123, 0, 724, 725, 3, 263, 130, 0, 725, 726, 3, 245, 121, 0, 726, 727, 3, 245, 121, 0, 727, 120, 1, 0, 0, 0, 728, 729, 3, 249, 123, 0, 729, 730, 3, 263, 130, 0, 730, 731, 3, 245, 121, 0, 731, 732, 3, 245, 121, 0, 732, 733, 3, 259, 128, 0, 733, 122, 1, 0, 0, 0, 734, 735, 3, 251, 124, 0, 735, 736, 3, 233, 115, 0, 736, 737, 3, 233, 115, 0, 737, 738, 3, 259, 128, 0, 738, 739, 3, 231, 114, 0, 739, 740, 3, 261, 129, 0, 740, 124, 1, 0, 0, 0, 741, 742, 3, 251, 124, 0, 742, 743, 3, 249, 123, 0, 743, 126, 1, 0, 0, 0, 744, 745, 3, 251, 124, 0, 745, 746, 3, 257, 127, 0, 746, 128, 1, 0, 0, 0, 747, 748, 3, 251, 124, 0, 748, 749, 3, 257, 127, 0, 749, 750, 3, 229, 113, 0, 750, 751, 3, 231, 114, 0, 751, 752, 3, 257, 127, 0, 752, 130, 1, 0, 0, 0, 753, 754, 3, 251, 124, 0, 754, 755, 3, 263, 130, 0, 755, 756, 3, 261, 129, 0, 756, 757, 3, 231, 114, 0, 757, 758, 3, 257, 127, 0, 758, 132, 1, 0, 0, 0, 759, 760, 3, 251, 124, 0, 760, 761, 3, 265, 131, 0, 761, 762, 3, 231, 114, 0, 762, 763, 3, 257, 127, 0, 763, 134, 1, 0, 0, 0, 764, 765, 3, 253, 125, 0, 765, 766, 3, 223, 110, 0, 766, 767, 3, 257, 127, 0, 767, 768, 3, 261, 129, 0, 768, 769, 3, 239, 118, 0, 769, 770, 3, 261, 129, 0, 770, 771, 3, 239, 118, 0, 771, 772, 3, 251, 124, 0, 772, 773, 3, 249, 123, 0, 773, 136, 1, 0, 0, 0, 774, 775, 3, 253, 125, 0, 775, 776, 3, 257, 127, 0, 776, 777, 3, 231, 114, 0, 777, 778, 3, 227, 112, 0, 778, 779, 3, 231, 114, 0, 779, 780, 3, 229, 113, 0, 780, 781, 3, 239, 118, 0, 781, 782, 3, 249, 123, 0, 782, 783, 3, 235, 116, 0, 783, 138, 1, 0, 0, 0, 784, 785, 3, 253, 125, 0, 785, 786, 3, 257, 127, 0, 786, 787, 3, 231, 114, 0, 787, 788, 3, 267, 132, 0, 788, 789, 3, 237, 117, 0, 789, 790, 3, 231, 114, 0, 790, 791, 3, 257, 127, 0, 791, 792, 3, 231, 114, 0, 792, 140, 1, 0, 0, 0, 793, 794, 3, 255, 126, 0, 794, 795, 3, 263, 130, 0, 795, 796, 3, 223, 110, 0, 796, 797, 3, 257, 127, 0, 797, 798, 3, 261, 129, 0, 798, 799, 3, 231, 114, 0, 799, 800, 3, 257, 127, 0, 800, 142, 1, 0, 0, 0, 801, 802, 3, 257, 127, 0, 802, 803, 3, 223, 110, 0, 803, 804, 3, 249, 123, 0, 804, 805, 3, 235, 116, 0, 805, 806, 3, 231, 114, 0, 806, 144, 1, 0, 0, 0, 807, 808, 3, 257, 127, 0, 808, 809, 3, 231, 114, 0, 809, 810, 3, 261, 129, 0, 810, 811, 3, 263, 130, 0, 811, 812, 3, 257, 127, 0, 812, 813, 3, 249, 123, 0, 813, 146, 1, 0, 0, 0, 814, 815, 3, 257, 127, 0, 815, 816, 3, 239, 118, 0, 816, 817, 3, 235, 116, 0, 817, 818, 3, 237, 117, 0, 818, 819, 3, 261, 129, 0, 819, 148, 1, 0, 0, 0, 820, 821, 3, 257, 127, 0, 821, 822, 3, 251, 124, 0, 822, 823, 3, 245, 121, 0, 823, 824, 3, 245, 121, 0, 824, 825, 3, 263, 130, 0, 825, 826, 3, 253, 125, 0, 826, 150, 1, 0, 0, 0, 827, 828, 3, 257, 127, 0, 828, 829, 3, 251, 124, 0, 829, 830, 3, 267, 132, 0, 830, 152, 1, 0, 0, 0, 831, 832, 3, 257, 127, 0, 832, 833, 3, 251, 124, 0, 833, 834, 3, 267, 132, 0, 834, 835, 3, 259, 128, 0, 835, 154, 1, 0, 0, 0, 836, 837, 3, 259, 128, 0, 837, 838, 3, 223, 110, 0, 838, 839, 3, 247, 122, 0, 839, 840, 3, 253, 125, 0, 840, 841, 3, 245, 121, 0, 841, 842, 3, 231, 114, 0, 842, 156, 1, 0, 0, 0, 843, 844, 3, 259, 128, 0, 844, 845, 3, 231, 114, 0, 845, 846, 3, 227, 112, 0, 846, 847, 3, 251, 124, 0, 847, 848, 3, 249, 123, 0, 848, 849, 3, 229, 113, 0, 849, 158, 1, 0, 0, 0, 850, 851, 3, 259, 128, 0, 851, 852, 3, 231, 114, 0, 852, 853, 3, 245, 121, 0, 853, 854, 3, 231, 114, 0, 854, 855, 3, 227, 112, 0, 855, 856, 3, 261, 129, 0, 856, 160, 1, 0, 0, 0, 857, 858, 3, 259, 128, 0, 858, 859, 3, 231, 114, 0, 859, 860, 3, 247, 122, 0, 860, 861, 3, 239, 118, 0, 861, 162, 1, 0, 0, 0, 862, 863, 3, 259, 128, 0, 863, 864, 3, 231, 114, 0, 864, 865, 3, 261, 129, 0, 865, 866, 3, 261, 129, 0, 866, 867, 3, 239, 118, 0, 867, 868, 3, 249, 123, 0, 868, 869, 3, 235, 116, 0, 869, 870, 3, 259, 128, 0, 870, 164, 1, 0, 0, 0, 871, 872, 3, 259, 128, 0, 872, 873, 3, 263, 130, 0, 873, 874, 3, 225, 111, 0, 874, 875, 3, 259, 128, 0, 875, 876, 3, 261, 129, 0, 876, 877, 3, 257, 127, 0, 877, 878, 3, 239, 118, 0, 878, 879, 3, 249, 123, 0, 879, 880, 3, 235, 116, 0, 880, 166, 1, 0, 0, 0, 881, 882, 3, 261, 129, 0, 882, 883, 3, 237, 117, 0, 883, 884, 3, 231, 114, 0, 884, 885, 3, 249, 123, 0, 885, 168, 1, 0, 0, 0, 886, 887, 3, 261, 129, 0, 887, 888, 3, 237, 117, 0, 888, 889, 3, 257, 127, 0, 889, 890, 3, 251, 124, 0, 890, 891, 3, 267, 132, 0, 891, 170, 1, 0, 0, 0, 892, 893, 3, 261, 129, 0, 893, 894, 3, 239, 118, 0, 894, 895, 3, 231, 114, 0, 895, 896, 3, 259, 128, 0, 896, 172, 1, 0, 0, 0, 897, 898, 3, 261, 129, 0, 898, 899, 3, 239, 118, 0, 899, 900, 3, 247, 122, 0, 900, 901, 3, 231, 114, 0, 901, 902, 3, 259, 128, 0, 902, 903, 3, 261, 129, 0, 903, 904, 3, 223, 110, 0, 904, 905, 3, 247, 122, 0, 905, 906, 3, 253, 125, 0, 906, 174, 1, 0, 0, 0, 907, 908, 3, 261, 129, 0, 908, 909, 3, 251, 124, 0, 909, 176, 1, 0, 0, 0, 910, 911, 3, 261, 129, 0, 911, 912, 3, 251, 124, 0, 912, 913, 3, 253, 125, 0, 913, 178, 1, 0, 0, 0, 914, 915, 3, 261, 129, 0, 915, 916, 3, 251, 124, 0, 916, 917, 3, 261, 129, 0, 917, 918, 3, 223, 110, 0, 918, 919, 3, 245, 121, 0, 919, 920, 3, 259, 128, 0, 920, 180, 1, 0, 0, 0, 921, 922, 3, 261, 129, 0, 922, 923, 3, 257, 127, 0, 923, 924, 3, 223, 110, 0, 924, 925, 3, 239, 118, 0, 925, 926, 3, 245, 121, 0, 926, 927, 3, 239, 118, 0, 927, 928, 3, 249, 123, 0, 928, 929, 3, 235, 116, 0, 929, 182, 1, 0, 0, 0, 930, 931, 3, 261, 129, 0, 931, 932, 3, 257, 127, 0, 932, 933, 3, 239, 118, 0, 933, 934, 3, 247, 122, 0, 934, 184, 1, 0, 0, 0, 935, 936, 3, 261, 129, 0, 936, 937, 3, 257, 127, 0, 937, 938, 3, 263, 130, 0, 938, 939, 3, 249, 123, 0, 939, 940, 3, 227, 112, 0, 940, 941, 3, 223, 110, 0, 941, 942, 3, 261, 129, 0, 942, 943, 3, 231, 114, 0, 943, 186, 1, 0, 0, 0, 944, 945, 3, 261, 129, 0, 945, 946, 3, 257, 127, 0, 946, 947, 3, 271, 134, 0, 947, 188, 1, 0, 0, 0, 948, 949, 3, 263, 130, 0, 949, 950, 3, 249, 123, 0, 950, 951, 3, 225, 111, 0, 951, 952, 3, 251, 124, 0, 952, 953, 3, 263, 130, 0, 953, 954, 3, 249, 123, 0, 954, 955, 3, 229, 113, 0, 955, 956, 3, 231, 114, 0, 956, 957, 3, 229, 113, 0, 957, 190, 1, 0, 0, 0, 958, 959, 3, 263, 130, 0, 959, 960, 3, 249, 123, 0, 960, 961, 3, 239, 118, 0, 961, 962, 3, 251, 124, 0, 962, 963, 3, 249, 123, 0, 963, 192, 1, 0, 0, 0, 964, 965, 3, 263, 130, 0, 965, 966, 3, 259, 128, 0, 966, 967, 3, 239, 118, 0, 967, 968, 3, 249, 123, 0, 968, 969, 3, 235, 116, 0, 969, 194, 1, 0, 0, 0, 970, 971, 3, 267, 132, 0, 971, 972, 3, 231, 114, 0, 972, 973, 3, 231, 114, 0, 973, 974, 3, 243, 120, 0, 974, 196, 1, 0, 0, 0, 975, 976, 3, 267, 132, 0, 976, 977, 3, 237, 117, 0, 977, 978, 3, 231, 114, 0, 978, 979, 3, 249, 123, 0, 979, 198, 1, 0, 0, 0, 980, 981, 3, 267, 132, 0, 981, 982, 3, 237, 117, 0, 982, 983, 3, 231, 114, 0, 983, 984, 3, 257, 127, 0, 984, 985, 3, 231, 114, 0, 985, 200, 1, 0, 0, 0, 986, 987, 3, 267, 132, 0, 987, 988, 3, 237, 117, 0, 988, 989, 3, 239, 118, 0, 989, 990, 3, 245, 121, 0, 990, 991, 3, 231, 114, 0, 991, 202, 1, 0, 0, 0, 992, 993, 3, 267, 132, 0, 993, 994, 3, 239, 118, 0, 994, 995, 3, 249, 123, 0, 995, 996, 3, 229, 113, 0, 996, 997, 3, 251, 124, 0, 997, 998, 3, 267, 132, 0, 998, 204, 1, 0, 0, 0, 999, 1000, 3, 267, 132, 0, 1000, 1001, 3, 239, 118, 0, 1001, 1002, 3, 261, 129, 0, 1002, 1003, 3, 237, 117, 0, 1003, 206, 1, 0, 0, 0, 1004, 1005, 3, 271, 134, 0, 1005, 1006, 3, 231, 114, 0, 1006, 1007, 3, 223, 110, 0, 1007, 1008, 3, 257, 127, 0, 1008, 1015, 1, 0, 0, 0, 1009, 1010, 3, 271, 134, 0, 1010, 1011, 3, 271, 134, 0, 1011, 1012, 3, 271, 134, 0, 1012, 1013, 3, 271, 134, 0, 1013, 1015, 1, 0, 0, 0, 1014, 1004, 1, 0, 0, 0, 1014, 1009, 1, 0, 0, 0, 1015, 208, 1, 0, 0, 0, 1016, 1017, 3, 289, 143, 0, 1017, 1018, 3, 225, 111, 0, 1018, 1044, 1, 0, 0, 0, 1019, 1020, 3, 289, 143, 0, 1020, 1021, 3, 233, 115, 0, 1021, 1044, 1, 0, 0, 0, 1022, 1023, 3, 289, 143, 0, 1023, 1024, 3, 257, 127, 0, 1024, 1044, 1, 0, 0, 0, 1025, 1026, 3, 289, 143, 0, 1026, 1027, 3, 249, 123, 0, 1027, 1044, 1, 0, 0, 0, 1028, 1029, 3, 289, 143, 0, 1029, 1030, 3, 261, 129, 0, 1030, 1044, 1, 0, 0, 0, 1031, 1032, 3, 289, 143, 0, 1032, 1033, 5, 48, 0, 0, 1033, 1044, 1, 0, 0, 0, 1034, 1035, 3, 289, 143, 0, 1035, 1036, 3, 223, 110, 0, 1036, 1044, 1, 0, 0, 0, 1037, 1038, 3, 289, 143, 0, 1038, 1039, 3, 265, 131, 0, 1039, 1044, 1, 0, 0, 0, 1040, 1041, 3, 289, 143, 0, 1041, 1042, 3, 289, 143, 0, 1042, 1044, 1, 0, 0, 0, 1043, 1016, 1, 0, 0, 0, 1043, 1019, 1, 0, 0, 0, 1043, 1022, 1, 0, 0, 0, 1043, 1025, 1, 0, 0, 0, 1043, 1028, 1, 0, 0, 0, 1043, 1031, 1, 0, 0, 0, 1043, 1034, 1, 0, 0, 0, 1043, 1037, 1, 0, 0, 0, 1043, 1040, 1, 0, 0, 0, 1044, 210, 1, 0, 0, 0, 1045, 1049, 3, 275, 136, 0, 1046, 1049, 3, 365, 181, 0, 1047, 1049, 3, 299, 148, 0, 1048, 1045, 1, 0, 0, 0, 1048, 1046, 1, 0, 0, 0, 1048, 1047, 1, 0, 0, 0, 1049, 1056, 1, 0, 0, 0, 1050, 1055, 3, 275, 136, 0, 1051, 1055, 3, 365, 181, 0, 1052, 1055, 3, 279, 138, 0, 1053, 1055, 3, 299, 148, 0, 1054, 1050, 1, 0, 0, 0, 1054, 1051, 1, 0, 0, 0, 1054, 1052, 1, 0, 0, 0, 1054, 1053, 1, 0, 0, 0, 1055, 1058, 1, 0, 0, 0, 1056, 1054, 1, 0, 0, 0, 1056, 1057, 1, 0, 0, 0, 1057, 1092, 1, 0, 0, 0, 1058, 1056, 1, 0, 0, 0, 1059, 1070, 3, 287, 142, 0, 1060, 1069, 8, 0, 0, 0, 1061, 1069, 3, 209, 103, 0, 1062, 1063, 3, 289, 143, 0, 1063, 1064, 3, 349, 173, 0, 1064, 1069, 1, 0, 0, 0, 1065, 1066, 3, 287, 142, 0, 1066, 1067, 3, 287, 142, 0, 1067, 1069, 1, 0, 0, 0, 1068, 1060, 1, 0, 0, 0, 1068, 1061, 1, 0, 0, 0, 1068, 1062, 1, 0, 0, 0, 1068, 1065, 1, 0, 0, 0, 1069, 1072, 1, 0, 0, 0, 1070, 1068, 1, 0, 0, 0, 1070, 1071, 1, 0, 0, 0, 1071, 1073, 1, 0, 0, 0, 1072, 1070, 1, 0, 0, 0, 1073, 1074, 3, 287, 142, 0, 1074, 1092, 1, 0, 0, 0, 1075, 1086, 3, 343, 170, 0, 1076, 1085, 8, 1, 0, 0, 1077, 1085, 3, 209, 103, 0, 1078, 1079, 3, 289, 143, 0, 1079, 1080, 3, 343, 170, 0, 1080, 1085, 1, 0, 0, 0, 1081, 1082, 3, 343, 170, 0, 1082, 1083, 3, 343, 170, 0, 1083, 1085, 1, 0, 0, 0, 1084, 1076, 1, 0, 0, 0, 1084, 1077, 1, 0, 0, 0, 1084, 1078, 1, 0, 0, 0, 1084, 1081, 1, 0, 0, 0, 1085, 1088, 1, 0, 0, 0, 1086, 1084, 1, 0, 0, 0, 1086, 1087, 1, 0, 0, 0, 1087, 1089, 1, 0, 0, 0, 1088, 1086, 1, 0, 0, 0, 1089, 1090, 3, 343, 170, 0, 1090, 1092, 1, 0, 0, 0, 1091, 1048, 1, 0, 0, 0, 1091, 1059, 1, 0, 0, 0, 1091, 1075, 1, 0, 0, 0, 1092, 212, 1, 0, 0, 0, 1093, 1094, 3, 219, 108, 0, 1094, 1098, 3, 301, 149, 0, 1095, 1097, 3, 281, 139, 0, 1096, 1095, 1, 0, 0, 0, 1097, 1100, 1, 0, 0, 0, 1098, 1096, 1, 0, 0, 0, 1098, 1099, 1, 0, 0, 0, 1099, 1103, 1, 0, 0, 0, 1100, 1098, 1, 0, 0, 0, 1101, 1104, 3, 253, 125, 0, 1102, 1104, 3, 231, 114, 0, 1103, 1101, 1, 0, 0, 0, 1103, 1102, 1, 0, 0, 0, 1104, 1107, 1, 0, 0, 0, 1105, 1108, 3, 339, 168, 0, 1106, 1108, 3, 297, 147, 0, 1107, 1105, 1, 0, 0, 0, 1107, 1106, 1, 0, 0, 0, 1107, 1108, 1, 0, 0, 0, 1108, 1110, 1, 0, 0, 0, 1109, 1111, 3, 279, 138, 0, 1110, 1109, 1, 0, 0, 0, 1111, 1112, 1, 0, 0, 0, 1112, 1110, 1, 0, 0, 0, 1112, 1113, 1, 0, 0, 0, 1113, 1170, 1, 0, 0, 0, 1114, 1117, 3, 219, 108, 0, 1115, 1118, 3, 253, 125, 0, 1116, 1118, 3, 231, 114, 0, 1117, 1115, 1, 0, 0, 0, 1117, 1116, 1, 0, 0, 0, 1118, 1121, 1, 0, 0, 0, 1119, 1122, 3, 339, 168, 0, 1120, 1122, 3, 297, 147, 0, 1121, 1119, 1, 0, 0, 0, 1121, 1120, 1, 0, 0, 0, 1121, 1122, 1, 0, 0, 0, 1122, 1124, 1, 0, 0, 0, 1123, 1125, 3, 279, 138, 0, 1124, 1123, 1, 0, 0, 0, 1125, 1126, 1, 0, 0, 0, 1126, 1124, 1, 0, 0, 0, 1126, 1127, 1, 0, 0, 0, 1127, 1170, 1, 0, 0, 0, 1128, 1129, 3, 217, 107, 0, 1129, 1133, 3, 301, 149, 0, 1130, 1132, 3, 279, 138, 0, 1131, 1130, 1, 0, 0, 0, 1132, 1135, 1, 0, 0, 0, 1133, 1131, 1, 0, 0, 0, 1133, 1134, 1, 0, 0, 0, 1134, 1136, 1, 0, 0, 0, 1135, 1133, 1, 0, 0, 0, 1136, 1139, 3, 231, 114, 0, 1137, 1140, 3, 339, 168, 0, 1138, 1140, 3, 297, 147, 0, 1139, 1137, 1, 0, 0, 0, 1139, 1138, 1, 0, 0, 0, 1139, 1140, 1, 0, 0, 0, 1140, 1142, 1, 0, 0, 0, 1141, 1143, 3, 279, 138, 0, 1142, 1141, 1, 0, 0, 0, 1143, 1144, 1, 0, 0, 0, 1144, 1142, 1, 0, 0, 0, 1144, 1145, 1, 0, 0, 0, 1145, 1170, 1, 0, 0, 0, 1146, 1147, 3, 301, 149, 0, 1147, 1148, 3, 217, 107, 0, 1148, 1151, 3, 231, 114, 0, 1149, 1152, 3, 339, 168, 0, 1150, 1152, 3, 297, 147, 0, 1151, 1149, 1, 0, 0, 0, 1151, 1150, 1, 0, 0, 0, 1151, 1152, 1, 0, 0, 0, 1152, 1154, 1, 0, 0, 0, 1153, 1155, 3, 279, 138, 0, 1154, 1153, 1, 0, 0, 0, 1155, 1156, 1, 0, 0, 0, 1156, 1154, 1, 0, 0, 0, 1156, 1157, 1, 0, 0, 0, 1157, 1170, 1, 0, 0, 0, 1158, 1159, 3, 217, 107, 0, 1159, 1162, 3, 231, 114, 0, 1160, 1163, 3, 339, 168, 0, 1161, 1163, 3, 297, 147, 0, 1162, 1160, 1, 0, 0, 0, 1162, 1161, 1, 0, 0, 0, 1162, 1163, 1, 0, 0, 0, 1163, 1165, 1, 0, 0, 0, 1164, 1166, 3, 279, 138, 0, 1165, 1164, 1, 0, 0, 0, 1166, 1167, 1, 0, 0, 0, 1167, 1165, 1, 0, 0, 0, 1167, 1168, 1, 0, 0, 0, 1168, 1170, 1, 0, 0, 0, 1169, 1093, 1, 0, 0, 0, 1169, 1114, 1, 0, 0, 0, 1169, 1128, 1, 0, 0, 0, 1169, 1146, 1, 0, 0, 0, 1169, 1158, 1, 0, 0, 0, 1170, 214, 1, 0, 0, 0, 1171, 1173, 5, 48, 0, 0, 1172, 1174, 3, 277, 137, 0, 1173, 1172, 1, 0, 0, 0, 1174, 1175, 1, 0, 0, 0, 1175, 1173, 1, 0, 0, 0, 1175, 1176, 1, 0, 0, 0, 1176, 216, 1, 0, 0, 0, 1177, 1179, 3, 279, 138, 0, 1178, 1177, 1, 0, 0, 0, 1179, 1180, 1, 0, 0, 0, 1180, 1178, 1, 0, 0, 0, 1180, 1181, 1, 0, 0, 0, 1181, 218, 1, 0, 0, 0, 1182, 1183, 5, 48, 0, 0, 1183, 1185, 3, 269, 133, 0, 1184, 1186, 3, 281, 139, 0, 1185, 1184, 1, 0, 0, 0, 1186, 1187, 1, 0, 0, 0, 1187, 1185, 1, 0, 0, 0, 1187, 1188, 1, 0, 0, 0, 1188, 220, 1, 0, 0, 0, 1189, 1200, 3, 349, 173, 0, 1190, 1199, 8, 2, 0, 0, 1191, 1199, 3, 209, 103, 0, 1192, 1193, 3, 289, 143, 0, 1193, 1194, 3, 349, 173, 0, 1194, 1199, 1, 0, 0, 0, 1195, 1196, 3, 349, 173, 0, 1196, 1197, 3, 349, 173, 0, 1197, 1199, 1, 0, 0, 0, 1198, 1190, 1, 0, 0, 0, 1198, 1191, 1, 0, 0, 0, 1198, 1192, 1, 0, 0, 0, 1198, 1195, 1, 0, 0, 0, 1199, 1202, 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1201, 1, 0, 0, 0, 1201, 1203, 1, 0, 0, 0, 1202, 1200, 1, 0, 0, 0, 1203, 1204, 3, 349, 173, 0, 1204, 222, 1, 0, 0, 0, 1205, 1206, 7, 3, 0, 0, 1206, 224, 1, 0, 0, 0, 1207, 1208, 7, 4, 0, 0, 1208, 226, 1, 0, 0, 0, 1209, 1210, 7, 5, 0, 0, 1210, 228, 1, 0, 0, 0, 1211, 1212, 7, 6, 0, 0, 1212, 230, 1, 0, 0, 0, 1213, 1214, 7, 7, 0, 0, 1214, 232, 1, 0, 0, 0, 1215, 1216, 7, 8, 0, 0, 1216, 234, 1, 0, 0, 0, 1217, 1218, 7, 9, 0, 0, 1218, 236, 1, 0, 0, 0, 1219, 1220, 7, 10, 0, 0, 1220, 238, 1, 0, 0, 0, 1221, 1222, 7, 11, 0, 0, 1222, 240, 1, 0, 0, 0, 1223, 1224, 7, 12, 0, 0, 1224, 242, 1, 0, 0, 0, 1225, 1226, 7, 13, 0, 0, 1226, 244, 1, 0, 0, 0, 1227, 1228, 7, 14, 0, 0, 1228, 246, 1, 0, 0, 0, 1229, 1230, 7, 15, 0, 0, 1230, 248, 1, 0, 0, 0, 1231, 1232, 7, 16, 0, 0, 1232, 250, 1, 0, 0, 0, 1233, 1234, 7, 17, 0, 0, 1234, 252, 1, 0, 0, 0, 1235, 1236, 7, 18, 0, 0, 1236, 254, 1, 0, 0, 0, 1237, 1238, 7, 19, 0, 0, 1238, 256, 1, 0, 0, 0, 1239, 1240, 7, 20, 0, 0, 1240, 258, 1, 0, 0, 0, 1241, 1242, 7, 21, 0, 0, 1242, 260, 1, 0, 0, 0, 1243, 1244, 7, 22, 0, 0, 1244, 262, 1, 0, 0, 0, 1245, 1246, 7, 23, 0, 0, 1246, 264, 1, 0, 0, 0, 1247, 1248, 7, 24, 0, 0, 1248, 266, 1, 0, 0, 0, 1249, 1250, 7, 25, 0, 0, 1250, 268, 1, 0, 0, 0, 1251, 1252, 7, 26, 0, 0, 1252, 270, 1, 0, 0, 0, 1253, 1254, 7, 27, 0, 0, 1254, 272, 1, 0, 0, 0, 1255, 1256, 7, 28, 0, 0, 1256, 274, 1, 0, 0, 0, 1257, 1258, 7, 29, 0, 0, 1258, 276, 1, 0, 0, 0, 1259, 1260, 7, 30, 0, 0, 1260, 278, 1, 0, 0, 0, 1261, 1262, 7, 31, 0, 0, 1262, 280, 1, 0, 0, 0, 1263, 1264, 7, 32, 0, 0, 1264, 282, 1, 0, 0, 0, 1265, 1266, 5, 45, 0, 0, 1266, 1267, 5, 62, 0, 0, 1267, 284, 1, 0, 0, 0, 1268, 1269, 5, 42, 0, 0, 1269, 286, 1, 0, 0, 0, 1270, 1271, 5, 96, 0, 0, 1271, 288, 1, 0, 0, 0, 1272, 1273, 5, 92, 0, 0, 1273, 290, 1, 0, 0, 0, 1274, 1275, 5, 58, 0, 0, 1275, 292, 1, 0, 0, 0, 1276, 1277, 5, 44, 0, 0, 1277, 294, 1, 0, 0, 0, 1278, 1279, 5, 124, 0, 0, 1279, 1280, 5, 124, 0, 0, 1280, 296, 1, 0, 0, 0, 1281, 1282, 5, 45, 0, 0, 1282, 298, 1, 0, 0, 0, 1283, 1284, 5, 36, 0, 0, 1284, 300, 1, 0, 0, 0, 1285, 1286, 5, 46, 0, 0, 1286, 302, 1, 0, 0, 0, 1287, 1288, 5, 61, 0, 0, 1288, 1289, 5, 61, 0, 0, 1289, 304, 1, 0, 0, 0, 1290, 1291, 5, 61, 0, 0, 1291, 306, 1, 0, 0, 0, 1292, 1293, 5, 62, 0, 0, 1293, 1294, 5, 61, 0, 0, 1294, 308, 1, 0, 0, 0, 1295, 1296, 5, 62, 0, 0, 1296, 310, 1, 0, 0, 0, 1297, 1298, 5, 35, 0, 0, 1298, 312, 1, 0, 0, 0, 1299, 1300, 5, 126, 0, 0, 1300, 1301, 5, 42, 0, 0, 1301, 314, 1, 0, 0, 0, 1302, 1303, 5, 61, 0, 0, 1303, 1304, 5, 126, 0, 0, 1304, 1305, 5, 42, 0, 0, 1305, 316, 1, 0, 0, 0, 1306, 1307, 5, 123, 0, 0, 1307, 1308, 1, 0, 0, 0, 1308, 1309, 6, 157, 0, 0, 1309, 318, 1, 0, 0, 0, 1310, 1311, 5, 91, 0, 0, 1311, 320, 1, 0, 0, 0, 1312, 1313, 5, 40, 0, 0, 1313, 322, 1, 0, 0, 0, 1314, 1315, 5, 60, 0, 0, 1315, 1316, 5, 61, 0, 0, 1316, 324, 1, 0, 0, 0, 1317, 1318, 5, 60, 0, 0, 1318, 326, 1, 0, 0, 0, 1319, 1320, 5, 33, 0, 0, 1320, 1324, 5, 61, 0, 0, 1321, 1322, 5, 60, 0, 0, 1322, 1324, 5, 62, 0, 0, 1323, 1319, 1, 0, 0, 0, 1323, 1321, 1, 0, 0, 0, 1324, 328, 1, 0, 0, 0, 1325, 1326, 5, 33, 0, 0, 1326, 1327, 5, 126, 0, 0, 1327, 1328, 5, 42, 0, 0, 1328, 330, 1, 0, 0, 0, 1329, 1330, 5, 33, 0, 0, 1330, 1331, 5, 126, 0, 0, 1331, 332, 1, 0, 0, 0, 1332, 1333, 5, 63, 0, 0, 1333, 1334, 5, 46, 0, 0, 1334, 334, 1, 0, 0, 0, 1335, 1336, 5, 63, 0, 0, 1336, 1337, 5, 63, 0, 0, 1337, 336, 1, 0, 0, 0, 1338, 1339, 5, 37, 0, 0, 1339, 338, 1, 0, 0, 0, 1340, 1341, 5, 43, 0, 0, 1341, 340, 1, 0, 0, 0, 1342, 1343, 5, 63, 0, 0, 1343, 342, 1, 0, 0, 0, 1344, 1345, 5, 34, 0, 0, 1345, 344, 1, 0, 0, 0, 1346, 1347, 5, 102, 0, 0, 1347, 1348, 5, 39, 0, 0, 1348, 1349, 1, 0, 0, 0, 1349, 1350, 6, 171, 1, 0, 1350, 346, 1, 0, 0, 0, 1351, 1352, 5, 70, 0, 0, 1352, 1353, 5, 39, 0, 0, 1353, 1354, 1, 0, 0, 0, 1354, 1355, 6, 172, 2, 0, 1355, 348, 1, 0, 0, 0, 1356, 1357, 5, 39, 0, 0, 1357, 350, 1, 0, 0, 0, 1358, 1359, 5, 126, 0, 0, 1359, 352, 1, 0, 0, 0, 1360, 1361, 5, 61, 0, 0, 1361, 1362, 5, 126, 0, 0, 1362, 354, 1, 0, 0, 0, 1363, 1364, 5, 125, 0, 0, 1364, 1365, 1, 0, 0, 0, 1365, 1366, 6, 176, 3, 0, 1366, 356, 1, 0, 0, 0, 1367, 1368, 5, 93, 0, 0, 1368, 358, 1, 0, 0, 0, 1369, 1370, 5, 41, 0, 0, 1370, 360, 1, 0, 0, 0, 1371, 1372, 5, 59, 0, 0, 1372, 362, 1, 0, 0, 0, 1373, 1374, 5, 47, 0, 0, 1374, 364, 1, 0, 0, 0, 1375, 1376, 5, 95, 0, 0, 1376, 366, 1, 0, 0, 0, 1377, 1378, 5, 47, 0, 0, 1378, 1379, 5, 42, 0, 0, 1379, 1383, 1, 0, 0, 0, 1380, 1382, 9, 0, 0, 0, 1381, 1380, 1, 0, 0, 0, 1382, 1385, 1, 0, 0, 0, 1383, 1384, 1, 0, 0, 0, 1383, 1381, 1, 0, 0, 0, 1384, 1386, 1, 0, 0, 0, 1385, 1383, 1, 0, 0, 0, 1386, 1387, 5, 42, 0, 0, 1387, 1388, 5, 47, 0, 0, 1388, 1389, 1, 0, 0, 0, 1389, 1390, 6, 182, 4, 0, 1390, 368, 1, 0, 0, 0, 1391, 1392, 5, 45, 0, 0, 1392, 1396, 5, 45, 0, 0, 1393, 1394, 5, 47, 0, 0, 1394, 1396, 5, 47, 0, 0, 1395, 1391, 1, 0, 0, 0, 1395, 1393, 1, 0, 0, 0, 1396, 1400, 1, 0, 0, 0, 1397, 1399, 8, 33, 0, 0, 1398, 1397, 1, 0, 0, 0, 1399, 1402, 1, 0, 0, 0, 1400, 1398, 1, 0, 0, 0, 1400, 1401, 1, 0, 0, 0, 1401, 1404, 1, 0, 0, 0, 1402, 1400, 1, 0, 0, 0, 1403, 1405, 7, 34, 0, 0, 1404, 1403, 1, 0, 0, 0, 1405, 1406, 1, 0, 0, 0, 1406, 1407, 6, 183, 4, 0, 1407, 370, 1, 0, 0, 0, 1408, 1409, 7, 35, 0, 0, 1409, 1410, 1, 0, 0, 0, 1410, 1411, 6, 184, 5, 0, 1411, 372, 1, 0, 0, 0, 1412, 1424, 8, 36, 0, 0, 1413, 1424, 3, 209, 103, 0, 1414, 1415, 3, 289, 143, 0, 1415, 1416, 3, 349, 173, 0, 1416, 1424, 1, 0, 0, 0, 1417, 1418, 3, 289, 143, 0, 1418, 1419, 3, 317, 157, 0, 1419, 1424, 1, 0, 0, 0, 1420, 1421, 3, 349, 173, 0, 1421, 1422, 3, 349, 173, 0, 1422, 1424, 1, 0, 0, 0, 1423, 1412, 1, 0, 0, 0, 1423, 1413, 1, 0, 0, 0, 1423, 1414, 1, 0, 0, 0, 1423, 1417, 1, 0, 0, 0, 1423, 1420, 1, 0, 0, 0, 1424, 1425, 1, 0, 0, 0, 1425, 1423, 1, 0, 0, 0, 1425, 1426, 1, 0, 0, 0, 1426, 374, 1, 0, 0, 0, 1427, 1428, 3, 317, 157, 0, 1428, 1429, 1, 0, 0, 0, 1429, 1430, 6, 186, 0, 0, 1430, 376, 1, 0, 0, 0, 1431, 1432, 3, 349, 173, 0, 1432, 1433, 1, 0, 0, 0, 1433, 1434, 6, 187, 6, 0, 1434, 1435, 6, 187, 3, 0, 1435, 378, 1, 0, 0, 0, 1436, 1442, 8, 37, 0, 0, 1437, 1442, 3, 209, 103, 0, 1438, 1439, 3, 289, 143, 0, 1439, 1440, 3, 317, 157, 0, 1440, 1442, 1, 0, 0, 0, 1441, 1436, 1, 0, 0, 0, 1441, 1437, 1, 0, 0, 0, 1441, 1438, 1, 0, 0, 0, 1442, 1443, 1, 0, 0, 0, 1443, 1441, 1, 0, 0, 0, 1443, 1444, 1, 0, 0, 0, 1444, 380, 1, 0, 0, 0, 1445, 1446, 3, 317, 157, 0, 1446, 1447, 1, 0, 0, 0, 1447, 1448, 6, 189, 0, 0, 1448, 382, 1, 0, 0, 0, 44, 0, 1, 2, 423, 640, 1014, 1043, 1048, 1054, 1056, 1068, 1070, 1084, 1086, 1091, 1098, 1103, 1107, 1112, 1117, 1121, 1126, 1133, 1139, 1144, 1151, 1156, 1162, 1167, 1169, 1175, 1180, 1187, 1198, 1200, 1323, 1383, 1395, 1400, 1404, 1423, 1425, 1441, 1443, 7, 5, 0, 0, 5, 1, 0, 5, 2, 0, 4, 0, 0, 6, 0, 0, 0, 1, 0, 7, 144, 0] \ No newline at end of file diff --git a/posthog/hogql/grammar/HogQLLexer.py b/posthog/hogql/grammar/HogQLLexer.py index 1460cefdcd0e4..1ce68bc24a643 100644 --- a/posthog/hogql/grammar/HogQLLexer.py +++ b/posthog/hogql/grammar/HogQLLexer.py @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,0,155,1417,6,-1,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4, + 4,0,159,1449,6,-1,6,-1,6,-1,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, @@ -41,533 +41,546 @@ def serializedATN(): 7,168,2,169,7,169,2,170,7,170,2,171,7,171,2,172,7,172,2,173,7,173, 2,174,7,174,2,175,7,175,2,176,7,176,2,177,7,177,2,178,7,178,2,179, 7,179,2,180,7,180,2,181,7,181,2,182,7,182,2,183,7,183,2,184,7,184, - 2,185,7,185,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2, - 1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,6, - 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,416,8,6,1,7,1,7, - 1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9, - 1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12, - 1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14, - 1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16, - 1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18, - 1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21, - 1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22, - 1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,25, - 1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26, - 1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29, - 1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,31, - 1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33, - 1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,1,36, - 1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39, - 1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40, - 1,40,3,40,619,8,40,1,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42, - 1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,44,1,44,1,44,1,44, - 1,44,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,47, - 1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49, - 1,49,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,52, - 1,52,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,54, - 1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,57, - 1,57,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,59, - 1,59,1,59,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,61,1,61,1,62,1,62, - 1,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64, - 1,64,1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65, - 1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,67, - 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,68,1,68, - 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70, - 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,73,1,73, - 1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75, - 1,75,1,75,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,77,1,77, - 1,77,1,77,1,77,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79, - 1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,80,1,80,1,80,1,80, - 1,80,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,82,1,82, - 1,82,1,82,1,82,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,85,1,85,1,85, - 1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86, - 1,87,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1,88,1,88,1,88,1,88,1,88, - 1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,90,1,90, - 1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,91,1,91,1,92,1,92,1,92, - 1,92,1,92,1,93,1,93,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1,94,1,94, - 1,95,1,95,1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,96,1,96,1,96, - 1,97,1,97,1,97,1,97,1,97,1,98,1,98,1,98,1,98,1,98,1,98,1,98,1,98, - 1,98,1,98,3,98,983,8,98,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99, - 1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99, - 1,99,1,99,1,99,1,99,1,99,1,99,3,99,1012,8,99,1,100,1,100,1,100,3, - 100,1017,8,100,1,100,1,100,1,100,1,100,5,100,1023,8,100,10,100,12, - 100,1026,9,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1, - 100,5,100,1037,8,100,10,100,12,100,1040,9,100,1,100,1,100,1,100, - 1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,5,100,1053,8,100, - 10,100,12,100,1056,9,100,1,100,1,100,3,100,1060,8,100,1,101,1,101, - 1,101,5,101,1065,8,101,10,101,12,101,1068,9,101,1,101,1,101,3,101, - 1072,8,101,1,101,1,101,3,101,1076,8,101,1,101,4,101,1079,8,101,11, - 101,12,101,1080,1,101,1,101,1,101,3,101,1086,8,101,1,101,1,101,3, - 101,1090,8,101,1,101,4,101,1093,8,101,11,101,12,101,1094,1,101,1, - 101,1,101,5,101,1100,8,101,10,101,12,101,1103,9,101,1,101,1,101, - 1,101,3,101,1108,8,101,1,101,4,101,1111,8,101,11,101,12,101,1112, - 1,101,1,101,1,101,1,101,1,101,3,101,1120,8,101,1,101,4,101,1123, - 8,101,11,101,12,101,1124,1,101,1,101,1,101,1,101,3,101,1131,8,101, - 1,101,4,101,1134,8,101,11,101,12,101,1135,3,101,1138,8,101,1,102, - 1,102,4,102,1142,8,102,11,102,12,102,1143,1,103,4,103,1147,8,103, - 11,103,12,103,1148,1,104,1,104,1,104,4,104,1154,8,104,11,104,12, - 104,1155,1,105,1,105,1,105,1,105,1,105,1,105,1,105,1,105,1,105,5, - 105,1167,8,105,10,105,12,105,1170,9,105,1,105,1,105,1,106,1,106, - 1,107,1,107,1,108,1,108,1,109,1,109,1,110,1,110,1,111,1,111,1,112, - 1,112,1,113,1,113,1,114,1,114,1,115,1,115,1,116,1,116,1,117,1,117, - 1,118,1,118,1,119,1,119,1,120,1,120,1,121,1,121,1,122,1,122,1,123, - 1,123,1,124,1,124,1,125,1,125,1,126,1,126,1,127,1,127,1,128,1,128, - 1,129,1,129,1,130,1,130,1,131,1,131,1,132,1,132,1,133,1,133,1,134, - 1,134,1,135,1,135,1,136,1,136,1,136,1,137,1,137,1,138,1,138,1,139, - 1,139,1,140,1,140,1,141,1,141,1,142,1,142,1,142,1,143,1,143,1,144, - 1,144,1,145,1,145,1,146,1,146,1,146,1,147,1,147,1,148,1,148,1,148, - 1,149,1,149,1,150,1,150,1,151,1,151,1,151,1,152,1,152,1,152,1,152, - 1,153,1,153,1,153,1,153,1,154,1,154,1,155,1,155,1,156,1,156,1,156, - 1,157,1,157,1,158,1,158,1,158,1,158,3,158,1292,8,158,1,159,1,159, - 1,159,1,159,1,160,1,160,1,160,1,161,1,161,1,161,1,162,1,162,1,162, - 1,163,1,163,1,164,1,164,1,165,1,165,1,166,1,166,1,167,1,167,1,167, - 1,167,1,167,1,168,1,168,1,168,1,168,1,168,1,169,1,169,1,170,1,170, - 1,171,1,171,1,171,1,172,1,172,1,172,1,172,1,173,1,173,1,174,1,174, - 1,175,1,175,1,176,1,176,1,177,1,177,1,178,1,178,1,178,1,178,5,178, - 1350,8,178,10,178,12,178,1353,9,178,1,178,1,178,1,178,1,178,1,178, - 1,179,1,179,1,179,1,179,3,179,1364,8,179,1,179,5,179,1367,8,179, - 10,179,12,179,1370,9,179,1,179,3,179,1373,8,179,1,179,1,179,1,180, - 1,180,1,180,1,180,1,181,1,181,1,181,1,181,1,181,1,181,1,181,1,181, - 1,181,1,181,1,181,4,181,1392,8,181,11,181,12,181,1393,1,182,1,182, - 1,182,1,182,1,183,1,183,1,183,1,183,1,183,1,184,1,184,1,184,1,184, - 1,184,4,184,1410,8,184,11,184,12,184,1411,1,185,1,185,1,185,1,185, - 1,1351,0,186,3,1,5,2,7,3,9,4,11,5,13,6,15,7,17,8,19,9,21,10,23,11, - 25,12,27,13,29,14,31,15,33,16,35,17,37,18,39,19,41,20,43,21,45,22, - 47,23,49,24,51,25,53,26,55,27,57,28,59,29,61,30,63,31,65,32,67,33, - 69,34,71,35,73,36,75,37,77,38,79,39,81,40,83,41,85,42,87,43,89,44, - 91,45,93,46,95,47,97,48,99,49,101,50,103,51,105,52,107,53,109,54, - 111,55,113,56,115,57,117,58,119,59,121,60,123,61,125,62,127,63,129, - 64,131,65,133,66,135,67,137,68,139,69,141,70,143,71,145,72,147,73, - 149,74,151,75,153,76,155,77,157,78,159,79,161,80,163,81,165,82,167, - 83,169,84,171,85,173,86,175,87,177,88,179,89,181,90,183,91,185,92, - 187,93,189,94,191,95,193,96,195,97,197,98,199,99,201,100,203,101, - 205,102,207,103,209,104,211,105,213,106,215,0,217,0,219,0,221,0, - 223,0,225,0,227,0,229,0,231,0,233,0,235,0,237,0,239,0,241,0,243, - 0,245,0,247,0,249,0,251,0,253,0,255,0,257,0,259,0,261,0,263,0,265, - 0,267,0,269,0,271,0,273,0,275,107,277,108,279,109,281,110,283,111, - 285,112,287,113,289,114,291,115,293,116,295,117,297,118,299,119, - 301,120,303,121,305,122,307,123,309,124,311,125,313,126,315,127, - 317,128,319,129,321,130,323,131,325,132,327,133,329,134,331,135, - 333,136,335,137,337,138,339,139,341,140,343,141,345,142,347,143, - 349,144,351,145,353,146,355,147,357,148,359,149,361,150,363,151, - 365,152,367,153,369,0,371,154,373,155,3,0,1,2,38,2,0,92,92,96,96, - 2,0,34,34,92,92,2,0,39,39,92,92,2,0,65,65,97,97,2,0,66,66,98,98, - 2,0,67,67,99,99,2,0,68,68,100,100,2,0,69,69,101,101,2,0,70,70,102, - 102,2,0,71,71,103,103,2,0,72,72,104,104,2,0,73,73,105,105,2,0,74, - 74,106,106,2,0,75,75,107,107,2,0,76,76,108,108,2,0,77,77,109,109, - 2,0,78,78,110,110,2,0,79,79,111,111,2,0,80,80,112,112,2,0,81,81, - 113,113,2,0,82,82,114,114,2,0,83,83,115,115,2,0,84,84,116,116,2, - 0,85,85,117,117,2,0,86,86,118,118,2,0,87,87,119,119,2,0,88,88,120, - 120,2,0,89,89,121,121,2,0,90,90,122,122,2,0,65,90,97,122,1,0,48, - 55,1,0,48,57,3,0,48,57,65,70,97,102,2,0,10,10,13,13,2,1,10,10,13, - 13,2,0,9,13,32,32,3,0,39,39,92,92,123,123,1,0,123,123,1453,0,3,1, - 0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0, - 0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0, - 0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0, - 0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0, - 0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0, - 0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0, - 0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0, - 0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0, - 0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0, - 0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1, - 0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0, - 113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0, - 0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131, - 1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0, - 0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1, - 0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0, - 159,1,0,0,0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0, - 0,0,0,169,1,0,0,0,0,171,1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177, - 1,0,0,0,0,179,1,0,0,0,0,181,1,0,0,0,0,183,1,0,0,0,0,185,1,0,0,0, - 0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0,0,0,0,193,1,0,0,0,0,195,1, - 0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,201,1,0,0,0,0,203,1,0,0,0,0, - 205,1,0,0,0,0,207,1,0,0,0,0,209,1,0,0,0,0,211,1,0,0,0,0,213,1,0, - 0,0,0,275,1,0,0,0,0,277,1,0,0,0,0,279,1,0,0,0,0,281,1,0,0,0,0,283, - 1,0,0,0,0,285,1,0,0,0,0,287,1,0,0,0,0,289,1,0,0,0,0,291,1,0,0,0, - 0,293,1,0,0,0,0,295,1,0,0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301,1, - 0,0,0,0,303,1,0,0,0,0,305,1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0, - 311,1,0,0,0,0,313,1,0,0,0,0,315,1,0,0,0,0,317,1,0,0,0,0,319,1,0, - 0,0,0,321,1,0,0,0,0,323,1,0,0,0,0,325,1,0,0,0,0,327,1,0,0,0,0,329, - 1,0,0,0,0,331,1,0,0,0,0,333,1,0,0,0,0,335,1,0,0,0,0,337,1,0,0,0, - 0,339,1,0,0,0,0,341,1,0,0,0,0,343,1,0,0,0,0,345,1,0,0,0,0,347,1, - 0,0,0,0,349,1,0,0,0,0,351,1,0,0,0,0,353,1,0,0,0,0,355,1,0,0,0,0, - 357,1,0,0,0,0,359,1,0,0,0,0,361,1,0,0,0,0,363,1,0,0,0,1,365,1,0, - 0,0,1,367,1,0,0,0,1,369,1,0,0,0,2,371,1,0,0,0,2,373,1,0,0,0,3,375, - 1,0,0,0,5,379,1,0,0,0,7,383,1,0,0,0,9,388,1,0,0,0,11,392,1,0,0,0, - 13,398,1,0,0,0,15,415,1,0,0,0,17,417,1,0,0,0,19,422,1,0,0,0,21,430, - 1,0,0,0,23,435,1,0,0,0,25,438,1,0,0,0,27,443,1,0,0,0,29,448,1,0, - 0,0,31,455,1,0,0,0,33,463,1,0,0,0,35,469,1,0,0,0,37,474,1,0,0,0, - 39,482,1,0,0,0,41,487,1,0,0,0,43,491,1,0,0,0,45,496,1,0,0,0,47,507, - 1,0,0,0,49,516,1,0,0,0,51,521,1,0,0,0,53,525,1,0,0,0,55,533,1,0, - 0,0,57,539,1,0,0,0,59,545,1,0,0,0,61,548,1,0,0,0,63,558,1,0,0,0, - 65,562,1,0,0,0,67,567,1,0,0,0,69,572,1,0,0,0,71,578,1,0,0,0,73,585, - 1,0,0,0,75,590,1,0,0,0,77,593,1,0,0,0,79,596,1,0,0,0,81,602,1,0, - 0,0,83,618,1,0,0,0,85,620,1,0,0,0,87,626,1,0,0,0,89,635,1,0,0,0, - 91,638,1,0,0,0,93,643,1,0,0,0,95,647,1,0,0,0,97,652,1,0,0,0,99,660, - 1,0,0,0,101,665,1,0,0,0,103,669,1,0,0,0,105,674,1,0,0,0,107,680, - 1,0,0,0,109,687,1,0,0,0,111,693,1,0,0,0,113,697,1,0,0,0,115,701, - 1,0,0,0,117,706,1,0,0,0,119,712,1,0,0,0,121,719,1,0,0,0,123,722, - 1,0,0,0,125,725,1,0,0,0,127,731,1,0,0,0,129,737,1,0,0,0,131,742, - 1,0,0,0,133,752,1,0,0,0,135,762,1,0,0,0,137,771,1,0,0,0,139,779, - 1,0,0,0,141,785,1,0,0,0,143,792,1,0,0,0,145,798,1,0,0,0,147,805, - 1,0,0,0,149,809,1,0,0,0,151,814,1,0,0,0,153,821,1,0,0,0,155,828, - 1,0,0,0,157,835,1,0,0,0,159,840,1,0,0,0,161,849,1,0,0,0,163,859, - 1,0,0,0,165,864,1,0,0,0,167,869,1,0,0,0,169,879,1,0,0,0,171,882, - 1,0,0,0,173,886,1,0,0,0,175,893,1,0,0,0,177,902,1,0,0,0,179,907, - 1,0,0,0,181,916,1,0,0,0,183,926,1,0,0,0,185,932,1,0,0,0,187,938, - 1,0,0,0,189,943,1,0,0,0,191,948,1,0,0,0,193,954,1,0,0,0,195,960, - 1,0,0,0,197,967,1,0,0,0,199,982,1,0,0,0,201,1011,1,0,0,0,203,1059, - 1,0,0,0,205,1137,1,0,0,0,207,1139,1,0,0,0,209,1146,1,0,0,0,211,1150, - 1,0,0,0,213,1157,1,0,0,0,215,1173,1,0,0,0,217,1175,1,0,0,0,219,1177, - 1,0,0,0,221,1179,1,0,0,0,223,1181,1,0,0,0,225,1183,1,0,0,0,227,1185, - 1,0,0,0,229,1187,1,0,0,0,231,1189,1,0,0,0,233,1191,1,0,0,0,235,1193, - 1,0,0,0,237,1195,1,0,0,0,239,1197,1,0,0,0,241,1199,1,0,0,0,243,1201, - 1,0,0,0,245,1203,1,0,0,0,247,1205,1,0,0,0,249,1207,1,0,0,0,251,1209, - 1,0,0,0,253,1211,1,0,0,0,255,1213,1,0,0,0,257,1215,1,0,0,0,259,1217, - 1,0,0,0,261,1219,1,0,0,0,263,1221,1,0,0,0,265,1223,1,0,0,0,267,1225, - 1,0,0,0,269,1227,1,0,0,0,271,1229,1,0,0,0,273,1231,1,0,0,0,275,1233, - 1,0,0,0,277,1236,1,0,0,0,279,1238,1,0,0,0,281,1240,1,0,0,0,283,1242, - 1,0,0,0,285,1244,1,0,0,0,287,1246,1,0,0,0,289,1249,1,0,0,0,291,1251, - 1,0,0,0,293,1253,1,0,0,0,295,1255,1,0,0,0,297,1258,1,0,0,0,299,1260, - 1,0,0,0,301,1263,1,0,0,0,303,1265,1,0,0,0,305,1267,1,0,0,0,307,1270, - 1,0,0,0,309,1274,1,0,0,0,311,1278,1,0,0,0,313,1280,1,0,0,0,315,1282, - 1,0,0,0,317,1285,1,0,0,0,319,1291,1,0,0,0,321,1293,1,0,0,0,323,1297, - 1,0,0,0,325,1300,1,0,0,0,327,1303,1,0,0,0,329,1306,1,0,0,0,331,1308, - 1,0,0,0,333,1310,1,0,0,0,335,1312,1,0,0,0,337,1314,1,0,0,0,339,1319, - 1,0,0,0,341,1324,1,0,0,0,343,1326,1,0,0,0,345,1328,1,0,0,0,347,1331, - 1,0,0,0,349,1335,1,0,0,0,351,1337,1,0,0,0,353,1339,1,0,0,0,355,1341, - 1,0,0,0,357,1343,1,0,0,0,359,1345,1,0,0,0,361,1363,1,0,0,0,363,1376, - 1,0,0,0,365,1391,1,0,0,0,367,1395,1,0,0,0,369,1399,1,0,0,0,371,1409, - 1,0,0,0,373,1413,1,0,0,0,375,376,3,215,106,0,376,377,3,237,117,0, - 377,378,3,237,117,0,378,4,1,0,0,0,379,380,3,215,106,0,380,381,3, - 241,119,0,381,382,3,221,109,0,382,6,1,0,0,0,383,384,3,215,106,0, - 384,385,3,241,119,0,385,386,3,253,125,0,386,387,3,231,114,0,387, - 8,1,0,0,0,388,389,3,215,106,0,389,390,3,241,119,0,390,391,3,263, - 130,0,391,10,1,0,0,0,392,393,3,215,106,0,393,394,3,249,123,0,394, - 395,3,249,123,0,395,396,3,215,106,0,396,397,3,263,130,0,397,12,1, - 0,0,0,398,399,3,215,106,0,399,400,3,251,124,0,400,14,1,0,0,0,401, - 402,3,215,106,0,402,403,3,251,124,0,403,404,3,219,108,0,404,416, - 1,0,0,0,405,406,3,215,106,0,406,407,3,251,124,0,407,408,3,219,108, - 0,408,409,3,223,110,0,409,410,3,241,119,0,410,411,3,221,109,0,411, - 412,3,231,114,0,412,413,3,241,119,0,413,414,3,227,112,0,414,416, - 1,0,0,0,415,401,1,0,0,0,415,405,1,0,0,0,416,16,1,0,0,0,417,418,3, - 215,106,0,418,419,3,251,124,0,419,420,3,243,120,0,420,421,3,225, - 111,0,421,18,1,0,0,0,422,423,3,217,107,0,423,424,3,223,110,0,424, - 425,3,253,125,0,425,426,3,259,128,0,426,427,3,223,110,0,427,428, - 3,223,110,0,428,429,3,241,119,0,429,20,1,0,0,0,430,431,3,217,107, - 0,431,432,3,243,120,0,432,433,3,253,125,0,433,434,3,229,113,0,434, - 22,1,0,0,0,435,436,3,217,107,0,436,437,3,263,130,0,437,24,1,0,0, - 0,438,439,3,219,108,0,439,440,3,215,106,0,440,441,3,251,124,0,441, - 442,3,223,110,0,442,26,1,0,0,0,443,444,3,219,108,0,444,445,3,215, - 106,0,445,446,3,251,124,0,446,447,3,253,125,0,447,28,1,0,0,0,448, - 449,3,219,108,0,449,450,3,243,120,0,450,451,3,229,113,0,451,452, - 3,243,120,0,452,453,3,249,123,0,453,454,3,253,125,0,454,30,1,0,0, - 0,455,456,3,219,108,0,456,457,3,243,120,0,457,458,3,237,117,0,458, - 459,3,237,117,0,459,460,3,215,106,0,460,461,3,253,125,0,461,462, - 3,223,110,0,462,32,1,0,0,0,463,464,3,219,108,0,464,465,3,249,123, - 0,465,466,3,243,120,0,466,467,3,251,124,0,467,468,3,251,124,0,468, - 34,1,0,0,0,469,470,3,219,108,0,470,471,3,255,126,0,471,472,3,217, - 107,0,472,473,3,223,110,0,473,36,1,0,0,0,474,475,3,219,108,0,475, - 476,3,255,126,0,476,477,3,249,123,0,477,478,3,249,123,0,478,479, - 3,223,110,0,479,480,3,241,119,0,480,481,3,253,125,0,481,38,1,0,0, - 0,482,483,3,221,109,0,483,484,3,215,106,0,484,485,3,253,125,0,485, - 486,3,223,110,0,486,40,1,0,0,0,487,488,3,221,109,0,488,489,3,215, - 106,0,489,490,3,263,130,0,490,42,1,0,0,0,491,492,3,221,109,0,492, - 493,3,223,110,0,493,494,3,251,124,0,494,495,3,219,108,0,495,44,1, - 0,0,0,496,497,3,221,109,0,497,498,3,223,110,0,498,499,3,251,124, - 0,499,500,3,219,108,0,500,501,3,223,110,0,501,502,3,241,119,0,502, - 503,3,221,109,0,503,504,3,231,114,0,504,505,3,241,119,0,505,506, - 3,227,112,0,506,46,1,0,0,0,507,508,3,221,109,0,508,509,3,231,114, - 0,509,510,3,251,124,0,510,511,3,253,125,0,511,512,3,231,114,0,512, - 513,3,241,119,0,513,514,3,219,108,0,514,515,3,253,125,0,515,48,1, - 0,0,0,516,517,3,223,110,0,517,518,3,237,117,0,518,519,3,251,124, - 0,519,520,3,223,110,0,520,50,1,0,0,0,521,522,3,223,110,0,522,523, - 3,241,119,0,523,524,3,221,109,0,524,52,1,0,0,0,525,526,3,223,110, - 0,526,527,3,261,129,0,527,528,3,253,125,0,528,529,3,249,123,0,529, - 530,3,215,106,0,530,531,3,219,108,0,531,532,3,253,125,0,532,54,1, - 0,0,0,533,534,3,225,111,0,534,535,3,231,114,0,535,536,3,241,119, - 0,536,537,3,215,106,0,537,538,3,237,117,0,538,56,1,0,0,0,539,540, - 3,225,111,0,540,541,3,231,114,0,541,542,3,249,123,0,542,543,3,251, - 124,0,543,544,3,253,125,0,544,58,1,0,0,0,545,546,3,225,111,0,546, - 547,3,241,119,0,547,60,1,0,0,0,548,549,3,225,111,0,549,550,3,243, - 120,0,550,551,3,237,117,0,551,552,3,237,117,0,552,553,3,243,120, - 0,553,554,3,259,128,0,554,555,3,231,114,0,555,556,3,241,119,0,556, - 557,3,227,112,0,557,62,1,0,0,0,558,559,3,225,111,0,559,560,3,243, - 120,0,560,561,3,249,123,0,561,64,1,0,0,0,562,563,3,225,111,0,563, - 564,3,249,123,0,564,565,3,243,120,0,565,566,3,239,118,0,566,66,1, - 0,0,0,567,568,3,225,111,0,568,569,3,255,126,0,569,570,3,237,117, - 0,570,571,3,237,117,0,571,68,1,0,0,0,572,573,3,227,112,0,573,574, - 3,249,123,0,574,575,3,243,120,0,575,576,3,255,126,0,576,577,3,245, - 121,0,577,70,1,0,0,0,578,579,3,229,113,0,579,580,3,215,106,0,580, - 581,3,257,127,0,581,582,3,231,114,0,582,583,3,241,119,0,583,584, - 3,227,112,0,584,72,1,0,0,0,585,586,3,229,113,0,586,587,3,243,120, - 0,587,588,3,255,126,0,588,589,3,249,123,0,589,74,1,0,0,0,590,591, - 3,231,114,0,591,592,3,221,109,0,592,76,1,0,0,0,593,594,3,231,114, - 0,594,595,3,225,111,0,595,78,1,0,0,0,596,597,3,231,114,0,597,598, - 3,237,117,0,598,599,3,231,114,0,599,600,3,235,116,0,600,601,3,223, - 110,0,601,80,1,0,0,0,602,603,3,231,114,0,603,604,3,241,119,0,604, - 82,1,0,0,0,605,606,3,231,114,0,606,607,3,241,119,0,607,608,3,225, - 111,0,608,619,1,0,0,0,609,610,3,231,114,0,610,611,3,241,119,0,611, - 612,3,225,111,0,612,613,3,231,114,0,613,614,3,241,119,0,614,615, - 3,231,114,0,615,616,3,253,125,0,616,617,3,263,130,0,617,619,1,0, - 0,0,618,605,1,0,0,0,618,609,1,0,0,0,619,84,1,0,0,0,620,621,3,231, - 114,0,621,622,3,241,119,0,622,623,3,241,119,0,623,624,3,223,110, - 0,624,625,3,249,123,0,625,86,1,0,0,0,626,627,3,231,114,0,627,628, - 3,241,119,0,628,629,3,253,125,0,629,630,3,223,110,0,630,631,3,249, - 123,0,631,632,3,257,127,0,632,633,3,215,106,0,633,634,3,237,117, - 0,634,88,1,0,0,0,635,636,3,231,114,0,636,637,3,251,124,0,637,90, - 1,0,0,0,638,639,3,233,115,0,639,640,3,243,120,0,640,641,3,231,114, - 0,641,642,3,241,119,0,642,92,1,0,0,0,643,644,3,235,116,0,644,645, - 3,223,110,0,645,646,3,263,130,0,646,94,1,0,0,0,647,648,3,237,117, - 0,648,649,3,215,106,0,649,650,3,251,124,0,650,651,3,253,125,0,651, - 96,1,0,0,0,652,653,3,237,117,0,653,654,3,223,110,0,654,655,3,215, - 106,0,655,656,3,221,109,0,656,657,3,231,114,0,657,658,3,241,119, - 0,658,659,3,227,112,0,659,98,1,0,0,0,660,661,3,237,117,0,661,662, - 3,223,110,0,662,663,3,225,111,0,663,664,3,253,125,0,664,100,1,0, - 0,0,665,666,3,237,117,0,666,667,3,223,110,0,667,668,3,253,125,0, - 668,102,1,0,0,0,669,670,3,237,117,0,670,671,3,231,114,0,671,672, - 3,235,116,0,672,673,3,223,110,0,673,104,1,0,0,0,674,675,3,237,117, - 0,675,676,3,231,114,0,676,677,3,239,118,0,677,678,3,231,114,0,678, - 679,3,253,125,0,679,106,1,0,0,0,680,681,3,239,118,0,681,682,3,231, - 114,0,682,683,3,241,119,0,683,684,3,255,126,0,684,685,3,253,125, - 0,685,686,3,223,110,0,686,108,1,0,0,0,687,688,3,239,118,0,688,689, - 3,243,120,0,689,690,3,241,119,0,690,691,3,253,125,0,691,692,3,229, - 113,0,692,110,1,0,0,0,693,694,3,241,119,0,694,695,3,215,106,0,695, - 696,3,241,119,0,696,112,1,0,0,0,697,698,3,241,119,0,698,699,3,243, - 120,0,699,700,3,253,125,0,700,114,1,0,0,0,701,702,3,241,119,0,702, - 703,3,255,126,0,703,704,3,237,117,0,704,705,3,237,117,0,705,116, - 1,0,0,0,706,707,3,241,119,0,707,708,3,255,126,0,708,709,3,237,117, - 0,709,710,3,237,117,0,710,711,3,251,124,0,711,118,1,0,0,0,712,713, - 3,243,120,0,713,714,3,225,111,0,714,715,3,225,111,0,715,716,3,251, - 124,0,716,717,3,223,110,0,717,718,3,253,125,0,718,120,1,0,0,0,719, - 720,3,243,120,0,720,721,3,241,119,0,721,122,1,0,0,0,722,723,3,243, - 120,0,723,724,3,249,123,0,724,124,1,0,0,0,725,726,3,243,120,0,726, - 727,3,249,123,0,727,728,3,221,109,0,728,729,3,223,110,0,729,730, - 3,249,123,0,730,126,1,0,0,0,731,732,3,243,120,0,732,733,3,255,126, - 0,733,734,3,253,125,0,734,735,3,223,110,0,735,736,3,249,123,0,736, - 128,1,0,0,0,737,738,3,243,120,0,738,739,3,257,127,0,739,740,3,223, - 110,0,740,741,3,249,123,0,741,130,1,0,0,0,742,743,3,245,121,0,743, - 744,3,215,106,0,744,745,3,249,123,0,745,746,3,253,125,0,746,747, - 3,231,114,0,747,748,3,253,125,0,748,749,3,231,114,0,749,750,3,243, - 120,0,750,751,3,241,119,0,751,132,1,0,0,0,752,753,3,245,121,0,753, - 754,3,249,123,0,754,755,3,223,110,0,755,756,3,219,108,0,756,757, - 3,223,110,0,757,758,3,221,109,0,758,759,3,231,114,0,759,760,3,241, - 119,0,760,761,3,227,112,0,761,134,1,0,0,0,762,763,3,245,121,0,763, - 764,3,249,123,0,764,765,3,223,110,0,765,766,3,259,128,0,766,767, - 3,229,113,0,767,768,3,223,110,0,768,769,3,249,123,0,769,770,3,223, - 110,0,770,136,1,0,0,0,771,772,3,247,122,0,772,773,3,255,126,0,773, - 774,3,215,106,0,774,775,3,249,123,0,775,776,3,253,125,0,776,777, - 3,223,110,0,777,778,3,249,123,0,778,138,1,0,0,0,779,780,3,249,123, - 0,780,781,3,215,106,0,781,782,3,241,119,0,782,783,3,227,112,0,783, - 784,3,223,110,0,784,140,1,0,0,0,785,786,3,249,123,0,786,787,3,223, - 110,0,787,788,3,253,125,0,788,789,3,255,126,0,789,790,3,249,123, - 0,790,791,3,241,119,0,791,142,1,0,0,0,792,793,3,249,123,0,793,794, - 3,231,114,0,794,795,3,227,112,0,795,796,3,229,113,0,796,797,3,253, - 125,0,797,144,1,0,0,0,798,799,3,249,123,0,799,800,3,243,120,0,800, - 801,3,237,117,0,801,802,3,237,117,0,802,803,3,255,126,0,803,804, - 3,245,121,0,804,146,1,0,0,0,805,806,3,249,123,0,806,807,3,243,120, - 0,807,808,3,259,128,0,808,148,1,0,0,0,809,810,3,249,123,0,810,811, - 3,243,120,0,811,812,3,259,128,0,812,813,3,251,124,0,813,150,1,0, - 0,0,814,815,3,251,124,0,815,816,3,215,106,0,816,817,3,239,118,0, - 817,818,3,245,121,0,818,819,3,237,117,0,819,820,3,223,110,0,820, - 152,1,0,0,0,821,822,3,251,124,0,822,823,3,223,110,0,823,824,3,219, - 108,0,824,825,3,243,120,0,825,826,3,241,119,0,826,827,3,221,109, - 0,827,154,1,0,0,0,828,829,3,251,124,0,829,830,3,223,110,0,830,831, - 3,237,117,0,831,832,3,223,110,0,832,833,3,219,108,0,833,834,3,253, - 125,0,834,156,1,0,0,0,835,836,3,251,124,0,836,837,3,223,110,0,837, - 838,3,239,118,0,838,839,3,231,114,0,839,158,1,0,0,0,840,841,3,251, - 124,0,841,842,3,223,110,0,842,843,3,253,125,0,843,844,3,253,125, - 0,844,845,3,231,114,0,845,846,3,241,119,0,846,847,3,227,112,0,847, - 848,3,251,124,0,848,160,1,0,0,0,849,850,3,251,124,0,850,851,3,255, - 126,0,851,852,3,217,107,0,852,853,3,251,124,0,853,854,3,253,125, - 0,854,855,3,249,123,0,855,856,3,231,114,0,856,857,3,241,119,0,857, - 858,3,227,112,0,858,162,1,0,0,0,859,860,3,253,125,0,860,861,3,229, - 113,0,861,862,3,223,110,0,862,863,3,241,119,0,863,164,1,0,0,0,864, - 865,3,253,125,0,865,866,3,231,114,0,866,867,3,223,110,0,867,868, - 3,251,124,0,868,166,1,0,0,0,869,870,3,253,125,0,870,871,3,231,114, - 0,871,872,3,239,118,0,872,873,3,223,110,0,873,874,3,251,124,0,874, - 875,3,253,125,0,875,876,3,215,106,0,876,877,3,239,118,0,877,878, - 3,245,121,0,878,168,1,0,0,0,879,880,3,253,125,0,880,881,3,243,120, - 0,881,170,1,0,0,0,882,883,3,253,125,0,883,884,3,243,120,0,884,885, - 3,245,121,0,885,172,1,0,0,0,886,887,3,253,125,0,887,888,3,243,120, - 0,888,889,3,253,125,0,889,890,3,215,106,0,890,891,3,237,117,0,891, - 892,3,251,124,0,892,174,1,0,0,0,893,894,3,253,125,0,894,895,3,249, - 123,0,895,896,3,215,106,0,896,897,3,231,114,0,897,898,3,237,117, - 0,898,899,3,231,114,0,899,900,3,241,119,0,900,901,3,227,112,0,901, - 176,1,0,0,0,902,903,3,253,125,0,903,904,3,249,123,0,904,905,3,231, - 114,0,905,906,3,239,118,0,906,178,1,0,0,0,907,908,3,253,125,0,908, - 909,3,249,123,0,909,910,3,255,126,0,910,911,3,241,119,0,911,912, - 3,219,108,0,912,913,3,215,106,0,913,914,3,253,125,0,914,915,3,223, - 110,0,915,180,1,0,0,0,916,917,3,255,126,0,917,918,3,241,119,0,918, - 919,3,217,107,0,919,920,3,243,120,0,920,921,3,255,126,0,921,922, - 3,241,119,0,922,923,3,221,109,0,923,924,3,223,110,0,924,925,3,221, - 109,0,925,182,1,0,0,0,926,927,3,255,126,0,927,928,3,241,119,0,928, - 929,3,231,114,0,929,930,3,243,120,0,930,931,3,241,119,0,931,184, - 1,0,0,0,932,933,3,255,126,0,933,934,3,251,124,0,934,935,3,231,114, - 0,935,936,3,241,119,0,936,937,3,227,112,0,937,186,1,0,0,0,938,939, - 3,259,128,0,939,940,3,223,110,0,940,941,3,223,110,0,941,942,3,235, - 116,0,942,188,1,0,0,0,943,944,3,259,128,0,944,945,3,229,113,0,945, - 946,3,223,110,0,946,947,3,241,119,0,947,190,1,0,0,0,948,949,3,259, - 128,0,949,950,3,229,113,0,950,951,3,223,110,0,951,952,3,249,123, - 0,952,953,3,223,110,0,953,192,1,0,0,0,954,955,3,259,128,0,955,956, - 3,229,113,0,956,957,3,231,114,0,957,958,3,237,117,0,958,959,3,223, - 110,0,959,194,1,0,0,0,960,961,3,259,128,0,961,962,3,231,114,0,962, - 963,3,241,119,0,963,964,3,221,109,0,964,965,3,243,120,0,965,966, - 3,259,128,0,966,196,1,0,0,0,967,968,3,259,128,0,968,969,3,231,114, - 0,969,970,3,253,125,0,970,971,3,229,113,0,971,198,1,0,0,0,972,973, - 3,263,130,0,973,974,3,223,110,0,974,975,3,215,106,0,975,976,3,249, - 123,0,976,983,1,0,0,0,977,978,3,263,130,0,978,979,3,263,130,0,979, - 980,3,263,130,0,980,981,3,263,130,0,981,983,1,0,0,0,982,972,1,0, - 0,0,982,977,1,0,0,0,983,200,1,0,0,0,984,985,3,281,139,0,985,986, - 3,217,107,0,986,1012,1,0,0,0,987,988,3,281,139,0,988,989,3,225,111, - 0,989,1012,1,0,0,0,990,991,3,281,139,0,991,992,3,249,123,0,992,1012, - 1,0,0,0,993,994,3,281,139,0,994,995,3,241,119,0,995,1012,1,0,0,0, - 996,997,3,281,139,0,997,998,3,253,125,0,998,1012,1,0,0,0,999,1000, - 3,281,139,0,1000,1001,5,48,0,0,1001,1012,1,0,0,0,1002,1003,3,281, - 139,0,1003,1004,3,215,106,0,1004,1012,1,0,0,0,1005,1006,3,281,139, - 0,1006,1007,3,257,127,0,1007,1012,1,0,0,0,1008,1009,3,281,139,0, - 1009,1010,3,281,139,0,1010,1012,1,0,0,0,1011,984,1,0,0,0,1011,987, - 1,0,0,0,1011,990,1,0,0,0,1011,993,1,0,0,0,1011,996,1,0,0,0,1011, - 999,1,0,0,0,1011,1002,1,0,0,0,1011,1005,1,0,0,0,1011,1008,1,0,0, - 0,1012,202,1,0,0,0,1013,1017,3,267,132,0,1014,1017,3,357,177,0,1015, - 1017,3,291,144,0,1016,1013,1,0,0,0,1016,1014,1,0,0,0,1016,1015,1, - 0,0,0,1017,1024,1,0,0,0,1018,1023,3,267,132,0,1019,1023,3,357,177, - 0,1020,1023,3,271,134,0,1021,1023,3,291,144,0,1022,1018,1,0,0,0, - 1022,1019,1,0,0,0,1022,1020,1,0,0,0,1022,1021,1,0,0,0,1023,1026, - 1,0,0,0,1024,1022,1,0,0,0,1024,1025,1,0,0,0,1025,1060,1,0,0,0,1026, - 1024,1,0,0,0,1027,1038,3,279,138,0,1028,1037,8,0,0,0,1029,1037,3, - 201,99,0,1030,1031,3,281,139,0,1031,1032,3,341,169,0,1032,1037,1, - 0,0,0,1033,1034,3,279,138,0,1034,1035,3,279,138,0,1035,1037,1,0, - 0,0,1036,1028,1,0,0,0,1036,1029,1,0,0,0,1036,1030,1,0,0,0,1036,1033, - 1,0,0,0,1037,1040,1,0,0,0,1038,1036,1,0,0,0,1038,1039,1,0,0,0,1039, - 1041,1,0,0,0,1040,1038,1,0,0,0,1041,1042,3,279,138,0,1042,1060,1, - 0,0,0,1043,1054,3,335,166,0,1044,1053,8,1,0,0,1045,1053,3,201,99, - 0,1046,1047,3,281,139,0,1047,1048,3,335,166,0,1048,1053,1,0,0,0, - 1049,1050,3,335,166,0,1050,1051,3,335,166,0,1051,1053,1,0,0,0,1052, - 1044,1,0,0,0,1052,1045,1,0,0,0,1052,1046,1,0,0,0,1052,1049,1,0,0, - 0,1053,1056,1,0,0,0,1054,1052,1,0,0,0,1054,1055,1,0,0,0,1055,1057, - 1,0,0,0,1056,1054,1,0,0,0,1057,1058,3,335,166,0,1058,1060,1,0,0, - 0,1059,1016,1,0,0,0,1059,1027,1,0,0,0,1059,1043,1,0,0,0,1060,204, - 1,0,0,0,1061,1062,3,211,104,0,1062,1066,3,293,145,0,1063,1065,3, - 273,135,0,1064,1063,1,0,0,0,1065,1068,1,0,0,0,1066,1064,1,0,0,0, - 1066,1067,1,0,0,0,1067,1071,1,0,0,0,1068,1066,1,0,0,0,1069,1072, - 3,245,121,0,1070,1072,3,223,110,0,1071,1069,1,0,0,0,1071,1070,1, - 0,0,0,1072,1075,1,0,0,0,1073,1076,3,331,164,0,1074,1076,3,289,143, - 0,1075,1073,1,0,0,0,1075,1074,1,0,0,0,1075,1076,1,0,0,0,1076,1078, - 1,0,0,0,1077,1079,3,271,134,0,1078,1077,1,0,0,0,1079,1080,1,0,0, - 0,1080,1078,1,0,0,0,1080,1081,1,0,0,0,1081,1138,1,0,0,0,1082,1085, - 3,211,104,0,1083,1086,3,245,121,0,1084,1086,3,223,110,0,1085,1083, - 1,0,0,0,1085,1084,1,0,0,0,1086,1089,1,0,0,0,1087,1090,3,331,164, - 0,1088,1090,3,289,143,0,1089,1087,1,0,0,0,1089,1088,1,0,0,0,1089, - 1090,1,0,0,0,1090,1092,1,0,0,0,1091,1093,3,271,134,0,1092,1091,1, - 0,0,0,1093,1094,1,0,0,0,1094,1092,1,0,0,0,1094,1095,1,0,0,0,1095, - 1138,1,0,0,0,1096,1097,3,209,103,0,1097,1101,3,293,145,0,1098,1100, - 3,271,134,0,1099,1098,1,0,0,0,1100,1103,1,0,0,0,1101,1099,1,0,0, - 0,1101,1102,1,0,0,0,1102,1104,1,0,0,0,1103,1101,1,0,0,0,1104,1107, - 3,223,110,0,1105,1108,3,331,164,0,1106,1108,3,289,143,0,1107,1105, - 1,0,0,0,1107,1106,1,0,0,0,1107,1108,1,0,0,0,1108,1110,1,0,0,0,1109, - 1111,3,271,134,0,1110,1109,1,0,0,0,1111,1112,1,0,0,0,1112,1110,1, - 0,0,0,1112,1113,1,0,0,0,1113,1138,1,0,0,0,1114,1115,3,293,145,0, - 1115,1116,3,209,103,0,1116,1119,3,223,110,0,1117,1120,3,331,164, - 0,1118,1120,3,289,143,0,1119,1117,1,0,0,0,1119,1118,1,0,0,0,1119, - 1120,1,0,0,0,1120,1122,1,0,0,0,1121,1123,3,271,134,0,1122,1121,1, - 0,0,0,1123,1124,1,0,0,0,1124,1122,1,0,0,0,1124,1125,1,0,0,0,1125, - 1138,1,0,0,0,1126,1127,3,209,103,0,1127,1130,3,223,110,0,1128,1131, - 3,331,164,0,1129,1131,3,289,143,0,1130,1128,1,0,0,0,1130,1129,1, - 0,0,0,1130,1131,1,0,0,0,1131,1133,1,0,0,0,1132,1134,3,271,134,0, - 1133,1132,1,0,0,0,1134,1135,1,0,0,0,1135,1133,1,0,0,0,1135,1136, - 1,0,0,0,1136,1138,1,0,0,0,1137,1061,1,0,0,0,1137,1082,1,0,0,0,1137, - 1096,1,0,0,0,1137,1114,1,0,0,0,1137,1126,1,0,0,0,1138,206,1,0,0, - 0,1139,1141,5,48,0,0,1140,1142,3,269,133,0,1141,1140,1,0,0,0,1142, - 1143,1,0,0,0,1143,1141,1,0,0,0,1143,1144,1,0,0,0,1144,208,1,0,0, - 0,1145,1147,3,271,134,0,1146,1145,1,0,0,0,1147,1148,1,0,0,0,1148, - 1146,1,0,0,0,1148,1149,1,0,0,0,1149,210,1,0,0,0,1150,1151,5,48,0, - 0,1151,1153,3,261,129,0,1152,1154,3,273,135,0,1153,1152,1,0,0,0, - 1154,1155,1,0,0,0,1155,1153,1,0,0,0,1155,1156,1,0,0,0,1156,212,1, - 0,0,0,1157,1168,3,341,169,0,1158,1167,8,2,0,0,1159,1167,3,201,99, - 0,1160,1161,3,281,139,0,1161,1162,3,341,169,0,1162,1167,1,0,0,0, - 1163,1164,3,341,169,0,1164,1165,3,341,169,0,1165,1167,1,0,0,0,1166, - 1158,1,0,0,0,1166,1159,1,0,0,0,1166,1160,1,0,0,0,1166,1163,1,0,0, - 0,1167,1170,1,0,0,0,1168,1166,1,0,0,0,1168,1169,1,0,0,0,1169,1171, - 1,0,0,0,1170,1168,1,0,0,0,1171,1172,3,341,169,0,1172,214,1,0,0,0, - 1173,1174,7,3,0,0,1174,216,1,0,0,0,1175,1176,7,4,0,0,1176,218,1, - 0,0,0,1177,1178,7,5,0,0,1178,220,1,0,0,0,1179,1180,7,6,0,0,1180, - 222,1,0,0,0,1181,1182,7,7,0,0,1182,224,1,0,0,0,1183,1184,7,8,0,0, - 1184,226,1,0,0,0,1185,1186,7,9,0,0,1186,228,1,0,0,0,1187,1188,7, - 10,0,0,1188,230,1,0,0,0,1189,1190,7,11,0,0,1190,232,1,0,0,0,1191, - 1192,7,12,0,0,1192,234,1,0,0,0,1193,1194,7,13,0,0,1194,236,1,0,0, - 0,1195,1196,7,14,0,0,1196,238,1,0,0,0,1197,1198,7,15,0,0,1198,240, - 1,0,0,0,1199,1200,7,16,0,0,1200,242,1,0,0,0,1201,1202,7,17,0,0,1202, - 244,1,0,0,0,1203,1204,7,18,0,0,1204,246,1,0,0,0,1205,1206,7,19,0, - 0,1206,248,1,0,0,0,1207,1208,7,20,0,0,1208,250,1,0,0,0,1209,1210, - 7,21,0,0,1210,252,1,0,0,0,1211,1212,7,22,0,0,1212,254,1,0,0,0,1213, - 1214,7,23,0,0,1214,256,1,0,0,0,1215,1216,7,24,0,0,1216,258,1,0,0, - 0,1217,1218,7,25,0,0,1218,260,1,0,0,0,1219,1220,7,26,0,0,1220,262, - 1,0,0,0,1221,1222,7,27,0,0,1222,264,1,0,0,0,1223,1224,7,28,0,0,1224, - 266,1,0,0,0,1225,1226,7,29,0,0,1226,268,1,0,0,0,1227,1228,7,30,0, - 0,1228,270,1,0,0,0,1229,1230,7,31,0,0,1230,272,1,0,0,0,1231,1232, - 7,32,0,0,1232,274,1,0,0,0,1233,1234,5,45,0,0,1234,1235,5,62,0,0, - 1235,276,1,0,0,0,1236,1237,5,42,0,0,1237,278,1,0,0,0,1238,1239,5, - 96,0,0,1239,280,1,0,0,0,1240,1241,5,92,0,0,1241,282,1,0,0,0,1242, - 1243,5,58,0,0,1243,284,1,0,0,0,1244,1245,5,44,0,0,1245,286,1,0,0, - 0,1246,1247,5,124,0,0,1247,1248,5,124,0,0,1248,288,1,0,0,0,1249, - 1250,5,45,0,0,1250,290,1,0,0,0,1251,1252,5,36,0,0,1252,292,1,0,0, - 0,1253,1254,5,46,0,0,1254,294,1,0,0,0,1255,1256,5,61,0,0,1256,1257, - 5,61,0,0,1257,296,1,0,0,0,1258,1259,5,61,0,0,1259,298,1,0,0,0,1260, - 1261,5,62,0,0,1261,1262,5,61,0,0,1262,300,1,0,0,0,1263,1264,5,62, - 0,0,1264,302,1,0,0,0,1265,1266,5,35,0,0,1266,304,1,0,0,0,1267,1268, - 5,126,0,0,1268,1269,5,42,0,0,1269,306,1,0,0,0,1270,1271,5,61,0,0, - 1271,1272,5,126,0,0,1272,1273,5,42,0,0,1273,308,1,0,0,0,1274,1275, - 5,123,0,0,1275,1276,1,0,0,0,1276,1277,6,153,0,0,1277,310,1,0,0,0, - 1278,1279,5,91,0,0,1279,312,1,0,0,0,1280,1281,5,40,0,0,1281,314, - 1,0,0,0,1282,1283,5,60,0,0,1283,1284,5,61,0,0,1284,316,1,0,0,0,1285, - 1286,5,60,0,0,1286,318,1,0,0,0,1287,1288,5,33,0,0,1288,1292,5,61, - 0,0,1289,1290,5,60,0,0,1290,1292,5,62,0,0,1291,1287,1,0,0,0,1291, - 1289,1,0,0,0,1292,320,1,0,0,0,1293,1294,5,33,0,0,1294,1295,5,126, - 0,0,1295,1296,5,42,0,0,1296,322,1,0,0,0,1297,1298,5,33,0,0,1298, - 1299,5,126,0,0,1299,324,1,0,0,0,1300,1301,5,63,0,0,1301,1302,5,46, - 0,0,1302,326,1,0,0,0,1303,1304,5,63,0,0,1304,1305,5,63,0,0,1305, - 328,1,0,0,0,1306,1307,5,37,0,0,1307,330,1,0,0,0,1308,1309,5,43,0, - 0,1309,332,1,0,0,0,1310,1311,5,63,0,0,1311,334,1,0,0,0,1312,1313, - 5,34,0,0,1313,336,1,0,0,0,1314,1315,5,102,0,0,1315,1316,5,39,0,0, - 1316,1317,1,0,0,0,1317,1318,6,167,1,0,1318,338,1,0,0,0,1319,1320, - 5,70,0,0,1320,1321,5,39,0,0,1321,1322,1,0,0,0,1322,1323,6,168,2, - 0,1323,340,1,0,0,0,1324,1325,5,39,0,0,1325,342,1,0,0,0,1326,1327, - 5,126,0,0,1327,344,1,0,0,0,1328,1329,5,61,0,0,1329,1330,5,126,0, - 0,1330,346,1,0,0,0,1331,1332,5,125,0,0,1332,1333,1,0,0,0,1333,1334, - 6,172,3,0,1334,348,1,0,0,0,1335,1336,5,93,0,0,1336,350,1,0,0,0,1337, - 1338,5,41,0,0,1338,352,1,0,0,0,1339,1340,5,59,0,0,1340,354,1,0,0, - 0,1341,1342,5,47,0,0,1342,356,1,0,0,0,1343,1344,5,95,0,0,1344,358, - 1,0,0,0,1345,1346,5,47,0,0,1346,1347,5,42,0,0,1347,1351,1,0,0,0, - 1348,1350,9,0,0,0,1349,1348,1,0,0,0,1350,1353,1,0,0,0,1351,1352, - 1,0,0,0,1351,1349,1,0,0,0,1352,1354,1,0,0,0,1353,1351,1,0,0,0,1354, - 1355,5,42,0,0,1355,1356,5,47,0,0,1356,1357,1,0,0,0,1357,1358,6,178, - 4,0,1358,360,1,0,0,0,1359,1360,5,45,0,0,1360,1364,5,45,0,0,1361, - 1362,5,47,0,0,1362,1364,5,47,0,0,1363,1359,1,0,0,0,1363,1361,1,0, - 0,0,1364,1368,1,0,0,0,1365,1367,8,33,0,0,1366,1365,1,0,0,0,1367, - 1370,1,0,0,0,1368,1366,1,0,0,0,1368,1369,1,0,0,0,1369,1372,1,0,0, - 0,1370,1368,1,0,0,0,1371,1373,7,34,0,0,1372,1371,1,0,0,0,1373,1374, - 1,0,0,0,1374,1375,6,179,4,0,1375,362,1,0,0,0,1376,1377,7,35,0,0, - 1377,1378,1,0,0,0,1378,1379,6,180,5,0,1379,364,1,0,0,0,1380,1392, - 8,36,0,0,1381,1392,3,201,99,0,1382,1383,3,281,139,0,1383,1384,3, - 341,169,0,1384,1392,1,0,0,0,1385,1386,3,281,139,0,1386,1387,3,309, - 153,0,1387,1392,1,0,0,0,1388,1389,3,341,169,0,1389,1390,3,341,169, - 0,1390,1392,1,0,0,0,1391,1380,1,0,0,0,1391,1381,1,0,0,0,1391,1382, - 1,0,0,0,1391,1385,1,0,0,0,1391,1388,1,0,0,0,1392,1393,1,0,0,0,1393, - 1391,1,0,0,0,1393,1394,1,0,0,0,1394,366,1,0,0,0,1395,1396,3,309, - 153,0,1396,1397,1,0,0,0,1397,1398,6,182,0,0,1398,368,1,0,0,0,1399, - 1400,3,341,169,0,1400,1401,1,0,0,0,1401,1402,6,183,6,0,1402,1403, - 6,183,3,0,1403,370,1,0,0,0,1404,1410,8,37,0,0,1405,1410,3,201,99, - 0,1406,1407,3,281,139,0,1407,1408,3,309,153,0,1408,1410,1,0,0,0, - 1409,1404,1,0,0,0,1409,1405,1,0,0,0,1409,1406,1,0,0,0,1410,1411, - 1,0,0,0,1411,1409,1,0,0,0,1411,1412,1,0,0,0,1412,372,1,0,0,0,1413, - 1414,3,309,153,0,1414,1415,1,0,0,0,1415,1416,6,185,0,0,1416,374, - 1,0,0,0,44,0,1,2,415,618,982,1011,1016,1022,1024,1036,1038,1052, - 1054,1059,1066,1071,1075,1080,1085,1089,1094,1101,1107,1112,1119, - 1124,1130,1135,1137,1143,1148,1155,1166,1168,1291,1351,1363,1368, - 1372,1391,1393,1409,1411,7,5,0,0,5,1,0,5,2,0,4,0,0,6,0,0,0,1,0,7, - 140,0 + 2,185,7,185,2,186,7,186,2,187,7,187,2,188,7,188,2,189,7,189,1,0, + 1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3, + 1,4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6, + 1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,424,8,6,1,7,1,7,1,7,1,7,1,7,1,8, + 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1, + 11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1, + 13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1, + 15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1, + 17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1, + 19,1,19,1,19,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,22,1, + 22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1, + 23,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1, + 25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1, + 27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,29,1,29,1, + 29,1,29,1,29,1,29,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,31,1,31,1, + 31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1, + 34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,1,35,1,36,1,36,1, + 36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1, + 39,1,39,1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,42,1, + 42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42,3,42,641, + 8,42,1,43,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44, + 1,44,1,44,1,44,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47, + 1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49, + 1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,52,1,52, + 1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54, + 1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56, + 1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59, + 1,59,1,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,62, + 1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64, + 1,64,1,65,1,65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66, + 1,66,1,66,1,66,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67, + 1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69, + 1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,1,71,1,71,1,71, + 1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,73,1,73,1,73, + 1,73,1,73,1,73,1,73,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75, + 1,76,1,76,1,76,1,76,1,76,1,76,1,76,1,77,1,77,1,77,1,77,1,77,1,77, + 1,77,1,78,1,78,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79,1,79, + 1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81, + 1,81,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,1,83,1,83, + 1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85, + 1,85,1,85,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,87,1,87,1,87,1,87, + 1,88,1,88,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89, + 1,89,1,89,1,89,1,90,1,90,1,90,1,90,1,90,1,91,1,91,1,91,1,91,1,91, + 1,91,1,91,1,91,1,91,1,92,1,92,1,92,1,92,1,93,1,93,1,93,1,93,1,93, + 1,93,1,93,1,93,1,93,1,93,1,94,1,94,1,94,1,94,1,94,1,94,1,95,1,95, + 1,95,1,95,1,95,1,95,1,96,1,96,1,96,1,96,1,96,1,97,1,97,1,97,1,97, + 1,97,1,98,1,98,1,98,1,98,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99, + 1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,101,1,101,1,101,1,101, + 1,101,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102, + 3,102,1015,8,102,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103, + 1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103, + 1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,3,103,1044,8,103, + 1,104,1,104,1,104,3,104,1049,8,104,1,104,1,104,1,104,1,104,5,104, + 1055,8,104,10,104,12,104,1058,9,104,1,104,1,104,1,104,1,104,1,104, + 1,104,1,104,1,104,1,104,5,104,1069,8,104,10,104,12,104,1072,9,104, + 1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104,1,104, + 5,104,1085,8,104,10,104,12,104,1088,9,104,1,104,1,104,3,104,1092, + 8,104,1,105,1,105,1,105,5,105,1097,8,105,10,105,12,105,1100,9,105, + 1,105,1,105,3,105,1104,8,105,1,105,1,105,3,105,1108,8,105,1,105, + 4,105,1111,8,105,11,105,12,105,1112,1,105,1,105,1,105,3,105,1118, + 8,105,1,105,1,105,3,105,1122,8,105,1,105,4,105,1125,8,105,11,105, + 12,105,1126,1,105,1,105,1,105,5,105,1132,8,105,10,105,12,105,1135, + 9,105,1,105,1,105,1,105,3,105,1140,8,105,1,105,4,105,1143,8,105, + 11,105,12,105,1144,1,105,1,105,1,105,1,105,1,105,3,105,1152,8,105, + 1,105,4,105,1155,8,105,11,105,12,105,1156,1,105,1,105,1,105,1,105, + 3,105,1163,8,105,1,105,4,105,1166,8,105,11,105,12,105,1167,3,105, + 1170,8,105,1,106,1,106,4,106,1174,8,106,11,106,12,106,1175,1,107, + 4,107,1179,8,107,11,107,12,107,1180,1,108,1,108,1,108,4,108,1186, + 8,108,11,108,12,108,1187,1,109,1,109,1,109,1,109,1,109,1,109,1,109, + 1,109,1,109,5,109,1199,8,109,10,109,12,109,1202,9,109,1,109,1,109, + 1,110,1,110,1,111,1,111,1,112,1,112,1,113,1,113,1,114,1,114,1,115, + 1,115,1,116,1,116,1,117,1,117,1,118,1,118,1,119,1,119,1,120,1,120, + 1,121,1,121,1,122,1,122,1,123,1,123,1,124,1,124,1,125,1,125,1,126, + 1,126,1,127,1,127,1,128,1,128,1,129,1,129,1,130,1,130,1,131,1,131, + 1,132,1,132,1,133,1,133,1,134,1,134,1,135,1,135,1,136,1,136,1,137, + 1,137,1,138,1,138,1,139,1,139,1,140,1,140,1,140,1,141,1,141,1,142, + 1,142,1,143,1,143,1,144,1,144,1,145,1,145,1,146,1,146,1,146,1,147, + 1,147,1,148,1,148,1,149,1,149,1,150,1,150,1,150,1,151,1,151,1,152, + 1,152,1,152,1,153,1,153,1,154,1,154,1,155,1,155,1,155,1,156,1,156, + 1,156,1,156,1,157,1,157,1,157,1,157,1,158,1,158,1,159,1,159,1,160, + 1,160,1,160,1,161,1,161,1,162,1,162,1,162,1,162,3,162,1324,8,162, + 1,163,1,163,1,163,1,163,1,164,1,164,1,164,1,165,1,165,1,165,1,166, + 1,166,1,166,1,167,1,167,1,168,1,168,1,169,1,169,1,170,1,170,1,171, + 1,171,1,171,1,171,1,171,1,172,1,172,1,172,1,172,1,172,1,173,1,173, + 1,174,1,174,1,175,1,175,1,175,1,176,1,176,1,176,1,176,1,177,1,177, + 1,178,1,178,1,179,1,179,1,180,1,180,1,181,1,181,1,182,1,182,1,182, + 1,182,5,182,1382,8,182,10,182,12,182,1385,9,182,1,182,1,182,1,182, + 1,182,1,182,1,183,1,183,1,183,1,183,3,183,1396,8,183,1,183,5,183, + 1399,8,183,10,183,12,183,1402,9,183,1,183,3,183,1405,8,183,1,183, + 1,183,1,184,1,184,1,184,1,184,1,185,1,185,1,185,1,185,1,185,1,185, + 1,185,1,185,1,185,1,185,1,185,4,185,1424,8,185,11,185,12,185,1425, + 1,186,1,186,1,186,1,186,1,187,1,187,1,187,1,187,1,187,1,188,1,188, + 1,188,1,188,1,188,4,188,1442,8,188,11,188,12,188,1443,1,189,1,189, + 1,189,1,189,1,1383,0,190,3,1,5,2,7,3,9,4,11,5,13,6,15,7,17,8,19, + 9,21,10,23,11,25,12,27,13,29,14,31,15,33,16,35,17,37,18,39,19,41, + 20,43,21,45,22,47,23,49,24,51,25,53,26,55,27,57,28,59,29,61,30,63, + 31,65,32,67,33,69,34,71,35,73,36,75,37,77,38,79,39,81,40,83,41,85, + 42,87,43,89,44,91,45,93,46,95,47,97,48,99,49,101,50,103,51,105,52, + 107,53,109,54,111,55,113,56,115,57,117,58,119,59,121,60,123,61,125, + 62,127,63,129,64,131,65,133,66,135,67,137,68,139,69,141,70,143,71, + 145,72,147,73,149,74,151,75,153,76,155,77,157,78,159,79,161,80,163, + 81,165,82,167,83,169,84,171,85,173,86,175,87,177,88,179,89,181,90, + 183,91,185,92,187,93,189,94,191,95,193,96,195,97,197,98,199,99,201, + 100,203,101,205,102,207,103,209,104,211,105,213,106,215,107,217, + 108,219,109,221,110,223,0,225,0,227,0,229,0,231,0,233,0,235,0,237, + 0,239,0,241,0,243,0,245,0,247,0,249,0,251,0,253,0,255,0,257,0,259, + 0,261,0,263,0,265,0,267,0,269,0,271,0,273,0,275,0,277,0,279,0,281, + 0,283,111,285,112,287,113,289,114,291,115,293,116,295,117,297,118, + 299,119,301,120,303,121,305,122,307,123,309,124,311,125,313,126, + 315,127,317,128,319,129,321,130,323,131,325,132,327,133,329,134, + 331,135,333,136,335,137,337,138,339,139,341,140,343,141,345,142, + 347,143,349,144,351,145,353,146,355,147,357,148,359,149,361,150, + 363,151,365,152,367,153,369,154,371,155,373,156,375,157,377,0,379, + 158,381,159,3,0,1,2,38,2,0,92,92,96,96,2,0,34,34,92,92,2,0,39,39, + 92,92,2,0,65,65,97,97,2,0,66,66,98,98,2,0,67,67,99,99,2,0,68,68, + 100,100,2,0,69,69,101,101,2,0,70,70,102,102,2,0,71,71,103,103,2, + 0,72,72,104,104,2,0,73,73,105,105,2,0,74,74,106,106,2,0,75,75,107, + 107,2,0,76,76,108,108,2,0,77,77,109,109,2,0,78,78,110,110,2,0,79, + 79,111,111,2,0,80,80,112,112,2,0,81,81,113,113,2,0,82,82,114,114, + 2,0,83,83,115,115,2,0,84,84,116,116,2,0,85,85,117,117,2,0,86,86, + 118,118,2,0,87,87,119,119,2,0,88,88,120,120,2,0,89,89,121,121,2, + 0,90,90,122,122,2,0,65,90,97,122,1,0,48,55,1,0,48,57,3,0,48,57,65, + 70,97,102,2,0,10,10,13,13,2,1,10,10,13,13,2,0,9,13,32,32,3,0,39, + 39,92,92,123,123,1,0,123,123,1485,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1, + 0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1, + 0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1, + 0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1, + 0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1, + 0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1, + 0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1, + 0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1, + 0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1, + 0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1, + 0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107, + 1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0, + 0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1, + 0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0, + 135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0, + 0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153, + 1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0, + 0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1, + 0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0, + 181,1,0,0,0,0,183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0, + 0,0,0,191,1,0,0,0,0,193,1,0,0,0,0,195,1,0,0,0,0,197,1,0,0,0,0,199, + 1,0,0,0,0,201,1,0,0,0,0,203,1,0,0,0,0,205,1,0,0,0,0,207,1,0,0,0, + 0,209,1,0,0,0,0,211,1,0,0,0,0,213,1,0,0,0,0,215,1,0,0,0,0,217,1, + 0,0,0,0,219,1,0,0,0,0,221,1,0,0,0,0,283,1,0,0,0,0,285,1,0,0,0,0, + 287,1,0,0,0,0,289,1,0,0,0,0,291,1,0,0,0,0,293,1,0,0,0,0,295,1,0, + 0,0,0,297,1,0,0,0,0,299,1,0,0,0,0,301,1,0,0,0,0,303,1,0,0,0,0,305, + 1,0,0,0,0,307,1,0,0,0,0,309,1,0,0,0,0,311,1,0,0,0,0,313,1,0,0,0, + 0,315,1,0,0,0,0,317,1,0,0,0,0,319,1,0,0,0,0,321,1,0,0,0,0,323,1, + 0,0,0,0,325,1,0,0,0,0,327,1,0,0,0,0,329,1,0,0,0,0,331,1,0,0,0,0, + 333,1,0,0,0,0,335,1,0,0,0,0,337,1,0,0,0,0,339,1,0,0,0,0,341,1,0, + 0,0,0,343,1,0,0,0,0,345,1,0,0,0,0,347,1,0,0,0,0,349,1,0,0,0,0,351, + 1,0,0,0,0,353,1,0,0,0,0,355,1,0,0,0,0,357,1,0,0,0,0,359,1,0,0,0, + 0,361,1,0,0,0,0,363,1,0,0,0,0,365,1,0,0,0,0,367,1,0,0,0,0,369,1, + 0,0,0,0,371,1,0,0,0,1,373,1,0,0,0,1,375,1,0,0,0,1,377,1,0,0,0,2, + 379,1,0,0,0,2,381,1,0,0,0,3,383,1,0,0,0,5,387,1,0,0,0,7,391,1,0, + 0,0,9,396,1,0,0,0,11,400,1,0,0,0,13,406,1,0,0,0,15,423,1,0,0,0,17, + 425,1,0,0,0,19,430,1,0,0,0,21,438,1,0,0,0,23,443,1,0,0,0,25,446, + 1,0,0,0,27,451,1,0,0,0,29,456,1,0,0,0,31,462,1,0,0,0,33,469,1,0, + 0,0,35,477,1,0,0,0,37,483,1,0,0,0,39,488,1,0,0,0,41,496,1,0,0,0, + 43,501,1,0,0,0,45,505,1,0,0,0,47,510,1,0,0,0,49,521,1,0,0,0,51,530, + 1,0,0,0,53,535,1,0,0,0,55,539,1,0,0,0,57,547,1,0,0,0,59,553,1,0, + 0,0,61,561,1,0,0,0,63,567,1,0,0,0,65,570,1,0,0,0,67,580,1,0,0,0, + 69,584,1,0,0,0,71,589,1,0,0,0,73,594,1,0,0,0,75,600,1,0,0,0,77,607, + 1,0,0,0,79,612,1,0,0,0,81,615,1,0,0,0,83,618,1,0,0,0,85,624,1,0, + 0,0,87,640,1,0,0,0,89,642,1,0,0,0,91,648,1,0,0,0,93,657,1,0,0,0, + 95,660,1,0,0,0,97,665,1,0,0,0,99,669,1,0,0,0,101,674,1,0,0,0,103, + 682,1,0,0,0,105,687,1,0,0,0,107,691,1,0,0,0,109,696,1,0,0,0,111, + 702,1,0,0,0,113,709,1,0,0,0,115,715,1,0,0,0,117,719,1,0,0,0,119, + 723,1,0,0,0,121,728,1,0,0,0,123,734,1,0,0,0,125,741,1,0,0,0,127, + 744,1,0,0,0,129,747,1,0,0,0,131,753,1,0,0,0,133,759,1,0,0,0,135, + 764,1,0,0,0,137,774,1,0,0,0,139,784,1,0,0,0,141,793,1,0,0,0,143, + 801,1,0,0,0,145,807,1,0,0,0,147,814,1,0,0,0,149,820,1,0,0,0,151, + 827,1,0,0,0,153,831,1,0,0,0,155,836,1,0,0,0,157,843,1,0,0,0,159, + 850,1,0,0,0,161,857,1,0,0,0,163,862,1,0,0,0,165,871,1,0,0,0,167, + 881,1,0,0,0,169,886,1,0,0,0,171,892,1,0,0,0,173,897,1,0,0,0,175, + 907,1,0,0,0,177,910,1,0,0,0,179,914,1,0,0,0,181,921,1,0,0,0,183, + 930,1,0,0,0,185,935,1,0,0,0,187,944,1,0,0,0,189,948,1,0,0,0,191, + 958,1,0,0,0,193,964,1,0,0,0,195,970,1,0,0,0,197,975,1,0,0,0,199, + 980,1,0,0,0,201,986,1,0,0,0,203,992,1,0,0,0,205,999,1,0,0,0,207, + 1014,1,0,0,0,209,1043,1,0,0,0,211,1091,1,0,0,0,213,1169,1,0,0,0, + 215,1171,1,0,0,0,217,1178,1,0,0,0,219,1182,1,0,0,0,221,1189,1,0, + 0,0,223,1205,1,0,0,0,225,1207,1,0,0,0,227,1209,1,0,0,0,229,1211, + 1,0,0,0,231,1213,1,0,0,0,233,1215,1,0,0,0,235,1217,1,0,0,0,237,1219, + 1,0,0,0,239,1221,1,0,0,0,241,1223,1,0,0,0,243,1225,1,0,0,0,245,1227, + 1,0,0,0,247,1229,1,0,0,0,249,1231,1,0,0,0,251,1233,1,0,0,0,253,1235, + 1,0,0,0,255,1237,1,0,0,0,257,1239,1,0,0,0,259,1241,1,0,0,0,261,1243, + 1,0,0,0,263,1245,1,0,0,0,265,1247,1,0,0,0,267,1249,1,0,0,0,269,1251, + 1,0,0,0,271,1253,1,0,0,0,273,1255,1,0,0,0,275,1257,1,0,0,0,277,1259, + 1,0,0,0,279,1261,1,0,0,0,281,1263,1,0,0,0,283,1265,1,0,0,0,285,1268, + 1,0,0,0,287,1270,1,0,0,0,289,1272,1,0,0,0,291,1274,1,0,0,0,293,1276, + 1,0,0,0,295,1278,1,0,0,0,297,1281,1,0,0,0,299,1283,1,0,0,0,301,1285, + 1,0,0,0,303,1287,1,0,0,0,305,1290,1,0,0,0,307,1292,1,0,0,0,309,1295, + 1,0,0,0,311,1297,1,0,0,0,313,1299,1,0,0,0,315,1302,1,0,0,0,317,1306, + 1,0,0,0,319,1310,1,0,0,0,321,1312,1,0,0,0,323,1314,1,0,0,0,325,1317, + 1,0,0,0,327,1323,1,0,0,0,329,1325,1,0,0,0,331,1329,1,0,0,0,333,1332, + 1,0,0,0,335,1335,1,0,0,0,337,1338,1,0,0,0,339,1340,1,0,0,0,341,1342, + 1,0,0,0,343,1344,1,0,0,0,345,1346,1,0,0,0,347,1351,1,0,0,0,349,1356, + 1,0,0,0,351,1358,1,0,0,0,353,1360,1,0,0,0,355,1363,1,0,0,0,357,1367, + 1,0,0,0,359,1369,1,0,0,0,361,1371,1,0,0,0,363,1373,1,0,0,0,365,1375, + 1,0,0,0,367,1377,1,0,0,0,369,1395,1,0,0,0,371,1408,1,0,0,0,373,1423, + 1,0,0,0,375,1427,1,0,0,0,377,1431,1,0,0,0,379,1441,1,0,0,0,381,1445, + 1,0,0,0,383,384,3,223,110,0,384,385,3,245,121,0,385,386,3,245,121, + 0,386,4,1,0,0,0,387,388,3,223,110,0,388,389,3,249,123,0,389,390, + 3,229,113,0,390,6,1,0,0,0,391,392,3,223,110,0,392,393,3,249,123, + 0,393,394,3,261,129,0,394,395,3,239,118,0,395,8,1,0,0,0,396,397, + 3,223,110,0,397,398,3,249,123,0,398,399,3,271,134,0,399,10,1,0,0, + 0,400,401,3,223,110,0,401,402,3,257,127,0,402,403,3,257,127,0,403, + 404,3,223,110,0,404,405,3,271,134,0,405,12,1,0,0,0,406,407,3,223, + 110,0,407,408,3,259,128,0,408,14,1,0,0,0,409,410,3,223,110,0,410, + 411,3,259,128,0,411,412,3,227,112,0,412,424,1,0,0,0,413,414,3,223, + 110,0,414,415,3,259,128,0,415,416,3,227,112,0,416,417,3,231,114, + 0,417,418,3,249,123,0,418,419,3,229,113,0,419,420,3,239,118,0,420, + 421,3,249,123,0,421,422,3,235,116,0,422,424,1,0,0,0,423,409,1,0, + 0,0,423,413,1,0,0,0,424,16,1,0,0,0,425,426,3,223,110,0,426,427,3, + 259,128,0,427,428,3,251,124,0,428,429,3,233,115,0,429,18,1,0,0,0, + 430,431,3,225,111,0,431,432,3,231,114,0,432,433,3,261,129,0,433, + 434,3,267,132,0,434,435,3,231,114,0,435,436,3,231,114,0,436,437, + 3,249,123,0,437,20,1,0,0,0,438,439,3,225,111,0,439,440,3,251,124, + 0,440,441,3,261,129,0,441,442,3,237,117,0,442,22,1,0,0,0,443,444, + 3,225,111,0,444,445,3,271,134,0,445,24,1,0,0,0,446,447,3,227,112, + 0,447,448,3,223,110,0,448,449,3,259,128,0,449,450,3,231,114,0,450, + 26,1,0,0,0,451,452,3,227,112,0,452,453,3,223,110,0,453,454,3,259, + 128,0,454,455,3,261,129,0,455,28,1,0,0,0,456,457,3,227,112,0,457, + 458,3,223,110,0,458,459,3,261,129,0,459,460,3,227,112,0,460,461, + 3,237,117,0,461,30,1,0,0,0,462,463,3,227,112,0,463,464,3,251,124, + 0,464,465,3,237,117,0,465,466,3,251,124,0,466,467,3,257,127,0,467, + 468,3,261,129,0,468,32,1,0,0,0,469,470,3,227,112,0,470,471,3,251, + 124,0,471,472,3,245,121,0,472,473,3,245,121,0,473,474,3,223,110, + 0,474,475,3,261,129,0,475,476,3,231,114,0,476,34,1,0,0,0,477,478, + 3,227,112,0,478,479,3,257,127,0,479,480,3,251,124,0,480,481,3,259, + 128,0,481,482,3,259,128,0,482,36,1,0,0,0,483,484,3,227,112,0,484, + 485,3,263,130,0,485,486,3,225,111,0,486,487,3,231,114,0,487,38,1, + 0,0,0,488,489,3,227,112,0,489,490,3,263,130,0,490,491,3,257,127, + 0,491,492,3,257,127,0,492,493,3,231,114,0,493,494,3,249,123,0,494, + 495,3,261,129,0,495,40,1,0,0,0,496,497,3,229,113,0,497,498,3,223, + 110,0,498,499,3,261,129,0,499,500,3,231,114,0,500,42,1,0,0,0,501, + 502,3,229,113,0,502,503,3,223,110,0,503,504,3,271,134,0,504,44,1, + 0,0,0,505,506,3,229,113,0,506,507,3,231,114,0,507,508,3,259,128, + 0,508,509,3,227,112,0,509,46,1,0,0,0,510,511,3,229,113,0,511,512, + 3,231,114,0,512,513,3,259,128,0,513,514,3,227,112,0,514,515,3,231, + 114,0,515,516,3,249,123,0,516,517,3,229,113,0,517,518,3,239,118, + 0,518,519,3,249,123,0,519,520,3,235,116,0,520,48,1,0,0,0,521,522, + 3,229,113,0,522,523,3,239,118,0,523,524,3,259,128,0,524,525,3,261, + 129,0,525,526,3,239,118,0,526,527,3,249,123,0,527,528,3,227,112, + 0,528,529,3,261,129,0,529,50,1,0,0,0,530,531,3,231,114,0,531,532, + 3,245,121,0,532,533,3,259,128,0,533,534,3,231,114,0,534,52,1,0,0, + 0,535,536,3,231,114,0,536,537,3,249,123,0,537,538,3,229,113,0,538, + 54,1,0,0,0,539,540,3,231,114,0,540,541,3,269,133,0,541,542,3,261, + 129,0,542,543,3,257,127,0,543,544,3,223,110,0,544,545,3,227,112, + 0,545,546,3,261,129,0,546,56,1,0,0,0,547,548,3,233,115,0,548,549, + 3,239,118,0,549,550,3,249,123,0,550,551,3,223,110,0,551,552,3,245, + 121,0,552,58,1,0,0,0,553,554,3,233,115,0,554,555,3,239,118,0,555, + 556,3,249,123,0,556,557,3,223,110,0,557,558,3,245,121,0,558,559, + 3,245,121,0,559,560,3,271,134,0,560,60,1,0,0,0,561,562,3,233,115, + 0,562,563,3,239,118,0,563,564,3,257,127,0,564,565,3,259,128,0,565, + 566,3,261,129,0,566,62,1,0,0,0,567,568,3,233,115,0,568,569,3,249, + 123,0,569,64,1,0,0,0,570,571,3,233,115,0,571,572,3,251,124,0,572, + 573,3,245,121,0,573,574,3,245,121,0,574,575,3,251,124,0,575,576, + 3,267,132,0,576,577,3,239,118,0,577,578,3,249,123,0,578,579,3,235, + 116,0,579,66,1,0,0,0,580,581,3,233,115,0,581,582,3,251,124,0,582, + 583,3,257,127,0,583,68,1,0,0,0,584,585,3,233,115,0,585,586,3,257, + 127,0,586,587,3,251,124,0,587,588,3,247,122,0,588,70,1,0,0,0,589, + 590,3,233,115,0,590,591,3,263,130,0,591,592,3,245,121,0,592,593, + 3,245,121,0,593,72,1,0,0,0,594,595,3,235,116,0,595,596,3,257,127, + 0,596,597,3,251,124,0,597,598,3,263,130,0,598,599,3,253,125,0,599, + 74,1,0,0,0,600,601,3,237,117,0,601,602,3,223,110,0,602,603,3,265, + 131,0,603,604,3,239,118,0,604,605,3,249,123,0,605,606,3,235,116, + 0,606,76,1,0,0,0,607,608,3,237,117,0,608,609,3,251,124,0,609,610, + 3,263,130,0,610,611,3,257,127,0,611,78,1,0,0,0,612,613,3,239,118, + 0,613,614,3,229,113,0,614,80,1,0,0,0,615,616,3,239,118,0,616,617, + 3,233,115,0,617,82,1,0,0,0,618,619,3,239,118,0,619,620,3,245,121, + 0,620,621,3,239,118,0,621,622,3,243,120,0,622,623,3,231,114,0,623, + 84,1,0,0,0,624,625,3,239,118,0,625,626,3,249,123,0,626,86,1,0,0, + 0,627,628,3,239,118,0,628,629,3,249,123,0,629,630,3,233,115,0,630, + 641,1,0,0,0,631,632,3,239,118,0,632,633,3,249,123,0,633,634,3,233, + 115,0,634,635,3,239,118,0,635,636,3,249,123,0,636,637,3,239,118, + 0,637,638,3,261,129,0,638,639,3,271,134,0,639,641,1,0,0,0,640,627, + 1,0,0,0,640,631,1,0,0,0,641,88,1,0,0,0,642,643,3,239,118,0,643,644, + 3,249,123,0,644,645,3,249,123,0,645,646,3,231,114,0,646,647,3,257, + 127,0,647,90,1,0,0,0,648,649,3,239,118,0,649,650,3,249,123,0,650, + 651,3,261,129,0,651,652,3,231,114,0,652,653,3,257,127,0,653,654, + 3,265,131,0,654,655,3,223,110,0,655,656,3,245,121,0,656,92,1,0,0, + 0,657,658,3,239,118,0,658,659,3,259,128,0,659,94,1,0,0,0,660,661, + 3,241,119,0,661,662,3,251,124,0,662,663,3,239,118,0,663,664,3,249, + 123,0,664,96,1,0,0,0,665,666,3,243,120,0,666,667,3,231,114,0,667, + 668,3,271,134,0,668,98,1,0,0,0,669,670,3,245,121,0,670,671,3,223, + 110,0,671,672,3,259,128,0,672,673,3,261,129,0,673,100,1,0,0,0,674, + 675,3,245,121,0,675,676,3,231,114,0,676,677,3,223,110,0,677,678, + 3,229,113,0,678,679,3,239,118,0,679,680,3,249,123,0,680,681,3,235, + 116,0,681,102,1,0,0,0,682,683,3,245,121,0,683,684,3,231,114,0,684, + 685,3,233,115,0,685,686,3,261,129,0,686,104,1,0,0,0,687,688,3,245, + 121,0,688,689,3,231,114,0,689,690,3,261,129,0,690,106,1,0,0,0,691, + 692,3,245,121,0,692,693,3,239,118,0,693,694,3,243,120,0,694,695, + 3,231,114,0,695,108,1,0,0,0,696,697,3,245,121,0,697,698,3,239,118, + 0,698,699,3,247,122,0,699,700,3,239,118,0,700,701,3,261,129,0,701, + 110,1,0,0,0,702,703,3,247,122,0,703,704,3,239,118,0,704,705,3,249, + 123,0,705,706,3,263,130,0,706,707,3,261,129,0,707,708,3,231,114, + 0,708,112,1,0,0,0,709,710,3,247,122,0,710,711,3,251,124,0,711,712, + 3,249,123,0,712,713,3,261,129,0,713,714,3,237,117,0,714,114,1,0, + 0,0,715,716,3,249,123,0,716,717,3,223,110,0,717,718,3,249,123,0, + 718,116,1,0,0,0,719,720,3,249,123,0,720,721,3,251,124,0,721,722, + 3,261,129,0,722,118,1,0,0,0,723,724,3,249,123,0,724,725,3,263,130, + 0,725,726,3,245,121,0,726,727,3,245,121,0,727,120,1,0,0,0,728,729, + 3,249,123,0,729,730,3,263,130,0,730,731,3,245,121,0,731,732,3,245, + 121,0,732,733,3,259,128,0,733,122,1,0,0,0,734,735,3,251,124,0,735, + 736,3,233,115,0,736,737,3,233,115,0,737,738,3,259,128,0,738,739, + 3,231,114,0,739,740,3,261,129,0,740,124,1,0,0,0,741,742,3,251,124, + 0,742,743,3,249,123,0,743,126,1,0,0,0,744,745,3,251,124,0,745,746, + 3,257,127,0,746,128,1,0,0,0,747,748,3,251,124,0,748,749,3,257,127, + 0,749,750,3,229,113,0,750,751,3,231,114,0,751,752,3,257,127,0,752, + 130,1,0,0,0,753,754,3,251,124,0,754,755,3,263,130,0,755,756,3,261, + 129,0,756,757,3,231,114,0,757,758,3,257,127,0,758,132,1,0,0,0,759, + 760,3,251,124,0,760,761,3,265,131,0,761,762,3,231,114,0,762,763, + 3,257,127,0,763,134,1,0,0,0,764,765,3,253,125,0,765,766,3,223,110, + 0,766,767,3,257,127,0,767,768,3,261,129,0,768,769,3,239,118,0,769, + 770,3,261,129,0,770,771,3,239,118,0,771,772,3,251,124,0,772,773, + 3,249,123,0,773,136,1,0,0,0,774,775,3,253,125,0,775,776,3,257,127, + 0,776,777,3,231,114,0,777,778,3,227,112,0,778,779,3,231,114,0,779, + 780,3,229,113,0,780,781,3,239,118,0,781,782,3,249,123,0,782,783, + 3,235,116,0,783,138,1,0,0,0,784,785,3,253,125,0,785,786,3,257,127, + 0,786,787,3,231,114,0,787,788,3,267,132,0,788,789,3,237,117,0,789, + 790,3,231,114,0,790,791,3,257,127,0,791,792,3,231,114,0,792,140, + 1,0,0,0,793,794,3,255,126,0,794,795,3,263,130,0,795,796,3,223,110, + 0,796,797,3,257,127,0,797,798,3,261,129,0,798,799,3,231,114,0,799, + 800,3,257,127,0,800,142,1,0,0,0,801,802,3,257,127,0,802,803,3,223, + 110,0,803,804,3,249,123,0,804,805,3,235,116,0,805,806,3,231,114, + 0,806,144,1,0,0,0,807,808,3,257,127,0,808,809,3,231,114,0,809,810, + 3,261,129,0,810,811,3,263,130,0,811,812,3,257,127,0,812,813,3,249, + 123,0,813,146,1,0,0,0,814,815,3,257,127,0,815,816,3,239,118,0,816, + 817,3,235,116,0,817,818,3,237,117,0,818,819,3,261,129,0,819,148, + 1,0,0,0,820,821,3,257,127,0,821,822,3,251,124,0,822,823,3,245,121, + 0,823,824,3,245,121,0,824,825,3,263,130,0,825,826,3,253,125,0,826, + 150,1,0,0,0,827,828,3,257,127,0,828,829,3,251,124,0,829,830,3,267, + 132,0,830,152,1,0,0,0,831,832,3,257,127,0,832,833,3,251,124,0,833, + 834,3,267,132,0,834,835,3,259,128,0,835,154,1,0,0,0,836,837,3,259, + 128,0,837,838,3,223,110,0,838,839,3,247,122,0,839,840,3,253,125, + 0,840,841,3,245,121,0,841,842,3,231,114,0,842,156,1,0,0,0,843,844, + 3,259,128,0,844,845,3,231,114,0,845,846,3,227,112,0,846,847,3,251, + 124,0,847,848,3,249,123,0,848,849,3,229,113,0,849,158,1,0,0,0,850, + 851,3,259,128,0,851,852,3,231,114,0,852,853,3,245,121,0,853,854, + 3,231,114,0,854,855,3,227,112,0,855,856,3,261,129,0,856,160,1,0, + 0,0,857,858,3,259,128,0,858,859,3,231,114,0,859,860,3,247,122,0, + 860,861,3,239,118,0,861,162,1,0,0,0,862,863,3,259,128,0,863,864, + 3,231,114,0,864,865,3,261,129,0,865,866,3,261,129,0,866,867,3,239, + 118,0,867,868,3,249,123,0,868,869,3,235,116,0,869,870,3,259,128, + 0,870,164,1,0,0,0,871,872,3,259,128,0,872,873,3,263,130,0,873,874, + 3,225,111,0,874,875,3,259,128,0,875,876,3,261,129,0,876,877,3,257, + 127,0,877,878,3,239,118,0,878,879,3,249,123,0,879,880,3,235,116, + 0,880,166,1,0,0,0,881,882,3,261,129,0,882,883,3,237,117,0,883,884, + 3,231,114,0,884,885,3,249,123,0,885,168,1,0,0,0,886,887,3,261,129, + 0,887,888,3,237,117,0,888,889,3,257,127,0,889,890,3,251,124,0,890, + 891,3,267,132,0,891,170,1,0,0,0,892,893,3,261,129,0,893,894,3,239, + 118,0,894,895,3,231,114,0,895,896,3,259,128,0,896,172,1,0,0,0,897, + 898,3,261,129,0,898,899,3,239,118,0,899,900,3,247,122,0,900,901, + 3,231,114,0,901,902,3,259,128,0,902,903,3,261,129,0,903,904,3,223, + 110,0,904,905,3,247,122,0,905,906,3,253,125,0,906,174,1,0,0,0,907, + 908,3,261,129,0,908,909,3,251,124,0,909,176,1,0,0,0,910,911,3,261, + 129,0,911,912,3,251,124,0,912,913,3,253,125,0,913,178,1,0,0,0,914, + 915,3,261,129,0,915,916,3,251,124,0,916,917,3,261,129,0,917,918, + 3,223,110,0,918,919,3,245,121,0,919,920,3,259,128,0,920,180,1,0, + 0,0,921,922,3,261,129,0,922,923,3,257,127,0,923,924,3,223,110,0, + 924,925,3,239,118,0,925,926,3,245,121,0,926,927,3,239,118,0,927, + 928,3,249,123,0,928,929,3,235,116,0,929,182,1,0,0,0,930,931,3,261, + 129,0,931,932,3,257,127,0,932,933,3,239,118,0,933,934,3,247,122, + 0,934,184,1,0,0,0,935,936,3,261,129,0,936,937,3,257,127,0,937,938, + 3,263,130,0,938,939,3,249,123,0,939,940,3,227,112,0,940,941,3,223, + 110,0,941,942,3,261,129,0,942,943,3,231,114,0,943,186,1,0,0,0,944, + 945,3,261,129,0,945,946,3,257,127,0,946,947,3,271,134,0,947,188, + 1,0,0,0,948,949,3,263,130,0,949,950,3,249,123,0,950,951,3,225,111, + 0,951,952,3,251,124,0,952,953,3,263,130,0,953,954,3,249,123,0,954, + 955,3,229,113,0,955,956,3,231,114,0,956,957,3,229,113,0,957,190, + 1,0,0,0,958,959,3,263,130,0,959,960,3,249,123,0,960,961,3,239,118, + 0,961,962,3,251,124,0,962,963,3,249,123,0,963,192,1,0,0,0,964,965, + 3,263,130,0,965,966,3,259,128,0,966,967,3,239,118,0,967,968,3,249, + 123,0,968,969,3,235,116,0,969,194,1,0,0,0,970,971,3,267,132,0,971, + 972,3,231,114,0,972,973,3,231,114,0,973,974,3,243,120,0,974,196, + 1,0,0,0,975,976,3,267,132,0,976,977,3,237,117,0,977,978,3,231,114, + 0,978,979,3,249,123,0,979,198,1,0,0,0,980,981,3,267,132,0,981,982, + 3,237,117,0,982,983,3,231,114,0,983,984,3,257,127,0,984,985,3,231, + 114,0,985,200,1,0,0,0,986,987,3,267,132,0,987,988,3,237,117,0,988, + 989,3,239,118,0,989,990,3,245,121,0,990,991,3,231,114,0,991,202, + 1,0,0,0,992,993,3,267,132,0,993,994,3,239,118,0,994,995,3,249,123, + 0,995,996,3,229,113,0,996,997,3,251,124,0,997,998,3,267,132,0,998, + 204,1,0,0,0,999,1000,3,267,132,0,1000,1001,3,239,118,0,1001,1002, + 3,261,129,0,1002,1003,3,237,117,0,1003,206,1,0,0,0,1004,1005,3,271, + 134,0,1005,1006,3,231,114,0,1006,1007,3,223,110,0,1007,1008,3,257, + 127,0,1008,1015,1,0,0,0,1009,1010,3,271,134,0,1010,1011,3,271,134, + 0,1011,1012,3,271,134,0,1012,1013,3,271,134,0,1013,1015,1,0,0,0, + 1014,1004,1,0,0,0,1014,1009,1,0,0,0,1015,208,1,0,0,0,1016,1017,3, + 289,143,0,1017,1018,3,225,111,0,1018,1044,1,0,0,0,1019,1020,3,289, + 143,0,1020,1021,3,233,115,0,1021,1044,1,0,0,0,1022,1023,3,289,143, + 0,1023,1024,3,257,127,0,1024,1044,1,0,0,0,1025,1026,3,289,143,0, + 1026,1027,3,249,123,0,1027,1044,1,0,0,0,1028,1029,3,289,143,0,1029, + 1030,3,261,129,0,1030,1044,1,0,0,0,1031,1032,3,289,143,0,1032,1033, + 5,48,0,0,1033,1044,1,0,0,0,1034,1035,3,289,143,0,1035,1036,3,223, + 110,0,1036,1044,1,0,0,0,1037,1038,3,289,143,0,1038,1039,3,265,131, + 0,1039,1044,1,0,0,0,1040,1041,3,289,143,0,1041,1042,3,289,143,0, + 1042,1044,1,0,0,0,1043,1016,1,0,0,0,1043,1019,1,0,0,0,1043,1022, + 1,0,0,0,1043,1025,1,0,0,0,1043,1028,1,0,0,0,1043,1031,1,0,0,0,1043, + 1034,1,0,0,0,1043,1037,1,0,0,0,1043,1040,1,0,0,0,1044,210,1,0,0, + 0,1045,1049,3,275,136,0,1046,1049,3,365,181,0,1047,1049,3,299,148, + 0,1048,1045,1,0,0,0,1048,1046,1,0,0,0,1048,1047,1,0,0,0,1049,1056, + 1,0,0,0,1050,1055,3,275,136,0,1051,1055,3,365,181,0,1052,1055,3, + 279,138,0,1053,1055,3,299,148,0,1054,1050,1,0,0,0,1054,1051,1,0, + 0,0,1054,1052,1,0,0,0,1054,1053,1,0,0,0,1055,1058,1,0,0,0,1056,1054, + 1,0,0,0,1056,1057,1,0,0,0,1057,1092,1,0,0,0,1058,1056,1,0,0,0,1059, + 1070,3,287,142,0,1060,1069,8,0,0,0,1061,1069,3,209,103,0,1062,1063, + 3,289,143,0,1063,1064,3,349,173,0,1064,1069,1,0,0,0,1065,1066,3, + 287,142,0,1066,1067,3,287,142,0,1067,1069,1,0,0,0,1068,1060,1,0, + 0,0,1068,1061,1,0,0,0,1068,1062,1,0,0,0,1068,1065,1,0,0,0,1069,1072, + 1,0,0,0,1070,1068,1,0,0,0,1070,1071,1,0,0,0,1071,1073,1,0,0,0,1072, + 1070,1,0,0,0,1073,1074,3,287,142,0,1074,1092,1,0,0,0,1075,1086,3, + 343,170,0,1076,1085,8,1,0,0,1077,1085,3,209,103,0,1078,1079,3,289, + 143,0,1079,1080,3,343,170,0,1080,1085,1,0,0,0,1081,1082,3,343,170, + 0,1082,1083,3,343,170,0,1083,1085,1,0,0,0,1084,1076,1,0,0,0,1084, + 1077,1,0,0,0,1084,1078,1,0,0,0,1084,1081,1,0,0,0,1085,1088,1,0,0, + 0,1086,1084,1,0,0,0,1086,1087,1,0,0,0,1087,1089,1,0,0,0,1088,1086, + 1,0,0,0,1089,1090,3,343,170,0,1090,1092,1,0,0,0,1091,1048,1,0,0, + 0,1091,1059,1,0,0,0,1091,1075,1,0,0,0,1092,212,1,0,0,0,1093,1094, + 3,219,108,0,1094,1098,3,301,149,0,1095,1097,3,281,139,0,1096,1095, + 1,0,0,0,1097,1100,1,0,0,0,1098,1096,1,0,0,0,1098,1099,1,0,0,0,1099, + 1103,1,0,0,0,1100,1098,1,0,0,0,1101,1104,3,253,125,0,1102,1104,3, + 231,114,0,1103,1101,1,0,0,0,1103,1102,1,0,0,0,1104,1107,1,0,0,0, + 1105,1108,3,339,168,0,1106,1108,3,297,147,0,1107,1105,1,0,0,0,1107, + 1106,1,0,0,0,1107,1108,1,0,0,0,1108,1110,1,0,0,0,1109,1111,3,279, + 138,0,1110,1109,1,0,0,0,1111,1112,1,0,0,0,1112,1110,1,0,0,0,1112, + 1113,1,0,0,0,1113,1170,1,0,0,0,1114,1117,3,219,108,0,1115,1118,3, + 253,125,0,1116,1118,3,231,114,0,1117,1115,1,0,0,0,1117,1116,1,0, + 0,0,1118,1121,1,0,0,0,1119,1122,3,339,168,0,1120,1122,3,297,147, + 0,1121,1119,1,0,0,0,1121,1120,1,0,0,0,1121,1122,1,0,0,0,1122,1124, + 1,0,0,0,1123,1125,3,279,138,0,1124,1123,1,0,0,0,1125,1126,1,0,0, + 0,1126,1124,1,0,0,0,1126,1127,1,0,0,0,1127,1170,1,0,0,0,1128,1129, + 3,217,107,0,1129,1133,3,301,149,0,1130,1132,3,279,138,0,1131,1130, + 1,0,0,0,1132,1135,1,0,0,0,1133,1131,1,0,0,0,1133,1134,1,0,0,0,1134, + 1136,1,0,0,0,1135,1133,1,0,0,0,1136,1139,3,231,114,0,1137,1140,3, + 339,168,0,1138,1140,3,297,147,0,1139,1137,1,0,0,0,1139,1138,1,0, + 0,0,1139,1140,1,0,0,0,1140,1142,1,0,0,0,1141,1143,3,279,138,0,1142, + 1141,1,0,0,0,1143,1144,1,0,0,0,1144,1142,1,0,0,0,1144,1145,1,0,0, + 0,1145,1170,1,0,0,0,1146,1147,3,301,149,0,1147,1148,3,217,107,0, + 1148,1151,3,231,114,0,1149,1152,3,339,168,0,1150,1152,3,297,147, + 0,1151,1149,1,0,0,0,1151,1150,1,0,0,0,1151,1152,1,0,0,0,1152,1154, + 1,0,0,0,1153,1155,3,279,138,0,1154,1153,1,0,0,0,1155,1156,1,0,0, + 0,1156,1154,1,0,0,0,1156,1157,1,0,0,0,1157,1170,1,0,0,0,1158,1159, + 3,217,107,0,1159,1162,3,231,114,0,1160,1163,3,339,168,0,1161,1163, + 3,297,147,0,1162,1160,1,0,0,0,1162,1161,1,0,0,0,1162,1163,1,0,0, + 0,1163,1165,1,0,0,0,1164,1166,3,279,138,0,1165,1164,1,0,0,0,1166, + 1167,1,0,0,0,1167,1165,1,0,0,0,1167,1168,1,0,0,0,1168,1170,1,0,0, + 0,1169,1093,1,0,0,0,1169,1114,1,0,0,0,1169,1128,1,0,0,0,1169,1146, + 1,0,0,0,1169,1158,1,0,0,0,1170,214,1,0,0,0,1171,1173,5,48,0,0,1172, + 1174,3,277,137,0,1173,1172,1,0,0,0,1174,1175,1,0,0,0,1175,1173,1, + 0,0,0,1175,1176,1,0,0,0,1176,216,1,0,0,0,1177,1179,3,279,138,0,1178, + 1177,1,0,0,0,1179,1180,1,0,0,0,1180,1178,1,0,0,0,1180,1181,1,0,0, + 0,1181,218,1,0,0,0,1182,1183,5,48,0,0,1183,1185,3,269,133,0,1184, + 1186,3,281,139,0,1185,1184,1,0,0,0,1186,1187,1,0,0,0,1187,1185,1, + 0,0,0,1187,1188,1,0,0,0,1188,220,1,0,0,0,1189,1200,3,349,173,0,1190, + 1199,8,2,0,0,1191,1199,3,209,103,0,1192,1193,3,289,143,0,1193,1194, + 3,349,173,0,1194,1199,1,0,0,0,1195,1196,3,349,173,0,1196,1197,3, + 349,173,0,1197,1199,1,0,0,0,1198,1190,1,0,0,0,1198,1191,1,0,0,0, + 1198,1192,1,0,0,0,1198,1195,1,0,0,0,1199,1202,1,0,0,0,1200,1198, + 1,0,0,0,1200,1201,1,0,0,0,1201,1203,1,0,0,0,1202,1200,1,0,0,0,1203, + 1204,3,349,173,0,1204,222,1,0,0,0,1205,1206,7,3,0,0,1206,224,1,0, + 0,0,1207,1208,7,4,0,0,1208,226,1,0,0,0,1209,1210,7,5,0,0,1210,228, + 1,0,0,0,1211,1212,7,6,0,0,1212,230,1,0,0,0,1213,1214,7,7,0,0,1214, + 232,1,0,0,0,1215,1216,7,8,0,0,1216,234,1,0,0,0,1217,1218,7,9,0,0, + 1218,236,1,0,0,0,1219,1220,7,10,0,0,1220,238,1,0,0,0,1221,1222,7, + 11,0,0,1222,240,1,0,0,0,1223,1224,7,12,0,0,1224,242,1,0,0,0,1225, + 1226,7,13,0,0,1226,244,1,0,0,0,1227,1228,7,14,0,0,1228,246,1,0,0, + 0,1229,1230,7,15,0,0,1230,248,1,0,0,0,1231,1232,7,16,0,0,1232,250, + 1,0,0,0,1233,1234,7,17,0,0,1234,252,1,0,0,0,1235,1236,7,18,0,0,1236, + 254,1,0,0,0,1237,1238,7,19,0,0,1238,256,1,0,0,0,1239,1240,7,20,0, + 0,1240,258,1,0,0,0,1241,1242,7,21,0,0,1242,260,1,0,0,0,1243,1244, + 7,22,0,0,1244,262,1,0,0,0,1245,1246,7,23,0,0,1246,264,1,0,0,0,1247, + 1248,7,24,0,0,1248,266,1,0,0,0,1249,1250,7,25,0,0,1250,268,1,0,0, + 0,1251,1252,7,26,0,0,1252,270,1,0,0,0,1253,1254,7,27,0,0,1254,272, + 1,0,0,0,1255,1256,7,28,0,0,1256,274,1,0,0,0,1257,1258,7,29,0,0,1258, + 276,1,0,0,0,1259,1260,7,30,0,0,1260,278,1,0,0,0,1261,1262,7,31,0, + 0,1262,280,1,0,0,0,1263,1264,7,32,0,0,1264,282,1,0,0,0,1265,1266, + 5,45,0,0,1266,1267,5,62,0,0,1267,284,1,0,0,0,1268,1269,5,42,0,0, + 1269,286,1,0,0,0,1270,1271,5,96,0,0,1271,288,1,0,0,0,1272,1273,5, + 92,0,0,1273,290,1,0,0,0,1274,1275,5,58,0,0,1275,292,1,0,0,0,1276, + 1277,5,44,0,0,1277,294,1,0,0,0,1278,1279,5,124,0,0,1279,1280,5,124, + 0,0,1280,296,1,0,0,0,1281,1282,5,45,0,0,1282,298,1,0,0,0,1283,1284, + 5,36,0,0,1284,300,1,0,0,0,1285,1286,5,46,0,0,1286,302,1,0,0,0,1287, + 1288,5,61,0,0,1288,1289,5,61,0,0,1289,304,1,0,0,0,1290,1291,5,61, + 0,0,1291,306,1,0,0,0,1292,1293,5,62,0,0,1293,1294,5,61,0,0,1294, + 308,1,0,0,0,1295,1296,5,62,0,0,1296,310,1,0,0,0,1297,1298,5,35,0, + 0,1298,312,1,0,0,0,1299,1300,5,126,0,0,1300,1301,5,42,0,0,1301,314, + 1,0,0,0,1302,1303,5,61,0,0,1303,1304,5,126,0,0,1304,1305,5,42,0, + 0,1305,316,1,0,0,0,1306,1307,5,123,0,0,1307,1308,1,0,0,0,1308,1309, + 6,157,0,0,1309,318,1,0,0,0,1310,1311,5,91,0,0,1311,320,1,0,0,0,1312, + 1313,5,40,0,0,1313,322,1,0,0,0,1314,1315,5,60,0,0,1315,1316,5,61, + 0,0,1316,324,1,0,0,0,1317,1318,5,60,0,0,1318,326,1,0,0,0,1319,1320, + 5,33,0,0,1320,1324,5,61,0,0,1321,1322,5,60,0,0,1322,1324,5,62,0, + 0,1323,1319,1,0,0,0,1323,1321,1,0,0,0,1324,328,1,0,0,0,1325,1326, + 5,33,0,0,1326,1327,5,126,0,0,1327,1328,5,42,0,0,1328,330,1,0,0,0, + 1329,1330,5,33,0,0,1330,1331,5,126,0,0,1331,332,1,0,0,0,1332,1333, + 5,63,0,0,1333,1334,5,46,0,0,1334,334,1,0,0,0,1335,1336,5,63,0,0, + 1336,1337,5,63,0,0,1337,336,1,0,0,0,1338,1339,5,37,0,0,1339,338, + 1,0,0,0,1340,1341,5,43,0,0,1341,340,1,0,0,0,1342,1343,5,63,0,0,1343, + 342,1,0,0,0,1344,1345,5,34,0,0,1345,344,1,0,0,0,1346,1347,5,102, + 0,0,1347,1348,5,39,0,0,1348,1349,1,0,0,0,1349,1350,6,171,1,0,1350, + 346,1,0,0,0,1351,1352,5,70,0,0,1352,1353,5,39,0,0,1353,1354,1,0, + 0,0,1354,1355,6,172,2,0,1355,348,1,0,0,0,1356,1357,5,39,0,0,1357, + 350,1,0,0,0,1358,1359,5,126,0,0,1359,352,1,0,0,0,1360,1361,5,61, + 0,0,1361,1362,5,126,0,0,1362,354,1,0,0,0,1363,1364,5,125,0,0,1364, + 1365,1,0,0,0,1365,1366,6,176,3,0,1366,356,1,0,0,0,1367,1368,5,93, + 0,0,1368,358,1,0,0,0,1369,1370,5,41,0,0,1370,360,1,0,0,0,1371,1372, + 5,59,0,0,1372,362,1,0,0,0,1373,1374,5,47,0,0,1374,364,1,0,0,0,1375, + 1376,5,95,0,0,1376,366,1,0,0,0,1377,1378,5,47,0,0,1378,1379,5,42, + 0,0,1379,1383,1,0,0,0,1380,1382,9,0,0,0,1381,1380,1,0,0,0,1382,1385, + 1,0,0,0,1383,1384,1,0,0,0,1383,1381,1,0,0,0,1384,1386,1,0,0,0,1385, + 1383,1,0,0,0,1386,1387,5,42,0,0,1387,1388,5,47,0,0,1388,1389,1,0, + 0,0,1389,1390,6,182,4,0,1390,368,1,0,0,0,1391,1392,5,45,0,0,1392, + 1396,5,45,0,0,1393,1394,5,47,0,0,1394,1396,5,47,0,0,1395,1391,1, + 0,0,0,1395,1393,1,0,0,0,1396,1400,1,0,0,0,1397,1399,8,33,0,0,1398, + 1397,1,0,0,0,1399,1402,1,0,0,0,1400,1398,1,0,0,0,1400,1401,1,0,0, + 0,1401,1404,1,0,0,0,1402,1400,1,0,0,0,1403,1405,7,34,0,0,1404,1403, + 1,0,0,0,1405,1406,1,0,0,0,1406,1407,6,183,4,0,1407,370,1,0,0,0,1408, + 1409,7,35,0,0,1409,1410,1,0,0,0,1410,1411,6,184,5,0,1411,372,1,0, + 0,0,1412,1424,8,36,0,0,1413,1424,3,209,103,0,1414,1415,3,289,143, + 0,1415,1416,3,349,173,0,1416,1424,1,0,0,0,1417,1418,3,289,143,0, + 1418,1419,3,317,157,0,1419,1424,1,0,0,0,1420,1421,3,349,173,0,1421, + 1422,3,349,173,0,1422,1424,1,0,0,0,1423,1412,1,0,0,0,1423,1413,1, + 0,0,0,1423,1414,1,0,0,0,1423,1417,1,0,0,0,1423,1420,1,0,0,0,1424, + 1425,1,0,0,0,1425,1423,1,0,0,0,1425,1426,1,0,0,0,1426,374,1,0,0, + 0,1427,1428,3,317,157,0,1428,1429,1,0,0,0,1429,1430,6,186,0,0,1430, + 376,1,0,0,0,1431,1432,3,349,173,0,1432,1433,1,0,0,0,1433,1434,6, + 187,6,0,1434,1435,6,187,3,0,1435,378,1,0,0,0,1436,1442,8,37,0,0, + 1437,1442,3,209,103,0,1438,1439,3,289,143,0,1439,1440,3,317,157, + 0,1440,1442,1,0,0,0,1441,1436,1,0,0,0,1441,1437,1,0,0,0,1441,1438, + 1,0,0,0,1442,1443,1,0,0,0,1443,1441,1,0,0,0,1443,1444,1,0,0,0,1444, + 380,1,0,0,0,1445,1446,3,317,157,0,1446,1447,1,0,0,0,1447,1448,6, + 189,0,0,1448,382,1,0,0,0,44,0,1,2,423,640,1014,1043,1048,1054,1056, + 1068,1070,1084,1086,1091,1098,1103,1107,1112,1117,1121,1126,1133, + 1139,1144,1151,1156,1162,1167,1169,1175,1180,1187,1198,1200,1323, + 1383,1395,1400,1404,1423,1425,1441,1443,7,5,0,0,5,1,0,5,2,0,4,0, + 0,6,0,0,0,1,0,7,144,0 ] class HogQLLexer(Lexer): @@ -592,148 +605,152 @@ class HogQLLexer(Lexer): BY = 11 CASE = 12 CAST = 13 - COHORT = 14 - COLLATE = 15 - CROSS = 16 - CUBE = 17 - CURRENT = 18 - DATE = 19 - DAY = 20 - DESC = 21 - DESCENDING = 22 - DISTINCT = 23 - ELSE = 24 - END = 25 - EXTRACT = 26 - FINAL = 27 - FIRST = 28 - FN = 29 - FOLLOWING = 30 - FOR = 31 - FROM = 32 - FULL = 33 - GROUP = 34 - HAVING = 35 - HOUR = 36 - ID = 37 - IF = 38 - ILIKE = 39 - IN = 40 - INF = 41 - INNER = 42 - INTERVAL = 43 - IS = 44 - JOIN = 45 - KEY = 46 - LAST = 47 - LEADING = 48 - LEFT = 49 - LET = 50 - LIKE = 51 - LIMIT = 52 - MINUTE = 53 - MONTH = 54 - NAN_SQL = 55 - NOT = 56 - NULL_SQL = 57 - NULLS = 58 - OFFSET = 59 - ON = 60 - OR = 61 - ORDER = 62 - OUTER = 63 - OVER = 64 - PARTITION = 65 - PRECEDING = 66 - PREWHERE = 67 - QUARTER = 68 - RANGE = 69 - RETURN = 70 - RIGHT = 71 - ROLLUP = 72 - ROW = 73 - ROWS = 74 - SAMPLE = 75 - SECOND = 76 - SELECT = 77 - SEMI = 78 - SETTINGS = 79 - SUBSTRING = 80 - THEN = 81 - TIES = 82 - TIMESTAMP = 83 - TO = 84 - TOP = 85 - TOTALS = 86 - TRAILING = 87 - TRIM = 88 - TRUNCATE = 89 - UNBOUNDED = 90 - UNION = 91 - USING = 92 - WEEK = 93 - WHEN = 94 - WHERE = 95 - WHILE = 96 - WINDOW = 97 - WITH = 98 - YEAR = 99 - ESCAPE_CHAR_COMMON = 100 - IDENTIFIER = 101 - FLOATING_LITERAL = 102 - OCTAL_LITERAL = 103 - DECIMAL_LITERAL = 104 - HEXADECIMAL_LITERAL = 105 - STRING_LITERAL = 106 - ARROW = 107 - ASTERISK = 108 - BACKQUOTE = 109 - BACKSLASH = 110 - COLON = 111 - COMMA = 112 - CONCAT = 113 - DASH = 114 - DOLLAR = 115 - DOT = 116 - EQ_DOUBLE = 117 - EQ_SINGLE = 118 - GT_EQ = 119 - GT = 120 - HASH = 121 - IREGEX_SINGLE = 122 - IREGEX_DOUBLE = 123 - LBRACE = 124 - LBRACKET = 125 - LPAREN = 126 - LT_EQ = 127 - LT = 128 - NOT_EQ = 129 - NOT_IREGEX = 130 - NOT_REGEX = 131 - NULL_PROPERTY = 132 - NULLISH = 133 - PERCENT = 134 - PLUS = 135 - QUERY = 136 - QUOTE_DOUBLE = 137 - QUOTE_SINGLE_TEMPLATE = 138 - QUOTE_SINGLE_TEMPLATE_FULL = 139 - QUOTE_SINGLE = 140 - REGEX_SINGLE = 141 - REGEX_DOUBLE = 142 - RBRACE = 143 - RBRACKET = 144 - RPAREN = 145 - SEMICOLON = 146 - SLASH = 147 - UNDERSCORE = 148 - MULTI_LINE_COMMENT = 149 - SINGLE_LINE_COMMENT = 150 - WHITESPACE = 151 - STRING_TEXT = 152 - STRING_ESCAPE_TRIGGER = 153 - FULL_STRING_TEXT = 154 - FULL_STRING_ESCAPE_TRIGGER = 155 + CATCH = 14 + COHORT = 15 + COLLATE = 16 + CROSS = 17 + CUBE = 18 + CURRENT = 19 + DATE = 20 + DAY = 21 + DESC = 22 + DESCENDING = 23 + DISTINCT = 24 + ELSE = 25 + END = 26 + EXTRACT = 27 + FINAL = 28 + FINALLY = 29 + FIRST = 30 + FN = 31 + FOLLOWING = 32 + FOR = 33 + FROM = 34 + FULL = 35 + GROUP = 36 + HAVING = 37 + HOUR = 38 + ID = 39 + IF = 40 + ILIKE = 41 + IN = 42 + INF = 43 + INNER = 44 + INTERVAL = 45 + IS = 46 + JOIN = 47 + KEY = 48 + LAST = 49 + LEADING = 50 + LEFT = 51 + LET = 52 + LIKE = 53 + LIMIT = 54 + MINUTE = 55 + MONTH = 56 + NAN_SQL = 57 + NOT = 58 + NULL_SQL = 59 + NULLS = 60 + OFFSET = 61 + ON = 62 + OR = 63 + ORDER = 64 + OUTER = 65 + OVER = 66 + PARTITION = 67 + PRECEDING = 68 + PREWHERE = 69 + QUARTER = 70 + RANGE = 71 + RETURN = 72 + RIGHT = 73 + ROLLUP = 74 + ROW = 75 + ROWS = 76 + SAMPLE = 77 + SECOND = 78 + SELECT = 79 + SEMI = 80 + SETTINGS = 81 + SUBSTRING = 82 + THEN = 83 + THROW = 84 + TIES = 85 + TIMESTAMP = 86 + TO = 87 + TOP = 88 + TOTALS = 89 + TRAILING = 90 + TRIM = 91 + TRUNCATE = 92 + TRY = 93 + UNBOUNDED = 94 + UNION = 95 + USING = 96 + WEEK = 97 + WHEN = 98 + WHERE = 99 + WHILE = 100 + WINDOW = 101 + WITH = 102 + YEAR = 103 + ESCAPE_CHAR_COMMON = 104 + IDENTIFIER = 105 + FLOATING_LITERAL = 106 + OCTAL_LITERAL = 107 + DECIMAL_LITERAL = 108 + HEXADECIMAL_LITERAL = 109 + STRING_LITERAL = 110 + ARROW = 111 + ASTERISK = 112 + BACKQUOTE = 113 + BACKSLASH = 114 + COLON = 115 + COMMA = 116 + CONCAT = 117 + DASH = 118 + DOLLAR = 119 + DOT = 120 + EQ_DOUBLE = 121 + EQ_SINGLE = 122 + GT_EQ = 123 + GT = 124 + HASH = 125 + IREGEX_SINGLE = 126 + IREGEX_DOUBLE = 127 + LBRACE = 128 + LBRACKET = 129 + LPAREN = 130 + LT_EQ = 131 + LT = 132 + NOT_EQ = 133 + NOT_IREGEX = 134 + NOT_REGEX = 135 + NULL_PROPERTY = 136 + NULLISH = 137 + PERCENT = 138 + PLUS = 139 + QUERY = 140 + QUOTE_DOUBLE = 141 + QUOTE_SINGLE_TEMPLATE = 142 + QUOTE_SINGLE_TEMPLATE_FULL = 143 + QUOTE_SINGLE = 144 + REGEX_SINGLE = 145 + REGEX_DOUBLE = 146 + RBRACE = 147 + RBRACKET = 148 + RPAREN = 149 + SEMICOLON = 150 + SLASH = 151 + UNDERSCORE = 152 + MULTI_LINE_COMMENT = 153 + SINGLE_LINE_COMMENT = 154 + WHITESPACE = 155 + STRING_TEXT = 156 + STRING_ESCAPE_TRIGGER = 157 + FULL_STRING_TEXT = 158 + FULL_STRING_ESCAPE_TRIGGER = 159 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] @@ -748,48 +765,50 @@ class HogQLLexer(Lexer): symbolicNames = [ "", "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", "ASOF", - "BETWEEN", "BOTH", "BY", "CASE", "CAST", "COHORT", "COLLATE", - "CROSS", "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", - "DISTINCT", "ELSE", "END", "EXTRACT", "FINAL", "FIRST", "FN", - "FOLLOWING", "FOR", "FROM", "FULL", "GROUP", "HAVING", "HOUR", - "ID", "IF", "ILIKE", "IN", "INF", "INNER", "INTERVAL", "IS", - "JOIN", "KEY", "LAST", "LEADING", "LEFT", "LET", "LIKE", "LIMIT", - "MINUTE", "MONTH", "NAN_SQL", "NOT", "NULL_SQL", "NULLS", "OFFSET", - "ON", "OR", "ORDER", "OUTER", "OVER", "PARTITION", "PRECEDING", - "PREWHERE", "QUARTER", "RANGE", "RETURN", "RIGHT", "ROLLUP", - "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT", "SEMI", "SETTINGS", - "SUBSTRING", "THEN", "TIES", "TIMESTAMP", "TO", "TOP", "TOTALS", - "TRAILING", "TRIM", "TRUNCATE", "UNBOUNDED", "UNION", "USING", - "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH", "YEAR", - "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", - "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", - "ARROW", "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", - "CONCAT", "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", - "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", "LBRACE", - "LBRACKET", "LPAREN", "LT_EQ", "LT", "NOT_EQ", "NOT_IREGEX", - "NOT_REGEX", "NULL_PROPERTY", "NULLISH", "PERCENT", "PLUS", - "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", "QUOTE_SINGLE_TEMPLATE_FULL", - "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", "RBRACE", "RBRACKET", - "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", "MULTI_LINE_COMMENT", - "SINGLE_LINE_COMMENT", "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", - "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" ] + "BETWEEN", "BOTH", "BY", "CASE", "CAST", "CATCH", "COHORT", + "COLLATE", "CROSS", "CUBE", "CURRENT", "DATE", "DAY", "DESC", + "DESCENDING", "DISTINCT", "ELSE", "END", "EXTRACT", "FINAL", + "FINALLY", "FIRST", "FN", "FOLLOWING", "FOR", "FROM", "FULL", + "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", "IN", "INF", + "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", + "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", "NAN_SQL", + "NOT", "NULL_SQL", "NULLS", "OFFSET", "ON", "OR", "ORDER", "OUTER", + "OVER", "PARTITION", "PRECEDING", "PREWHERE", "QUARTER", "RANGE", + "RETURN", "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", + "SELECT", "SEMI", "SETTINGS", "SUBSTRING", "THEN", "THROW", + "TIES", "TIMESTAMP", "TO", "TOP", "TOTALS", "TRAILING", "TRIM", + "TRUNCATE", "TRY", "UNBOUNDED", "UNION", "USING", "WEEK", "WHEN", + "WHERE", "WHILE", "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", + "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", + "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW", "ASTERISK", + "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", "CONCAT", "DASH", + "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", "GT_EQ", "GT", "HASH", + "IREGEX_SINGLE", "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", + "LT_EQ", "LT", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", + "NULLISH", "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", + "QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", + "REGEX_DOUBLE", "RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", + "SLASH", "UNDERSCORE", "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", + "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", "FULL_STRING_TEXT", + "FULL_STRING_ESCAPE_TRIGGER" ] ruleNames = [ "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", - "ASOF", "BETWEEN", "BOTH", "BY", "CASE", "CAST", "COHORT", - "COLLATE", "CROSS", "CUBE", "CURRENT", "DATE", "DAY", - "DESC", "DESCENDING", "DISTINCT", "ELSE", "END", "EXTRACT", - "FINAL", "FIRST", "FN", "FOLLOWING", "FOR", "FROM", "FULL", - "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", "IN", - "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", - "LEADING", "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", - "NAN_SQL", "NOT", "NULL_SQL", "NULLS", "OFFSET", "ON", - "OR", "ORDER", "OUTER", "OVER", "PARTITION", "PRECEDING", - "PREWHERE", "QUARTER", "RANGE", "RETURN", "RIGHT", "ROLLUP", - "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT", "SEMI", "SETTINGS", - "SUBSTRING", "THEN", "TIES", "TIMESTAMP", "TO", "TOP", - "TOTALS", "TRAILING", "TRIM", "TRUNCATE", "UNBOUNDED", - "UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", - "WITH", "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", + "ASOF", "BETWEEN", "BOTH", "BY", "CASE", "CAST", "CATCH", + "COHORT", "COLLATE", "CROSS", "CUBE", "CURRENT", "DATE", + "DAY", "DESC", "DESCENDING", "DISTINCT", "ELSE", "END", + "EXTRACT", "FINAL", "FINALLY", "FIRST", "FN", "FOLLOWING", + "FOR", "FROM", "FULL", "GROUP", "HAVING", "HOUR", "ID", + "IF", "ILIKE", "IN", "INF", "INNER", "INTERVAL", "IS", + "JOIN", "KEY", "LAST", "LEADING", "LEFT", "LET", "LIKE", + "LIMIT", "MINUTE", "MONTH", "NAN_SQL", "NOT", "NULL_SQL", + "NULLS", "OFFSET", "ON", "OR", "ORDER", "OUTER", "OVER", + "PARTITION", "PRECEDING", "PREWHERE", "QUARTER", "RANGE", + "RETURN", "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", + "SECOND", "SELECT", "SEMI", "SETTINGS", "SUBSTRING", "THEN", + "THROW", "TIES", "TIMESTAMP", "TO", "TOP", "TOTALS", "TRAILING", + "TRIM", "TRUNCATE", "TRY", "UNBOUNDED", "UNION", "USING", + "WEEK", "WHEN", "WHERE", "WHILE", "WINDOW", "WITH", "YEAR", + "ESCAPE_CHAR_COMMON", "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", diff --git a/posthog/hogql/grammar/HogQLLexer.tokens b/posthog/hogql/grammar/HogQLLexer.tokens index 3ba82bf92c17b..320718e97710b 100644 --- a/posthog/hogql/grammar/HogQLLexer.tokens +++ b/posthog/hogql/grammar/HogQLLexer.tokens @@ -11,186 +11,190 @@ BOTH=10 BY=11 CASE=12 CAST=13 -COHORT=14 -COLLATE=15 -CROSS=16 -CUBE=17 -CURRENT=18 -DATE=19 -DAY=20 -DESC=21 -DESCENDING=22 -DISTINCT=23 -ELSE=24 -END=25 -EXTRACT=26 -FINAL=27 -FIRST=28 -FN=29 -FOLLOWING=30 -FOR=31 -FROM=32 -FULL=33 -GROUP=34 -HAVING=35 -HOUR=36 -ID=37 -IF=38 -ILIKE=39 -IN=40 -INF=41 -INNER=42 -INTERVAL=43 -IS=44 -JOIN=45 -KEY=46 -LAST=47 -LEADING=48 -LEFT=49 -LET=50 -LIKE=51 -LIMIT=52 -MINUTE=53 -MONTH=54 -NAN_SQL=55 -NOT=56 -NULL_SQL=57 -NULLS=58 -OFFSET=59 -ON=60 -OR=61 -ORDER=62 -OUTER=63 -OVER=64 -PARTITION=65 -PRECEDING=66 -PREWHERE=67 -QUARTER=68 -RANGE=69 -RETURN=70 -RIGHT=71 -ROLLUP=72 -ROW=73 -ROWS=74 -SAMPLE=75 -SECOND=76 -SELECT=77 -SEMI=78 -SETTINGS=79 -SUBSTRING=80 -THEN=81 -TIES=82 -TIMESTAMP=83 -TO=84 -TOP=85 -TOTALS=86 -TRAILING=87 -TRIM=88 -TRUNCATE=89 -UNBOUNDED=90 -UNION=91 -USING=92 -WEEK=93 -WHEN=94 -WHERE=95 -WHILE=96 -WINDOW=97 -WITH=98 -YEAR=99 -ESCAPE_CHAR_COMMON=100 -IDENTIFIER=101 -FLOATING_LITERAL=102 -OCTAL_LITERAL=103 -DECIMAL_LITERAL=104 -HEXADECIMAL_LITERAL=105 -STRING_LITERAL=106 -ARROW=107 -ASTERISK=108 -BACKQUOTE=109 -BACKSLASH=110 -COLON=111 -COMMA=112 -CONCAT=113 -DASH=114 -DOLLAR=115 -DOT=116 -EQ_DOUBLE=117 -EQ_SINGLE=118 -GT_EQ=119 -GT=120 -HASH=121 -IREGEX_SINGLE=122 -IREGEX_DOUBLE=123 -LBRACE=124 -LBRACKET=125 -LPAREN=126 -LT_EQ=127 -LT=128 -NOT_EQ=129 -NOT_IREGEX=130 -NOT_REGEX=131 -NULL_PROPERTY=132 -NULLISH=133 -PERCENT=134 -PLUS=135 -QUERY=136 -QUOTE_DOUBLE=137 -QUOTE_SINGLE_TEMPLATE=138 -QUOTE_SINGLE_TEMPLATE_FULL=139 -QUOTE_SINGLE=140 -REGEX_SINGLE=141 -REGEX_DOUBLE=142 -RBRACE=143 -RBRACKET=144 -RPAREN=145 -SEMICOLON=146 -SLASH=147 -UNDERSCORE=148 -MULTI_LINE_COMMENT=149 -SINGLE_LINE_COMMENT=150 -WHITESPACE=151 -STRING_TEXT=152 -STRING_ESCAPE_TRIGGER=153 -FULL_STRING_TEXT=154 -FULL_STRING_ESCAPE_TRIGGER=155 -'->'=107 -'*'=108 -'`'=109 -'\\'=110 -':'=111 -','=112 -'||'=113 -'-'=114 -'$'=115 -'.'=116 -'=='=117 -'='=118 -'>='=119 -'>'=120 -'#'=121 -'~*'=122 -'=~*'=123 -'{'=124 -'['=125 -'('=126 -'<='=127 -'<'=128 -'!~*'=130 -'!~'=131 -'?.'=132 -'??'=133 -'%'=134 -'+'=135 -'?'=136 -'"'=137 -'f\''=138 -'F\''=139 -'\''=140 -'~'=141 -'=~'=142 -'}'=143 -']'=144 -')'=145 -';'=146 -'/'=147 -'_'=148 +CATCH=14 +COHORT=15 +COLLATE=16 +CROSS=17 +CUBE=18 +CURRENT=19 +DATE=20 +DAY=21 +DESC=22 +DESCENDING=23 +DISTINCT=24 +ELSE=25 +END=26 +EXTRACT=27 +FINAL=28 +FINALLY=29 +FIRST=30 +FN=31 +FOLLOWING=32 +FOR=33 +FROM=34 +FULL=35 +GROUP=36 +HAVING=37 +HOUR=38 +ID=39 +IF=40 +ILIKE=41 +IN=42 +INF=43 +INNER=44 +INTERVAL=45 +IS=46 +JOIN=47 +KEY=48 +LAST=49 +LEADING=50 +LEFT=51 +LET=52 +LIKE=53 +LIMIT=54 +MINUTE=55 +MONTH=56 +NAN_SQL=57 +NOT=58 +NULL_SQL=59 +NULLS=60 +OFFSET=61 +ON=62 +OR=63 +ORDER=64 +OUTER=65 +OVER=66 +PARTITION=67 +PRECEDING=68 +PREWHERE=69 +QUARTER=70 +RANGE=71 +RETURN=72 +RIGHT=73 +ROLLUP=74 +ROW=75 +ROWS=76 +SAMPLE=77 +SECOND=78 +SELECT=79 +SEMI=80 +SETTINGS=81 +SUBSTRING=82 +THEN=83 +THROW=84 +TIES=85 +TIMESTAMP=86 +TO=87 +TOP=88 +TOTALS=89 +TRAILING=90 +TRIM=91 +TRUNCATE=92 +TRY=93 +UNBOUNDED=94 +UNION=95 +USING=96 +WEEK=97 +WHEN=98 +WHERE=99 +WHILE=100 +WINDOW=101 +WITH=102 +YEAR=103 +ESCAPE_CHAR_COMMON=104 +IDENTIFIER=105 +FLOATING_LITERAL=106 +OCTAL_LITERAL=107 +DECIMAL_LITERAL=108 +HEXADECIMAL_LITERAL=109 +STRING_LITERAL=110 +ARROW=111 +ASTERISK=112 +BACKQUOTE=113 +BACKSLASH=114 +COLON=115 +COMMA=116 +CONCAT=117 +DASH=118 +DOLLAR=119 +DOT=120 +EQ_DOUBLE=121 +EQ_SINGLE=122 +GT_EQ=123 +GT=124 +HASH=125 +IREGEX_SINGLE=126 +IREGEX_DOUBLE=127 +LBRACE=128 +LBRACKET=129 +LPAREN=130 +LT_EQ=131 +LT=132 +NOT_EQ=133 +NOT_IREGEX=134 +NOT_REGEX=135 +NULL_PROPERTY=136 +NULLISH=137 +PERCENT=138 +PLUS=139 +QUERY=140 +QUOTE_DOUBLE=141 +QUOTE_SINGLE_TEMPLATE=142 +QUOTE_SINGLE_TEMPLATE_FULL=143 +QUOTE_SINGLE=144 +REGEX_SINGLE=145 +REGEX_DOUBLE=146 +RBRACE=147 +RBRACKET=148 +RPAREN=149 +SEMICOLON=150 +SLASH=151 +UNDERSCORE=152 +MULTI_LINE_COMMENT=153 +SINGLE_LINE_COMMENT=154 +WHITESPACE=155 +STRING_TEXT=156 +STRING_ESCAPE_TRIGGER=157 +FULL_STRING_TEXT=158 +FULL_STRING_ESCAPE_TRIGGER=159 +'->'=111 +'*'=112 +'`'=113 +'\\'=114 +':'=115 +','=116 +'||'=117 +'-'=118 +'$'=119 +'.'=120 +'=='=121 +'='=122 +'>='=123 +'>'=124 +'#'=125 +'~*'=126 +'=~*'=127 +'{'=128 +'['=129 +'('=130 +'<='=131 +'<'=132 +'!~*'=134 +'!~'=135 +'?.'=136 +'??'=137 +'%'=138 +'+'=139 +'?'=140 +'"'=141 +'f\''=142 +'F\''=143 +'\''=144 +'~'=145 +'=~'=146 +'}'=147 +']'=148 +')'=149 +';'=150 +'/'=151 +'_'=152 diff --git a/posthog/hogql/grammar/HogQLParser.g4 b/posthog/hogql/grammar/HogQLParser.g4 index 2c0d7f206ebb7..871f549f41f02 100644 --- a/posthog/hogql/grammar/HogQLParser.g4 +++ b/posthog/hogql/grammar/HogQLParser.g4 @@ -15,6 +15,8 @@ varDecl: LET identifier ( COLON EQ_SINGLE expression )? ; identifierList: identifier (COMMA identifier)* COMMA?; statement : returnStmt + | throwStmt + | tryCatchStmt | ifStmt | whileStmt | forInStmt @@ -27,6 +29,9 @@ statement : returnStmt ; returnStmt : RETURN expression? SEMICOLON?; +throwStmt : THROW expression? SEMICOLON?; +catchBlock : CATCH (LPAREN catchVar=identifier (COLON catchType=identifier)? RPAREN)? catchStmt=block; +tryCatchStmt : TRY tryStmt=block catchBlock* (FINALLY finallyStmt=block)?; ifStmt : IF LPAREN expression RPAREN statement ( ELSE statement )? ; whileStmt : WHILE LPAREN expression RPAREN statement SEMICOLON?; forStmt : FOR LPAREN @@ -216,7 +221,7 @@ columnLambdaExpr: hogqlxTagElement : LT identifier hogqlxTagAttribute* SLASH GT # HogqlxTagElementClosed - | LT identifier hogqlxTagAttribute* GT hogqlxTagElement? LT SLASH identifier GT # HogqlxTagElementNested + | LT identifier hogqlxTagAttribute* GT (hogqlxTagElement | (LBRACE columnExpr RBRACE))? LT SLASH identifier GT # HogqlxTagElementNested ; hogqlxTagAttribute : identifier '=' string diff --git a/posthog/hogql/grammar/HogQLParser.interp b/posthog/hogql/grammar/HogQLParser.interp index 22fc706e26505..e31bf92fee7e9 100644 --- a/posthog/hogql/grammar/HogQLParser.interp +++ b/posthog/hogql/grammar/HogQLParser.interp @@ -106,6 +106,10 @@ null null null null +null +null +null +null '->' '*' '`' @@ -171,6 +175,7 @@ BOTH BY CASE CAST +CATCH COHORT COLLATE CROSS @@ -185,6 +190,7 @@ ELSE END EXTRACT FINAL +FINALLY FIRST FN FOLLOWING @@ -239,6 +245,7 @@ SEMI SETTINGS SUBSTRING THEN +THROW TIES TIMESTAMP TO @@ -247,6 +254,7 @@ TOTALS TRAILING TRIM TRUNCATE +TRY UNBOUNDED UNION USING @@ -322,6 +330,9 @@ varDecl identifierList statement returnStmt +throwStmt +catchBlock +tryCatchStmt ifStmt whileStmt forStmt @@ -403,4 +414,4 @@ stringContentsFull atn: -[4, 1, 155, 1267, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 1, 0, 5, 0, 172, 8, 0, 10, 0, 12, 0, 175, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 181, 8, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 190, 8, 3, 1, 4, 1, 4, 1, 4, 5, 4, 195, 8, 4, 10, 4, 12, 4, 198, 9, 4, 1, 4, 3, 4, 201, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 213, 8, 5, 1, 6, 1, 6, 3, 6, 217, 8, 6, 1, 6, 3, 6, 220, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 229, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 237, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 244, 8, 9, 1, 9, 1, 9, 3, 9, 248, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 254, 8, 9, 1, 9, 1, 9, 1, 9, 3, 9, 259, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 267, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 274, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 280, 8, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 3, 13, 292, 8, 13, 1, 14, 1, 14, 1, 15, 1, 15, 5, 15, 298, 8, 15, 10, 15, 12, 15, 301, 9, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 5, 17, 312, 8, 17, 10, 17, 12, 17, 315, 9, 17, 1, 17, 3, 17, 318, 8, 17, 1, 18, 1, 18, 1, 18, 3, 18, 323, 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 5, 19, 331, 8, 19, 10, 19, 12, 19, 334, 9, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 342, 8, 20, 1, 21, 3, 21, 345, 8, 21, 1, 21, 1, 21, 3, 21, 349, 8, 21, 1, 21, 3, 21, 352, 8, 21, 1, 21, 1, 21, 3, 21, 356, 8, 21, 1, 21, 3, 21, 359, 8, 21, 1, 21, 3, 21, 362, 8, 21, 1, 21, 3, 21, 365, 8, 21, 1, 21, 3, 21, 368, 8, 21, 1, 21, 1, 21, 3, 21, 372, 8, 21, 1, 21, 1, 21, 3, 21, 376, 8, 21, 1, 21, 3, 21, 379, 8, 21, 1, 21, 3, 21, 382, 8, 21, 1, 21, 3, 21, 385, 8, 21, 1, 21, 1, 21, 3, 21, 389, 8, 21, 1, 21, 3, 21, 392, 8, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 401, 8, 23, 1, 24, 1, 24, 1, 24, 1, 25, 3, 25, 407, 8, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 426, 8, 26, 10, 26, 12, 26, 429, 9, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 3, 29, 445, 8, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 462, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 468, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 474, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 3, 33, 485, 8, 33, 3, 33, 487, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 3, 36, 498, 8, 36, 1, 36, 3, 36, 501, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 507, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 515, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 521, 8, 36, 10, 36, 12, 36, 524, 9, 36, 1, 37, 3, 37, 527, 8, 37, 1, 37, 1, 37, 1, 37, 3, 37, 532, 8, 37, 1, 37, 3, 37, 535, 8, 37, 1, 37, 3, 37, 538, 8, 37, 1, 37, 1, 37, 3, 37, 542, 8, 37, 1, 37, 1, 37, 3, 37, 546, 8, 37, 1, 37, 3, 37, 549, 8, 37, 3, 37, 551, 8, 37, 1, 37, 3, 37, 554, 8, 37, 1, 37, 1, 37, 3, 37, 558, 8, 37, 1, 37, 1, 37, 3, 37, 562, 8, 37, 1, 37, 3, 37, 565, 8, 37, 3, 37, 567, 8, 37, 3, 37, 569, 8, 37, 1, 38, 1, 38, 1, 38, 3, 38, 574, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 585, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 3, 40, 591, 8, 40, 1, 41, 1, 41, 1, 41, 5, 41, 596, 8, 41, 10, 41, 12, 41, 599, 9, 41, 1, 42, 1, 42, 3, 42, 603, 8, 42, 1, 42, 1, 42, 3, 42, 607, 8, 42, 1, 42, 1, 42, 3, 42, 611, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 617, 8, 43, 3, 43, 619, 8, 43, 1, 44, 1, 44, 1, 44, 5, 44, 624, 8, 44, 10, 44, 12, 44, 627, 9, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 3, 46, 634, 8, 46, 1, 46, 3, 46, 637, 8, 46, 1, 46, 3, 46, 640, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 3, 50, 659, 8, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 3, 51, 673, 8, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 687, 8, 53, 10, 53, 12, 53, 690, 9, 53, 1, 53, 3, 53, 693, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 702, 8, 53, 10, 53, 12, 53, 705, 9, 53, 1, 53, 3, 53, 708, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 717, 8, 53, 10, 53, 12, 53, 720, 9, 53, 1, 53, 3, 53, 723, 8, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 730, 8, 53, 1, 53, 1, 53, 3, 53, 734, 8, 53, 1, 54, 1, 54, 1, 54, 5, 54, 739, 8, 54, 10, 54, 12, 54, 742, 9, 54, 1, 54, 3, 54, 745, 8, 54, 1, 55, 1, 55, 1, 55, 3, 55, 750, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 4, 55, 757, 8, 55, 11, 55, 12, 55, 758, 1, 55, 1, 55, 3, 55, 763, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 787, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 804, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 810, 8, 55, 1, 55, 3, 55, 813, 8, 55, 1, 55, 3, 55, 816, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 826, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 832, 8, 55, 1, 55, 3, 55, 835, 8, 55, 1, 55, 3, 55, 838, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 846, 8, 55, 1, 55, 3, 55, 849, 8, 55, 1, 55, 1, 55, 3, 55, 853, 8, 55, 1, 55, 3, 55, 856, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 870, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 887, 8, 55, 1, 55, 1, 55, 1, 55, 3, 55, 892, 8, 55, 1, 55, 1, 55, 3, 55, 896, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 902, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 909, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 921, 8, 55, 1, 55, 1, 55, 3, 55, 925, 8, 55, 1, 55, 3, 55, 928, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 937, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 951, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 990, 8, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 3, 55, 998, 8, 55, 5, 55, 1000, 8, 55, 10, 55, 12, 55, 1003, 9, 55, 1, 56, 1, 56, 1, 56, 5, 56, 1008, 8, 56, 10, 56, 12, 56, 1011, 9, 56, 1, 56, 3, 56, 1014, 8, 56, 1, 57, 1, 57, 3, 57, 1018, 8, 57, 1, 58, 1, 58, 1, 58, 1, 58, 5, 58, 1024, 8, 58, 10, 58, 12, 58, 1027, 9, 58, 1, 58, 3, 58, 1030, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 5, 58, 1037, 8, 58, 10, 58, 12, 58, 1040, 9, 58, 1, 58, 3, 58, 1043, 8, 58, 3, 58, 1045, 8, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 5, 59, 1053, 8, 59, 10, 59, 12, 59, 1056, 9, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 1064, 8, 59, 10, 59, 12, 59, 1067, 9, 59, 1, 59, 1, 59, 3, 59, 1071, 8, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 1078, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 1091, 8, 60, 1, 61, 1, 61, 1, 61, 5, 61, 1096, 8, 61, 10, 61, 12, 61, 1099, 9, 61, 1, 61, 3, 61, 1102, 8, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1114, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1120, 8, 63, 1, 63, 3, 63, 1123, 8, 63, 1, 64, 1, 64, 1, 64, 5, 64, 1128, 8, 64, 10, 64, 12, 64, 1131, 9, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1142, 8, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1148, 8, 65, 5, 65, 1150, 8, 65, 10, 65, 12, 65, 1153, 9, 65, 1, 66, 1, 66, 1, 66, 3, 66, 1158, 8, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 3, 67, 1165, 8, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 5, 68, 1172, 8, 68, 10, 68, 12, 68, 1175, 9, 68, 1, 68, 3, 68, 1178, 8, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 3, 70, 1188, 8, 70, 3, 70, 1190, 8, 70, 1, 71, 3, 71, 1193, 8, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 1, 71, 3, 71, 1201, 8, 71, 1, 72, 1, 72, 1, 72, 3, 72, 1206, 8, 72, 1, 73, 1, 73, 1, 74, 1, 74, 1, 75, 1, 75, 1, 76, 1, 76, 3, 76, 1216, 8, 76, 1, 77, 1, 77, 1, 77, 3, 77, 1221, 8, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 3, 80, 1233, 8, 80, 1, 81, 1, 81, 5, 81, 1237, 8, 81, 10, 81, 12, 81, 1240, 9, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 82, 3, 82, 1249, 8, 82, 1, 83, 1, 83, 5, 83, 1253, 8, 83, 10, 83, 12, 83, 1256, 9, 83, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 84, 1, 84, 3, 84, 1265, 8, 84, 1, 84, 0, 3, 72, 110, 130, 85, 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, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 0, 16, 2, 0, 17, 17, 72, 72, 2, 0, 42, 42, 49, 49, 3, 0, 1, 1, 4, 4, 8, 8, 4, 0, 1, 1, 3, 4, 8, 8, 78, 78, 2, 0, 49, 49, 71, 71, 2, 0, 1, 1, 4, 4, 2, 0, 7, 7, 21, 22, 2, 0, 28, 28, 47, 47, 2, 0, 69, 69, 74, 74, 3, 0, 10, 10, 48, 48, 87, 87, 2, 0, 39, 39, 51, 51, 1, 0, 103, 104, 2, 0, 114, 114, 135, 135, 7, 0, 20, 20, 36, 36, 53, 54, 68, 68, 76, 76, 93, 93, 99, 99, 12, 0, 1, 19, 21, 28, 30, 35, 37, 40, 42, 49, 51, 52, 56, 56, 58, 67, 69, 75, 77, 92, 94, 95, 97, 98, 4, 0, 19, 19, 28, 28, 37, 37, 46, 46, 1429, 0, 173, 1, 0, 0, 0, 2, 180, 1, 0, 0, 0, 4, 182, 1, 0, 0, 0, 6, 184, 1, 0, 0, 0, 8, 191, 1, 0, 0, 0, 10, 212, 1, 0, 0, 0, 12, 214, 1, 0, 0, 0, 14, 221, 1, 0, 0, 0, 16, 230, 1, 0, 0, 0, 18, 238, 1, 0, 0, 0, 20, 260, 1, 0, 0, 0, 22, 275, 1, 0, 0, 0, 24, 284, 1, 0, 0, 0, 26, 289, 1, 0, 0, 0, 28, 293, 1, 0, 0, 0, 30, 295, 1, 0, 0, 0, 32, 304, 1, 0, 0, 0, 34, 308, 1, 0, 0, 0, 36, 322, 1, 0, 0, 0, 38, 326, 1, 0, 0, 0, 40, 341, 1, 0, 0, 0, 42, 344, 1, 0, 0, 0, 44, 393, 1, 0, 0, 0, 46, 396, 1, 0, 0, 0, 48, 402, 1, 0, 0, 0, 50, 406, 1, 0, 0, 0, 52, 412, 1, 0, 0, 0, 54, 430, 1, 0, 0, 0, 56, 433, 1, 0, 0, 0, 58, 436, 1, 0, 0, 0, 60, 446, 1, 0, 0, 0, 62, 449, 1, 0, 0, 0, 64, 453, 1, 0, 0, 0, 66, 486, 1, 0, 0, 0, 68, 488, 1, 0, 0, 0, 70, 491, 1, 0, 0, 0, 72, 506, 1, 0, 0, 0, 74, 568, 1, 0, 0, 0, 76, 573, 1, 0, 0, 0, 78, 584, 1, 0, 0, 0, 80, 586, 1, 0, 0, 0, 82, 592, 1, 0, 0, 0, 84, 600, 1, 0, 0, 0, 86, 618, 1, 0, 0, 0, 88, 620, 1, 0, 0, 0, 90, 628, 1, 0, 0, 0, 92, 633, 1, 0, 0, 0, 94, 641, 1, 0, 0, 0, 96, 645, 1, 0, 0, 0, 98, 649, 1, 0, 0, 0, 100, 658, 1, 0, 0, 0, 102, 672, 1, 0, 0, 0, 104, 674, 1, 0, 0, 0, 106, 733, 1, 0, 0, 0, 108, 735, 1, 0, 0, 0, 110, 895, 1, 0, 0, 0, 112, 1004, 1, 0, 0, 0, 114, 1017, 1, 0, 0, 0, 116, 1044, 1, 0, 0, 0, 118, 1077, 1, 0, 0, 0, 120, 1090, 1, 0, 0, 0, 122, 1092, 1, 0, 0, 0, 124, 1113, 1, 0, 0, 0, 126, 1122, 1, 0, 0, 0, 128, 1124, 1, 0, 0, 0, 130, 1141, 1, 0, 0, 0, 132, 1154, 1, 0, 0, 0, 134, 1164, 1, 0, 0, 0, 136, 1168, 1, 0, 0, 0, 138, 1179, 1, 0, 0, 0, 140, 1189, 1, 0, 0, 0, 142, 1192, 1, 0, 0, 0, 144, 1205, 1, 0, 0, 0, 146, 1207, 1, 0, 0, 0, 148, 1209, 1, 0, 0, 0, 150, 1211, 1, 0, 0, 0, 152, 1215, 1, 0, 0, 0, 154, 1220, 1, 0, 0, 0, 156, 1222, 1, 0, 0, 0, 158, 1226, 1, 0, 0, 0, 160, 1232, 1, 0, 0, 0, 162, 1234, 1, 0, 0, 0, 164, 1248, 1, 0, 0, 0, 166, 1250, 1, 0, 0, 0, 168, 1264, 1, 0, 0, 0, 170, 172, 3, 2, 1, 0, 171, 170, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 0, 0, 1, 177, 1, 1, 0, 0, 0, 178, 181, 3, 6, 3, 0, 179, 181, 3, 10, 5, 0, 180, 178, 1, 0, 0, 0, 180, 179, 1, 0, 0, 0, 181, 3, 1, 0, 0, 0, 182, 183, 3, 110, 55, 0, 183, 5, 1, 0, 0, 0, 184, 185, 5, 50, 0, 0, 185, 189, 3, 154, 77, 0, 186, 187, 5, 111, 0, 0, 187, 188, 5, 118, 0, 0, 188, 190, 3, 4, 2, 0, 189, 186, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 7, 1, 0, 0, 0, 191, 196, 3, 154, 77, 0, 192, 193, 5, 112, 0, 0, 193, 195, 3, 154, 77, 0, 194, 192, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 200, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 201, 5, 112, 0, 0, 200, 199, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 9, 1, 0, 0, 0, 202, 213, 3, 12, 6, 0, 203, 213, 3, 14, 7, 0, 204, 213, 3, 16, 8, 0, 205, 213, 3, 20, 10, 0, 206, 213, 3, 18, 9, 0, 207, 213, 3, 22, 11, 0, 208, 213, 3, 24, 12, 0, 209, 213, 3, 30, 15, 0, 210, 213, 3, 26, 13, 0, 211, 213, 3, 28, 14, 0, 212, 202, 1, 0, 0, 0, 212, 203, 1, 0, 0, 0, 212, 204, 1, 0, 0, 0, 212, 205, 1, 0, 0, 0, 212, 206, 1, 0, 0, 0, 212, 207, 1, 0, 0, 0, 212, 208, 1, 0, 0, 0, 212, 209, 1, 0, 0, 0, 212, 210, 1, 0, 0, 0, 212, 211, 1, 0, 0, 0, 213, 11, 1, 0, 0, 0, 214, 216, 5, 70, 0, 0, 215, 217, 3, 4, 2, 0, 216, 215, 1, 0, 0, 0, 216, 217, 1, 0, 0, 0, 217, 219, 1, 0, 0, 0, 218, 220, 5, 146, 0, 0, 219, 218, 1, 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 13, 1, 0, 0, 0, 221, 222, 5, 38, 0, 0, 222, 223, 5, 126, 0, 0, 223, 224, 3, 4, 2, 0, 224, 225, 5, 145, 0, 0, 225, 228, 3, 10, 5, 0, 226, 227, 5, 24, 0, 0, 227, 229, 3, 10, 5, 0, 228, 226, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 15, 1, 0, 0, 0, 230, 231, 5, 96, 0, 0, 231, 232, 5, 126, 0, 0, 232, 233, 3, 4, 2, 0, 233, 234, 5, 145, 0, 0, 234, 236, 3, 10, 5, 0, 235, 237, 5, 146, 0, 0, 236, 235, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, 237, 17, 1, 0, 0, 0, 238, 239, 5, 31, 0, 0, 239, 243, 5, 126, 0, 0, 240, 244, 3, 6, 3, 0, 241, 244, 3, 24, 12, 0, 242, 244, 3, 4, 2, 0, 243, 240, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 242, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 247, 5, 146, 0, 0, 246, 248, 3, 4, 2, 0, 247, 246, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 253, 5, 146, 0, 0, 250, 254, 3, 6, 3, 0, 251, 254, 3, 24, 12, 0, 252, 254, 3, 4, 2, 0, 253, 250, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 252, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 256, 5, 145, 0, 0, 256, 258, 3, 10, 5, 0, 257, 259, 5, 146, 0, 0, 258, 257, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 19, 1, 0, 0, 0, 260, 261, 5, 31, 0, 0, 261, 262, 5, 126, 0, 0, 262, 263, 5, 50, 0, 0, 263, 266, 3, 154, 77, 0, 264, 265, 5, 112, 0, 0, 265, 267, 3, 154, 77, 0, 266, 264, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 5, 40, 0, 0, 269, 270, 3, 4, 2, 0, 270, 271, 5, 145, 0, 0, 271, 273, 3, 10, 5, 0, 272, 274, 5, 146, 0, 0, 273, 272, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 21, 1, 0, 0, 0, 275, 276, 5, 29, 0, 0, 276, 277, 3, 154, 77, 0, 277, 279, 5, 126, 0, 0, 278, 280, 3, 8, 4, 0, 279, 278, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 282, 5, 145, 0, 0, 282, 283, 3, 30, 15, 0, 283, 23, 1, 0, 0, 0, 284, 285, 3, 4, 2, 0, 285, 286, 5, 111, 0, 0, 286, 287, 5, 118, 0, 0, 287, 288, 3, 4, 2, 0, 288, 25, 1, 0, 0, 0, 289, 291, 3, 4, 2, 0, 290, 292, 5, 146, 0, 0, 291, 290, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 27, 1, 0, 0, 0, 293, 294, 5, 146, 0, 0, 294, 29, 1, 0, 0, 0, 295, 299, 5, 124, 0, 0, 296, 298, 3, 2, 1, 0, 297, 296, 1, 0, 0, 0, 298, 301, 1, 0, 0, 0, 299, 297, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 302, 1, 0, 0, 0, 301, 299, 1, 0, 0, 0, 302, 303, 5, 143, 0, 0, 303, 31, 1, 0, 0, 0, 304, 305, 3, 4, 2, 0, 305, 306, 5, 111, 0, 0, 306, 307, 3, 4, 2, 0, 307, 33, 1, 0, 0, 0, 308, 313, 3, 32, 16, 0, 309, 310, 5, 112, 0, 0, 310, 312, 3, 32, 16, 0, 311, 309, 1, 0, 0, 0, 312, 315, 1, 0, 0, 0, 313, 311, 1, 0, 0, 0, 313, 314, 1, 0, 0, 0, 314, 317, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 316, 318, 5, 112, 0, 0, 317, 316, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 35, 1, 0, 0, 0, 319, 323, 3, 38, 19, 0, 320, 323, 3, 42, 21, 0, 321, 323, 3, 118, 59, 0, 322, 319, 1, 0, 0, 0, 322, 320, 1, 0, 0, 0, 322, 321, 1, 0, 0, 0, 323, 324, 1, 0, 0, 0, 324, 325, 5, 0, 0, 1, 325, 37, 1, 0, 0, 0, 326, 332, 3, 40, 20, 0, 327, 328, 5, 91, 0, 0, 328, 329, 5, 1, 0, 0, 329, 331, 3, 40, 20, 0, 330, 327, 1, 0, 0, 0, 331, 334, 1, 0, 0, 0, 332, 330, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 39, 1, 0, 0, 0, 334, 332, 1, 0, 0, 0, 335, 342, 3, 42, 21, 0, 336, 337, 5, 126, 0, 0, 337, 338, 3, 38, 19, 0, 338, 339, 5, 145, 0, 0, 339, 342, 1, 0, 0, 0, 340, 342, 3, 158, 79, 0, 341, 335, 1, 0, 0, 0, 341, 336, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, 342, 41, 1, 0, 0, 0, 343, 345, 3, 44, 22, 0, 344, 343, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 346, 1, 0, 0, 0, 346, 348, 5, 77, 0, 0, 347, 349, 5, 23, 0, 0, 348, 347, 1, 0, 0, 0, 348, 349, 1, 0, 0, 0, 349, 351, 1, 0, 0, 0, 350, 352, 3, 46, 23, 0, 351, 350, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0, 353, 355, 3, 108, 54, 0, 354, 356, 3, 48, 24, 0, 355, 354, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 358, 1, 0, 0, 0, 357, 359, 3, 50, 25, 0, 358, 357, 1, 0, 0, 0, 358, 359, 1, 0, 0, 0, 359, 361, 1, 0, 0, 0, 360, 362, 3, 54, 27, 0, 361, 360, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 364, 1, 0, 0, 0, 363, 365, 3, 56, 28, 0, 364, 363, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 367, 1, 0, 0, 0, 366, 368, 3, 58, 29, 0, 367, 366, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 371, 1, 0, 0, 0, 369, 370, 5, 98, 0, 0, 370, 372, 7, 0, 0, 0, 371, 369, 1, 0, 0, 0, 371, 372, 1, 0, 0, 0, 372, 375, 1, 0, 0, 0, 373, 374, 5, 98, 0, 0, 374, 376, 5, 86, 0, 0, 375, 373, 1, 0, 0, 0, 375, 376, 1, 0, 0, 0, 376, 378, 1, 0, 0, 0, 377, 379, 3, 60, 30, 0, 378, 377, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 381, 1, 0, 0, 0, 380, 382, 3, 52, 26, 0, 381, 380, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 384, 1, 0, 0, 0, 383, 385, 3, 62, 31, 0, 384, 383, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 388, 1, 0, 0, 0, 386, 389, 3, 66, 33, 0, 387, 389, 3, 68, 34, 0, 388, 386, 1, 0, 0, 0, 388, 387, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 391, 1, 0, 0, 0, 390, 392, 3, 70, 35, 0, 391, 390, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 43, 1, 0, 0, 0, 393, 394, 5, 98, 0, 0, 394, 395, 3, 122, 61, 0, 395, 45, 1, 0, 0, 0, 396, 397, 5, 85, 0, 0, 397, 400, 5, 104, 0, 0, 398, 399, 5, 98, 0, 0, 399, 401, 5, 82, 0, 0, 400, 398, 1, 0, 0, 0, 400, 401, 1, 0, 0, 0, 401, 47, 1, 0, 0, 0, 402, 403, 5, 32, 0, 0, 403, 404, 3, 72, 36, 0, 404, 49, 1, 0, 0, 0, 405, 407, 7, 1, 0, 0, 406, 405, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 409, 5, 5, 0, 0, 409, 410, 5, 45, 0, 0, 410, 411, 3, 108, 54, 0, 411, 51, 1, 0, 0, 0, 412, 413, 5, 97, 0, 0, 413, 414, 3, 154, 77, 0, 414, 415, 5, 6, 0, 0, 415, 416, 5, 126, 0, 0, 416, 417, 3, 92, 46, 0, 417, 427, 5, 145, 0, 0, 418, 419, 5, 112, 0, 0, 419, 420, 3, 154, 77, 0, 420, 421, 5, 6, 0, 0, 421, 422, 5, 126, 0, 0, 422, 423, 3, 92, 46, 0, 423, 424, 5, 145, 0, 0, 424, 426, 1, 0, 0, 0, 425, 418, 1, 0, 0, 0, 426, 429, 1, 0, 0, 0, 427, 425, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 53, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 430, 431, 5, 67, 0, 0, 431, 432, 3, 110, 55, 0, 432, 55, 1, 0, 0, 0, 433, 434, 5, 95, 0, 0, 434, 435, 3, 110, 55, 0, 435, 57, 1, 0, 0, 0, 436, 437, 5, 34, 0, 0, 437, 444, 5, 11, 0, 0, 438, 439, 7, 0, 0, 0, 439, 440, 5, 126, 0, 0, 440, 441, 3, 108, 54, 0, 441, 442, 5, 145, 0, 0, 442, 445, 1, 0, 0, 0, 443, 445, 3, 108, 54, 0, 444, 438, 1, 0, 0, 0, 444, 443, 1, 0, 0, 0, 445, 59, 1, 0, 0, 0, 446, 447, 5, 35, 0, 0, 447, 448, 3, 110, 55, 0, 448, 61, 1, 0, 0, 0, 449, 450, 5, 62, 0, 0, 450, 451, 5, 11, 0, 0, 451, 452, 3, 82, 41, 0, 452, 63, 1, 0, 0, 0, 453, 454, 5, 62, 0, 0, 454, 455, 5, 11, 0, 0, 455, 456, 3, 108, 54, 0, 456, 65, 1, 0, 0, 0, 457, 458, 5, 52, 0, 0, 458, 461, 3, 110, 55, 0, 459, 460, 5, 112, 0, 0, 460, 462, 3, 110, 55, 0, 461, 459, 1, 0, 0, 0, 461, 462, 1, 0, 0, 0, 462, 467, 1, 0, 0, 0, 463, 464, 5, 98, 0, 0, 464, 468, 5, 82, 0, 0, 465, 466, 5, 11, 0, 0, 466, 468, 3, 108, 54, 0, 467, 463, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 467, 468, 1, 0, 0, 0, 468, 487, 1, 0, 0, 0, 469, 470, 5, 52, 0, 0, 470, 473, 3, 110, 55, 0, 471, 472, 5, 98, 0, 0, 472, 474, 5, 82, 0, 0, 473, 471, 1, 0, 0, 0, 473, 474, 1, 0, 0, 0, 474, 475, 1, 0, 0, 0, 475, 476, 5, 59, 0, 0, 476, 477, 3, 110, 55, 0, 477, 487, 1, 0, 0, 0, 478, 479, 5, 52, 0, 0, 479, 480, 3, 110, 55, 0, 480, 481, 5, 59, 0, 0, 481, 484, 3, 110, 55, 0, 482, 483, 5, 11, 0, 0, 483, 485, 3, 108, 54, 0, 484, 482, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 487, 1, 0, 0, 0, 486, 457, 1, 0, 0, 0, 486, 469, 1, 0, 0, 0, 486, 478, 1, 0, 0, 0, 487, 67, 1, 0, 0, 0, 488, 489, 5, 59, 0, 0, 489, 490, 3, 110, 55, 0, 490, 69, 1, 0, 0, 0, 491, 492, 5, 79, 0, 0, 492, 493, 3, 88, 44, 0, 493, 71, 1, 0, 0, 0, 494, 495, 6, 36, -1, 0, 495, 497, 3, 130, 65, 0, 496, 498, 5, 27, 0, 0, 497, 496, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 500, 1, 0, 0, 0, 499, 501, 3, 80, 40, 0, 500, 499, 1, 0, 0, 0, 500, 501, 1, 0, 0, 0, 501, 507, 1, 0, 0, 0, 502, 503, 5, 126, 0, 0, 503, 504, 3, 72, 36, 0, 504, 505, 5, 145, 0, 0, 505, 507, 1, 0, 0, 0, 506, 494, 1, 0, 0, 0, 506, 502, 1, 0, 0, 0, 507, 522, 1, 0, 0, 0, 508, 509, 10, 3, 0, 0, 509, 510, 3, 76, 38, 0, 510, 511, 3, 72, 36, 4, 511, 521, 1, 0, 0, 0, 512, 514, 10, 4, 0, 0, 513, 515, 3, 74, 37, 0, 514, 513, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 1, 0, 0, 0, 516, 517, 5, 45, 0, 0, 517, 518, 3, 72, 36, 0, 518, 519, 3, 78, 39, 0, 519, 521, 1, 0, 0, 0, 520, 508, 1, 0, 0, 0, 520, 512, 1, 0, 0, 0, 521, 524, 1, 0, 0, 0, 522, 520, 1, 0, 0, 0, 522, 523, 1, 0, 0, 0, 523, 73, 1, 0, 0, 0, 524, 522, 1, 0, 0, 0, 525, 527, 7, 2, 0, 0, 526, 525, 1, 0, 0, 0, 526, 527, 1, 0, 0, 0, 527, 528, 1, 0, 0, 0, 528, 535, 5, 42, 0, 0, 529, 531, 5, 42, 0, 0, 530, 532, 7, 2, 0, 0, 531, 530, 1, 0, 0, 0, 531, 532, 1, 0, 0, 0, 532, 535, 1, 0, 0, 0, 533, 535, 7, 2, 0, 0, 534, 526, 1, 0, 0, 0, 534, 529, 1, 0, 0, 0, 534, 533, 1, 0, 0, 0, 535, 569, 1, 0, 0, 0, 536, 538, 7, 3, 0, 0, 537, 536, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 541, 7, 4, 0, 0, 540, 542, 5, 63, 0, 0, 541, 540, 1, 0, 0, 0, 541, 542, 1, 0, 0, 0, 542, 551, 1, 0, 0, 0, 543, 545, 7, 4, 0, 0, 544, 546, 5, 63, 0, 0, 545, 544, 1, 0, 0, 0, 545, 546, 1, 0, 0, 0, 546, 548, 1, 0, 0, 0, 547, 549, 7, 3, 0, 0, 548, 547, 1, 0, 0, 0, 548, 549, 1, 0, 0, 0, 549, 551, 1, 0, 0, 0, 550, 537, 1, 0, 0, 0, 550, 543, 1, 0, 0, 0, 551, 569, 1, 0, 0, 0, 552, 554, 7, 5, 0, 0, 553, 552, 1, 0, 0, 0, 553, 554, 1, 0, 0, 0, 554, 555, 1, 0, 0, 0, 555, 557, 5, 33, 0, 0, 556, 558, 5, 63, 0, 0, 557, 556, 1, 0, 0, 0, 557, 558, 1, 0, 0, 0, 558, 567, 1, 0, 0, 0, 559, 561, 5, 33, 0, 0, 560, 562, 5, 63, 0, 0, 561, 560, 1, 0, 0, 0, 561, 562, 1, 0, 0, 0, 562, 564, 1, 0, 0, 0, 563, 565, 7, 5, 0, 0, 564, 563, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, 565, 567, 1, 0, 0, 0, 566, 553, 1, 0, 0, 0, 566, 559, 1, 0, 0, 0, 567, 569, 1, 0, 0, 0, 568, 534, 1, 0, 0, 0, 568, 550, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 569, 75, 1, 0, 0, 0, 570, 571, 5, 16, 0, 0, 571, 574, 5, 45, 0, 0, 572, 574, 5, 112, 0, 0, 573, 570, 1, 0, 0, 0, 573, 572, 1, 0, 0, 0, 574, 77, 1, 0, 0, 0, 575, 576, 5, 60, 0, 0, 576, 585, 3, 108, 54, 0, 577, 578, 5, 92, 0, 0, 578, 579, 5, 126, 0, 0, 579, 580, 3, 108, 54, 0, 580, 581, 5, 145, 0, 0, 581, 585, 1, 0, 0, 0, 582, 583, 5, 92, 0, 0, 583, 585, 3, 108, 54, 0, 584, 575, 1, 0, 0, 0, 584, 577, 1, 0, 0, 0, 584, 582, 1, 0, 0, 0, 585, 79, 1, 0, 0, 0, 586, 587, 5, 75, 0, 0, 587, 590, 3, 86, 43, 0, 588, 589, 5, 59, 0, 0, 589, 591, 3, 86, 43, 0, 590, 588, 1, 0, 0, 0, 590, 591, 1, 0, 0, 0, 591, 81, 1, 0, 0, 0, 592, 597, 3, 84, 42, 0, 593, 594, 5, 112, 0, 0, 594, 596, 3, 84, 42, 0, 595, 593, 1, 0, 0, 0, 596, 599, 1, 0, 0, 0, 597, 595, 1, 0, 0, 0, 597, 598, 1, 0, 0, 0, 598, 83, 1, 0, 0, 0, 599, 597, 1, 0, 0, 0, 600, 602, 3, 110, 55, 0, 601, 603, 7, 6, 0, 0, 602, 601, 1, 0, 0, 0, 602, 603, 1, 0, 0, 0, 603, 606, 1, 0, 0, 0, 604, 605, 5, 58, 0, 0, 605, 607, 7, 7, 0, 0, 606, 604, 1, 0, 0, 0, 606, 607, 1, 0, 0, 0, 607, 610, 1, 0, 0, 0, 608, 609, 5, 15, 0, 0, 609, 611, 5, 106, 0, 0, 610, 608, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 85, 1, 0, 0, 0, 612, 619, 3, 158, 79, 0, 613, 616, 3, 142, 71, 0, 614, 615, 5, 147, 0, 0, 615, 617, 3, 142, 71, 0, 616, 614, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 619, 1, 0, 0, 0, 618, 612, 1, 0, 0, 0, 618, 613, 1, 0, 0, 0, 619, 87, 1, 0, 0, 0, 620, 625, 3, 90, 45, 0, 621, 622, 5, 112, 0, 0, 622, 624, 3, 90, 45, 0, 623, 621, 1, 0, 0, 0, 624, 627, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 89, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 628, 629, 3, 154, 77, 0, 629, 630, 5, 118, 0, 0, 630, 631, 3, 144, 72, 0, 631, 91, 1, 0, 0, 0, 632, 634, 3, 94, 47, 0, 633, 632, 1, 0, 0, 0, 633, 634, 1, 0, 0, 0, 634, 636, 1, 0, 0, 0, 635, 637, 3, 96, 48, 0, 636, 635, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 639, 1, 0, 0, 0, 638, 640, 3, 98, 49, 0, 639, 638, 1, 0, 0, 0, 639, 640, 1, 0, 0, 0, 640, 93, 1, 0, 0, 0, 641, 642, 5, 65, 0, 0, 642, 643, 5, 11, 0, 0, 643, 644, 3, 108, 54, 0, 644, 95, 1, 0, 0, 0, 645, 646, 5, 62, 0, 0, 646, 647, 5, 11, 0, 0, 647, 648, 3, 82, 41, 0, 648, 97, 1, 0, 0, 0, 649, 650, 7, 8, 0, 0, 650, 651, 3, 100, 50, 0, 651, 99, 1, 0, 0, 0, 652, 659, 3, 102, 51, 0, 653, 654, 5, 9, 0, 0, 654, 655, 3, 102, 51, 0, 655, 656, 5, 2, 0, 0, 656, 657, 3, 102, 51, 0, 657, 659, 1, 0, 0, 0, 658, 652, 1, 0, 0, 0, 658, 653, 1, 0, 0, 0, 659, 101, 1, 0, 0, 0, 660, 661, 5, 18, 0, 0, 661, 673, 5, 73, 0, 0, 662, 663, 5, 90, 0, 0, 663, 673, 5, 66, 0, 0, 664, 665, 5, 90, 0, 0, 665, 673, 5, 30, 0, 0, 666, 667, 3, 142, 71, 0, 667, 668, 5, 66, 0, 0, 668, 673, 1, 0, 0, 0, 669, 670, 3, 142, 71, 0, 670, 671, 5, 30, 0, 0, 671, 673, 1, 0, 0, 0, 672, 660, 1, 0, 0, 0, 672, 662, 1, 0, 0, 0, 672, 664, 1, 0, 0, 0, 672, 666, 1, 0, 0, 0, 672, 669, 1, 0, 0, 0, 673, 103, 1, 0, 0, 0, 674, 675, 3, 110, 55, 0, 675, 676, 5, 0, 0, 1, 676, 105, 1, 0, 0, 0, 677, 734, 3, 154, 77, 0, 678, 679, 3, 154, 77, 0, 679, 680, 5, 126, 0, 0, 680, 681, 3, 154, 77, 0, 681, 688, 3, 106, 53, 0, 682, 683, 5, 112, 0, 0, 683, 684, 3, 154, 77, 0, 684, 685, 3, 106, 53, 0, 685, 687, 1, 0, 0, 0, 686, 682, 1, 0, 0, 0, 687, 690, 1, 0, 0, 0, 688, 686, 1, 0, 0, 0, 688, 689, 1, 0, 0, 0, 689, 692, 1, 0, 0, 0, 690, 688, 1, 0, 0, 0, 691, 693, 5, 112, 0, 0, 692, 691, 1, 0, 0, 0, 692, 693, 1, 0, 0, 0, 693, 694, 1, 0, 0, 0, 694, 695, 5, 145, 0, 0, 695, 734, 1, 0, 0, 0, 696, 697, 3, 154, 77, 0, 697, 698, 5, 126, 0, 0, 698, 703, 3, 156, 78, 0, 699, 700, 5, 112, 0, 0, 700, 702, 3, 156, 78, 0, 701, 699, 1, 0, 0, 0, 702, 705, 1, 0, 0, 0, 703, 701, 1, 0, 0, 0, 703, 704, 1, 0, 0, 0, 704, 707, 1, 0, 0, 0, 705, 703, 1, 0, 0, 0, 706, 708, 5, 112, 0, 0, 707, 706, 1, 0, 0, 0, 707, 708, 1, 0, 0, 0, 708, 709, 1, 0, 0, 0, 709, 710, 5, 145, 0, 0, 710, 734, 1, 0, 0, 0, 711, 712, 3, 154, 77, 0, 712, 713, 5, 126, 0, 0, 713, 718, 3, 106, 53, 0, 714, 715, 5, 112, 0, 0, 715, 717, 3, 106, 53, 0, 716, 714, 1, 0, 0, 0, 717, 720, 1, 0, 0, 0, 718, 716, 1, 0, 0, 0, 718, 719, 1, 0, 0, 0, 719, 722, 1, 0, 0, 0, 720, 718, 1, 0, 0, 0, 721, 723, 5, 112, 0, 0, 722, 721, 1, 0, 0, 0, 722, 723, 1, 0, 0, 0, 723, 724, 1, 0, 0, 0, 724, 725, 5, 145, 0, 0, 725, 734, 1, 0, 0, 0, 726, 727, 3, 154, 77, 0, 727, 729, 5, 126, 0, 0, 728, 730, 3, 108, 54, 0, 729, 728, 1, 0, 0, 0, 729, 730, 1, 0, 0, 0, 730, 731, 1, 0, 0, 0, 731, 732, 5, 145, 0, 0, 732, 734, 1, 0, 0, 0, 733, 677, 1, 0, 0, 0, 733, 678, 1, 0, 0, 0, 733, 696, 1, 0, 0, 0, 733, 711, 1, 0, 0, 0, 733, 726, 1, 0, 0, 0, 734, 107, 1, 0, 0, 0, 735, 740, 3, 110, 55, 0, 736, 737, 5, 112, 0, 0, 737, 739, 3, 110, 55, 0, 738, 736, 1, 0, 0, 0, 739, 742, 1, 0, 0, 0, 740, 738, 1, 0, 0, 0, 740, 741, 1, 0, 0, 0, 741, 744, 1, 0, 0, 0, 742, 740, 1, 0, 0, 0, 743, 745, 5, 112, 0, 0, 744, 743, 1, 0, 0, 0, 744, 745, 1, 0, 0, 0, 745, 109, 1, 0, 0, 0, 746, 747, 6, 55, -1, 0, 747, 749, 5, 12, 0, 0, 748, 750, 3, 110, 55, 0, 749, 748, 1, 0, 0, 0, 749, 750, 1, 0, 0, 0, 750, 756, 1, 0, 0, 0, 751, 752, 5, 94, 0, 0, 752, 753, 3, 110, 55, 0, 753, 754, 5, 81, 0, 0, 754, 755, 3, 110, 55, 0, 755, 757, 1, 0, 0, 0, 756, 751, 1, 0, 0, 0, 757, 758, 1, 0, 0, 0, 758, 756, 1, 0, 0, 0, 758, 759, 1, 0, 0, 0, 759, 762, 1, 0, 0, 0, 760, 761, 5, 24, 0, 0, 761, 763, 3, 110, 55, 0, 762, 760, 1, 0, 0, 0, 762, 763, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 765, 5, 25, 0, 0, 765, 896, 1, 0, 0, 0, 766, 767, 5, 13, 0, 0, 767, 768, 5, 126, 0, 0, 768, 769, 3, 110, 55, 0, 769, 770, 5, 6, 0, 0, 770, 771, 3, 106, 53, 0, 771, 772, 5, 145, 0, 0, 772, 896, 1, 0, 0, 0, 773, 774, 5, 19, 0, 0, 774, 896, 5, 106, 0, 0, 775, 776, 5, 43, 0, 0, 776, 777, 3, 110, 55, 0, 777, 778, 3, 146, 73, 0, 778, 896, 1, 0, 0, 0, 779, 780, 5, 80, 0, 0, 780, 781, 5, 126, 0, 0, 781, 782, 3, 110, 55, 0, 782, 783, 5, 32, 0, 0, 783, 786, 3, 110, 55, 0, 784, 785, 5, 31, 0, 0, 785, 787, 3, 110, 55, 0, 786, 784, 1, 0, 0, 0, 786, 787, 1, 0, 0, 0, 787, 788, 1, 0, 0, 0, 788, 789, 5, 145, 0, 0, 789, 896, 1, 0, 0, 0, 790, 791, 5, 83, 0, 0, 791, 896, 5, 106, 0, 0, 792, 793, 5, 88, 0, 0, 793, 794, 5, 126, 0, 0, 794, 795, 7, 9, 0, 0, 795, 796, 3, 160, 80, 0, 796, 797, 5, 32, 0, 0, 797, 798, 3, 110, 55, 0, 798, 799, 5, 145, 0, 0, 799, 896, 1, 0, 0, 0, 800, 801, 3, 154, 77, 0, 801, 803, 5, 126, 0, 0, 802, 804, 3, 108, 54, 0, 803, 802, 1, 0, 0, 0, 803, 804, 1, 0, 0, 0, 804, 805, 1, 0, 0, 0, 805, 806, 5, 145, 0, 0, 806, 815, 1, 0, 0, 0, 807, 809, 5, 126, 0, 0, 808, 810, 5, 23, 0, 0, 809, 808, 1, 0, 0, 0, 809, 810, 1, 0, 0, 0, 810, 812, 1, 0, 0, 0, 811, 813, 3, 112, 56, 0, 812, 811, 1, 0, 0, 0, 812, 813, 1, 0, 0, 0, 813, 814, 1, 0, 0, 0, 814, 816, 5, 145, 0, 0, 815, 807, 1, 0, 0, 0, 815, 816, 1, 0, 0, 0, 816, 817, 1, 0, 0, 0, 817, 818, 5, 64, 0, 0, 818, 819, 5, 126, 0, 0, 819, 820, 3, 92, 46, 0, 820, 821, 5, 145, 0, 0, 821, 896, 1, 0, 0, 0, 822, 823, 3, 154, 77, 0, 823, 825, 5, 126, 0, 0, 824, 826, 3, 108, 54, 0, 825, 824, 1, 0, 0, 0, 825, 826, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 828, 5, 145, 0, 0, 828, 837, 1, 0, 0, 0, 829, 831, 5, 126, 0, 0, 830, 832, 5, 23, 0, 0, 831, 830, 1, 0, 0, 0, 831, 832, 1, 0, 0, 0, 832, 834, 1, 0, 0, 0, 833, 835, 3, 112, 56, 0, 834, 833, 1, 0, 0, 0, 834, 835, 1, 0, 0, 0, 835, 836, 1, 0, 0, 0, 836, 838, 5, 145, 0, 0, 837, 829, 1, 0, 0, 0, 837, 838, 1, 0, 0, 0, 838, 839, 1, 0, 0, 0, 839, 840, 5, 64, 0, 0, 840, 841, 3, 154, 77, 0, 841, 896, 1, 0, 0, 0, 842, 848, 3, 154, 77, 0, 843, 845, 5, 126, 0, 0, 844, 846, 3, 108, 54, 0, 845, 844, 1, 0, 0, 0, 845, 846, 1, 0, 0, 0, 846, 847, 1, 0, 0, 0, 847, 849, 5, 145, 0, 0, 848, 843, 1, 0, 0, 0, 848, 849, 1, 0, 0, 0, 849, 850, 1, 0, 0, 0, 850, 852, 5, 126, 0, 0, 851, 853, 5, 23, 0, 0, 852, 851, 1, 0, 0, 0, 852, 853, 1, 0, 0, 0, 853, 855, 1, 0, 0, 0, 854, 856, 3, 112, 56, 0, 855, 854, 1, 0, 0, 0, 855, 856, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 858, 5, 145, 0, 0, 858, 896, 1, 0, 0, 0, 859, 896, 3, 118, 59, 0, 860, 896, 3, 162, 81, 0, 861, 896, 3, 144, 72, 0, 862, 863, 5, 114, 0, 0, 863, 896, 3, 110, 55, 19, 864, 865, 5, 56, 0, 0, 865, 896, 3, 110, 55, 13, 866, 867, 3, 134, 67, 0, 867, 868, 5, 116, 0, 0, 868, 870, 1, 0, 0, 0, 869, 866, 1, 0, 0, 0, 869, 870, 1, 0, 0, 0, 870, 871, 1, 0, 0, 0, 871, 896, 5, 108, 0, 0, 872, 873, 5, 126, 0, 0, 873, 874, 3, 38, 19, 0, 874, 875, 5, 145, 0, 0, 875, 896, 1, 0, 0, 0, 876, 877, 5, 126, 0, 0, 877, 878, 3, 110, 55, 0, 878, 879, 5, 145, 0, 0, 879, 896, 1, 0, 0, 0, 880, 881, 5, 126, 0, 0, 881, 882, 3, 108, 54, 0, 882, 883, 5, 145, 0, 0, 883, 896, 1, 0, 0, 0, 884, 886, 5, 125, 0, 0, 885, 887, 3, 108, 54, 0, 886, 885, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 888, 1, 0, 0, 0, 888, 896, 5, 144, 0, 0, 889, 891, 5, 124, 0, 0, 890, 892, 3, 34, 17, 0, 891, 890, 1, 0, 0, 0, 891, 892, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 896, 5, 143, 0, 0, 894, 896, 3, 126, 63, 0, 895, 746, 1, 0, 0, 0, 895, 766, 1, 0, 0, 0, 895, 773, 1, 0, 0, 0, 895, 775, 1, 0, 0, 0, 895, 779, 1, 0, 0, 0, 895, 790, 1, 0, 0, 0, 895, 792, 1, 0, 0, 0, 895, 800, 1, 0, 0, 0, 895, 822, 1, 0, 0, 0, 895, 842, 1, 0, 0, 0, 895, 859, 1, 0, 0, 0, 895, 860, 1, 0, 0, 0, 895, 861, 1, 0, 0, 0, 895, 862, 1, 0, 0, 0, 895, 864, 1, 0, 0, 0, 895, 869, 1, 0, 0, 0, 895, 872, 1, 0, 0, 0, 895, 876, 1, 0, 0, 0, 895, 880, 1, 0, 0, 0, 895, 884, 1, 0, 0, 0, 895, 889, 1, 0, 0, 0, 895, 894, 1, 0, 0, 0, 896, 1001, 1, 0, 0, 0, 897, 901, 10, 18, 0, 0, 898, 902, 5, 108, 0, 0, 899, 902, 5, 147, 0, 0, 900, 902, 5, 134, 0, 0, 901, 898, 1, 0, 0, 0, 901, 899, 1, 0, 0, 0, 901, 900, 1, 0, 0, 0, 902, 903, 1, 0, 0, 0, 903, 1000, 3, 110, 55, 19, 904, 908, 10, 17, 0, 0, 905, 909, 5, 135, 0, 0, 906, 909, 5, 114, 0, 0, 907, 909, 5, 113, 0, 0, 908, 905, 1, 0, 0, 0, 908, 906, 1, 0, 0, 0, 908, 907, 1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 1000, 3, 110, 55, 18, 911, 936, 10, 16, 0, 0, 912, 937, 5, 117, 0, 0, 913, 937, 5, 118, 0, 0, 914, 937, 5, 129, 0, 0, 915, 937, 5, 127, 0, 0, 916, 937, 5, 128, 0, 0, 917, 937, 5, 119, 0, 0, 918, 937, 5, 120, 0, 0, 919, 921, 5, 56, 0, 0, 920, 919, 1, 0, 0, 0, 920, 921, 1, 0, 0, 0, 921, 922, 1, 0, 0, 0, 922, 924, 5, 40, 0, 0, 923, 925, 5, 14, 0, 0, 924, 923, 1, 0, 0, 0, 924, 925, 1, 0, 0, 0, 925, 937, 1, 0, 0, 0, 926, 928, 5, 56, 0, 0, 927, 926, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 929, 1, 0, 0, 0, 929, 937, 7, 10, 0, 0, 930, 937, 5, 141, 0, 0, 931, 937, 5, 142, 0, 0, 932, 937, 5, 131, 0, 0, 933, 937, 5, 122, 0, 0, 934, 937, 5, 123, 0, 0, 935, 937, 5, 130, 0, 0, 936, 912, 1, 0, 0, 0, 936, 913, 1, 0, 0, 0, 936, 914, 1, 0, 0, 0, 936, 915, 1, 0, 0, 0, 936, 916, 1, 0, 0, 0, 936, 917, 1, 0, 0, 0, 936, 918, 1, 0, 0, 0, 936, 920, 1, 0, 0, 0, 936, 927, 1, 0, 0, 0, 936, 930, 1, 0, 0, 0, 936, 931, 1, 0, 0, 0, 936, 932, 1, 0, 0, 0, 936, 933, 1, 0, 0, 0, 936, 934, 1, 0, 0, 0, 936, 935, 1, 0, 0, 0, 937, 938, 1, 0, 0, 0, 938, 1000, 3, 110, 55, 17, 939, 940, 10, 14, 0, 0, 940, 941, 5, 133, 0, 0, 941, 1000, 3, 110, 55, 15, 942, 943, 10, 12, 0, 0, 943, 944, 5, 2, 0, 0, 944, 1000, 3, 110, 55, 13, 945, 946, 10, 11, 0, 0, 946, 947, 5, 61, 0, 0, 947, 1000, 3, 110, 55, 12, 948, 950, 10, 10, 0, 0, 949, 951, 5, 56, 0, 0, 950, 949, 1, 0, 0, 0, 950, 951, 1, 0, 0, 0, 951, 952, 1, 0, 0, 0, 952, 953, 5, 9, 0, 0, 953, 954, 3, 110, 55, 0, 954, 955, 5, 2, 0, 0, 955, 956, 3, 110, 55, 11, 956, 1000, 1, 0, 0, 0, 957, 958, 10, 9, 0, 0, 958, 959, 5, 136, 0, 0, 959, 960, 3, 110, 55, 0, 960, 961, 5, 111, 0, 0, 961, 962, 3, 110, 55, 9, 962, 1000, 1, 0, 0, 0, 963, 964, 10, 25, 0, 0, 964, 965, 5, 125, 0, 0, 965, 966, 3, 110, 55, 0, 966, 967, 5, 144, 0, 0, 967, 1000, 1, 0, 0, 0, 968, 969, 10, 24, 0, 0, 969, 970, 5, 116, 0, 0, 970, 1000, 5, 104, 0, 0, 971, 972, 10, 23, 0, 0, 972, 973, 5, 116, 0, 0, 973, 1000, 3, 154, 77, 0, 974, 975, 10, 22, 0, 0, 975, 976, 5, 132, 0, 0, 976, 977, 5, 125, 0, 0, 977, 978, 3, 110, 55, 0, 978, 979, 5, 144, 0, 0, 979, 1000, 1, 0, 0, 0, 980, 981, 10, 21, 0, 0, 981, 982, 5, 132, 0, 0, 982, 1000, 5, 104, 0, 0, 983, 984, 10, 20, 0, 0, 984, 985, 5, 132, 0, 0, 985, 1000, 3, 154, 77, 0, 986, 987, 10, 15, 0, 0, 987, 989, 5, 44, 0, 0, 988, 990, 5, 56, 0, 0, 989, 988, 1, 0, 0, 0, 989, 990, 1, 0, 0, 0, 990, 991, 1, 0, 0, 0, 991, 1000, 5, 57, 0, 0, 992, 997, 10, 8, 0, 0, 993, 994, 5, 6, 0, 0, 994, 998, 3, 154, 77, 0, 995, 996, 5, 6, 0, 0, 996, 998, 5, 106, 0, 0, 997, 993, 1, 0, 0, 0, 997, 995, 1, 0, 0, 0, 998, 1000, 1, 0, 0, 0, 999, 897, 1, 0, 0, 0, 999, 904, 1, 0, 0, 0, 999, 911, 1, 0, 0, 0, 999, 939, 1, 0, 0, 0, 999, 942, 1, 0, 0, 0, 999, 945, 1, 0, 0, 0, 999, 948, 1, 0, 0, 0, 999, 957, 1, 0, 0, 0, 999, 963, 1, 0, 0, 0, 999, 968, 1, 0, 0, 0, 999, 971, 1, 0, 0, 0, 999, 974, 1, 0, 0, 0, 999, 980, 1, 0, 0, 0, 999, 983, 1, 0, 0, 0, 999, 986, 1, 0, 0, 0, 999, 992, 1, 0, 0, 0, 1000, 1003, 1, 0, 0, 0, 1001, 999, 1, 0, 0, 0, 1001, 1002, 1, 0, 0, 0, 1002, 111, 1, 0, 0, 0, 1003, 1001, 1, 0, 0, 0, 1004, 1009, 3, 114, 57, 0, 1005, 1006, 5, 112, 0, 0, 1006, 1008, 3, 114, 57, 0, 1007, 1005, 1, 0, 0, 0, 1008, 1011, 1, 0, 0, 0, 1009, 1007, 1, 0, 0, 0, 1009, 1010, 1, 0, 0, 0, 1010, 1013, 1, 0, 0, 0, 1011, 1009, 1, 0, 0, 0, 1012, 1014, 5, 112, 0, 0, 1013, 1012, 1, 0, 0, 0, 1013, 1014, 1, 0, 0, 0, 1014, 113, 1, 0, 0, 0, 1015, 1018, 3, 116, 58, 0, 1016, 1018, 3, 110, 55, 0, 1017, 1015, 1, 0, 0, 0, 1017, 1016, 1, 0, 0, 0, 1018, 115, 1, 0, 0, 0, 1019, 1020, 5, 126, 0, 0, 1020, 1025, 3, 154, 77, 0, 1021, 1022, 5, 112, 0, 0, 1022, 1024, 3, 154, 77, 0, 1023, 1021, 1, 0, 0, 0, 1024, 1027, 1, 0, 0, 0, 1025, 1023, 1, 0, 0, 0, 1025, 1026, 1, 0, 0, 0, 1026, 1029, 1, 0, 0, 0, 1027, 1025, 1, 0, 0, 0, 1028, 1030, 5, 112, 0, 0, 1029, 1028, 1, 0, 0, 0, 1029, 1030, 1, 0, 0, 0, 1030, 1031, 1, 0, 0, 0, 1031, 1032, 5, 145, 0, 0, 1032, 1045, 1, 0, 0, 0, 1033, 1038, 3, 154, 77, 0, 1034, 1035, 5, 112, 0, 0, 1035, 1037, 3, 154, 77, 0, 1036, 1034, 1, 0, 0, 0, 1037, 1040, 1, 0, 0, 0, 1038, 1036, 1, 0, 0, 0, 1038, 1039, 1, 0, 0, 0, 1039, 1042, 1, 0, 0, 0, 1040, 1038, 1, 0, 0, 0, 1041, 1043, 5, 112, 0, 0, 1042, 1041, 1, 0, 0, 0, 1042, 1043, 1, 0, 0, 0, 1043, 1045, 1, 0, 0, 0, 1044, 1019, 1, 0, 0, 0, 1044, 1033, 1, 0, 0, 0, 1045, 1046, 1, 0, 0, 0, 1046, 1047, 5, 107, 0, 0, 1047, 1048, 3, 110, 55, 0, 1048, 117, 1, 0, 0, 0, 1049, 1050, 5, 128, 0, 0, 1050, 1054, 3, 154, 77, 0, 1051, 1053, 3, 120, 60, 0, 1052, 1051, 1, 0, 0, 0, 1053, 1056, 1, 0, 0, 0, 1054, 1052, 1, 0, 0, 0, 1054, 1055, 1, 0, 0, 0, 1055, 1057, 1, 0, 0, 0, 1056, 1054, 1, 0, 0, 0, 1057, 1058, 5, 147, 0, 0, 1058, 1059, 5, 120, 0, 0, 1059, 1078, 1, 0, 0, 0, 1060, 1061, 5, 128, 0, 0, 1061, 1065, 3, 154, 77, 0, 1062, 1064, 3, 120, 60, 0, 1063, 1062, 1, 0, 0, 0, 1064, 1067, 1, 0, 0, 0, 1065, 1063, 1, 0, 0, 0, 1065, 1066, 1, 0, 0, 0, 1066, 1068, 1, 0, 0, 0, 1067, 1065, 1, 0, 0, 0, 1068, 1070, 5, 120, 0, 0, 1069, 1071, 3, 118, 59, 0, 1070, 1069, 1, 0, 0, 0, 1070, 1071, 1, 0, 0, 0, 1071, 1072, 1, 0, 0, 0, 1072, 1073, 5, 128, 0, 0, 1073, 1074, 5, 147, 0, 0, 1074, 1075, 3, 154, 77, 0, 1075, 1076, 5, 120, 0, 0, 1076, 1078, 1, 0, 0, 0, 1077, 1049, 1, 0, 0, 0, 1077, 1060, 1, 0, 0, 0, 1078, 119, 1, 0, 0, 0, 1079, 1080, 3, 154, 77, 0, 1080, 1081, 5, 118, 0, 0, 1081, 1082, 3, 160, 80, 0, 1082, 1091, 1, 0, 0, 0, 1083, 1084, 3, 154, 77, 0, 1084, 1085, 5, 118, 0, 0, 1085, 1086, 5, 124, 0, 0, 1086, 1087, 3, 110, 55, 0, 1087, 1088, 5, 143, 0, 0, 1088, 1091, 1, 0, 0, 0, 1089, 1091, 3, 154, 77, 0, 1090, 1079, 1, 0, 0, 0, 1090, 1083, 1, 0, 0, 0, 1090, 1089, 1, 0, 0, 0, 1091, 121, 1, 0, 0, 0, 1092, 1097, 3, 124, 62, 0, 1093, 1094, 5, 112, 0, 0, 1094, 1096, 3, 124, 62, 0, 1095, 1093, 1, 0, 0, 0, 1096, 1099, 1, 0, 0, 0, 1097, 1095, 1, 0, 0, 0, 1097, 1098, 1, 0, 0, 0, 1098, 1101, 1, 0, 0, 0, 1099, 1097, 1, 0, 0, 0, 1100, 1102, 5, 112, 0, 0, 1101, 1100, 1, 0, 0, 0, 1101, 1102, 1, 0, 0, 0, 1102, 123, 1, 0, 0, 0, 1103, 1104, 3, 154, 77, 0, 1104, 1105, 5, 6, 0, 0, 1105, 1106, 5, 126, 0, 0, 1106, 1107, 3, 38, 19, 0, 1107, 1108, 5, 145, 0, 0, 1108, 1114, 1, 0, 0, 0, 1109, 1110, 3, 110, 55, 0, 1110, 1111, 5, 6, 0, 0, 1111, 1112, 3, 154, 77, 0, 1112, 1114, 1, 0, 0, 0, 1113, 1103, 1, 0, 0, 0, 1113, 1109, 1, 0, 0, 0, 1114, 125, 1, 0, 0, 0, 1115, 1123, 3, 158, 79, 0, 1116, 1117, 3, 134, 67, 0, 1117, 1118, 5, 116, 0, 0, 1118, 1120, 1, 0, 0, 0, 1119, 1116, 1, 0, 0, 0, 1119, 1120, 1, 0, 0, 0, 1120, 1121, 1, 0, 0, 0, 1121, 1123, 3, 128, 64, 0, 1122, 1115, 1, 0, 0, 0, 1122, 1119, 1, 0, 0, 0, 1123, 127, 1, 0, 0, 0, 1124, 1129, 3, 154, 77, 0, 1125, 1126, 5, 116, 0, 0, 1126, 1128, 3, 154, 77, 0, 1127, 1125, 1, 0, 0, 0, 1128, 1131, 1, 0, 0, 0, 1129, 1127, 1, 0, 0, 0, 1129, 1130, 1, 0, 0, 0, 1130, 129, 1, 0, 0, 0, 1131, 1129, 1, 0, 0, 0, 1132, 1133, 6, 65, -1, 0, 1133, 1142, 3, 134, 67, 0, 1134, 1142, 3, 132, 66, 0, 1135, 1136, 5, 126, 0, 0, 1136, 1137, 3, 38, 19, 0, 1137, 1138, 5, 145, 0, 0, 1138, 1142, 1, 0, 0, 0, 1139, 1142, 3, 118, 59, 0, 1140, 1142, 3, 158, 79, 0, 1141, 1132, 1, 0, 0, 0, 1141, 1134, 1, 0, 0, 0, 1141, 1135, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1141, 1140, 1, 0, 0, 0, 1142, 1151, 1, 0, 0, 0, 1143, 1147, 10, 3, 0, 0, 1144, 1148, 3, 152, 76, 0, 1145, 1146, 5, 6, 0, 0, 1146, 1148, 3, 154, 77, 0, 1147, 1144, 1, 0, 0, 0, 1147, 1145, 1, 0, 0, 0, 1148, 1150, 1, 0, 0, 0, 1149, 1143, 1, 0, 0, 0, 1150, 1153, 1, 0, 0, 0, 1151, 1149, 1, 0, 0, 0, 1151, 1152, 1, 0, 0, 0, 1152, 131, 1, 0, 0, 0, 1153, 1151, 1, 0, 0, 0, 1154, 1155, 3, 154, 77, 0, 1155, 1157, 5, 126, 0, 0, 1156, 1158, 3, 136, 68, 0, 1157, 1156, 1, 0, 0, 0, 1157, 1158, 1, 0, 0, 0, 1158, 1159, 1, 0, 0, 0, 1159, 1160, 5, 145, 0, 0, 1160, 133, 1, 0, 0, 0, 1161, 1162, 3, 138, 69, 0, 1162, 1163, 5, 116, 0, 0, 1163, 1165, 1, 0, 0, 0, 1164, 1161, 1, 0, 0, 0, 1164, 1165, 1, 0, 0, 0, 1165, 1166, 1, 0, 0, 0, 1166, 1167, 3, 154, 77, 0, 1167, 135, 1, 0, 0, 0, 1168, 1173, 3, 110, 55, 0, 1169, 1170, 5, 112, 0, 0, 1170, 1172, 3, 110, 55, 0, 1171, 1169, 1, 0, 0, 0, 1172, 1175, 1, 0, 0, 0, 1173, 1171, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 1177, 1, 0, 0, 0, 1175, 1173, 1, 0, 0, 0, 1176, 1178, 5, 112, 0, 0, 1177, 1176, 1, 0, 0, 0, 1177, 1178, 1, 0, 0, 0, 1178, 137, 1, 0, 0, 0, 1179, 1180, 3, 154, 77, 0, 1180, 139, 1, 0, 0, 0, 1181, 1190, 5, 102, 0, 0, 1182, 1183, 5, 116, 0, 0, 1183, 1190, 7, 11, 0, 0, 1184, 1185, 5, 104, 0, 0, 1185, 1187, 5, 116, 0, 0, 1186, 1188, 7, 11, 0, 0, 1187, 1186, 1, 0, 0, 0, 1187, 1188, 1, 0, 0, 0, 1188, 1190, 1, 0, 0, 0, 1189, 1181, 1, 0, 0, 0, 1189, 1182, 1, 0, 0, 0, 1189, 1184, 1, 0, 0, 0, 1190, 141, 1, 0, 0, 0, 1191, 1193, 7, 12, 0, 0, 1192, 1191, 1, 0, 0, 0, 1192, 1193, 1, 0, 0, 0, 1193, 1200, 1, 0, 0, 0, 1194, 1201, 3, 140, 70, 0, 1195, 1201, 5, 103, 0, 0, 1196, 1201, 5, 104, 0, 0, 1197, 1201, 5, 105, 0, 0, 1198, 1201, 5, 41, 0, 0, 1199, 1201, 5, 55, 0, 0, 1200, 1194, 1, 0, 0, 0, 1200, 1195, 1, 0, 0, 0, 1200, 1196, 1, 0, 0, 0, 1200, 1197, 1, 0, 0, 0, 1200, 1198, 1, 0, 0, 0, 1200, 1199, 1, 0, 0, 0, 1201, 143, 1, 0, 0, 0, 1202, 1206, 3, 142, 71, 0, 1203, 1206, 5, 106, 0, 0, 1204, 1206, 5, 57, 0, 0, 1205, 1202, 1, 0, 0, 0, 1205, 1203, 1, 0, 0, 0, 1205, 1204, 1, 0, 0, 0, 1206, 145, 1, 0, 0, 0, 1207, 1208, 7, 13, 0, 0, 1208, 147, 1, 0, 0, 0, 1209, 1210, 7, 14, 0, 0, 1210, 149, 1, 0, 0, 0, 1211, 1212, 7, 15, 0, 0, 1212, 151, 1, 0, 0, 0, 1213, 1216, 5, 101, 0, 0, 1214, 1216, 3, 150, 75, 0, 1215, 1213, 1, 0, 0, 0, 1215, 1214, 1, 0, 0, 0, 1216, 153, 1, 0, 0, 0, 1217, 1221, 5, 101, 0, 0, 1218, 1221, 3, 146, 73, 0, 1219, 1221, 3, 148, 74, 0, 1220, 1217, 1, 0, 0, 0, 1220, 1218, 1, 0, 0, 0, 1220, 1219, 1, 0, 0, 0, 1221, 155, 1, 0, 0, 0, 1222, 1223, 3, 160, 80, 0, 1223, 1224, 5, 118, 0, 0, 1224, 1225, 3, 142, 71, 0, 1225, 157, 1, 0, 0, 0, 1226, 1227, 5, 124, 0, 0, 1227, 1228, 3, 154, 77, 0, 1228, 1229, 5, 143, 0, 0, 1229, 159, 1, 0, 0, 0, 1230, 1233, 5, 106, 0, 0, 1231, 1233, 3, 162, 81, 0, 1232, 1230, 1, 0, 0, 0, 1232, 1231, 1, 0, 0, 0, 1233, 161, 1, 0, 0, 0, 1234, 1238, 5, 138, 0, 0, 1235, 1237, 3, 164, 82, 0, 1236, 1235, 1, 0, 0, 0, 1237, 1240, 1, 0, 0, 0, 1238, 1236, 1, 0, 0, 0, 1238, 1239, 1, 0, 0, 0, 1239, 1241, 1, 0, 0, 0, 1240, 1238, 1, 0, 0, 0, 1241, 1242, 5, 140, 0, 0, 1242, 163, 1, 0, 0, 0, 1243, 1244, 5, 153, 0, 0, 1244, 1245, 3, 110, 55, 0, 1245, 1246, 5, 143, 0, 0, 1246, 1249, 1, 0, 0, 0, 1247, 1249, 5, 152, 0, 0, 1248, 1243, 1, 0, 0, 0, 1248, 1247, 1, 0, 0, 0, 1249, 165, 1, 0, 0, 0, 1250, 1254, 5, 139, 0, 0, 1251, 1253, 3, 168, 84, 0, 1252, 1251, 1, 0, 0, 0, 1253, 1256, 1, 0, 0, 0, 1254, 1252, 1, 0, 0, 0, 1254, 1255, 1, 0, 0, 0, 1255, 1257, 1, 0, 0, 0, 1256, 1254, 1, 0, 0, 0, 1257, 1258, 5, 0, 0, 1, 1258, 167, 1, 0, 0, 0, 1259, 1260, 5, 155, 0, 0, 1260, 1261, 3, 110, 55, 0, 1261, 1262, 5, 143, 0, 0, 1262, 1265, 1, 0, 0, 0, 1263, 1265, 5, 154, 0, 0, 1264, 1259, 1, 0, 0, 0, 1264, 1263, 1, 0, 0, 0, 1265, 169, 1, 0, 0, 0, 162, 173, 180, 189, 196, 200, 212, 216, 219, 228, 236, 243, 247, 253, 258, 266, 273, 279, 291, 299, 313, 317, 322, 332, 341, 344, 348, 351, 355, 358, 361, 364, 367, 371, 375, 378, 381, 384, 388, 391, 400, 406, 427, 444, 461, 467, 473, 484, 486, 497, 500, 506, 514, 520, 522, 526, 531, 534, 537, 541, 545, 548, 550, 553, 557, 561, 564, 566, 568, 573, 584, 590, 597, 602, 606, 610, 616, 618, 625, 633, 636, 639, 658, 672, 688, 692, 703, 707, 718, 722, 729, 733, 740, 744, 749, 758, 762, 786, 803, 809, 812, 815, 825, 831, 834, 837, 845, 848, 852, 855, 869, 886, 891, 895, 901, 908, 920, 924, 927, 936, 950, 989, 997, 999, 1001, 1009, 1013, 1017, 1025, 1029, 1038, 1042, 1044, 1054, 1065, 1070, 1077, 1090, 1097, 1101, 1113, 1119, 1122, 1129, 1141, 1147, 1151, 1157, 1164, 1173, 1177, 1187, 1189, 1192, 1200, 1205, 1215, 1220, 1232, 1238, 1248, 1254, 1264] \ No newline at end of file +[4, 1, 159, 1311, 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, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 1, 0, 5, 0, 178, 8, 0, 10, 0, 12, 0, 181, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 187, 8, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 196, 8, 3, 1, 4, 1, 4, 1, 4, 5, 4, 201, 8, 4, 10, 4, 12, 4, 204, 9, 4, 1, 4, 3, 4, 207, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 221, 8, 5, 1, 6, 1, 6, 3, 6, 225, 8, 6, 1, 6, 3, 6, 228, 8, 6, 1, 7, 1, 7, 3, 7, 232, 8, 7, 1, 7, 3, 7, 235, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 242, 8, 8, 1, 8, 1, 8, 3, 8, 246, 8, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 253, 8, 9, 10, 9, 12, 9, 256, 9, 9, 1, 9, 1, 9, 3, 9, 260, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 269, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 277, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 284, 8, 12, 1, 12, 1, 12, 3, 12, 288, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 294, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 299, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 307, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 314, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 320, 8, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 332, 8, 16, 1, 17, 1, 17, 1, 18, 1, 18, 5, 18, 338, 8, 18, 10, 18, 12, 18, 341, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 5, 20, 352, 8, 20, 10, 20, 12, 20, 355, 9, 20, 1, 20, 3, 20, 358, 8, 20, 1, 21, 1, 21, 1, 21, 3, 21, 363, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 5, 22, 371, 8, 22, 10, 22, 12, 22, 374, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 382, 8, 23, 1, 24, 3, 24, 385, 8, 24, 1, 24, 1, 24, 3, 24, 389, 8, 24, 1, 24, 3, 24, 392, 8, 24, 1, 24, 1, 24, 3, 24, 396, 8, 24, 1, 24, 3, 24, 399, 8, 24, 1, 24, 3, 24, 402, 8, 24, 1, 24, 3, 24, 405, 8, 24, 1, 24, 3, 24, 408, 8, 24, 1, 24, 1, 24, 3, 24, 412, 8, 24, 1, 24, 1, 24, 3, 24, 416, 8, 24, 1, 24, 3, 24, 419, 8, 24, 1, 24, 3, 24, 422, 8, 24, 1, 24, 3, 24, 425, 8, 24, 1, 24, 1, 24, 3, 24, 429, 8, 24, 1, 24, 3, 24, 432, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 441, 8, 26, 1, 27, 1, 27, 1, 27, 1, 28, 3, 28, 447, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 5, 29, 466, 8, 29, 10, 29, 12, 29, 469, 9, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 485, 8, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 502, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 508, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 514, 8, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 3, 36, 525, 8, 36, 3, 36, 527, 8, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 3, 39, 538, 8, 39, 1, 39, 3, 39, 541, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 547, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 555, 8, 39, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 561, 8, 39, 10, 39, 12, 39, 564, 9, 39, 1, 40, 3, 40, 567, 8, 40, 1, 40, 1, 40, 1, 40, 3, 40, 572, 8, 40, 1, 40, 3, 40, 575, 8, 40, 1, 40, 3, 40, 578, 8, 40, 1, 40, 1, 40, 3, 40, 582, 8, 40, 1, 40, 1, 40, 3, 40, 586, 8, 40, 1, 40, 3, 40, 589, 8, 40, 3, 40, 591, 8, 40, 1, 40, 3, 40, 594, 8, 40, 1, 40, 1, 40, 3, 40, 598, 8, 40, 1, 40, 1, 40, 3, 40, 602, 8, 40, 1, 40, 3, 40, 605, 8, 40, 3, 40, 607, 8, 40, 3, 40, 609, 8, 40, 1, 41, 1, 41, 1, 41, 3, 41, 614, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 625, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 631, 8, 43, 1, 44, 1, 44, 1, 44, 5, 44, 636, 8, 44, 10, 44, 12, 44, 639, 9, 44, 1, 45, 1, 45, 3, 45, 643, 8, 45, 1, 45, 1, 45, 3, 45, 647, 8, 45, 1, 45, 1, 45, 3, 45, 651, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 657, 8, 46, 3, 46, 659, 8, 46, 1, 47, 1, 47, 1, 47, 5, 47, 664, 8, 47, 10, 47, 12, 47, 667, 9, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 3, 49, 674, 8, 49, 1, 49, 3, 49, 677, 8, 49, 1, 49, 3, 49, 680, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 3, 53, 699, 8, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 3, 54, 713, 8, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 727, 8, 56, 10, 56, 12, 56, 730, 9, 56, 1, 56, 3, 56, 733, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 742, 8, 56, 10, 56, 12, 56, 745, 9, 56, 1, 56, 3, 56, 748, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 757, 8, 56, 10, 56, 12, 56, 760, 9, 56, 1, 56, 3, 56, 763, 8, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 3, 56, 770, 8, 56, 1, 56, 1, 56, 3, 56, 774, 8, 56, 1, 57, 1, 57, 1, 57, 5, 57, 779, 8, 57, 10, 57, 12, 57, 782, 9, 57, 1, 57, 3, 57, 785, 8, 57, 1, 58, 1, 58, 1, 58, 3, 58, 790, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 4, 58, 797, 8, 58, 11, 58, 12, 58, 798, 1, 58, 1, 58, 3, 58, 803, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 827, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 844, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 850, 8, 58, 1, 58, 3, 58, 853, 8, 58, 1, 58, 3, 58, 856, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 866, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 872, 8, 58, 1, 58, 3, 58, 875, 8, 58, 1, 58, 3, 58, 878, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 886, 8, 58, 1, 58, 3, 58, 889, 8, 58, 1, 58, 1, 58, 3, 58, 893, 8, 58, 1, 58, 3, 58, 896, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 910, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 927, 8, 58, 1, 58, 1, 58, 1, 58, 3, 58, 932, 8, 58, 1, 58, 1, 58, 3, 58, 936, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 942, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 949, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 961, 8, 58, 1, 58, 1, 58, 3, 58, 965, 8, 58, 1, 58, 3, 58, 968, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 977, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 991, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 1030, 8, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 1038, 8, 58, 5, 58, 1040, 8, 58, 10, 58, 12, 58, 1043, 9, 58, 1, 59, 1, 59, 1, 59, 5, 59, 1048, 8, 59, 10, 59, 12, 59, 1051, 9, 59, 1, 59, 3, 59, 1054, 8, 59, 1, 60, 1, 60, 3, 60, 1058, 8, 60, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 1064, 8, 61, 10, 61, 12, 61, 1067, 9, 61, 1, 61, 3, 61, 1070, 8, 61, 1, 61, 1, 61, 1, 61, 1, 61, 1, 61, 5, 61, 1077, 8, 61, 10, 61, 12, 61, 1080, 9, 61, 1, 61, 3, 61, 1083, 8, 61, 3, 61, 1085, 8, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 5, 62, 1093, 8, 62, 10, 62, 12, 62, 1096, 9, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 5, 62, 1104, 8, 62, 10, 62, 12, 62, 1107, 9, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1115, 8, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 3, 62, 1122, 8, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 3, 63, 1135, 8, 63, 1, 64, 1, 64, 1, 64, 5, 64, 1140, 8, 64, 10, 64, 12, 64, 1143, 9, 64, 1, 64, 3, 64, 1146, 8, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 1, 65, 3, 65, 1158, 8, 65, 1, 66, 1, 66, 1, 66, 1, 66, 3, 66, 1164, 8, 66, 1, 66, 3, 66, 1167, 8, 66, 1, 67, 1, 67, 1, 67, 5, 67, 1172, 8, 67, 10, 67, 12, 67, 1175, 9, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1186, 8, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 1192, 8, 68, 5, 68, 1194, 8, 68, 10, 68, 12, 68, 1197, 9, 68, 1, 69, 1, 69, 1, 69, 3, 69, 1202, 8, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 3, 70, 1209, 8, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 71, 5, 71, 1216, 8, 71, 10, 71, 12, 71, 1219, 9, 71, 1, 71, 3, 71, 1222, 8, 71, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 1, 73, 3, 73, 1232, 8, 73, 3, 73, 1234, 8, 73, 1, 74, 3, 74, 1237, 8, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 3, 74, 1245, 8, 74, 1, 75, 1, 75, 1, 75, 3, 75, 1250, 8, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 78, 1, 78, 1, 79, 1, 79, 3, 79, 1260, 8, 79, 1, 80, 1, 80, 1, 80, 3, 80, 1265, 8, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 83, 1, 83, 3, 83, 1277, 8, 83, 1, 84, 1, 84, 5, 84, 1281, 8, 84, 10, 84, 12, 84, 1284, 9, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 3, 85, 1293, 8, 85, 1, 86, 1, 86, 5, 86, 1297, 8, 86, 10, 86, 12, 86, 1300, 9, 86, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 3, 87, 1309, 8, 87, 1, 87, 0, 3, 78, 116, 136, 88, 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, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 0, 16, 2, 0, 18, 18, 74, 74, 2, 0, 44, 44, 51, 51, 3, 0, 1, 1, 4, 4, 8, 8, 4, 0, 1, 1, 3, 4, 8, 8, 80, 80, 2, 0, 51, 51, 73, 73, 2, 0, 1, 1, 4, 4, 2, 0, 7, 7, 22, 23, 2, 0, 30, 30, 49, 49, 2, 0, 71, 71, 76, 76, 3, 0, 10, 10, 50, 50, 90, 90, 2, 0, 41, 41, 53, 53, 1, 0, 107, 108, 2, 0, 118, 118, 139, 139, 7, 0, 21, 21, 38, 38, 55, 56, 70, 70, 78, 78, 97, 97, 103, 103, 16, 0, 1, 13, 15, 20, 22, 28, 30, 30, 32, 37, 39, 42, 44, 51, 53, 54, 58, 58, 60, 69, 71, 77, 79, 83, 85, 92, 94, 96, 98, 99, 101, 102, 4, 0, 20, 20, 30, 30, 39, 39, 48, 48, 1479, 0, 179, 1, 0, 0, 0, 2, 186, 1, 0, 0, 0, 4, 188, 1, 0, 0, 0, 6, 190, 1, 0, 0, 0, 8, 197, 1, 0, 0, 0, 10, 220, 1, 0, 0, 0, 12, 222, 1, 0, 0, 0, 14, 229, 1, 0, 0, 0, 16, 236, 1, 0, 0, 0, 18, 249, 1, 0, 0, 0, 20, 261, 1, 0, 0, 0, 22, 270, 1, 0, 0, 0, 24, 278, 1, 0, 0, 0, 26, 300, 1, 0, 0, 0, 28, 315, 1, 0, 0, 0, 30, 324, 1, 0, 0, 0, 32, 329, 1, 0, 0, 0, 34, 333, 1, 0, 0, 0, 36, 335, 1, 0, 0, 0, 38, 344, 1, 0, 0, 0, 40, 348, 1, 0, 0, 0, 42, 362, 1, 0, 0, 0, 44, 366, 1, 0, 0, 0, 46, 381, 1, 0, 0, 0, 48, 384, 1, 0, 0, 0, 50, 433, 1, 0, 0, 0, 52, 436, 1, 0, 0, 0, 54, 442, 1, 0, 0, 0, 56, 446, 1, 0, 0, 0, 58, 452, 1, 0, 0, 0, 60, 470, 1, 0, 0, 0, 62, 473, 1, 0, 0, 0, 64, 476, 1, 0, 0, 0, 66, 486, 1, 0, 0, 0, 68, 489, 1, 0, 0, 0, 70, 493, 1, 0, 0, 0, 72, 526, 1, 0, 0, 0, 74, 528, 1, 0, 0, 0, 76, 531, 1, 0, 0, 0, 78, 546, 1, 0, 0, 0, 80, 608, 1, 0, 0, 0, 82, 613, 1, 0, 0, 0, 84, 624, 1, 0, 0, 0, 86, 626, 1, 0, 0, 0, 88, 632, 1, 0, 0, 0, 90, 640, 1, 0, 0, 0, 92, 658, 1, 0, 0, 0, 94, 660, 1, 0, 0, 0, 96, 668, 1, 0, 0, 0, 98, 673, 1, 0, 0, 0, 100, 681, 1, 0, 0, 0, 102, 685, 1, 0, 0, 0, 104, 689, 1, 0, 0, 0, 106, 698, 1, 0, 0, 0, 108, 712, 1, 0, 0, 0, 110, 714, 1, 0, 0, 0, 112, 773, 1, 0, 0, 0, 114, 775, 1, 0, 0, 0, 116, 935, 1, 0, 0, 0, 118, 1044, 1, 0, 0, 0, 120, 1057, 1, 0, 0, 0, 122, 1084, 1, 0, 0, 0, 124, 1121, 1, 0, 0, 0, 126, 1134, 1, 0, 0, 0, 128, 1136, 1, 0, 0, 0, 130, 1157, 1, 0, 0, 0, 132, 1166, 1, 0, 0, 0, 134, 1168, 1, 0, 0, 0, 136, 1185, 1, 0, 0, 0, 138, 1198, 1, 0, 0, 0, 140, 1208, 1, 0, 0, 0, 142, 1212, 1, 0, 0, 0, 144, 1223, 1, 0, 0, 0, 146, 1233, 1, 0, 0, 0, 148, 1236, 1, 0, 0, 0, 150, 1249, 1, 0, 0, 0, 152, 1251, 1, 0, 0, 0, 154, 1253, 1, 0, 0, 0, 156, 1255, 1, 0, 0, 0, 158, 1259, 1, 0, 0, 0, 160, 1264, 1, 0, 0, 0, 162, 1266, 1, 0, 0, 0, 164, 1270, 1, 0, 0, 0, 166, 1276, 1, 0, 0, 0, 168, 1278, 1, 0, 0, 0, 170, 1292, 1, 0, 0, 0, 172, 1294, 1, 0, 0, 0, 174, 1308, 1, 0, 0, 0, 176, 178, 3, 2, 1, 0, 177, 176, 1, 0, 0, 0, 178, 181, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 182, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 182, 183, 5, 0, 0, 1, 183, 1, 1, 0, 0, 0, 184, 187, 3, 6, 3, 0, 185, 187, 3, 10, 5, 0, 186, 184, 1, 0, 0, 0, 186, 185, 1, 0, 0, 0, 187, 3, 1, 0, 0, 0, 188, 189, 3, 116, 58, 0, 189, 5, 1, 0, 0, 0, 190, 191, 5, 52, 0, 0, 191, 195, 3, 160, 80, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 122, 0, 0, 194, 196, 3, 4, 2, 0, 195, 192, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 7, 1, 0, 0, 0, 197, 202, 3, 160, 80, 0, 198, 199, 5, 116, 0, 0, 199, 201, 3, 160, 80, 0, 200, 198, 1, 0, 0, 0, 201, 204, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, 204, 202, 1, 0, 0, 0, 205, 207, 5, 116, 0, 0, 206, 205, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 9, 1, 0, 0, 0, 208, 221, 3, 12, 6, 0, 209, 221, 3, 14, 7, 0, 210, 221, 3, 18, 9, 0, 211, 221, 3, 20, 10, 0, 212, 221, 3, 22, 11, 0, 213, 221, 3, 26, 13, 0, 214, 221, 3, 24, 12, 0, 215, 221, 3, 28, 14, 0, 216, 221, 3, 30, 15, 0, 217, 221, 3, 36, 18, 0, 218, 221, 3, 32, 16, 0, 219, 221, 3, 34, 17, 0, 220, 208, 1, 0, 0, 0, 220, 209, 1, 0, 0, 0, 220, 210, 1, 0, 0, 0, 220, 211, 1, 0, 0, 0, 220, 212, 1, 0, 0, 0, 220, 213, 1, 0, 0, 0, 220, 214, 1, 0, 0, 0, 220, 215, 1, 0, 0, 0, 220, 216, 1, 0, 0, 0, 220, 217, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 220, 219, 1, 0, 0, 0, 221, 11, 1, 0, 0, 0, 222, 224, 5, 72, 0, 0, 223, 225, 3, 4, 2, 0, 224, 223, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 227, 1, 0, 0, 0, 226, 228, 5, 150, 0, 0, 227, 226, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 13, 1, 0, 0, 0, 229, 231, 5, 84, 0, 0, 230, 232, 3, 4, 2, 0, 231, 230, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 234, 1, 0, 0, 0, 233, 235, 5, 150, 0, 0, 234, 233, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 15, 1, 0, 0, 0, 236, 245, 5, 14, 0, 0, 237, 238, 5, 130, 0, 0, 238, 241, 3, 160, 80, 0, 239, 240, 5, 115, 0, 0, 240, 242, 3, 160, 80, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 244, 5, 149, 0, 0, 244, 246, 1, 0, 0, 0, 245, 237, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 248, 3, 36, 18, 0, 248, 17, 1, 0, 0, 0, 249, 250, 5, 93, 0, 0, 250, 254, 3, 36, 18, 0, 251, 253, 3, 16, 8, 0, 252, 251, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 259, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 258, 5, 29, 0, 0, 258, 260, 3, 36, 18, 0, 259, 257, 1, 0, 0, 0, 259, 260, 1, 0, 0, 0, 260, 19, 1, 0, 0, 0, 261, 262, 5, 40, 0, 0, 262, 263, 5, 130, 0, 0, 263, 264, 3, 4, 2, 0, 264, 265, 5, 149, 0, 0, 265, 268, 3, 10, 5, 0, 266, 267, 5, 25, 0, 0, 267, 269, 3, 10, 5, 0, 268, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 21, 1, 0, 0, 0, 270, 271, 5, 100, 0, 0, 271, 272, 5, 130, 0, 0, 272, 273, 3, 4, 2, 0, 273, 274, 5, 149, 0, 0, 274, 276, 3, 10, 5, 0, 275, 277, 5, 150, 0, 0, 276, 275, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 23, 1, 0, 0, 0, 278, 279, 5, 33, 0, 0, 279, 283, 5, 130, 0, 0, 280, 284, 3, 6, 3, 0, 281, 284, 3, 30, 15, 0, 282, 284, 3, 4, 2, 0, 283, 280, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 283, 282, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 287, 5, 150, 0, 0, 286, 288, 3, 4, 2, 0, 287, 286, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 293, 5, 150, 0, 0, 290, 294, 3, 6, 3, 0, 291, 294, 3, 30, 15, 0, 292, 294, 3, 4, 2, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 5, 149, 0, 0, 296, 298, 3, 10, 5, 0, 297, 299, 5, 150, 0, 0, 298, 297, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 25, 1, 0, 0, 0, 300, 301, 5, 33, 0, 0, 301, 302, 5, 130, 0, 0, 302, 303, 5, 52, 0, 0, 303, 306, 3, 160, 80, 0, 304, 305, 5, 116, 0, 0, 305, 307, 3, 160, 80, 0, 306, 304, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 1, 0, 0, 0, 308, 309, 5, 42, 0, 0, 309, 310, 3, 4, 2, 0, 310, 311, 5, 149, 0, 0, 311, 313, 3, 10, 5, 0, 312, 314, 5, 150, 0, 0, 313, 312, 1, 0, 0, 0, 313, 314, 1, 0, 0, 0, 314, 27, 1, 0, 0, 0, 315, 316, 5, 31, 0, 0, 316, 317, 3, 160, 80, 0, 317, 319, 5, 130, 0, 0, 318, 320, 3, 8, 4, 0, 319, 318, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 321, 1, 0, 0, 0, 321, 322, 5, 149, 0, 0, 322, 323, 3, 36, 18, 0, 323, 29, 1, 0, 0, 0, 324, 325, 3, 4, 2, 0, 325, 326, 5, 115, 0, 0, 326, 327, 5, 122, 0, 0, 327, 328, 3, 4, 2, 0, 328, 31, 1, 0, 0, 0, 329, 331, 3, 4, 2, 0, 330, 332, 5, 150, 0, 0, 331, 330, 1, 0, 0, 0, 331, 332, 1, 0, 0, 0, 332, 33, 1, 0, 0, 0, 333, 334, 5, 150, 0, 0, 334, 35, 1, 0, 0, 0, 335, 339, 5, 128, 0, 0, 336, 338, 3, 2, 1, 0, 337, 336, 1, 0, 0, 0, 338, 341, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 342, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 342, 343, 5, 147, 0, 0, 343, 37, 1, 0, 0, 0, 344, 345, 3, 4, 2, 0, 345, 346, 5, 115, 0, 0, 346, 347, 3, 4, 2, 0, 347, 39, 1, 0, 0, 0, 348, 353, 3, 38, 19, 0, 349, 350, 5, 116, 0, 0, 350, 352, 3, 38, 19, 0, 351, 349, 1, 0, 0, 0, 352, 355, 1, 0, 0, 0, 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 357, 1, 0, 0, 0, 355, 353, 1, 0, 0, 0, 356, 358, 5, 116, 0, 0, 357, 356, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 41, 1, 0, 0, 0, 359, 363, 3, 44, 22, 0, 360, 363, 3, 48, 24, 0, 361, 363, 3, 124, 62, 0, 362, 359, 1, 0, 0, 0, 362, 360, 1, 0, 0, 0, 362, 361, 1, 0, 0, 0, 363, 364, 1, 0, 0, 0, 364, 365, 5, 0, 0, 1, 365, 43, 1, 0, 0, 0, 366, 372, 3, 46, 23, 0, 367, 368, 5, 95, 0, 0, 368, 369, 5, 1, 0, 0, 369, 371, 3, 46, 23, 0, 370, 367, 1, 0, 0, 0, 371, 374, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 45, 1, 0, 0, 0, 374, 372, 1, 0, 0, 0, 375, 382, 3, 48, 24, 0, 376, 377, 5, 130, 0, 0, 377, 378, 3, 44, 22, 0, 378, 379, 5, 149, 0, 0, 379, 382, 1, 0, 0, 0, 380, 382, 3, 164, 82, 0, 381, 375, 1, 0, 0, 0, 381, 376, 1, 0, 0, 0, 381, 380, 1, 0, 0, 0, 382, 47, 1, 0, 0, 0, 383, 385, 3, 50, 25, 0, 384, 383, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 388, 5, 79, 0, 0, 387, 389, 5, 24, 0, 0, 388, 387, 1, 0, 0, 0, 388, 389, 1, 0, 0, 0, 389, 391, 1, 0, 0, 0, 390, 392, 3, 52, 26, 0, 391, 390, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 393, 1, 0, 0, 0, 393, 395, 3, 114, 57, 0, 394, 396, 3, 54, 27, 0, 395, 394, 1, 0, 0, 0, 395, 396, 1, 0, 0, 0, 396, 398, 1, 0, 0, 0, 397, 399, 3, 56, 28, 0, 398, 397, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 401, 1, 0, 0, 0, 400, 402, 3, 60, 30, 0, 401, 400, 1, 0, 0, 0, 401, 402, 1, 0, 0, 0, 402, 404, 1, 0, 0, 0, 403, 405, 3, 62, 31, 0, 404, 403, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 407, 1, 0, 0, 0, 406, 408, 3, 64, 32, 0, 407, 406, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 411, 1, 0, 0, 0, 409, 410, 5, 102, 0, 0, 410, 412, 7, 0, 0, 0, 411, 409, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 415, 1, 0, 0, 0, 413, 414, 5, 102, 0, 0, 414, 416, 5, 89, 0, 0, 415, 413, 1, 0, 0, 0, 415, 416, 1, 0, 0, 0, 416, 418, 1, 0, 0, 0, 417, 419, 3, 66, 33, 0, 418, 417, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 421, 1, 0, 0, 0, 420, 422, 3, 58, 29, 0, 421, 420, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 424, 1, 0, 0, 0, 423, 425, 3, 68, 34, 0, 424, 423, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 428, 1, 0, 0, 0, 426, 429, 3, 72, 36, 0, 427, 429, 3, 74, 37, 0, 428, 426, 1, 0, 0, 0, 428, 427, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 431, 1, 0, 0, 0, 430, 432, 3, 76, 38, 0, 431, 430, 1, 0, 0, 0, 431, 432, 1, 0, 0, 0, 432, 49, 1, 0, 0, 0, 433, 434, 5, 102, 0, 0, 434, 435, 3, 128, 64, 0, 435, 51, 1, 0, 0, 0, 436, 437, 5, 88, 0, 0, 437, 440, 5, 108, 0, 0, 438, 439, 5, 102, 0, 0, 439, 441, 5, 85, 0, 0, 440, 438, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 53, 1, 0, 0, 0, 442, 443, 5, 34, 0, 0, 443, 444, 3, 78, 39, 0, 444, 55, 1, 0, 0, 0, 445, 447, 7, 1, 0, 0, 446, 445, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 448, 1, 0, 0, 0, 448, 449, 5, 5, 0, 0, 449, 450, 5, 47, 0, 0, 450, 451, 3, 114, 57, 0, 451, 57, 1, 0, 0, 0, 452, 453, 5, 101, 0, 0, 453, 454, 3, 160, 80, 0, 454, 455, 5, 6, 0, 0, 455, 456, 5, 130, 0, 0, 456, 457, 3, 98, 49, 0, 457, 467, 5, 149, 0, 0, 458, 459, 5, 116, 0, 0, 459, 460, 3, 160, 80, 0, 460, 461, 5, 6, 0, 0, 461, 462, 5, 130, 0, 0, 462, 463, 3, 98, 49, 0, 463, 464, 5, 149, 0, 0, 464, 466, 1, 0, 0, 0, 465, 458, 1, 0, 0, 0, 466, 469, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 467, 468, 1, 0, 0, 0, 468, 59, 1, 0, 0, 0, 469, 467, 1, 0, 0, 0, 470, 471, 5, 69, 0, 0, 471, 472, 3, 116, 58, 0, 472, 61, 1, 0, 0, 0, 473, 474, 5, 99, 0, 0, 474, 475, 3, 116, 58, 0, 475, 63, 1, 0, 0, 0, 476, 477, 5, 36, 0, 0, 477, 484, 5, 11, 0, 0, 478, 479, 7, 0, 0, 0, 479, 480, 5, 130, 0, 0, 480, 481, 3, 114, 57, 0, 481, 482, 5, 149, 0, 0, 482, 485, 1, 0, 0, 0, 483, 485, 3, 114, 57, 0, 484, 478, 1, 0, 0, 0, 484, 483, 1, 0, 0, 0, 485, 65, 1, 0, 0, 0, 486, 487, 5, 37, 0, 0, 487, 488, 3, 116, 58, 0, 488, 67, 1, 0, 0, 0, 489, 490, 5, 64, 0, 0, 490, 491, 5, 11, 0, 0, 491, 492, 3, 88, 44, 0, 492, 69, 1, 0, 0, 0, 493, 494, 5, 64, 0, 0, 494, 495, 5, 11, 0, 0, 495, 496, 3, 114, 57, 0, 496, 71, 1, 0, 0, 0, 497, 498, 5, 54, 0, 0, 498, 501, 3, 116, 58, 0, 499, 500, 5, 116, 0, 0, 500, 502, 3, 116, 58, 0, 501, 499, 1, 0, 0, 0, 501, 502, 1, 0, 0, 0, 502, 507, 1, 0, 0, 0, 503, 504, 5, 102, 0, 0, 504, 508, 5, 85, 0, 0, 505, 506, 5, 11, 0, 0, 506, 508, 3, 114, 57, 0, 507, 503, 1, 0, 0, 0, 507, 505, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 527, 1, 0, 0, 0, 509, 510, 5, 54, 0, 0, 510, 513, 3, 116, 58, 0, 511, 512, 5, 102, 0, 0, 512, 514, 5, 85, 0, 0, 513, 511, 1, 0, 0, 0, 513, 514, 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 515, 516, 5, 61, 0, 0, 516, 517, 3, 116, 58, 0, 517, 527, 1, 0, 0, 0, 518, 519, 5, 54, 0, 0, 519, 520, 3, 116, 58, 0, 520, 521, 5, 61, 0, 0, 521, 524, 3, 116, 58, 0, 522, 523, 5, 11, 0, 0, 523, 525, 3, 114, 57, 0, 524, 522, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 527, 1, 0, 0, 0, 526, 497, 1, 0, 0, 0, 526, 509, 1, 0, 0, 0, 526, 518, 1, 0, 0, 0, 527, 73, 1, 0, 0, 0, 528, 529, 5, 61, 0, 0, 529, 530, 3, 116, 58, 0, 530, 75, 1, 0, 0, 0, 531, 532, 5, 81, 0, 0, 532, 533, 3, 94, 47, 0, 533, 77, 1, 0, 0, 0, 534, 535, 6, 39, -1, 0, 535, 537, 3, 136, 68, 0, 536, 538, 5, 28, 0, 0, 537, 536, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, 540, 1, 0, 0, 0, 539, 541, 3, 86, 43, 0, 540, 539, 1, 0, 0, 0, 540, 541, 1, 0, 0, 0, 541, 547, 1, 0, 0, 0, 542, 543, 5, 130, 0, 0, 543, 544, 3, 78, 39, 0, 544, 545, 5, 149, 0, 0, 545, 547, 1, 0, 0, 0, 546, 534, 1, 0, 0, 0, 546, 542, 1, 0, 0, 0, 547, 562, 1, 0, 0, 0, 548, 549, 10, 3, 0, 0, 549, 550, 3, 82, 41, 0, 550, 551, 3, 78, 39, 4, 551, 561, 1, 0, 0, 0, 552, 554, 10, 4, 0, 0, 553, 555, 3, 80, 40, 0, 554, 553, 1, 0, 0, 0, 554, 555, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 557, 5, 47, 0, 0, 557, 558, 3, 78, 39, 0, 558, 559, 3, 84, 42, 0, 559, 561, 1, 0, 0, 0, 560, 548, 1, 0, 0, 0, 560, 552, 1, 0, 0, 0, 561, 564, 1, 0, 0, 0, 562, 560, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 79, 1, 0, 0, 0, 564, 562, 1, 0, 0, 0, 565, 567, 7, 2, 0, 0, 566, 565, 1, 0, 0, 0, 566, 567, 1, 0, 0, 0, 567, 568, 1, 0, 0, 0, 568, 575, 5, 44, 0, 0, 569, 571, 5, 44, 0, 0, 570, 572, 7, 2, 0, 0, 571, 570, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 575, 1, 0, 0, 0, 573, 575, 7, 2, 0, 0, 574, 566, 1, 0, 0, 0, 574, 569, 1, 0, 0, 0, 574, 573, 1, 0, 0, 0, 575, 609, 1, 0, 0, 0, 576, 578, 7, 3, 0, 0, 577, 576, 1, 0, 0, 0, 577, 578, 1, 0, 0, 0, 578, 579, 1, 0, 0, 0, 579, 581, 7, 4, 0, 0, 580, 582, 5, 65, 0, 0, 581, 580, 1, 0, 0, 0, 581, 582, 1, 0, 0, 0, 582, 591, 1, 0, 0, 0, 583, 585, 7, 4, 0, 0, 584, 586, 5, 65, 0, 0, 585, 584, 1, 0, 0, 0, 585, 586, 1, 0, 0, 0, 586, 588, 1, 0, 0, 0, 587, 589, 7, 3, 0, 0, 588, 587, 1, 0, 0, 0, 588, 589, 1, 0, 0, 0, 589, 591, 1, 0, 0, 0, 590, 577, 1, 0, 0, 0, 590, 583, 1, 0, 0, 0, 591, 609, 1, 0, 0, 0, 592, 594, 7, 5, 0, 0, 593, 592, 1, 0, 0, 0, 593, 594, 1, 0, 0, 0, 594, 595, 1, 0, 0, 0, 595, 597, 5, 35, 0, 0, 596, 598, 5, 65, 0, 0, 597, 596, 1, 0, 0, 0, 597, 598, 1, 0, 0, 0, 598, 607, 1, 0, 0, 0, 599, 601, 5, 35, 0, 0, 600, 602, 5, 65, 0, 0, 601, 600, 1, 0, 0, 0, 601, 602, 1, 0, 0, 0, 602, 604, 1, 0, 0, 0, 603, 605, 7, 5, 0, 0, 604, 603, 1, 0, 0, 0, 604, 605, 1, 0, 0, 0, 605, 607, 1, 0, 0, 0, 606, 593, 1, 0, 0, 0, 606, 599, 1, 0, 0, 0, 607, 609, 1, 0, 0, 0, 608, 574, 1, 0, 0, 0, 608, 590, 1, 0, 0, 0, 608, 606, 1, 0, 0, 0, 609, 81, 1, 0, 0, 0, 610, 611, 5, 17, 0, 0, 611, 614, 5, 47, 0, 0, 612, 614, 5, 116, 0, 0, 613, 610, 1, 0, 0, 0, 613, 612, 1, 0, 0, 0, 614, 83, 1, 0, 0, 0, 615, 616, 5, 62, 0, 0, 616, 625, 3, 114, 57, 0, 617, 618, 5, 96, 0, 0, 618, 619, 5, 130, 0, 0, 619, 620, 3, 114, 57, 0, 620, 621, 5, 149, 0, 0, 621, 625, 1, 0, 0, 0, 622, 623, 5, 96, 0, 0, 623, 625, 3, 114, 57, 0, 624, 615, 1, 0, 0, 0, 624, 617, 1, 0, 0, 0, 624, 622, 1, 0, 0, 0, 625, 85, 1, 0, 0, 0, 626, 627, 5, 77, 0, 0, 627, 630, 3, 92, 46, 0, 628, 629, 5, 61, 0, 0, 629, 631, 3, 92, 46, 0, 630, 628, 1, 0, 0, 0, 630, 631, 1, 0, 0, 0, 631, 87, 1, 0, 0, 0, 632, 637, 3, 90, 45, 0, 633, 634, 5, 116, 0, 0, 634, 636, 3, 90, 45, 0, 635, 633, 1, 0, 0, 0, 636, 639, 1, 0, 0, 0, 637, 635, 1, 0, 0, 0, 637, 638, 1, 0, 0, 0, 638, 89, 1, 0, 0, 0, 639, 637, 1, 0, 0, 0, 640, 642, 3, 116, 58, 0, 641, 643, 7, 6, 0, 0, 642, 641, 1, 0, 0, 0, 642, 643, 1, 0, 0, 0, 643, 646, 1, 0, 0, 0, 644, 645, 5, 60, 0, 0, 645, 647, 7, 7, 0, 0, 646, 644, 1, 0, 0, 0, 646, 647, 1, 0, 0, 0, 647, 650, 1, 0, 0, 0, 648, 649, 5, 16, 0, 0, 649, 651, 5, 110, 0, 0, 650, 648, 1, 0, 0, 0, 650, 651, 1, 0, 0, 0, 651, 91, 1, 0, 0, 0, 652, 659, 3, 164, 82, 0, 653, 656, 3, 148, 74, 0, 654, 655, 5, 151, 0, 0, 655, 657, 3, 148, 74, 0, 656, 654, 1, 0, 0, 0, 656, 657, 1, 0, 0, 0, 657, 659, 1, 0, 0, 0, 658, 652, 1, 0, 0, 0, 658, 653, 1, 0, 0, 0, 659, 93, 1, 0, 0, 0, 660, 665, 3, 96, 48, 0, 661, 662, 5, 116, 0, 0, 662, 664, 3, 96, 48, 0, 663, 661, 1, 0, 0, 0, 664, 667, 1, 0, 0, 0, 665, 663, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 95, 1, 0, 0, 0, 667, 665, 1, 0, 0, 0, 668, 669, 3, 160, 80, 0, 669, 670, 5, 122, 0, 0, 670, 671, 3, 150, 75, 0, 671, 97, 1, 0, 0, 0, 672, 674, 3, 100, 50, 0, 673, 672, 1, 0, 0, 0, 673, 674, 1, 0, 0, 0, 674, 676, 1, 0, 0, 0, 675, 677, 3, 102, 51, 0, 676, 675, 1, 0, 0, 0, 676, 677, 1, 0, 0, 0, 677, 679, 1, 0, 0, 0, 678, 680, 3, 104, 52, 0, 679, 678, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 99, 1, 0, 0, 0, 681, 682, 5, 67, 0, 0, 682, 683, 5, 11, 0, 0, 683, 684, 3, 114, 57, 0, 684, 101, 1, 0, 0, 0, 685, 686, 5, 64, 0, 0, 686, 687, 5, 11, 0, 0, 687, 688, 3, 88, 44, 0, 688, 103, 1, 0, 0, 0, 689, 690, 7, 8, 0, 0, 690, 691, 3, 106, 53, 0, 691, 105, 1, 0, 0, 0, 692, 699, 3, 108, 54, 0, 693, 694, 5, 9, 0, 0, 694, 695, 3, 108, 54, 0, 695, 696, 5, 2, 0, 0, 696, 697, 3, 108, 54, 0, 697, 699, 1, 0, 0, 0, 698, 692, 1, 0, 0, 0, 698, 693, 1, 0, 0, 0, 699, 107, 1, 0, 0, 0, 700, 701, 5, 19, 0, 0, 701, 713, 5, 75, 0, 0, 702, 703, 5, 94, 0, 0, 703, 713, 5, 68, 0, 0, 704, 705, 5, 94, 0, 0, 705, 713, 5, 32, 0, 0, 706, 707, 3, 148, 74, 0, 707, 708, 5, 68, 0, 0, 708, 713, 1, 0, 0, 0, 709, 710, 3, 148, 74, 0, 710, 711, 5, 32, 0, 0, 711, 713, 1, 0, 0, 0, 712, 700, 1, 0, 0, 0, 712, 702, 1, 0, 0, 0, 712, 704, 1, 0, 0, 0, 712, 706, 1, 0, 0, 0, 712, 709, 1, 0, 0, 0, 713, 109, 1, 0, 0, 0, 714, 715, 3, 116, 58, 0, 715, 716, 5, 0, 0, 1, 716, 111, 1, 0, 0, 0, 717, 774, 3, 160, 80, 0, 718, 719, 3, 160, 80, 0, 719, 720, 5, 130, 0, 0, 720, 721, 3, 160, 80, 0, 721, 728, 3, 112, 56, 0, 722, 723, 5, 116, 0, 0, 723, 724, 3, 160, 80, 0, 724, 725, 3, 112, 56, 0, 725, 727, 1, 0, 0, 0, 726, 722, 1, 0, 0, 0, 727, 730, 1, 0, 0, 0, 728, 726, 1, 0, 0, 0, 728, 729, 1, 0, 0, 0, 729, 732, 1, 0, 0, 0, 730, 728, 1, 0, 0, 0, 731, 733, 5, 116, 0, 0, 732, 731, 1, 0, 0, 0, 732, 733, 1, 0, 0, 0, 733, 734, 1, 0, 0, 0, 734, 735, 5, 149, 0, 0, 735, 774, 1, 0, 0, 0, 736, 737, 3, 160, 80, 0, 737, 738, 5, 130, 0, 0, 738, 743, 3, 162, 81, 0, 739, 740, 5, 116, 0, 0, 740, 742, 3, 162, 81, 0, 741, 739, 1, 0, 0, 0, 742, 745, 1, 0, 0, 0, 743, 741, 1, 0, 0, 0, 743, 744, 1, 0, 0, 0, 744, 747, 1, 0, 0, 0, 745, 743, 1, 0, 0, 0, 746, 748, 5, 116, 0, 0, 747, 746, 1, 0, 0, 0, 747, 748, 1, 0, 0, 0, 748, 749, 1, 0, 0, 0, 749, 750, 5, 149, 0, 0, 750, 774, 1, 0, 0, 0, 751, 752, 3, 160, 80, 0, 752, 753, 5, 130, 0, 0, 753, 758, 3, 112, 56, 0, 754, 755, 5, 116, 0, 0, 755, 757, 3, 112, 56, 0, 756, 754, 1, 0, 0, 0, 757, 760, 1, 0, 0, 0, 758, 756, 1, 0, 0, 0, 758, 759, 1, 0, 0, 0, 759, 762, 1, 0, 0, 0, 760, 758, 1, 0, 0, 0, 761, 763, 5, 116, 0, 0, 762, 761, 1, 0, 0, 0, 762, 763, 1, 0, 0, 0, 763, 764, 1, 0, 0, 0, 764, 765, 5, 149, 0, 0, 765, 774, 1, 0, 0, 0, 766, 767, 3, 160, 80, 0, 767, 769, 5, 130, 0, 0, 768, 770, 3, 114, 57, 0, 769, 768, 1, 0, 0, 0, 769, 770, 1, 0, 0, 0, 770, 771, 1, 0, 0, 0, 771, 772, 5, 149, 0, 0, 772, 774, 1, 0, 0, 0, 773, 717, 1, 0, 0, 0, 773, 718, 1, 0, 0, 0, 773, 736, 1, 0, 0, 0, 773, 751, 1, 0, 0, 0, 773, 766, 1, 0, 0, 0, 774, 113, 1, 0, 0, 0, 775, 780, 3, 116, 58, 0, 776, 777, 5, 116, 0, 0, 777, 779, 3, 116, 58, 0, 778, 776, 1, 0, 0, 0, 779, 782, 1, 0, 0, 0, 780, 778, 1, 0, 0, 0, 780, 781, 1, 0, 0, 0, 781, 784, 1, 0, 0, 0, 782, 780, 1, 0, 0, 0, 783, 785, 5, 116, 0, 0, 784, 783, 1, 0, 0, 0, 784, 785, 1, 0, 0, 0, 785, 115, 1, 0, 0, 0, 786, 787, 6, 58, -1, 0, 787, 789, 5, 12, 0, 0, 788, 790, 3, 116, 58, 0, 789, 788, 1, 0, 0, 0, 789, 790, 1, 0, 0, 0, 790, 796, 1, 0, 0, 0, 791, 792, 5, 98, 0, 0, 792, 793, 3, 116, 58, 0, 793, 794, 5, 83, 0, 0, 794, 795, 3, 116, 58, 0, 795, 797, 1, 0, 0, 0, 796, 791, 1, 0, 0, 0, 797, 798, 1, 0, 0, 0, 798, 796, 1, 0, 0, 0, 798, 799, 1, 0, 0, 0, 799, 802, 1, 0, 0, 0, 800, 801, 5, 25, 0, 0, 801, 803, 3, 116, 58, 0, 802, 800, 1, 0, 0, 0, 802, 803, 1, 0, 0, 0, 803, 804, 1, 0, 0, 0, 804, 805, 5, 26, 0, 0, 805, 936, 1, 0, 0, 0, 806, 807, 5, 13, 0, 0, 807, 808, 5, 130, 0, 0, 808, 809, 3, 116, 58, 0, 809, 810, 5, 6, 0, 0, 810, 811, 3, 112, 56, 0, 811, 812, 5, 149, 0, 0, 812, 936, 1, 0, 0, 0, 813, 814, 5, 20, 0, 0, 814, 936, 5, 110, 0, 0, 815, 816, 5, 45, 0, 0, 816, 817, 3, 116, 58, 0, 817, 818, 3, 152, 76, 0, 818, 936, 1, 0, 0, 0, 819, 820, 5, 82, 0, 0, 820, 821, 5, 130, 0, 0, 821, 822, 3, 116, 58, 0, 822, 823, 5, 34, 0, 0, 823, 826, 3, 116, 58, 0, 824, 825, 5, 33, 0, 0, 825, 827, 3, 116, 58, 0, 826, 824, 1, 0, 0, 0, 826, 827, 1, 0, 0, 0, 827, 828, 1, 0, 0, 0, 828, 829, 5, 149, 0, 0, 829, 936, 1, 0, 0, 0, 830, 831, 5, 86, 0, 0, 831, 936, 5, 110, 0, 0, 832, 833, 5, 91, 0, 0, 833, 834, 5, 130, 0, 0, 834, 835, 7, 9, 0, 0, 835, 836, 3, 166, 83, 0, 836, 837, 5, 34, 0, 0, 837, 838, 3, 116, 58, 0, 838, 839, 5, 149, 0, 0, 839, 936, 1, 0, 0, 0, 840, 841, 3, 160, 80, 0, 841, 843, 5, 130, 0, 0, 842, 844, 3, 114, 57, 0, 843, 842, 1, 0, 0, 0, 843, 844, 1, 0, 0, 0, 844, 845, 1, 0, 0, 0, 845, 846, 5, 149, 0, 0, 846, 855, 1, 0, 0, 0, 847, 849, 5, 130, 0, 0, 848, 850, 5, 24, 0, 0, 849, 848, 1, 0, 0, 0, 849, 850, 1, 0, 0, 0, 850, 852, 1, 0, 0, 0, 851, 853, 3, 118, 59, 0, 852, 851, 1, 0, 0, 0, 852, 853, 1, 0, 0, 0, 853, 854, 1, 0, 0, 0, 854, 856, 5, 149, 0, 0, 855, 847, 1, 0, 0, 0, 855, 856, 1, 0, 0, 0, 856, 857, 1, 0, 0, 0, 857, 858, 5, 66, 0, 0, 858, 859, 5, 130, 0, 0, 859, 860, 3, 98, 49, 0, 860, 861, 5, 149, 0, 0, 861, 936, 1, 0, 0, 0, 862, 863, 3, 160, 80, 0, 863, 865, 5, 130, 0, 0, 864, 866, 3, 114, 57, 0, 865, 864, 1, 0, 0, 0, 865, 866, 1, 0, 0, 0, 866, 867, 1, 0, 0, 0, 867, 868, 5, 149, 0, 0, 868, 877, 1, 0, 0, 0, 869, 871, 5, 130, 0, 0, 870, 872, 5, 24, 0, 0, 871, 870, 1, 0, 0, 0, 871, 872, 1, 0, 0, 0, 872, 874, 1, 0, 0, 0, 873, 875, 3, 118, 59, 0, 874, 873, 1, 0, 0, 0, 874, 875, 1, 0, 0, 0, 875, 876, 1, 0, 0, 0, 876, 878, 5, 149, 0, 0, 877, 869, 1, 0, 0, 0, 877, 878, 1, 0, 0, 0, 878, 879, 1, 0, 0, 0, 879, 880, 5, 66, 0, 0, 880, 881, 3, 160, 80, 0, 881, 936, 1, 0, 0, 0, 882, 888, 3, 160, 80, 0, 883, 885, 5, 130, 0, 0, 884, 886, 3, 114, 57, 0, 885, 884, 1, 0, 0, 0, 885, 886, 1, 0, 0, 0, 886, 887, 1, 0, 0, 0, 887, 889, 5, 149, 0, 0, 888, 883, 1, 0, 0, 0, 888, 889, 1, 0, 0, 0, 889, 890, 1, 0, 0, 0, 890, 892, 5, 130, 0, 0, 891, 893, 5, 24, 0, 0, 892, 891, 1, 0, 0, 0, 892, 893, 1, 0, 0, 0, 893, 895, 1, 0, 0, 0, 894, 896, 3, 118, 59, 0, 895, 894, 1, 0, 0, 0, 895, 896, 1, 0, 0, 0, 896, 897, 1, 0, 0, 0, 897, 898, 5, 149, 0, 0, 898, 936, 1, 0, 0, 0, 899, 936, 3, 124, 62, 0, 900, 936, 3, 168, 84, 0, 901, 936, 3, 150, 75, 0, 902, 903, 5, 118, 0, 0, 903, 936, 3, 116, 58, 19, 904, 905, 5, 58, 0, 0, 905, 936, 3, 116, 58, 13, 906, 907, 3, 140, 70, 0, 907, 908, 5, 120, 0, 0, 908, 910, 1, 0, 0, 0, 909, 906, 1, 0, 0, 0, 909, 910, 1, 0, 0, 0, 910, 911, 1, 0, 0, 0, 911, 936, 5, 112, 0, 0, 912, 913, 5, 130, 0, 0, 913, 914, 3, 44, 22, 0, 914, 915, 5, 149, 0, 0, 915, 936, 1, 0, 0, 0, 916, 917, 5, 130, 0, 0, 917, 918, 3, 116, 58, 0, 918, 919, 5, 149, 0, 0, 919, 936, 1, 0, 0, 0, 920, 921, 5, 130, 0, 0, 921, 922, 3, 114, 57, 0, 922, 923, 5, 149, 0, 0, 923, 936, 1, 0, 0, 0, 924, 926, 5, 129, 0, 0, 925, 927, 3, 114, 57, 0, 926, 925, 1, 0, 0, 0, 926, 927, 1, 0, 0, 0, 927, 928, 1, 0, 0, 0, 928, 936, 5, 148, 0, 0, 929, 931, 5, 128, 0, 0, 930, 932, 3, 40, 20, 0, 931, 930, 1, 0, 0, 0, 931, 932, 1, 0, 0, 0, 932, 933, 1, 0, 0, 0, 933, 936, 5, 147, 0, 0, 934, 936, 3, 132, 66, 0, 935, 786, 1, 0, 0, 0, 935, 806, 1, 0, 0, 0, 935, 813, 1, 0, 0, 0, 935, 815, 1, 0, 0, 0, 935, 819, 1, 0, 0, 0, 935, 830, 1, 0, 0, 0, 935, 832, 1, 0, 0, 0, 935, 840, 1, 0, 0, 0, 935, 862, 1, 0, 0, 0, 935, 882, 1, 0, 0, 0, 935, 899, 1, 0, 0, 0, 935, 900, 1, 0, 0, 0, 935, 901, 1, 0, 0, 0, 935, 902, 1, 0, 0, 0, 935, 904, 1, 0, 0, 0, 935, 909, 1, 0, 0, 0, 935, 912, 1, 0, 0, 0, 935, 916, 1, 0, 0, 0, 935, 920, 1, 0, 0, 0, 935, 924, 1, 0, 0, 0, 935, 929, 1, 0, 0, 0, 935, 934, 1, 0, 0, 0, 936, 1041, 1, 0, 0, 0, 937, 941, 10, 18, 0, 0, 938, 942, 5, 112, 0, 0, 939, 942, 5, 151, 0, 0, 940, 942, 5, 138, 0, 0, 941, 938, 1, 0, 0, 0, 941, 939, 1, 0, 0, 0, 941, 940, 1, 0, 0, 0, 942, 943, 1, 0, 0, 0, 943, 1040, 3, 116, 58, 19, 944, 948, 10, 17, 0, 0, 945, 949, 5, 139, 0, 0, 946, 949, 5, 118, 0, 0, 947, 949, 5, 117, 0, 0, 948, 945, 1, 0, 0, 0, 948, 946, 1, 0, 0, 0, 948, 947, 1, 0, 0, 0, 949, 950, 1, 0, 0, 0, 950, 1040, 3, 116, 58, 18, 951, 976, 10, 16, 0, 0, 952, 977, 5, 121, 0, 0, 953, 977, 5, 122, 0, 0, 954, 977, 5, 133, 0, 0, 955, 977, 5, 131, 0, 0, 956, 977, 5, 132, 0, 0, 957, 977, 5, 123, 0, 0, 958, 977, 5, 124, 0, 0, 959, 961, 5, 58, 0, 0, 960, 959, 1, 0, 0, 0, 960, 961, 1, 0, 0, 0, 961, 962, 1, 0, 0, 0, 962, 964, 5, 42, 0, 0, 963, 965, 5, 15, 0, 0, 964, 963, 1, 0, 0, 0, 964, 965, 1, 0, 0, 0, 965, 977, 1, 0, 0, 0, 966, 968, 5, 58, 0, 0, 967, 966, 1, 0, 0, 0, 967, 968, 1, 0, 0, 0, 968, 969, 1, 0, 0, 0, 969, 977, 7, 10, 0, 0, 970, 977, 5, 145, 0, 0, 971, 977, 5, 146, 0, 0, 972, 977, 5, 135, 0, 0, 973, 977, 5, 126, 0, 0, 974, 977, 5, 127, 0, 0, 975, 977, 5, 134, 0, 0, 976, 952, 1, 0, 0, 0, 976, 953, 1, 0, 0, 0, 976, 954, 1, 0, 0, 0, 976, 955, 1, 0, 0, 0, 976, 956, 1, 0, 0, 0, 976, 957, 1, 0, 0, 0, 976, 958, 1, 0, 0, 0, 976, 960, 1, 0, 0, 0, 976, 967, 1, 0, 0, 0, 976, 970, 1, 0, 0, 0, 976, 971, 1, 0, 0, 0, 976, 972, 1, 0, 0, 0, 976, 973, 1, 0, 0, 0, 976, 974, 1, 0, 0, 0, 976, 975, 1, 0, 0, 0, 977, 978, 1, 0, 0, 0, 978, 1040, 3, 116, 58, 17, 979, 980, 10, 14, 0, 0, 980, 981, 5, 137, 0, 0, 981, 1040, 3, 116, 58, 15, 982, 983, 10, 12, 0, 0, 983, 984, 5, 2, 0, 0, 984, 1040, 3, 116, 58, 13, 985, 986, 10, 11, 0, 0, 986, 987, 5, 63, 0, 0, 987, 1040, 3, 116, 58, 12, 988, 990, 10, 10, 0, 0, 989, 991, 5, 58, 0, 0, 990, 989, 1, 0, 0, 0, 990, 991, 1, 0, 0, 0, 991, 992, 1, 0, 0, 0, 992, 993, 5, 9, 0, 0, 993, 994, 3, 116, 58, 0, 994, 995, 5, 2, 0, 0, 995, 996, 3, 116, 58, 11, 996, 1040, 1, 0, 0, 0, 997, 998, 10, 9, 0, 0, 998, 999, 5, 140, 0, 0, 999, 1000, 3, 116, 58, 0, 1000, 1001, 5, 115, 0, 0, 1001, 1002, 3, 116, 58, 9, 1002, 1040, 1, 0, 0, 0, 1003, 1004, 10, 25, 0, 0, 1004, 1005, 5, 129, 0, 0, 1005, 1006, 3, 116, 58, 0, 1006, 1007, 5, 148, 0, 0, 1007, 1040, 1, 0, 0, 0, 1008, 1009, 10, 24, 0, 0, 1009, 1010, 5, 120, 0, 0, 1010, 1040, 5, 108, 0, 0, 1011, 1012, 10, 23, 0, 0, 1012, 1013, 5, 120, 0, 0, 1013, 1040, 3, 160, 80, 0, 1014, 1015, 10, 22, 0, 0, 1015, 1016, 5, 136, 0, 0, 1016, 1017, 5, 129, 0, 0, 1017, 1018, 3, 116, 58, 0, 1018, 1019, 5, 148, 0, 0, 1019, 1040, 1, 0, 0, 0, 1020, 1021, 10, 21, 0, 0, 1021, 1022, 5, 136, 0, 0, 1022, 1040, 5, 108, 0, 0, 1023, 1024, 10, 20, 0, 0, 1024, 1025, 5, 136, 0, 0, 1025, 1040, 3, 160, 80, 0, 1026, 1027, 10, 15, 0, 0, 1027, 1029, 5, 46, 0, 0, 1028, 1030, 5, 58, 0, 0, 1029, 1028, 1, 0, 0, 0, 1029, 1030, 1, 0, 0, 0, 1030, 1031, 1, 0, 0, 0, 1031, 1040, 5, 59, 0, 0, 1032, 1037, 10, 8, 0, 0, 1033, 1034, 5, 6, 0, 0, 1034, 1038, 3, 160, 80, 0, 1035, 1036, 5, 6, 0, 0, 1036, 1038, 5, 110, 0, 0, 1037, 1033, 1, 0, 0, 0, 1037, 1035, 1, 0, 0, 0, 1038, 1040, 1, 0, 0, 0, 1039, 937, 1, 0, 0, 0, 1039, 944, 1, 0, 0, 0, 1039, 951, 1, 0, 0, 0, 1039, 979, 1, 0, 0, 0, 1039, 982, 1, 0, 0, 0, 1039, 985, 1, 0, 0, 0, 1039, 988, 1, 0, 0, 0, 1039, 997, 1, 0, 0, 0, 1039, 1003, 1, 0, 0, 0, 1039, 1008, 1, 0, 0, 0, 1039, 1011, 1, 0, 0, 0, 1039, 1014, 1, 0, 0, 0, 1039, 1020, 1, 0, 0, 0, 1039, 1023, 1, 0, 0, 0, 1039, 1026, 1, 0, 0, 0, 1039, 1032, 1, 0, 0, 0, 1040, 1043, 1, 0, 0, 0, 1041, 1039, 1, 0, 0, 0, 1041, 1042, 1, 0, 0, 0, 1042, 117, 1, 0, 0, 0, 1043, 1041, 1, 0, 0, 0, 1044, 1049, 3, 120, 60, 0, 1045, 1046, 5, 116, 0, 0, 1046, 1048, 3, 120, 60, 0, 1047, 1045, 1, 0, 0, 0, 1048, 1051, 1, 0, 0, 0, 1049, 1047, 1, 0, 0, 0, 1049, 1050, 1, 0, 0, 0, 1050, 1053, 1, 0, 0, 0, 1051, 1049, 1, 0, 0, 0, 1052, 1054, 5, 116, 0, 0, 1053, 1052, 1, 0, 0, 0, 1053, 1054, 1, 0, 0, 0, 1054, 119, 1, 0, 0, 0, 1055, 1058, 3, 122, 61, 0, 1056, 1058, 3, 116, 58, 0, 1057, 1055, 1, 0, 0, 0, 1057, 1056, 1, 0, 0, 0, 1058, 121, 1, 0, 0, 0, 1059, 1060, 5, 130, 0, 0, 1060, 1065, 3, 160, 80, 0, 1061, 1062, 5, 116, 0, 0, 1062, 1064, 3, 160, 80, 0, 1063, 1061, 1, 0, 0, 0, 1064, 1067, 1, 0, 0, 0, 1065, 1063, 1, 0, 0, 0, 1065, 1066, 1, 0, 0, 0, 1066, 1069, 1, 0, 0, 0, 1067, 1065, 1, 0, 0, 0, 1068, 1070, 5, 116, 0, 0, 1069, 1068, 1, 0, 0, 0, 1069, 1070, 1, 0, 0, 0, 1070, 1071, 1, 0, 0, 0, 1071, 1072, 5, 149, 0, 0, 1072, 1085, 1, 0, 0, 0, 1073, 1078, 3, 160, 80, 0, 1074, 1075, 5, 116, 0, 0, 1075, 1077, 3, 160, 80, 0, 1076, 1074, 1, 0, 0, 0, 1077, 1080, 1, 0, 0, 0, 1078, 1076, 1, 0, 0, 0, 1078, 1079, 1, 0, 0, 0, 1079, 1082, 1, 0, 0, 0, 1080, 1078, 1, 0, 0, 0, 1081, 1083, 5, 116, 0, 0, 1082, 1081, 1, 0, 0, 0, 1082, 1083, 1, 0, 0, 0, 1083, 1085, 1, 0, 0, 0, 1084, 1059, 1, 0, 0, 0, 1084, 1073, 1, 0, 0, 0, 1085, 1086, 1, 0, 0, 0, 1086, 1087, 5, 111, 0, 0, 1087, 1088, 3, 116, 58, 0, 1088, 123, 1, 0, 0, 0, 1089, 1090, 5, 132, 0, 0, 1090, 1094, 3, 160, 80, 0, 1091, 1093, 3, 126, 63, 0, 1092, 1091, 1, 0, 0, 0, 1093, 1096, 1, 0, 0, 0, 1094, 1092, 1, 0, 0, 0, 1094, 1095, 1, 0, 0, 0, 1095, 1097, 1, 0, 0, 0, 1096, 1094, 1, 0, 0, 0, 1097, 1098, 5, 151, 0, 0, 1098, 1099, 5, 124, 0, 0, 1099, 1122, 1, 0, 0, 0, 1100, 1101, 5, 132, 0, 0, 1101, 1105, 3, 160, 80, 0, 1102, 1104, 3, 126, 63, 0, 1103, 1102, 1, 0, 0, 0, 1104, 1107, 1, 0, 0, 0, 1105, 1103, 1, 0, 0, 0, 1105, 1106, 1, 0, 0, 0, 1106, 1108, 1, 0, 0, 0, 1107, 1105, 1, 0, 0, 0, 1108, 1114, 5, 124, 0, 0, 1109, 1115, 3, 124, 62, 0, 1110, 1111, 5, 128, 0, 0, 1111, 1112, 3, 116, 58, 0, 1112, 1113, 5, 147, 0, 0, 1113, 1115, 1, 0, 0, 0, 1114, 1109, 1, 0, 0, 0, 1114, 1110, 1, 0, 0, 0, 1114, 1115, 1, 0, 0, 0, 1115, 1116, 1, 0, 0, 0, 1116, 1117, 5, 132, 0, 0, 1117, 1118, 5, 151, 0, 0, 1118, 1119, 3, 160, 80, 0, 1119, 1120, 5, 124, 0, 0, 1120, 1122, 1, 0, 0, 0, 1121, 1089, 1, 0, 0, 0, 1121, 1100, 1, 0, 0, 0, 1122, 125, 1, 0, 0, 0, 1123, 1124, 3, 160, 80, 0, 1124, 1125, 5, 122, 0, 0, 1125, 1126, 3, 166, 83, 0, 1126, 1135, 1, 0, 0, 0, 1127, 1128, 3, 160, 80, 0, 1128, 1129, 5, 122, 0, 0, 1129, 1130, 5, 128, 0, 0, 1130, 1131, 3, 116, 58, 0, 1131, 1132, 5, 147, 0, 0, 1132, 1135, 1, 0, 0, 0, 1133, 1135, 3, 160, 80, 0, 1134, 1123, 1, 0, 0, 0, 1134, 1127, 1, 0, 0, 0, 1134, 1133, 1, 0, 0, 0, 1135, 127, 1, 0, 0, 0, 1136, 1141, 3, 130, 65, 0, 1137, 1138, 5, 116, 0, 0, 1138, 1140, 3, 130, 65, 0, 1139, 1137, 1, 0, 0, 0, 1140, 1143, 1, 0, 0, 0, 1141, 1139, 1, 0, 0, 0, 1141, 1142, 1, 0, 0, 0, 1142, 1145, 1, 0, 0, 0, 1143, 1141, 1, 0, 0, 0, 1144, 1146, 5, 116, 0, 0, 1145, 1144, 1, 0, 0, 0, 1145, 1146, 1, 0, 0, 0, 1146, 129, 1, 0, 0, 0, 1147, 1148, 3, 160, 80, 0, 1148, 1149, 5, 6, 0, 0, 1149, 1150, 5, 130, 0, 0, 1150, 1151, 3, 44, 22, 0, 1151, 1152, 5, 149, 0, 0, 1152, 1158, 1, 0, 0, 0, 1153, 1154, 3, 116, 58, 0, 1154, 1155, 5, 6, 0, 0, 1155, 1156, 3, 160, 80, 0, 1156, 1158, 1, 0, 0, 0, 1157, 1147, 1, 0, 0, 0, 1157, 1153, 1, 0, 0, 0, 1158, 131, 1, 0, 0, 0, 1159, 1167, 3, 164, 82, 0, 1160, 1161, 3, 140, 70, 0, 1161, 1162, 5, 120, 0, 0, 1162, 1164, 1, 0, 0, 0, 1163, 1160, 1, 0, 0, 0, 1163, 1164, 1, 0, 0, 0, 1164, 1165, 1, 0, 0, 0, 1165, 1167, 3, 134, 67, 0, 1166, 1159, 1, 0, 0, 0, 1166, 1163, 1, 0, 0, 0, 1167, 133, 1, 0, 0, 0, 1168, 1173, 3, 160, 80, 0, 1169, 1170, 5, 120, 0, 0, 1170, 1172, 3, 160, 80, 0, 1171, 1169, 1, 0, 0, 0, 1172, 1175, 1, 0, 0, 0, 1173, 1171, 1, 0, 0, 0, 1173, 1174, 1, 0, 0, 0, 1174, 135, 1, 0, 0, 0, 1175, 1173, 1, 0, 0, 0, 1176, 1177, 6, 68, -1, 0, 1177, 1186, 3, 140, 70, 0, 1178, 1186, 3, 138, 69, 0, 1179, 1180, 5, 130, 0, 0, 1180, 1181, 3, 44, 22, 0, 1181, 1182, 5, 149, 0, 0, 1182, 1186, 1, 0, 0, 0, 1183, 1186, 3, 124, 62, 0, 1184, 1186, 3, 164, 82, 0, 1185, 1176, 1, 0, 0, 0, 1185, 1178, 1, 0, 0, 0, 1185, 1179, 1, 0, 0, 0, 1185, 1183, 1, 0, 0, 0, 1185, 1184, 1, 0, 0, 0, 1186, 1195, 1, 0, 0, 0, 1187, 1191, 10, 3, 0, 0, 1188, 1192, 3, 158, 79, 0, 1189, 1190, 5, 6, 0, 0, 1190, 1192, 3, 160, 80, 0, 1191, 1188, 1, 0, 0, 0, 1191, 1189, 1, 0, 0, 0, 1192, 1194, 1, 0, 0, 0, 1193, 1187, 1, 0, 0, 0, 1194, 1197, 1, 0, 0, 0, 1195, 1193, 1, 0, 0, 0, 1195, 1196, 1, 0, 0, 0, 1196, 137, 1, 0, 0, 0, 1197, 1195, 1, 0, 0, 0, 1198, 1199, 3, 160, 80, 0, 1199, 1201, 5, 130, 0, 0, 1200, 1202, 3, 142, 71, 0, 1201, 1200, 1, 0, 0, 0, 1201, 1202, 1, 0, 0, 0, 1202, 1203, 1, 0, 0, 0, 1203, 1204, 5, 149, 0, 0, 1204, 139, 1, 0, 0, 0, 1205, 1206, 3, 144, 72, 0, 1206, 1207, 5, 120, 0, 0, 1207, 1209, 1, 0, 0, 0, 1208, 1205, 1, 0, 0, 0, 1208, 1209, 1, 0, 0, 0, 1209, 1210, 1, 0, 0, 0, 1210, 1211, 3, 160, 80, 0, 1211, 141, 1, 0, 0, 0, 1212, 1217, 3, 116, 58, 0, 1213, 1214, 5, 116, 0, 0, 1214, 1216, 3, 116, 58, 0, 1215, 1213, 1, 0, 0, 0, 1216, 1219, 1, 0, 0, 0, 1217, 1215, 1, 0, 0, 0, 1217, 1218, 1, 0, 0, 0, 1218, 1221, 1, 0, 0, 0, 1219, 1217, 1, 0, 0, 0, 1220, 1222, 5, 116, 0, 0, 1221, 1220, 1, 0, 0, 0, 1221, 1222, 1, 0, 0, 0, 1222, 143, 1, 0, 0, 0, 1223, 1224, 3, 160, 80, 0, 1224, 145, 1, 0, 0, 0, 1225, 1234, 5, 106, 0, 0, 1226, 1227, 5, 120, 0, 0, 1227, 1234, 7, 11, 0, 0, 1228, 1229, 5, 108, 0, 0, 1229, 1231, 5, 120, 0, 0, 1230, 1232, 7, 11, 0, 0, 1231, 1230, 1, 0, 0, 0, 1231, 1232, 1, 0, 0, 0, 1232, 1234, 1, 0, 0, 0, 1233, 1225, 1, 0, 0, 0, 1233, 1226, 1, 0, 0, 0, 1233, 1228, 1, 0, 0, 0, 1234, 147, 1, 0, 0, 0, 1235, 1237, 7, 12, 0, 0, 1236, 1235, 1, 0, 0, 0, 1236, 1237, 1, 0, 0, 0, 1237, 1244, 1, 0, 0, 0, 1238, 1245, 3, 146, 73, 0, 1239, 1245, 5, 107, 0, 0, 1240, 1245, 5, 108, 0, 0, 1241, 1245, 5, 109, 0, 0, 1242, 1245, 5, 43, 0, 0, 1243, 1245, 5, 57, 0, 0, 1244, 1238, 1, 0, 0, 0, 1244, 1239, 1, 0, 0, 0, 1244, 1240, 1, 0, 0, 0, 1244, 1241, 1, 0, 0, 0, 1244, 1242, 1, 0, 0, 0, 1244, 1243, 1, 0, 0, 0, 1245, 149, 1, 0, 0, 0, 1246, 1250, 3, 148, 74, 0, 1247, 1250, 5, 110, 0, 0, 1248, 1250, 5, 59, 0, 0, 1249, 1246, 1, 0, 0, 0, 1249, 1247, 1, 0, 0, 0, 1249, 1248, 1, 0, 0, 0, 1250, 151, 1, 0, 0, 0, 1251, 1252, 7, 13, 0, 0, 1252, 153, 1, 0, 0, 0, 1253, 1254, 7, 14, 0, 0, 1254, 155, 1, 0, 0, 0, 1255, 1256, 7, 15, 0, 0, 1256, 157, 1, 0, 0, 0, 1257, 1260, 5, 105, 0, 0, 1258, 1260, 3, 156, 78, 0, 1259, 1257, 1, 0, 0, 0, 1259, 1258, 1, 0, 0, 0, 1260, 159, 1, 0, 0, 0, 1261, 1265, 5, 105, 0, 0, 1262, 1265, 3, 152, 76, 0, 1263, 1265, 3, 154, 77, 0, 1264, 1261, 1, 0, 0, 0, 1264, 1262, 1, 0, 0, 0, 1264, 1263, 1, 0, 0, 0, 1265, 161, 1, 0, 0, 0, 1266, 1267, 3, 166, 83, 0, 1267, 1268, 5, 122, 0, 0, 1268, 1269, 3, 148, 74, 0, 1269, 163, 1, 0, 0, 0, 1270, 1271, 5, 128, 0, 0, 1271, 1272, 3, 160, 80, 0, 1272, 1273, 5, 147, 0, 0, 1273, 165, 1, 0, 0, 0, 1274, 1277, 5, 110, 0, 0, 1275, 1277, 3, 168, 84, 0, 1276, 1274, 1, 0, 0, 0, 1276, 1275, 1, 0, 0, 0, 1277, 167, 1, 0, 0, 0, 1278, 1282, 5, 142, 0, 0, 1279, 1281, 3, 170, 85, 0, 1280, 1279, 1, 0, 0, 0, 1281, 1284, 1, 0, 0, 0, 1282, 1280, 1, 0, 0, 0, 1282, 1283, 1, 0, 0, 0, 1283, 1285, 1, 0, 0, 0, 1284, 1282, 1, 0, 0, 0, 1285, 1286, 5, 144, 0, 0, 1286, 169, 1, 0, 0, 0, 1287, 1288, 5, 157, 0, 0, 1288, 1289, 3, 116, 58, 0, 1289, 1290, 5, 147, 0, 0, 1290, 1293, 1, 0, 0, 0, 1291, 1293, 5, 156, 0, 0, 1292, 1287, 1, 0, 0, 0, 1292, 1291, 1, 0, 0, 0, 1293, 171, 1, 0, 0, 0, 1294, 1298, 5, 143, 0, 0, 1295, 1297, 3, 174, 87, 0, 1296, 1295, 1, 0, 0, 0, 1297, 1300, 1, 0, 0, 0, 1298, 1296, 1, 0, 0, 0, 1298, 1299, 1, 0, 0, 0, 1299, 1301, 1, 0, 0, 0, 1300, 1298, 1, 0, 0, 0, 1301, 1302, 5, 0, 0, 1, 1302, 173, 1, 0, 0, 0, 1303, 1304, 5, 159, 0, 0, 1304, 1305, 3, 116, 58, 0, 1305, 1306, 5, 147, 0, 0, 1306, 1309, 1, 0, 0, 0, 1307, 1309, 5, 158, 0, 0, 1308, 1303, 1, 0, 0, 0, 1308, 1307, 1, 0, 0, 0, 1309, 175, 1, 0, 0, 0, 168, 179, 186, 195, 202, 206, 220, 224, 227, 231, 234, 241, 245, 254, 259, 268, 276, 283, 287, 293, 298, 306, 313, 319, 331, 339, 353, 357, 362, 372, 381, 384, 388, 391, 395, 398, 401, 404, 407, 411, 415, 418, 421, 424, 428, 431, 440, 446, 467, 484, 501, 507, 513, 524, 526, 537, 540, 546, 554, 560, 562, 566, 571, 574, 577, 581, 585, 588, 590, 593, 597, 601, 604, 606, 608, 613, 624, 630, 637, 642, 646, 650, 656, 658, 665, 673, 676, 679, 698, 712, 728, 732, 743, 747, 758, 762, 769, 773, 780, 784, 789, 798, 802, 826, 843, 849, 852, 855, 865, 871, 874, 877, 885, 888, 892, 895, 909, 926, 931, 935, 941, 948, 960, 964, 967, 976, 990, 1029, 1037, 1039, 1041, 1049, 1053, 1057, 1065, 1069, 1078, 1082, 1084, 1094, 1105, 1114, 1121, 1134, 1141, 1145, 1157, 1163, 1166, 1173, 1185, 1191, 1195, 1201, 1208, 1217, 1221, 1231, 1233, 1236, 1244, 1249, 1259, 1264, 1276, 1282, 1292, 1298, 1308] \ No newline at end of file diff --git a/posthog/hogql/grammar/HogQLParser.py b/posthog/hogql/grammar/HogQLParser.py index 39024c561054f..6865c4c553220 100644 --- a/posthog/hogql/grammar/HogQLParser.py +++ b/posthog/hogql/grammar/HogQLParser.py @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,1,155,1267,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, + 4,1,159,1311,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, @@ -22,502 +22,521 @@ def serializedATN(): 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,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2, 72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7, - 78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,1, - 0,5,0,172,8,0,10,0,12,0,175,9,0,1,0,1,0,1,1,1,1,3,1,181,8,1,1,2, - 1,2,1,3,1,3,1,3,1,3,1,3,3,3,190,8,3,1,4,1,4,1,4,5,4,195,8,4,10,4, - 12,4,198,9,4,1,4,3,4,201,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5, - 1,5,3,5,213,8,5,1,6,1,6,3,6,217,8,6,1,6,3,6,220,8,6,1,7,1,7,1,7, - 1,7,1,7,1,7,1,7,3,7,229,8,7,1,8,1,8,1,8,1,8,1,8,1,8,3,8,237,8,8, - 1,9,1,9,1,9,1,9,1,9,3,9,244,8,9,1,9,1,9,3,9,248,8,9,1,9,1,9,1,9, - 1,9,3,9,254,8,9,1,9,1,9,1,9,3,9,259,8,9,1,10,1,10,1,10,1,10,1,10, - 1,10,3,10,267,8,10,1,10,1,10,1,10,1,10,1,10,3,10,274,8,10,1,11,1, - 11,1,11,1,11,3,11,280,8,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1, - 12,1,13,1,13,3,13,292,8,13,1,14,1,14,1,15,1,15,5,15,298,8,15,10, - 15,12,15,301,9,15,1,15,1,15,1,16,1,16,1,16,1,16,1,17,1,17,1,17,5, - 17,312,8,17,10,17,12,17,315,9,17,1,17,3,17,318,8,17,1,18,1,18,1, - 18,3,18,323,8,18,1,18,1,18,1,19,1,19,1,19,1,19,5,19,331,8,19,10, - 19,12,19,334,9,19,1,20,1,20,1,20,1,20,1,20,1,20,3,20,342,8,20,1, - 21,3,21,345,8,21,1,21,1,21,3,21,349,8,21,1,21,3,21,352,8,21,1,21, - 1,21,3,21,356,8,21,1,21,3,21,359,8,21,1,21,3,21,362,8,21,1,21,3, - 21,365,8,21,1,21,3,21,368,8,21,1,21,1,21,3,21,372,8,21,1,21,1,21, - 3,21,376,8,21,1,21,3,21,379,8,21,1,21,3,21,382,8,21,1,21,3,21,385, - 8,21,1,21,1,21,3,21,389,8,21,1,21,3,21,392,8,21,1,22,1,22,1,22,1, - 23,1,23,1,23,1,23,3,23,401,8,23,1,24,1,24,1,24,1,25,3,25,407,8,25, - 1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26, - 1,26,1,26,1,26,1,26,5,26,426,8,26,10,26,12,26,429,9,26,1,27,1,27, - 1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29, - 445,8,29,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32, - 1,33,1,33,1,33,1,33,3,33,462,8,33,1,33,1,33,1,33,1,33,3,33,468,8, - 33,1,33,1,33,1,33,1,33,3,33,474,8,33,1,33,1,33,1,33,1,33,1,33,1, - 33,1,33,1,33,1,33,3,33,485,8,33,3,33,487,8,33,1,34,1,34,1,34,1,35, - 1,35,1,35,1,36,1,36,1,36,3,36,498,8,36,1,36,3,36,501,8,36,1,36,1, - 36,1,36,1,36,3,36,507,8,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,515, - 8,36,1,36,1,36,1,36,1,36,5,36,521,8,36,10,36,12,36,524,9,36,1,37, - 3,37,527,8,37,1,37,1,37,1,37,3,37,532,8,37,1,37,3,37,535,8,37,1, - 37,3,37,538,8,37,1,37,1,37,3,37,542,8,37,1,37,1,37,3,37,546,8,37, - 1,37,3,37,549,8,37,3,37,551,8,37,1,37,3,37,554,8,37,1,37,1,37,3, - 37,558,8,37,1,37,1,37,3,37,562,8,37,1,37,3,37,565,8,37,3,37,567, - 8,37,3,37,569,8,37,1,38,1,38,1,38,3,38,574,8,38,1,39,1,39,1,39,1, - 39,1,39,1,39,1,39,1,39,1,39,3,39,585,8,39,1,40,1,40,1,40,1,40,3, - 40,591,8,40,1,41,1,41,1,41,5,41,596,8,41,10,41,12,41,599,9,41,1, - 42,1,42,3,42,603,8,42,1,42,1,42,3,42,607,8,42,1,42,1,42,3,42,611, - 8,42,1,43,1,43,1,43,1,43,3,43,617,8,43,3,43,619,8,43,1,44,1,44,1, - 44,5,44,624,8,44,10,44,12,44,627,9,44,1,45,1,45,1,45,1,45,1,46,3, - 46,634,8,46,1,46,3,46,637,8,46,1,46,3,46,640,8,46,1,47,1,47,1,47, - 1,47,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50, - 1,50,3,50,659,8,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51, - 1,51,1,51,1,51,3,51,673,8,51,1,52,1,52,1,52,1,53,1,53,1,53,1,53, - 1,53,1,53,1,53,1,53,1,53,5,53,687,8,53,10,53,12,53,690,9,53,1,53, - 3,53,693,8,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,5,53,702,8,53,10, - 53,12,53,705,9,53,1,53,3,53,708,8,53,1,53,1,53,1,53,1,53,1,53,1, - 53,1,53,5,53,717,8,53,10,53,12,53,720,9,53,1,53,3,53,723,8,53,1, - 53,1,53,1,53,1,53,1,53,3,53,730,8,53,1,53,1,53,3,53,734,8,53,1,54, - 1,54,1,54,5,54,739,8,54,10,54,12,54,742,9,54,1,54,3,54,745,8,54, - 1,55,1,55,1,55,3,55,750,8,55,1,55,1,55,1,55,1,55,1,55,4,55,757,8, - 55,11,55,12,55,758,1,55,1,55,3,55,763,8,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,3,55,787,8,55,1,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,804,8,55,1, - 55,1,55,1,55,1,55,3,55,810,8,55,1,55,3,55,813,8,55,1,55,3,55,816, - 8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,826,8,55,1,55, - 1,55,1,55,1,55,3,55,832,8,55,1,55,3,55,835,8,55,1,55,3,55,838,8, - 55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,846,8,55,1,55,3,55,849,8,55, - 1,55,1,55,3,55,853,8,55,1,55,3,55,856,8,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,870,8,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3, - 55,887,8,55,1,55,1,55,1,55,3,55,892,8,55,1,55,1,55,3,55,896,8,55, - 1,55,1,55,1,55,1,55,3,55,902,8,55,1,55,1,55,1,55,1,55,1,55,3,55, - 909,8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55, - 921,8,55,1,55,1,55,3,55,925,8,55,1,55,3,55,928,8,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,3,55,937,8,55,1,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,951,8,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1, - 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,990,8,55,1,55,1,55,1, - 55,1,55,1,55,1,55,3,55,998,8,55,5,55,1000,8,55,10,55,12,55,1003, - 9,55,1,56,1,56,1,56,5,56,1008,8,56,10,56,12,56,1011,9,56,1,56,3, - 56,1014,8,56,1,57,1,57,3,57,1018,8,57,1,58,1,58,1,58,1,58,5,58,1024, - 8,58,10,58,12,58,1027,9,58,1,58,3,58,1030,8,58,1,58,1,58,1,58,1, - 58,1,58,5,58,1037,8,58,10,58,12,58,1040,9,58,1,58,3,58,1043,8,58, - 3,58,1045,8,58,1,58,1,58,1,58,1,59,1,59,1,59,5,59,1053,8,59,10,59, - 12,59,1056,9,59,1,59,1,59,1,59,1,59,1,59,1,59,5,59,1064,8,59,10, - 59,12,59,1067,9,59,1,59,1,59,3,59,1071,8,59,1,59,1,59,1,59,1,59, - 1,59,3,59,1078,8,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60, - 1,60,1,60,3,60,1091,8,60,1,61,1,61,1,61,5,61,1096,8,61,10,61,12, - 61,1099,9,61,1,61,3,61,1102,8,61,1,62,1,62,1,62,1,62,1,62,1,62,1, - 62,1,62,1,62,1,62,3,62,1114,8,62,1,63,1,63,1,63,1,63,3,63,1120,8, - 63,1,63,3,63,1123,8,63,1,64,1,64,1,64,5,64,1128,8,64,10,64,12,64, - 1131,9,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,3,65,1142, - 8,65,1,65,1,65,1,65,1,65,3,65,1148,8,65,5,65,1150,8,65,10,65,12, - 65,1153,9,65,1,66,1,66,1,66,3,66,1158,8,66,1,66,1,66,1,67,1,67,1, - 67,3,67,1165,8,67,1,67,1,67,1,68,1,68,1,68,5,68,1172,8,68,10,68, - 12,68,1175,9,68,1,68,3,68,1178,8,68,1,69,1,69,1,70,1,70,1,70,1,70, - 1,70,1,70,3,70,1188,8,70,3,70,1190,8,70,1,71,3,71,1193,8,71,1,71, - 1,71,1,71,1,71,1,71,1,71,3,71,1201,8,71,1,72,1,72,1,72,3,72,1206, - 8,72,1,73,1,73,1,74,1,74,1,75,1,75,1,76,1,76,3,76,1216,8,76,1,77, - 1,77,1,77,3,77,1221,8,77,1,78,1,78,1,78,1,78,1,79,1,79,1,79,1,79, - 1,80,1,80,3,80,1233,8,80,1,81,1,81,5,81,1237,8,81,10,81,12,81,1240, - 9,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,3,82,1249,8,82,1,83,1,83, - 5,83,1253,8,83,10,83,12,83,1256,9,83,1,83,1,83,1,84,1,84,1,84,1, - 84,1,84,3,84,1265,8,84,1,84,0,3,72,110,130,85,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,132, - 134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164, - 166,168,0,16,2,0,17,17,72,72,2,0,42,42,49,49,3,0,1,1,4,4,8,8,4,0, - 1,1,3,4,8,8,78,78,2,0,49,49,71,71,2,0,1,1,4,4,2,0,7,7,21,22,2,0, - 28,28,47,47,2,0,69,69,74,74,3,0,10,10,48,48,87,87,2,0,39,39,51,51, - 1,0,103,104,2,0,114,114,135,135,7,0,20,20,36,36,53,54,68,68,76,76, - 93,93,99,99,12,0,1,19,21,28,30,35,37,40,42,49,51,52,56,56,58,67, - 69,75,77,92,94,95,97,98,4,0,19,19,28,28,37,37,46,46,1429,0,173,1, - 0,0,0,2,180,1,0,0,0,4,182,1,0,0,0,6,184,1,0,0,0,8,191,1,0,0,0,10, - 212,1,0,0,0,12,214,1,0,0,0,14,221,1,0,0,0,16,230,1,0,0,0,18,238, - 1,0,0,0,20,260,1,0,0,0,22,275,1,0,0,0,24,284,1,0,0,0,26,289,1,0, - 0,0,28,293,1,0,0,0,30,295,1,0,0,0,32,304,1,0,0,0,34,308,1,0,0,0, - 36,322,1,0,0,0,38,326,1,0,0,0,40,341,1,0,0,0,42,344,1,0,0,0,44,393, - 1,0,0,0,46,396,1,0,0,0,48,402,1,0,0,0,50,406,1,0,0,0,52,412,1,0, - 0,0,54,430,1,0,0,0,56,433,1,0,0,0,58,436,1,0,0,0,60,446,1,0,0,0, - 62,449,1,0,0,0,64,453,1,0,0,0,66,486,1,0,0,0,68,488,1,0,0,0,70,491, - 1,0,0,0,72,506,1,0,0,0,74,568,1,0,0,0,76,573,1,0,0,0,78,584,1,0, - 0,0,80,586,1,0,0,0,82,592,1,0,0,0,84,600,1,0,0,0,86,618,1,0,0,0, - 88,620,1,0,0,0,90,628,1,0,0,0,92,633,1,0,0,0,94,641,1,0,0,0,96,645, - 1,0,0,0,98,649,1,0,0,0,100,658,1,0,0,0,102,672,1,0,0,0,104,674,1, - 0,0,0,106,733,1,0,0,0,108,735,1,0,0,0,110,895,1,0,0,0,112,1004,1, - 0,0,0,114,1017,1,0,0,0,116,1044,1,0,0,0,118,1077,1,0,0,0,120,1090, - 1,0,0,0,122,1092,1,0,0,0,124,1113,1,0,0,0,126,1122,1,0,0,0,128,1124, - 1,0,0,0,130,1141,1,0,0,0,132,1154,1,0,0,0,134,1164,1,0,0,0,136,1168, - 1,0,0,0,138,1179,1,0,0,0,140,1189,1,0,0,0,142,1192,1,0,0,0,144,1205, - 1,0,0,0,146,1207,1,0,0,0,148,1209,1,0,0,0,150,1211,1,0,0,0,152,1215, - 1,0,0,0,154,1220,1,0,0,0,156,1222,1,0,0,0,158,1226,1,0,0,0,160,1232, - 1,0,0,0,162,1234,1,0,0,0,164,1248,1,0,0,0,166,1250,1,0,0,0,168,1264, - 1,0,0,0,170,172,3,2,1,0,171,170,1,0,0,0,172,175,1,0,0,0,173,171, - 1,0,0,0,173,174,1,0,0,0,174,176,1,0,0,0,175,173,1,0,0,0,176,177, - 5,0,0,1,177,1,1,0,0,0,178,181,3,6,3,0,179,181,3,10,5,0,180,178,1, - 0,0,0,180,179,1,0,0,0,181,3,1,0,0,0,182,183,3,110,55,0,183,5,1,0, - 0,0,184,185,5,50,0,0,185,189,3,154,77,0,186,187,5,111,0,0,187,188, - 5,118,0,0,188,190,3,4,2,0,189,186,1,0,0,0,189,190,1,0,0,0,190,7, - 1,0,0,0,191,196,3,154,77,0,192,193,5,112,0,0,193,195,3,154,77,0, - 194,192,1,0,0,0,195,198,1,0,0,0,196,194,1,0,0,0,196,197,1,0,0,0, - 197,200,1,0,0,0,198,196,1,0,0,0,199,201,5,112,0,0,200,199,1,0,0, - 0,200,201,1,0,0,0,201,9,1,0,0,0,202,213,3,12,6,0,203,213,3,14,7, - 0,204,213,3,16,8,0,205,213,3,20,10,0,206,213,3,18,9,0,207,213,3, - 22,11,0,208,213,3,24,12,0,209,213,3,30,15,0,210,213,3,26,13,0,211, - 213,3,28,14,0,212,202,1,0,0,0,212,203,1,0,0,0,212,204,1,0,0,0,212, - 205,1,0,0,0,212,206,1,0,0,0,212,207,1,0,0,0,212,208,1,0,0,0,212, - 209,1,0,0,0,212,210,1,0,0,0,212,211,1,0,0,0,213,11,1,0,0,0,214,216, - 5,70,0,0,215,217,3,4,2,0,216,215,1,0,0,0,216,217,1,0,0,0,217,219, - 1,0,0,0,218,220,5,146,0,0,219,218,1,0,0,0,219,220,1,0,0,0,220,13, - 1,0,0,0,221,222,5,38,0,0,222,223,5,126,0,0,223,224,3,4,2,0,224,225, - 5,145,0,0,225,228,3,10,5,0,226,227,5,24,0,0,227,229,3,10,5,0,228, - 226,1,0,0,0,228,229,1,0,0,0,229,15,1,0,0,0,230,231,5,96,0,0,231, - 232,5,126,0,0,232,233,3,4,2,0,233,234,5,145,0,0,234,236,3,10,5,0, - 235,237,5,146,0,0,236,235,1,0,0,0,236,237,1,0,0,0,237,17,1,0,0,0, - 238,239,5,31,0,0,239,243,5,126,0,0,240,244,3,6,3,0,241,244,3,24, - 12,0,242,244,3,4,2,0,243,240,1,0,0,0,243,241,1,0,0,0,243,242,1,0, - 0,0,243,244,1,0,0,0,244,245,1,0,0,0,245,247,5,146,0,0,246,248,3, - 4,2,0,247,246,1,0,0,0,247,248,1,0,0,0,248,249,1,0,0,0,249,253,5, - 146,0,0,250,254,3,6,3,0,251,254,3,24,12,0,252,254,3,4,2,0,253,250, - 1,0,0,0,253,251,1,0,0,0,253,252,1,0,0,0,253,254,1,0,0,0,254,255, - 1,0,0,0,255,256,5,145,0,0,256,258,3,10,5,0,257,259,5,146,0,0,258, - 257,1,0,0,0,258,259,1,0,0,0,259,19,1,0,0,0,260,261,5,31,0,0,261, - 262,5,126,0,0,262,263,5,50,0,0,263,266,3,154,77,0,264,265,5,112, - 0,0,265,267,3,154,77,0,266,264,1,0,0,0,266,267,1,0,0,0,267,268,1, - 0,0,0,268,269,5,40,0,0,269,270,3,4,2,0,270,271,5,145,0,0,271,273, - 3,10,5,0,272,274,5,146,0,0,273,272,1,0,0,0,273,274,1,0,0,0,274,21, - 1,0,0,0,275,276,5,29,0,0,276,277,3,154,77,0,277,279,5,126,0,0,278, - 280,3,8,4,0,279,278,1,0,0,0,279,280,1,0,0,0,280,281,1,0,0,0,281, - 282,5,145,0,0,282,283,3,30,15,0,283,23,1,0,0,0,284,285,3,4,2,0,285, - 286,5,111,0,0,286,287,5,118,0,0,287,288,3,4,2,0,288,25,1,0,0,0,289, - 291,3,4,2,0,290,292,5,146,0,0,291,290,1,0,0,0,291,292,1,0,0,0,292, - 27,1,0,0,0,293,294,5,146,0,0,294,29,1,0,0,0,295,299,5,124,0,0,296, - 298,3,2,1,0,297,296,1,0,0,0,298,301,1,0,0,0,299,297,1,0,0,0,299, - 300,1,0,0,0,300,302,1,0,0,0,301,299,1,0,0,0,302,303,5,143,0,0,303, - 31,1,0,0,0,304,305,3,4,2,0,305,306,5,111,0,0,306,307,3,4,2,0,307, - 33,1,0,0,0,308,313,3,32,16,0,309,310,5,112,0,0,310,312,3,32,16,0, - 311,309,1,0,0,0,312,315,1,0,0,0,313,311,1,0,0,0,313,314,1,0,0,0, - 314,317,1,0,0,0,315,313,1,0,0,0,316,318,5,112,0,0,317,316,1,0,0, - 0,317,318,1,0,0,0,318,35,1,0,0,0,319,323,3,38,19,0,320,323,3,42, - 21,0,321,323,3,118,59,0,322,319,1,0,0,0,322,320,1,0,0,0,322,321, - 1,0,0,0,323,324,1,0,0,0,324,325,5,0,0,1,325,37,1,0,0,0,326,332,3, - 40,20,0,327,328,5,91,0,0,328,329,5,1,0,0,329,331,3,40,20,0,330,327, - 1,0,0,0,331,334,1,0,0,0,332,330,1,0,0,0,332,333,1,0,0,0,333,39,1, - 0,0,0,334,332,1,0,0,0,335,342,3,42,21,0,336,337,5,126,0,0,337,338, - 3,38,19,0,338,339,5,145,0,0,339,342,1,0,0,0,340,342,3,158,79,0,341, - 335,1,0,0,0,341,336,1,0,0,0,341,340,1,0,0,0,342,41,1,0,0,0,343,345, - 3,44,22,0,344,343,1,0,0,0,344,345,1,0,0,0,345,346,1,0,0,0,346,348, - 5,77,0,0,347,349,5,23,0,0,348,347,1,0,0,0,348,349,1,0,0,0,349,351, - 1,0,0,0,350,352,3,46,23,0,351,350,1,0,0,0,351,352,1,0,0,0,352,353, - 1,0,0,0,353,355,3,108,54,0,354,356,3,48,24,0,355,354,1,0,0,0,355, - 356,1,0,0,0,356,358,1,0,0,0,357,359,3,50,25,0,358,357,1,0,0,0,358, - 359,1,0,0,0,359,361,1,0,0,0,360,362,3,54,27,0,361,360,1,0,0,0,361, - 362,1,0,0,0,362,364,1,0,0,0,363,365,3,56,28,0,364,363,1,0,0,0,364, - 365,1,0,0,0,365,367,1,0,0,0,366,368,3,58,29,0,367,366,1,0,0,0,367, - 368,1,0,0,0,368,371,1,0,0,0,369,370,5,98,0,0,370,372,7,0,0,0,371, - 369,1,0,0,0,371,372,1,0,0,0,372,375,1,0,0,0,373,374,5,98,0,0,374, - 376,5,86,0,0,375,373,1,0,0,0,375,376,1,0,0,0,376,378,1,0,0,0,377, - 379,3,60,30,0,378,377,1,0,0,0,378,379,1,0,0,0,379,381,1,0,0,0,380, - 382,3,52,26,0,381,380,1,0,0,0,381,382,1,0,0,0,382,384,1,0,0,0,383, - 385,3,62,31,0,384,383,1,0,0,0,384,385,1,0,0,0,385,388,1,0,0,0,386, - 389,3,66,33,0,387,389,3,68,34,0,388,386,1,0,0,0,388,387,1,0,0,0, - 388,389,1,0,0,0,389,391,1,0,0,0,390,392,3,70,35,0,391,390,1,0,0, - 0,391,392,1,0,0,0,392,43,1,0,0,0,393,394,5,98,0,0,394,395,3,122, - 61,0,395,45,1,0,0,0,396,397,5,85,0,0,397,400,5,104,0,0,398,399,5, - 98,0,0,399,401,5,82,0,0,400,398,1,0,0,0,400,401,1,0,0,0,401,47,1, - 0,0,0,402,403,5,32,0,0,403,404,3,72,36,0,404,49,1,0,0,0,405,407, - 7,1,0,0,406,405,1,0,0,0,406,407,1,0,0,0,407,408,1,0,0,0,408,409, - 5,5,0,0,409,410,5,45,0,0,410,411,3,108,54,0,411,51,1,0,0,0,412,413, - 5,97,0,0,413,414,3,154,77,0,414,415,5,6,0,0,415,416,5,126,0,0,416, - 417,3,92,46,0,417,427,5,145,0,0,418,419,5,112,0,0,419,420,3,154, - 77,0,420,421,5,6,0,0,421,422,5,126,0,0,422,423,3,92,46,0,423,424, - 5,145,0,0,424,426,1,0,0,0,425,418,1,0,0,0,426,429,1,0,0,0,427,425, - 1,0,0,0,427,428,1,0,0,0,428,53,1,0,0,0,429,427,1,0,0,0,430,431,5, - 67,0,0,431,432,3,110,55,0,432,55,1,0,0,0,433,434,5,95,0,0,434,435, - 3,110,55,0,435,57,1,0,0,0,436,437,5,34,0,0,437,444,5,11,0,0,438, - 439,7,0,0,0,439,440,5,126,0,0,440,441,3,108,54,0,441,442,5,145,0, - 0,442,445,1,0,0,0,443,445,3,108,54,0,444,438,1,0,0,0,444,443,1,0, - 0,0,445,59,1,0,0,0,446,447,5,35,0,0,447,448,3,110,55,0,448,61,1, - 0,0,0,449,450,5,62,0,0,450,451,5,11,0,0,451,452,3,82,41,0,452,63, - 1,0,0,0,453,454,5,62,0,0,454,455,5,11,0,0,455,456,3,108,54,0,456, - 65,1,0,0,0,457,458,5,52,0,0,458,461,3,110,55,0,459,460,5,112,0,0, - 460,462,3,110,55,0,461,459,1,0,0,0,461,462,1,0,0,0,462,467,1,0,0, - 0,463,464,5,98,0,0,464,468,5,82,0,0,465,466,5,11,0,0,466,468,3,108, - 54,0,467,463,1,0,0,0,467,465,1,0,0,0,467,468,1,0,0,0,468,487,1,0, - 0,0,469,470,5,52,0,0,470,473,3,110,55,0,471,472,5,98,0,0,472,474, - 5,82,0,0,473,471,1,0,0,0,473,474,1,0,0,0,474,475,1,0,0,0,475,476, - 5,59,0,0,476,477,3,110,55,0,477,487,1,0,0,0,478,479,5,52,0,0,479, - 480,3,110,55,0,480,481,5,59,0,0,481,484,3,110,55,0,482,483,5,11, - 0,0,483,485,3,108,54,0,484,482,1,0,0,0,484,485,1,0,0,0,485,487,1, - 0,0,0,486,457,1,0,0,0,486,469,1,0,0,0,486,478,1,0,0,0,487,67,1,0, - 0,0,488,489,5,59,0,0,489,490,3,110,55,0,490,69,1,0,0,0,491,492,5, - 79,0,0,492,493,3,88,44,0,493,71,1,0,0,0,494,495,6,36,-1,0,495,497, - 3,130,65,0,496,498,5,27,0,0,497,496,1,0,0,0,497,498,1,0,0,0,498, - 500,1,0,0,0,499,501,3,80,40,0,500,499,1,0,0,0,500,501,1,0,0,0,501, - 507,1,0,0,0,502,503,5,126,0,0,503,504,3,72,36,0,504,505,5,145,0, - 0,505,507,1,0,0,0,506,494,1,0,0,0,506,502,1,0,0,0,507,522,1,0,0, - 0,508,509,10,3,0,0,509,510,3,76,38,0,510,511,3,72,36,4,511,521,1, - 0,0,0,512,514,10,4,0,0,513,515,3,74,37,0,514,513,1,0,0,0,514,515, - 1,0,0,0,515,516,1,0,0,0,516,517,5,45,0,0,517,518,3,72,36,0,518,519, - 3,78,39,0,519,521,1,0,0,0,520,508,1,0,0,0,520,512,1,0,0,0,521,524, - 1,0,0,0,522,520,1,0,0,0,522,523,1,0,0,0,523,73,1,0,0,0,524,522,1, - 0,0,0,525,527,7,2,0,0,526,525,1,0,0,0,526,527,1,0,0,0,527,528,1, - 0,0,0,528,535,5,42,0,0,529,531,5,42,0,0,530,532,7,2,0,0,531,530, - 1,0,0,0,531,532,1,0,0,0,532,535,1,0,0,0,533,535,7,2,0,0,534,526, - 1,0,0,0,534,529,1,0,0,0,534,533,1,0,0,0,535,569,1,0,0,0,536,538, - 7,3,0,0,537,536,1,0,0,0,537,538,1,0,0,0,538,539,1,0,0,0,539,541, - 7,4,0,0,540,542,5,63,0,0,541,540,1,0,0,0,541,542,1,0,0,0,542,551, - 1,0,0,0,543,545,7,4,0,0,544,546,5,63,0,0,545,544,1,0,0,0,545,546, - 1,0,0,0,546,548,1,0,0,0,547,549,7,3,0,0,548,547,1,0,0,0,548,549, - 1,0,0,0,549,551,1,0,0,0,550,537,1,0,0,0,550,543,1,0,0,0,551,569, - 1,0,0,0,552,554,7,5,0,0,553,552,1,0,0,0,553,554,1,0,0,0,554,555, - 1,0,0,0,555,557,5,33,0,0,556,558,5,63,0,0,557,556,1,0,0,0,557,558, - 1,0,0,0,558,567,1,0,0,0,559,561,5,33,0,0,560,562,5,63,0,0,561,560, - 1,0,0,0,561,562,1,0,0,0,562,564,1,0,0,0,563,565,7,5,0,0,564,563, - 1,0,0,0,564,565,1,0,0,0,565,567,1,0,0,0,566,553,1,0,0,0,566,559, - 1,0,0,0,567,569,1,0,0,0,568,534,1,0,0,0,568,550,1,0,0,0,568,566, - 1,0,0,0,569,75,1,0,0,0,570,571,5,16,0,0,571,574,5,45,0,0,572,574, - 5,112,0,0,573,570,1,0,0,0,573,572,1,0,0,0,574,77,1,0,0,0,575,576, - 5,60,0,0,576,585,3,108,54,0,577,578,5,92,0,0,578,579,5,126,0,0,579, - 580,3,108,54,0,580,581,5,145,0,0,581,585,1,0,0,0,582,583,5,92,0, - 0,583,585,3,108,54,0,584,575,1,0,0,0,584,577,1,0,0,0,584,582,1,0, - 0,0,585,79,1,0,0,0,586,587,5,75,0,0,587,590,3,86,43,0,588,589,5, - 59,0,0,589,591,3,86,43,0,590,588,1,0,0,0,590,591,1,0,0,0,591,81, - 1,0,0,0,592,597,3,84,42,0,593,594,5,112,0,0,594,596,3,84,42,0,595, - 593,1,0,0,0,596,599,1,0,0,0,597,595,1,0,0,0,597,598,1,0,0,0,598, - 83,1,0,0,0,599,597,1,0,0,0,600,602,3,110,55,0,601,603,7,6,0,0,602, - 601,1,0,0,0,602,603,1,0,0,0,603,606,1,0,0,0,604,605,5,58,0,0,605, - 607,7,7,0,0,606,604,1,0,0,0,606,607,1,0,0,0,607,610,1,0,0,0,608, - 609,5,15,0,0,609,611,5,106,0,0,610,608,1,0,0,0,610,611,1,0,0,0,611, - 85,1,0,0,0,612,619,3,158,79,0,613,616,3,142,71,0,614,615,5,147,0, - 0,615,617,3,142,71,0,616,614,1,0,0,0,616,617,1,0,0,0,617,619,1,0, - 0,0,618,612,1,0,0,0,618,613,1,0,0,0,619,87,1,0,0,0,620,625,3,90, - 45,0,621,622,5,112,0,0,622,624,3,90,45,0,623,621,1,0,0,0,624,627, - 1,0,0,0,625,623,1,0,0,0,625,626,1,0,0,0,626,89,1,0,0,0,627,625,1, - 0,0,0,628,629,3,154,77,0,629,630,5,118,0,0,630,631,3,144,72,0,631, - 91,1,0,0,0,632,634,3,94,47,0,633,632,1,0,0,0,633,634,1,0,0,0,634, - 636,1,0,0,0,635,637,3,96,48,0,636,635,1,0,0,0,636,637,1,0,0,0,637, - 639,1,0,0,0,638,640,3,98,49,0,639,638,1,0,0,0,639,640,1,0,0,0,640, - 93,1,0,0,0,641,642,5,65,0,0,642,643,5,11,0,0,643,644,3,108,54,0, - 644,95,1,0,0,0,645,646,5,62,0,0,646,647,5,11,0,0,647,648,3,82,41, - 0,648,97,1,0,0,0,649,650,7,8,0,0,650,651,3,100,50,0,651,99,1,0,0, - 0,652,659,3,102,51,0,653,654,5,9,0,0,654,655,3,102,51,0,655,656, - 5,2,0,0,656,657,3,102,51,0,657,659,1,0,0,0,658,652,1,0,0,0,658,653, - 1,0,0,0,659,101,1,0,0,0,660,661,5,18,0,0,661,673,5,73,0,0,662,663, - 5,90,0,0,663,673,5,66,0,0,664,665,5,90,0,0,665,673,5,30,0,0,666, - 667,3,142,71,0,667,668,5,66,0,0,668,673,1,0,0,0,669,670,3,142,71, - 0,670,671,5,30,0,0,671,673,1,0,0,0,672,660,1,0,0,0,672,662,1,0,0, - 0,672,664,1,0,0,0,672,666,1,0,0,0,672,669,1,0,0,0,673,103,1,0,0, - 0,674,675,3,110,55,0,675,676,5,0,0,1,676,105,1,0,0,0,677,734,3,154, - 77,0,678,679,3,154,77,0,679,680,5,126,0,0,680,681,3,154,77,0,681, - 688,3,106,53,0,682,683,5,112,0,0,683,684,3,154,77,0,684,685,3,106, - 53,0,685,687,1,0,0,0,686,682,1,0,0,0,687,690,1,0,0,0,688,686,1,0, - 0,0,688,689,1,0,0,0,689,692,1,0,0,0,690,688,1,0,0,0,691,693,5,112, - 0,0,692,691,1,0,0,0,692,693,1,0,0,0,693,694,1,0,0,0,694,695,5,145, - 0,0,695,734,1,0,0,0,696,697,3,154,77,0,697,698,5,126,0,0,698,703, - 3,156,78,0,699,700,5,112,0,0,700,702,3,156,78,0,701,699,1,0,0,0, - 702,705,1,0,0,0,703,701,1,0,0,0,703,704,1,0,0,0,704,707,1,0,0,0, - 705,703,1,0,0,0,706,708,5,112,0,0,707,706,1,0,0,0,707,708,1,0,0, - 0,708,709,1,0,0,0,709,710,5,145,0,0,710,734,1,0,0,0,711,712,3,154, - 77,0,712,713,5,126,0,0,713,718,3,106,53,0,714,715,5,112,0,0,715, - 717,3,106,53,0,716,714,1,0,0,0,717,720,1,0,0,0,718,716,1,0,0,0,718, - 719,1,0,0,0,719,722,1,0,0,0,720,718,1,0,0,0,721,723,5,112,0,0,722, - 721,1,0,0,0,722,723,1,0,0,0,723,724,1,0,0,0,724,725,5,145,0,0,725, - 734,1,0,0,0,726,727,3,154,77,0,727,729,5,126,0,0,728,730,3,108,54, - 0,729,728,1,0,0,0,729,730,1,0,0,0,730,731,1,0,0,0,731,732,5,145, - 0,0,732,734,1,0,0,0,733,677,1,0,0,0,733,678,1,0,0,0,733,696,1,0, - 0,0,733,711,1,0,0,0,733,726,1,0,0,0,734,107,1,0,0,0,735,740,3,110, - 55,0,736,737,5,112,0,0,737,739,3,110,55,0,738,736,1,0,0,0,739,742, - 1,0,0,0,740,738,1,0,0,0,740,741,1,0,0,0,741,744,1,0,0,0,742,740, - 1,0,0,0,743,745,5,112,0,0,744,743,1,0,0,0,744,745,1,0,0,0,745,109, - 1,0,0,0,746,747,6,55,-1,0,747,749,5,12,0,0,748,750,3,110,55,0,749, - 748,1,0,0,0,749,750,1,0,0,0,750,756,1,0,0,0,751,752,5,94,0,0,752, - 753,3,110,55,0,753,754,5,81,0,0,754,755,3,110,55,0,755,757,1,0,0, - 0,756,751,1,0,0,0,757,758,1,0,0,0,758,756,1,0,0,0,758,759,1,0,0, - 0,759,762,1,0,0,0,760,761,5,24,0,0,761,763,3,110,55,0,762,760,1, - 0,0,0,762,763,1,0,0,0,763,764,1,0,0,0,764,765,5,25,0,0,765,896,1, - 0,0,0,766,767,5,13,0,0,767,768,5,126,0,0,768,769,3,110,55,0,769, - 770,5,6,0,0,770,771,3,106,53,0,771,772,5,145,0,0,772,896,1,0,0,0, - 773,774,5,19,0,0,774,896,5,106,0,0,775,776,5,43,0,0,776,777,3,110, - 55,0,777,778,3,146,73,0,778,896,1,0,0,0,779,780,5,80,0,0,780,781, - 5,126,0,0,781,782,3,110,55,0,782,783,5,32,0,0,783,786,3,110,55,0, - 784,785,5,31,0,0,785,787,3,110,55,0,786,784,1,0,0,0,786,787,1,0, - 0,0,787,788,1,0,0,0,788,789,5,145,0,0,789,896,1,0,0,0,790,791,5, - 83,0,0,791,896,5,106,0,0,792,793,5,88,0,0,793,794,5,126,0,0,794, - 795,7,9,0,0,795,796,3,160,80,0,796,797,5,32,0,0,797,798,3,110,55, - 0,798,799,5,145,0,0,799,896,1,0,0,0,800,801,3,154,77,0,801,803,5, - 126,0,0,802,804,3,108,54,0,803,802,1,0,0,0,803,804,1,0,0,0,804,805, - 1,0,0,0,805,806,5,145,0,0,806,815,1,0,0,0,807,809,5,126,0,0,808, - 810,5,23,0,0,809,808,1,0,0,0,809,810,1,0,0,0,810,812,1,0,0,0,811, - 813,3,112,56,0,812,811,1,0,0,0,812,813,1,0,0,0,813,814,1,0,0,0,814, - 816,5,145,0,0,815,807,1,0,0,0,815,816,1,0,0,0,816,817,1,0,0,0,817, - 818,5,64,0,0,818,819,5,126,0,0,819,820,3,92,46,0,820,821,5,145,0, - 0,821,896,1,0,0,0,822,823,3,154,77,0,823,825,5,126,0,0,824,826,3, - 108,54,0,825,824,1,0,0,0,825,826,1,0,0,0,826,827,1,0,0,0,827,828, - 5,145,0,0,828,837,1,0,0,0,829,831,5,126,0,0,830,832,5,23,0,0,831, - 830,1,0,0,0,831,832,1,0,0,0,832,834,1,0,0,0,833,835,3,112,56,0,834, - 833,1,0,0,0,834,835,1,0,0,0,835,836,1,0,0,0,836,838,5,145,0,0,837, - 829,1,0,0,0,837,838,1,0,0,0,838,839,1,0,0,0,839,840,5,64,0,0,840, - 841,3,154,77,0,841,896,1,0,0,0,842,848,3,154,77,0,843,845,5,126, - 0,0,844,846,3,108,54,0,845,844,1,0,0,0,845,846,1,0,0,0,846,847,1, - 0,0,0,847,849,5,145,0,0,848,843,1,0,0,0,848,849,1,0,0,0,849,850, - 1,0,0,0,850,852,5,126,0,0,851,853,5,23,0,0,852,851,1,0,0,0,852,853, - 1,0,0,0,853,855,1,0,0,0,854,856,3,112,56,0,855,854,1,0,0,0,855,856, - 1,0,0,0,856,857,1,0,0,0,857,858,5,145,0,0,858,896,1,0,0,0,859,896, - 3,118,59,0,860,896,3,162,81,0,861,896,3,144,72,0,862,863,5,114,0, - 0,863,896,3,110,55,19,864,865,5,56,0,0,865,896,3,110,55,13,866,867, - 3,134,67,0,867,868,5,116,0,0,868,870,1,0,0,0,869,866,1,0,0,0,869, - 870,1,0,0,0,870,871,1,0,0,0,871,896,5,108,0,0,872,873,5,126,0,0, - 873,874,3,38,19,0,874,875,5,145,0,0,875,896,1,0,0,0,876,877,5,126, - 0,0,877,878,3,110,55,0,878,879,5,145,0,0,879,896,1,0,0,0,880,881, - 5,126,0,0,881,882,3,108,54,0,882,883,5,145,0,0,883,896,1,0,0,0,884, - 886,5,125,0,0,885,887,3,108,54,0,886,885,1,0,0,0,886,887,1,0,0,0, - 887,888,1,0,0,0,888,896,5,144,0,0,889,891,5,124,0,0,890,892,3,34, - 17,0,891,890,1,0,0,0,891,892,1,0,0,0,892,893,1,0,0,0,893,896,5,143, - 0,0,894,896,3,126,63,0,895,746,1,0,0,0,895,766,1,0,0,0,895,773,1, - 0,0,0,895,775,1,0,0,0,895,779,1,0,0,0,895,790,1,0,0,0,895,792,1, - 0,0,0,895,800,1,0,0,0,895,822,1,0,0,0,895,842,1,0,0,0,895,859,1, - 0,0,0,895,860,1,0,0,0,895,861,1,0,0,0,895,862,1,0,0,0,895,864,1, - 0,0,0,895,869,1,0,0,0,895,872,1,0,0,0,895,876,1,0,0,0,895,880,1, - 0,0,0,895,884,1,0,0,0,895,889,1,0,0,0,895,894,1,0,0,0,896,1001,1, - 0,0,0,897,901,10,18,0,0,898,902,5,108,0,0,899,902,5,147,0,0,900, - 902,5,134,0,0,901,898,1,0,0,0,901,899,1,0,0,0,901,900,1,0,0,0,902, - 903,1,0,0,0,903,1000,3,110,55,19,904,908,10,17,0,0,905,909,5,135, - 0,0,906,909,5,114,0,0,907,909,5,113,0,0,908,905,1,0,0,0,908,906, - 1,0,0,0,908,907,1,0,0,0,909,910,1,0,0,0,910,1000,3,110,55,18,911, - 936,10,16,0,0,912,937,5,117,0,0,913,937,5,118,0,0,914,937,5,129, - 0,0,915,937,5,127,0,0,916,937,5,128,0,0,917,937,5,119,0,0,918,937, - 5,120,0,0,919,921,5,56,0,0,920,919,1,0,0,0,920,921,1,0,0,0,921,922, - 1,0,0,0,922,924,5,40,0,0,923,925,5,14,0,0,924,923,1,0,0,0,924,925, - 1,0,0,0,925,937,1,0,0,0,926,928,5,56,0,0,927,926,1,0,0,0,927,928, - 1,0,0,0,928,929,1,0,0,0,929,937,7,10,0,0,930,937,5,141,0,0,931,937, - 5,142,0,0,932,937,5,131,0,0,933,937,5,122,0,0,934,937,5,123,0,0, - 935,937,5,130,0,0,936,912,1,0,0,0,936,913,1,0,0,0,936,914,1,0,0, - 0,936,915,1,0,0,0,936,916,1,0,0,0,936,917,1,0,0,0,936,918,1,0,0, - 0,936,920,1,0,0,0,936,927,1,0,0,0,936,930,1,0,0,0,936,931,1,0,0, - 0,936,932,1,0,0,0,936,933,1,0,0,0,936,934,1,0,0,0,936,935,1,0,0, - 0,937,938,1,0,0,0,938,1000,3,110,55,17,939,940,10,14,0,0,940,941, - 5,133,0,0,941,1000,3,110,55,15,942,943,10,12,0,0,943,944,5,2,0,0, - 944,1000,3,110,55,13,945,946,10,11,0,0,946,947,5,61,0,0,947,1000, - 3,110,55,12,948,950,10,10,0,0,949,951,5,56,0,0,950,949,1,0,0,0,950, - 951,1,0,0,0,951,952,1,0,0,0,952,953,5,9,0,0,953,954,3,110,55,0,954, - 955,5,2,0,0,955,956,3,110,55,11,956,1000,1,0,0,0,957,958,10,9,0, - 0,958,959,5,136,0,0,959,960,3,110,55,0,960,961,5,111,0,0,961,962, - 3,110,55,9,962,1000,1,0,0,0,963,964,10,25,0,0,964,965,5,125,0,0, - 965,966,3,110,55,0,966,967,5,144,0,0,967,1000,1,0,0,0,968,969,10, - 24,0,0,969,970,5,116,0,0,970,1000,5,104,0,0,971,972,10,23,0,0,972, - 973,5,116,0,0,973,1000,3,154,77,0,974,975,10,22,0,0,975,976,5,132, - 0,0,976,977,5,125,0,0,977,978,3,110,55,0,978,979,5,144,0,0,979,1000, - 1,0,0,0,980,981,10,21,0,0,981,982,5,132,0,0,982,1000,5,104,0,0,983, - 984,10,20,0,0,984,985,5,132,0,0,985,1000,3,154,77,0,986,987,10,15, - 0,0,987,989,5,44,0,0,988,990,5,56,0,0,989,988,1,0,0,0,989,990,1, - 0,0,0,990,991,1,0,0,0,991,1000,5,57,0,0,992,997,10,8,0,0,993,994, - 5,6,0,0,994,998,3,154,77,0,995,996,5,6,0,0,996,998,5,106,0,0,997, - 993,1,0,0,0,997,995,1,0,0,0,998,1000,1,0,0,0,999,897,1,0,0,0,999, - 904,1,0,0,0,999,911,1,0,0,0,999,939,1,0,0,0,999,942,1,0,0,0,999, - 945,1,0,0,0,999,948,1,0,0,0,999,957,1,0,0,0,999,963,1,0,0,0,999, - 968,1,0,0,0,999,971,1,0,0,0,999,974,1,0,0,0,999,980,1,0,0,0,999, - 983,1,0,0,0,999,986,1,0,0,0,999,992,1,0,0,0,1000,1003,1,0,0,0,1001, - 999,1,0,0,0,1001,1002,1,0,0,0,1002,111,1,0,0,0,1003,1001,1,0,0,0, - 1004,1009,3,114,57,0,1005,1006,5,112,0,0,1006,1008,3,114,57,0,1007, - 1005,1,0,0,0,1008,1011,1,0,0,0,1009,1007,1,0,0,0,1009,1010,1,0,0, - 0,1010,1013,1,0,0,0,1011,1009,1,0,0,0,1012,1014,5,112,0,0,1013,1012, - 1,0,0,0,1013,1014,1,0,0,0,1014,113,1,0,0,0,1015,1018,3,116,58,0, - 1016,1018,3,110,55,0,1017,1015,1,0,0,0,1017,1016,1,0,0,0,1018,115, - 1,0,0,0,1019,1020,5,126,0,0,1020,1025,3,154,77,0,1021,1022,5,112, - 0,0,1022,1024,3,154,77,0,1023,1021,1,0,0,0,1024,1027,1,0,0,0,1025, - 1023,1,0,0,0,1025,1026,1,0,0,0,1026,1029,1,0,0,0,1027,1025,1,0,0, - 0,1028,1030,5,112,0,0,1029,1028,1,0,0,0,1029,1030,1,0,0,0,1030,1031, - 1,0,0,0,1031,1032,5,145,0,0,1032,1045,1,0,0,0,1033,1038,3,154,77, - 0,1034,1035,5,112,0,0,1035,1037,3,154,77,0,1036,1034,1,0,0,0,1037, - 1040,1,0,0,0,1038,1036,1,0,0,0,1038,1039,1,0,0,0,1039,1042,1,0,0, - 0,1040,1038,1,0,0,0,1041,1043,5,112,0,0,1042,1041,1,0,0,0,1042,1043, - 1,0,0,0,1043,1045,1,0,0,0,1044,1019,1,0,0,0,1044,1033,1,0,0,0,1045, - 1046,1,0,0,0,1046,1047,5,107,0,0,1047,1048,3,110,55,0,1048,117,1, - 0,0,0,1049,1050,5,128,0,0,1050,1054,3,154,77,0,1051,1053,3,120,60, - 0,1052,1051,1,0,0,0,1053,1056,1,0,0,0,1054,1052,1,0,0,0,1054,1055, - 1,0,0,0,1055,1057,1,0,0,0,1056,1054,1,0,0,0,1057,1058,5,147,0,0, - 1058,1059,5,120,0,0,1059,1078,1,0,0,0,1060,1061,5,128,0,0,1061,1065, - 3,154,77,0,1062,1064,3,120,60,0,1063,1062,1,0,0,0,1064,1067,1,0, - 0,0,1065,1063,1,0,0,0,1065,1066,1,0,0,0,1066,1068,1,0,0,0,1067,1065, - 1,0,0,0,1068,1070,5,120,0,0,1069,1071,3,118,59,0,1070,1069,1,0,0, - 0,1070,1071,1,0,0,0,1071,1072,1,0,0,0,1072,1073,5,128,0,0,1073,1074, - 5,147,0,0,1074,1075,3,154,77,0,1075,1076,5,120,0,0,1076,1078,1,0, - 0,0,1077,1049,1,0,0,0,1077,1060,1,0,0,0,1078,119,1,0,0,0,1079,1080, - 3,154,77,0,1080,1081,5,118,0,0,1081,1082,3,160,80,0,1082,1091,1, - 0,0,0,1083,1084,3,154,77,0,1084,1085,5,118,0,0,1085,1086,5,124,0, - 0,1086,1087,3,110,55,0,1087,1088,5,143,0,0,1088,1091,1,0,0,0,1089, - 1091,3,154,77,0,1090,1079,1,0,0,0,1090,1083,1,0,0,0,1090,1089,1, - 0,0,0,1091,121,1,0,0,0,1092,1097,3,124,62,0,1093,1094,5,112,0,0, - 1094,1096,3,124,62,0,1095,1093,1,0,0,0,1096,1099,1,0,0,0,1097,1095, - 1,0,0,0,1097,1098,1,0,0,0,1098,1101,1,0,0,0,1099,1097,1,0,0,0,1100, - 1102,5,112,0,0,1101,1100,1,0,0,0,1101,1102,1,0,0,0,1102,123,1,0, - 0,0,1103,1104,3,154,77,0,1104,1105,5,6,0,0,1105,1106,5,126,0,0,1106, - 1107,3,38,19,0,1107,1108,5,145,0,0,1108,1114,1,0,0,0,1109,1110,3, - 110,55,0,1110,1111,5,6,0,0,1111,1112,3,154,77,0,1112,1114,1,0,0, - 0,1113,1103,1,0,0,0,1113,1109,1,0,0,0,1114,125,1,0,0,0,1115,1123, - 3,158,79,0,1116,1117,3,134,67,0,1117,1118,5,116,0,0,1118,1120,1, - 0,0,0,1119,1116,1,0,0,0,1119,1120,1,0,0,0,1120,1121,1,0,0,0,1121, - 1123,3,128,64,0,1122,1115,1,0,0,0,1122,1119,1,0,0,0,1123,127,1,0, - 0,0,1124,1129,3,154,77,0,1125,1126,5,116,0,0,1126,1128,3,154,77, - 0,1127,1125,1,0,0,0,1128,1131,1,0,0,0,1129,1127,1,0,0,0,1129,1130, - 1,0,0,0,1130,129,1,0,0,0,1131,1129,1,0,0,0,1132,1133,6,65,-1,0,1133, - 1142,3,134,67,0,1134,1142,3,132,66,0,1135,1136,5,126,0,0,1136,1137, - 3,38,19,0,1137,1138,5,145,0,0,1138,1142,1,0,0,0,1139,1142,3,118, - 59,0,1140,1142,3,158,79,0,1141,1132,1,0,0,0,1141,1134,1,0,0,0,1141, - 1135,1,0,0,0,1141,1139,1,0,0,0,1141,1140,1,0,0,0,1142,1151,1,0,0, - 0,1143,1147,10,3,0,0,1144,1148,3,152,76,0,1145,1146,5,6,0,0,1146, - 1148,3,154,77,0,1147,1144,1,0,0,0,1147,1145,1,0,0,0,1148,1150,1, - 0,0,0,1149,1143,1,0,0,0,1150,1153,1,0,0,0,1151,1149,1,0,0,0,1151, - 1152,1,0,0,0,1152,131,1,0,0,0,1153,1151,1,0,0,0,1154,1155,3,154, - 77,0,1155,1157,5,126,0,0,1156,1158,3,136,68,0,1157,1156,1,0,0,0, - 1157,1158,1,0,0,0,1158,1159,1,0,0,0,1159,1160,5,145,0,0,1160,133, - 1,0,0,0,1161,1162,3,138,69,0,1162,1163,5,116,0,0,1163,1165,1,0,0, - 0,1164,1161,1,0,0,0,1164,1165,1,0,0,0,1165,1166,1,0,0,0,1166,1167, - 3,154,77,0,1167,135,1,0,0,0,1168,1173,3,110,55,0,1169,1170,5,112, - 0,0,1170,1172,3,110,55,0,1171,1169,1,0,0,0,1172,1175,1,0,0,0,1173, - 1171,1,0,0,0,1173,1174,1,0,0,0,1174,1177,1,0,0,0,1175,1173,1,0,0, - 0,1176,1178,5,112,0,0,1177,1176,1,0,0,0,1177,1178,1,0,0,0,1178,137, - 1,0,0,0,1179,1180,3,154,77,0,1180,139,1,0,0,0,1181,1190,5,102,0, - 0,1182,1183,5,116,0,0,1183,1190,7,11,0,0,1184,1185,5,104,0,0,1185, - 1187,5,116,0,0,1186,1188,7,11,0,0,1187,1186,1,0,0,0,1187,1188,1, - 0,0,0,1188,1190,1,0,0,0,1189,1181,1,0,0,0,1189,1182,1,0,0,0,1189, - 1184,1,0,0,0,1190,141,1,0,0,0,1191,1193,7,12,0,0,1192,1191,1,0,0, - 0,1192,1193,1,0,0,0,1193,1200,1,0,0,0,1194,1201,3,140,70,0,1195, - 1201,5,103,0,0,1196,1201,5,104,0,0,1197,1201,5,105,0,0,1198,1201, - 5,41,0,0,1199,1201,5,55,0,0,1200,1194,1,0,0,0,1200,1195,1,0,0,0, - 1200,1196,1,0,0,0,1200,1197,1,0,0,0,1200,1198,1,0,0,0,1200,1199, - 1,0,0,0,1201,143,1,0,0,0,1202,1206,3,142,71,0,1203,1206,5,106,0, - 0,1204,1206,5,57,0,0,1205,1202,1,0,0,0,1205,1203,1,0,0,0,1205,1204, - 1,0,0,0,1206,145,1,0,0,0,1207,1208,7,13,0,0,1208,147,1,0,0,0,1209, - 1210,7,14,0,0,1210,149,1,0,0,0,1211,1212,7,15,0,0,1212,151,1,0,0, - 0,1213,1216,5,101,0,0,1214,1216,3,150,75,0,1215,1213,1,0,0,0,1215, - 1214,1,0,0,0,1216,153,1,0,0,0,1217,1221,5,101,0,0,1218,1221,3,146, - 73,0,1219,1221,3,148,74,0,1220,1217,1,0,0,0,1220,1218,1,0,0,0,1220, - 1219,1,0,0,0,1221,155,1,0,0,0,1222,1223,3,160,80,0,1223,1224,5,118, - 0,0,1224,1225,3,142,71,0,1225,157,1,0,0,0,1226,1227,5,124,0,0,1227, - 1228,3,154,77,0,1228,1229,5,143,0,0,1229,159,1,0,0,0,1230,1233,5, - 106,0,0,1231,1233,3,162,81,0,1232,1230,1,0,0,0,1232,1231,1,0,0,0, - 1233,161,1,0,0,0,1234,1238,5,138,0,0,1235,1237,3,164,82,0,1236,1235, - 1,0,0,0,1237,1240,1,0,0,0,1238,1236,1,0,0,0,1238,1239,1,0,0,0,1239, - 1241,1,0,0,0,1240,1238,1,0,0,0,1241,1242,5,140,0,0,1242,163,1,0, - 0,0,1243,1244,5,153,0,0,1244,1245,3,110,55,0,1245,1246,5,143,0,0, - 1246,1249,1,0,0,0,1247,1249,5,152,0,0,1248,1243,1,0,0,0,1248,1247, - 1,0,0,0,1249,165,1,0,0,0,1250,1254,5,139,0,0,1251,1253,3,168,84, - 0,1252,1251,1,0,0,0,1253,1256,1,0,0,0,1254,1252,1,0,0,0,1254,1255, - 1,0,0,0,1255,1257,1,0,0,0,1256,1254,1,0,0,0,1257,1258,5,0,0,1,1258, - 167,1,0,0,0,1259,1260,5,155,0,0,1260,1261,3,110,55,0,1261,1262,5, - 143,0,0,1262,1265,1,0,0,0,1263,1265,5,154,0,0,1264,1259,1,0,0,0, - 1264,1263,1,0,0,0,1265,169,1,0,0,0,162,173,180,189,196,200,212,216, - 219,228,236,243,247,253,258,266,273,279,291,299,313,317,322,332, - 341,344,348,351,355,358,361,364,367,371,375,378,381,384,388,391, - 400,406,427,444,461,467,473,484,486,497,500,506,514,520,522,526, - 531,534,537,541,545,548,550,553,557,561,564,566,568,573,584,590, - 597,602,606,610,616,618,625,633,636,639,658,672,688,692,703,707, - 718,722,729,733,740,744,749,758,762,786,803,809,812,815,825,831, - 834,837,845,848,852,855,869,886,891,895,901,908,920,924,927,936, - 950,989,997,999,1001,1009,1013,1017,1025,1029,1038,1042,1044,1054, - 1065,1070,1077,1090,1097,1101,1113,1119,1122,1129,1141,1147,1151, - 1157,1164,1173,1177,1187,1189,1192,1200,1205,1215,1220,1232,1238, - 1248,1254,1264 + 78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2, + 85,7,85,2,86,7,86,2,87,7,87,1,0,5,0,178,8,0,10,0,12,0,181,9,0,1, + 0,1,0,1,1,1,1,3,1,187,8,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,3,3,196,8, + 3,1,4,1,4,1,4,5,4,201,8,4,10,4,12,4,204,9,4,1,4,3,4,207,8,4,1,5, + 1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,221,8,5,1,6,1,6, + 3,6,225,8,6,1,6,3,6,228,8,6,1,7,1,7,3,7,232,8,7,1,7,3,7,235,8,7, + 1,8,1,8,1,8,1,8,1,8,3,8,242,8,8,1,8,1,8,3,8,246,8,8,1,8,1,8,1,9, + 1,9,1,9,5,9,253,8,9,10,9,12,9,256,9,9,1,9,1,9,3,9,260,8,9,1,10,1, + 10,1,10,1,10,1,10,1,10,1,10,3,10,269,8,10,1,11,1,11,1,11,1,11,1, + 11,1,11,3,11,277,8,11,1,12,1,12,1,12,1,12,1,12,3,12,284,8,12,1,12, + 1,12,3,12,288,8,12,1,12,1,12,1,12,1,12,3,12,294,8,12,1,12,1,12,1, + 12,3,12,299,8,12,1,13,1,13,1,13,1,13,1,13,1,13,3,13,307,8,13,1,13, + 1,13,1,13,1,13,1,13,3,13,314,8,13,1,14,1,14,1,14,1,14,3,14,320,8, + 14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,3,16,332,8, + 16,1,17,1,17,1,18,1,18,5,18,338,8,18,10,18,12,18,341,9,18,1,18,1, + 18,1,19,1,19,1,19,1,19,1,20,1,20,1,20,5,20,352,8,20,10,20,12,20, + 355,9,20,1,20,3,20,358,8,20,1,21,1,21,1,21,3,21,363,8,21,1,21,1, + 21,1,22,1,22,1,22,1,22,5,22,371,8,22,10,22,12,22,374,9,22,1,23,1, + 23,1,23,1,23,1,23,1,23,3,23,382,8,23,1,24,3,24,385,8,24,1,24,1,24, + 3,24,389,8,24,1,24,3,24,392,8,24,1,24,1,24,3,24,396,8,24,1,24,3, + 24,399,8,24,1,24,3,24,402,8,24,1,24,3,24,405,8,24,1,24,3,24,408, + 8,24,1,24,1,24,3,24,412,8,24,1,24,1,24,3,24,416,8,24,1,24,3,24,419, + 8,24,1,24,3,24,422,8,24,1,24,3,24,425,8,24,1,24,1,24,3,24,429,8, + 24,1,24,3,24,432,8,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,3,26,441, + 8,26,1,27,1,27,1,27,1,28,3,28,447,8,28,1,28,1,28,1,28,1,28,1,29, + 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,5,29, + 466,8,29,10,29,12,29,469,9,29,1,30,1,30,1,30,1,31,1,31,1,31,1,32, + 1,32,1,32,1,32,1,32,1,32,1,32,1,32,3,32,485,8,32,1,33,1,33,1,33, + 1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,3,36, + 502,8,36,1,36,1,36,1,36,1,36,3,36,508,8,36,1,36,1,36,1,36,1,36,3, + 36,514,8,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,525, + 8,36,3,36,527,8,36,1,37,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39, + 3,39,538,8,39,1,39,3,39,541,8,39,1,39,1,39,1,39,1,39,3,39,547,8, + 39,1,39,1,39,1,39,1,39,1,39,1,39,3,39,555,8,39,1,39,1,39,1,39,1, + 39,5,39,561,8,39,10,39,12,39,564,9,39,1,40,3,40,567,8,40,1,40,1, + 40,1,40,3,40,572,8,40,1,40,3,40,575,8,40,1,40,3,40,578,8,40,1,40, + 1,40,3,40,582,8,40,1,40,1,40,3,40,586,8,40,1,40,3,40,589,8,40,3, + 40,591,8,40,1,40,3,40,594,8,40,1,40,1,40,3,40,598,8,40,1,40,1,40, + 3,40,602,8,40,1,40,3,40,605,8,40,3,40,607,8,40,3,40,609,8,40,1,41, + 1,41,1,41,3,41,614,8,41,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,42, + 1,42,3,42,625,8,42,1,43,1,43,1,43,1,43,3,43,631,8,43,1,44,1,44,1, + 44,5,44,636,8,44,10,44,12,44,639,9,44,1,45,1,45,3,45,643,8,45,1, + 45,1,45,3,45,647,8,45,1,45,1,45,3,45,651,8,45,1,46,1,46,1,46,1,46, + 3,46,657,8,46,3,46,659,8,46,1,47,1,47,1,47,5,47,664,8,47,10,47,12, + 47,667,9,47,1,48,1,48,1,48,1,48,1,49,3,49,674,8,49,1,49,3,49,677, + 8,49,1,49,3,49,680,8,49,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51, + 1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,3,53,699,8,53,1,54, + 1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,713, + 8,54,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56, + 5,56,727,8,56,10,56,12,56,730,9,56,1,56,3,56,733,8,56,1,56,1,56, + 1,56,1,56,1,56,1,56,1,56,5,56,742,8,56,10,56,12,56,745,9,56,1,56, + 3,56,748,8,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,5,56,757,8,56,10, + 56,12,56,760,9,56,1,56,3,56,763,8,56,1,56,1,56,1,56,1,56,1,56,3, + 56,770,8,56,1,56,1,56,3,56,774,8,56,1,57,1,57,1,57,5,57,779,8,57, + 10,57,12,57,782,9,57,1,57,3,57,785,8,57,1,58,1,58,1,58,3,58,790, + 8,58,1,58,1,58,1,58,1,58,1,58,4,58,797,8,58,11,58,12,58,798,1,58, + 1,58,3,58,803,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 3,58,827,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,3,58,844,8,58,1,58,1,58,1,58,1,58,3,58, + 850,8,58,1,58,3,58,853,8,58,1,58,3,58,856,8,58,1,58,1,58,1,58,1, + 58,1,58,1,58,1,58,1,58,3,58,866,8,58,1,58,1,58,1,58,1,58,3,58,872, + 8,58,1,58,3,58,875,8,58,1,58,3,58,878,8,58,1,58,1,58,1,58,1,58,1, + 58,1,58,3,58,886,8,58,1,58,3,58,889,8,58,1,58,1,58,3,58,893,8,58, + 1,58,3,58,896,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,3,58,910,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,927,8,58,1,58,1,58, + 1,58,3,58,932,8,58,1,58,1,58,3,58,936,8,58,1,58,1,58,1,58,1,58,3, + 58,942,8,58,1,58,1,58,1,58,1,58,1,58,3,58,949,8,58,1,58,1,58,1,58, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,961,8,58,1,58,1,58,3,58, + 965,8,58,1,58,3,58,968,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3, + 58,977,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1, + 58,1,58,3,58,991,8,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1, + 58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1, + 58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1, + 58,1,58,1,58,3,58,1030,8,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,1038, + 8,58,5,58,1040,8,58,10,58,12,58,1043,9,58,1,59,1,59,1,59,5,59,1048, + 8,59,10,59,12,59,1051,9,59,1,59,3,59,1054,8,59,1,60,1,60,3,60,1058, + 8,60,1,61,1,61,1,61,1,61,5,61,1064,8,61,10,61,12,61,1067,9,61,1, + 61,3,61,1070,8,61,1,61,1,61,1,61,1,61,1,61,5,61,1077,8,61,10,61, + 12,61,1080,9,61,1,61,3,61,1083,8,61,3,61,1085,8,61,1,61,1,61,1,61, + 1,62,1,62,1,62,5,62,1093,8,62,10,62,12,62,1096,9,62,1,62,1,62,1, + 62,1,62,1,62,1,62,5,62,1104,8,62,10,62,12,62,1107,9,62,1,62,1,62, + 1,62,1,62,1,62,1,62,3,62,1115,8,62,1,62,1,62,1,62,1,62,1,62,3,62, + 1122,8,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,63, + 3,63,1135,8,63,1,64,1,64,1,64,5,64,1140,8,64,10,64,12,64,1143,9, + 64,1,64,3,64,1146,8,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1, + 65,1,65,3,65,1158,8,65,1,66,1,66,1,66,1,66,3,66,1164,8,66,1,66,3, + 66,1167,8,66,1,67,1,67,1,67,5,67,1172,8,67,10,67,12,67,1175,9,67, + 1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,3,68,1186,8,68,1,68, + 1,68,1,68,1,68,3,68,1192,8,68,5,68,1194,8,68,10,68,12,68,1197,9, + 68,1,69,1,69,1,69,3,69,1202,8,69,1,69,1,69,1,70,1,70,1,70,3,70,1209, + 8,70,1,70,1,70,1,71,1,71,1,71,5,71,1216,8,71,10,71,12,71,1219,9, + 71,1,71,3,71,1222,8,71,1,72,1,72,1,73,1,73,1,73,1,73,1,73,1,73,3, + 73,1232,8,73,3,73,1234,8,73,1,74,3,74,1237,8,74,1,74,1,74,1,74,1, + 74,1,74,1,74,3,74,1245,8,74,1,75,1,75,1,75,3,75,1250,8,75,1,76,1, + 76,1,77,1,77,1,78,1,78,1,79,1,79,3,79,1260,8,79,1,80,1,80,1,80,3, + 80,1265,8,80,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1,83,1,83,3, + 83,1277,8,83,1,84,1,84,5,84,1281,8,84,10,84,12,84,1284,9,84,1,84, + 1,84,1,85,1,85,1,85,1,85,1,85,3,85,1293,8,85,1,86,1,86,5,86,1297, + 8,86,10,86,12,86,1300,9,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,3, + 87,1309,8,87,1,87,0,3,78,116,136,88,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,132,134,136,138, + 140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170, + 172,174,0,16,2,0,18,18,74,74,2,0,44,44,51,51,3,0,1,1,4,4,8,8,4,0, + 1,1,3,4,8,8,80,80,2,0,51,51,73,73,2,0,1,1,4,4,2,0,7,7,22,23,2,0, + 30,30,49,49,2,0,71,71,76,76,3,0,10,10,50,50,90,90,2,0,41,41,53,53, + 1,0,107,108,2,0,118,118,139,139,7,0,21,21,38,38,55,56,70,70,78,78, + 97,97,103,103,16,0,1,13,15,20,22,28,30,30,32,37,39,42,44,51,53,54, + 58,58,60,69,71,77,79,83,85,92,94,96,98,99,101,102,4,0,20,20,30,30, + 39,39,48,48,1479,0,179,1,0,0,0,2,186,1,0,0,0,4,188,1,0,0,0,6,190, + 1,0,0,0,8,197,1,0,0,0,10,220,1,0,0,0,12,222,1,0,0,0,14,229,1,0,0, + 0,16,236,1,0,0,0,18,249,1,0,0,0,20,261,1,0,0,0,22,270,1,0,0,0,24, + 278,1,0,0,0,26,300,1,0,0,0,28,315,1,0,0,0,30,324,1,0,0,0,32,329, + 1,0,0,0,34,333,1,0,0,0,36,335,1,0,0,0,38,344,1,0,0,0,40,348,1,0, + 0,0,42,362,1,0,0,0,44,366,1,0,0,0,46,381,1,0,0,0,48,384,1,0,0,0, + 50,433,1,0,0,0,52,436,1,0,0,0,54,442,1,0,0,0,56,446,1,0,0,0,58,452, + 1,0,0,0,60,470,1,0,0,0,62,473,1,0,0,0,64,476,1,0,0,0,66,486,1,0, + 0,0,68,489,1,0,0,0,70,493,1,0,0,0,72,526,1,0,0,0,74,528,1,0,0,0, + 76,531,1,0,0,0,78,546,1,0,0,0,80,608,1,0,0,0,82,613,1,0,0,0,84,624, + 1,0,0,0,86,626,1,0,0,0,88,632,1,0,0,0,90,640,1,0,0,0,92,658,1,0, + 0,0,94,660,1,0,0,0,96,668,1,0,0,0,98,673,1,0,0,0,100,681,1,0,0,0, + 102,685,1,0,0,0,104,689,1,0,0,0,106,698,1,0,0,0,108,712,1,0,0,0, + 110,714,1,0,0,0,112,773,1,0,0,0,114,775,1,0,0,0,116,935,1,0,0,0, + 118,1044,1,0,0,0,120,1057,1,0,0,0,122,1084,1,0,0,0,124,1121,1,0, + 0,0,126,1134,1,0,0,0,128,1136,1,0,0,0,130,1157,1,0,0,0,132,1166, + 1,0,0,0,134,1168,1,0,0,0,136,1185,1,0,0,0,138,1198,1,0,0,0,140,1208, + 1,0,0,0,142,1212,1,0,0,0,144,1223,1,0,0,0,146,1233,1,0,0,0,148,1236, + 1,0,0,0,150,1249,1,0,0,0,152,1251,1,0,0,0,154,1253,1,0,0,0,156,1255, + 1,0,0,0,158,1259,1,0,0,0,160,1264,1,0,0,0,162,1266,1,0,0,0,164,1270, + 1,0,0,0,166,1276,1,0,0,0,168,1278,1,0,0,0,170,1292,1,0,0,0,172,1294, + 1,0,0,0,174,1308,1,0,0,0,176,178,3,2,1,0,177,176,1,0,0,0,178,181, + 1,0,0,0,179,177,1,0,0,0,179,180,1,0,0,0,180,182,1,0,0,0,181,179, + 1,0,0,0,182,183,5,0,0,1,183,1,1,0,0,0,184,187,3,6,3,0,185,187,3, + 10,5,0,186,184,1,0,0,0,186,185,1,0,0,0,187,3,1,0,0,0,188,189,3,116, + 58,0,189,5,1,0,0,0,190,191,5,52,0,0,191,195,3,160,80,0,192,193,5, + 115,0,0,193,194,5,122,0,0,194,196,3,4,2,0,195,192,1,0,0,0,195,196, + 1,0,0,0,196,7,1,0,0,0,197,202,3,160,80,0,198,199,5,116,0,0,199,201, + 3,160,80,0,200,198,1,0,0,0,201,204,1,0,0,0,202,200,1,0,0,0,202,203, + 1,0,0,0,203,206,1,0,0,0,204,202,1,0,0,0,205,207,5,116,0,0,206,205, + 1,0,0,0,206,207,1,0,0,0,207,9,1,0,0,0,208,221,3,12,6,0,209,221,3, + 14,7,0,210,221,3,18,9,0,211,221,3,20,10,0,212,221,3,22,11,0,213, + 221,3,26,13,0,214,221,3,24,12,0,215,221,3,28,14,0,216,221,3,30,15, + 0,217,221,3,36,18,0,218,221,3,32,16,0,219,221,3,34,17,0,220,208, + 1,0,0,0,220,209,1,0,0,0,220,210,1,0,0,0,220,211,1,0,0,0,220,212, + 1,0,0,0,220,213,1,0,0,0,220,214,1,0,0,0,220,215,1,0,0,0,220,216, + 1,0,0,0,220,217,1,0,0,0,220,218,1,0,0,0,220,219,1,0,0,0,221,11,1, + 0,0,0,222,224,5,72,0,0,223,225,3,4,2,0,224,223,1,0,0,0,224,225,1, + 0,0,0,225,227,1,0,0,0,226,228,5,150,0,0,227,226,1,0,0,0,227,228, + 1,0,0,0,228,13,1,0,0,0,229,231,5,84,0,0,230,232,3,4,2,0,231,230, + 1,0,0,0,231,232,1,0,0,0,232,234,1,0,0,0,233,235,5,150,0,0,234,233, + 1,0,0,0,234,235,1,0,0,0,235,15,1,0,0,0,236,245,5,14,0,0,237,238, + 5,130,0,0,238,241,3,160,80,0,239,240,5,115,0,0,240,242,3,160,80, + 0,241,239,1,0,0,0,241,242,1,0,0,0,242,243,1,0,0,0,243,244,5,149, + 0,0,244,246,1,0,0,0,245,237,1,0,0,0,245,246,1,0,0,0,246,247,1,0, + 0,0,247,248,3,36,18,0,248,17,1,0,0,0,249,250,5,93,0,0,250,254,3, + 36,18,0,251,253,3,16,8,0,252,251,1,0,0,0,253,256,1,0,0,0,254,252, + 1,0,0,0,254,255,1,0,0,0,255,259,1,0,0,0,256,254,1,0,0,0,257,258, + 5,29,0,0,258,260,3,36,18,0,259,257,1,0,0,0,259,260,1,0,0,0,260,19, + 1,0,0,0,261,262,5,40,0,0,262,263,5,130,0,0,263,264,3,4,2,0,264,265, + 5,149,0,0,265,268,3,10,5,0,266,267,5,25,0,0,267,269,3,10,5,0,268, + 266,1,0,0,0,268,269,1,0,0,0,269,21,1,0,0,0,270,271,5,100,0,0,271, + 272,5,130,0,0,272,273,3,4,2,0,273,274,5,149,0,0,274,276,3,10,5,0, + 275,277,5,150,0,0,276,275,1,0,0,0,276,277,1,0,0,0,277,23,1,0,0,0, + 278,279,5,33,0,0,279,283,5,130,0,0,280,284,3,6,3,0,281,284,3,30, + 15,0,282,284,3,4,2,0,283,280,1,0,0,0,283,281,1,0,0,0,283,282,1,0, + 0,0,283,284,1,0,0,0,284,285,1,0,0,0,285,287,5,150,0,0,286,288,3, + 4,2,0,287,286,1,0,0,0,287,288,1,0,0,0,288,289,1,0,0,0,289,293,5, + 150,0,0,290,294,3,6,3,0,291,294,3,30,15,0,292,294,3,4,2,0,293,290, + 1,0,0,0,293,291,1,0,0,0,293,292,1,0,0,0,293,294,1,0,0,0,294,295, + 1,0,0,0,295,296,5,149,0,0,296,298,3,10,5,0,297,299,5,150,0,0,298, + 297,1,0,0,0,298,299,1,0,0,0,299,25,1,0,0,0,300,301,5,33,0,0,301, + 302,5,130,0,0,302,303,5,52,0,0,303,306,3,160,80,0,304,305,5,116, + 0,0,305,307,3,160,80,0,306,304,1,0,0,0,306,307,1,0,0,0,307,308,1, + 0,0,0,308,309,5,42,0,0,309,310,3,4,2,0,310,311,5,149,0,0,311,313, + 3,10,5,0,312,314,5,150,0,0,313,312,1,0,0,0,313,314,1,0,0,0,314,27, + 1,0,0,0,315,316,5,31,0,0,316,317,3,160,80,0,317,319,5,130,0,0,318, + 320,3,8,4,0,319,318,1,0,0,0,319,320,1,0,0,0,320,321,1,0,0,0,321, + 322,5,149,0,0,322,323,3,36,18,0,323,29,1,0,0,0,324,325,3,4,2,0,325, + 326,5,115,0,0,326,327,5,122,0,0,327,328,3,4,2,0,328,31,1,0,0,0,329, + 331,3,4,2,0,330,332,5,150,0,0,331,330,1,0,0,0,331,332,1,0,0,0,332, + 33,1,0,0,0,333,334,5,150,0,0,334,35,1,0,0,0,335,339,5,128,0,0,336, + 338,3,2,1,0,337,336,1,0,0,0,338,341,1,0,0,0,339,337,1,0,0,0,339, + 340,1,0,0,0,340,342,1,0,0,0,341,339,1,0,0,0,342,343,5,147,0,0,343, + 37,1,0,0,0,344,345,3,4,2,0,345,346,5,115,0,0,346,347,3,4,2,0,347, + 39,1,0,0,0,348,353,3,38,19,0,349,350,5,116,0,0,350,352,3,38,19,0, + 351,349,1,0,0,0,352,355,1,0,0,0,353,351,1,0,0,0,353,354,1,0,0,0, + 354,357,1,0,0,0,355,353,1,0,0,0,356,358,5,116,0,0,357,356,1,0,0, + 0,357,358,1,0,0,0,358,41,1,0,0,0,359,363,3,44,22,0,360,363,3,48, + 24,0,361,363,3,124,62,0,362,359,1,0,0,0,362,360,1,0,0,0,362,361, + 1,0,0,0,363,364,1,0,0,0,364,365,5,0,0,1,365,43,1,0,0,0,366,372,3, + 46,23,0,367,368,5,95,0,0,368,369,5,1,0,0,369,371,3,46,23,0,370,367, + 1,0,0,0,371,374,1,0,0,0,372,370,1,0,0,0,372,373,1,0,0,0,373,45,1, + 0,0,0,374,372,1,0,0,0,375,382,3,48,24,0,376,377,5,130,0,0,377,378, + 3,44,22,0,378,379,5,149,0,0,379,382,1,0,0,0,380,382,3,164,82,0,381, + 375,1,0,0,0,381,376,1,0,0,0,381,380,1,0,0,0,382,47,1,0,0,0,383,385, + 3,50,25,0,384,383,1,0,0,0,384,385,1,0,0,0,385,386,1,0,0,0,386,388, + 5,79,0,0,387,389,5,24,0,0,388,387,1,0,0,0,388,389,1,0,0,0,389,391, + 1,0,0,0,390,392,3,52,26,0,391,390,1,0,0,0,391,392,1,0,0,0,392,393, + 1,0,0,0,393,395,3,114,57,0,394,396,3,54,27,0,395,394,1,0,0,0,395, + 396,1,0,0,0,396,398,1,0,0,0,397,399,3,56,28,0,398,397,1,0,0,0,398, + 399,1,0,0,0,399,401,1,0,0,0,400,402,3,60,30,0,401,400,1,0,0,0,401, + 402,1,0,0,0,402,404,1,0,0,0,403,405,3,62,31,0,404,403,1,0,0,0,404, + 405,1,0,0,0,405,407,1,0,0,0,406,408,3,64,32,0,407,406,1,0,0,0,407, + 408,1,0,0,0,408,411,1,0,0,0,409,410,5,102,0,0,410,412,7,0,0,0,411, + 409,1,0,0,0,411,412,1,0,0,0,412,415,1,0,0,0,413,414,5,102,0,0,414, + 416,5,89,0,0,415,413,1,0,0,0,415,416,1,0,0,0,416,418,1,0,0,0,417, + 419,3,66,33,0,418,417,1,0,0,0,418,419,1,0,0,0,419,421,1,0,0,0,420, + 422,3,58,29,0,421,420,1,0,0,0,421,422,1,0,0,0,422,424,1,0,0,0,423, + 425,3,68,34,0,424,423,1,0,0,0,424,425,1,0,0,0,425,428,1,0,0,0,426, + 429,3,72,36,0,427,429,3,74,37,0,428,426,1,0,0,0,428,427,1,0,0,0, + 428,429,1,0,0,0,429,431,1,0,0,0,430,432,3,76,38,0,431,430,1,0,0, + 0,431,432,1,0,0,0,432,49,1,0,0,0,433,434,5,102,0,0,434,435,3,128, + 64,0,435,51,1,0,0,0,436,437,5,88,0,0,437,440,5,108,0,0,438,439,5, + 102,0,0,439,441,5,85,0,0,440,438,1,0,0,0,440,441,1,0,0,0,441,53, + 1,0,0,0,442,443,5,34,0,0,443,444,3,78,39,0,444,55,1,0,0,0,445,447, + 7,1,0,0,446,445,1,0,0,0,446,447,1,0,0,0,447,448,1,0,0,0,448,449, + 5,5,0,0,449,450,5,47,0,0,450,451,3,114,57,0,451,57,1,0,0,0,452,453, + 5,101,0,0,453,454,3,160,80,0,454,455,5,6,0,0,455,456,5,130,0,0,456, + 457,3,98,49,0,457,467,5,149,0,0,458,459,5,116,0,0,459,460,3,160, + 80,0,460,461,5,6,0,0,461,462,5,130,0,0,462,463,3,98,49,0,463,464, + 5,149,0,0,464,466,1,0,0,0,465,458,1,0,0,0,466,469,1,0,0,0,467,465, + 1,0,0,0,467,468,1,0,0,0,468,59,1,0,0,0,469,467,1,0,0,0,470,471,5, + 69,0,0,471,472,3,116,58,0,472,61,1,0,0,0,473,474,5,99,0,0,474,475, + 3,116,58,0,475,63,1,0,0,0,476,477,5,36,0,0,477,484,5,11,0,0,478, + 479,7,0,0,0,479,480,5,130,0,0,480,481,3,114,57,0,481,482,5,149,0, + 0,482,485,1,0,0,0,483,485,3,114,57,0,484,478,1,0,0,0,484,483,1,0, + 0,0,485,65,1,0,0,0,486,487,5,37,0,0,487,488,3,116,58,0,488,67,1, + 0,0,0,489,490,5,64,0,0,490,491,5,11,0,0,491,492,3,88,44,0,492,69, + 1,0,0,0,493,494,5,64,0,0,494,495,5,11,0,0,495,496,3,114,57,0,496, + 71,1,0,0,0,497,498,5,54,0,0,498,501,3,116,58,0,499,500,5,116,0,0, + 500,502,3,116,58,0,501,499,1,0,0,0,501,502,1,0,0,0,502,507,1,0,0, + 0,503,504,5,102,0,0,504,508,5,85,0,0,505,506,5,11,0,0,506,508,3, + 114,57,0,507,503,1,0,0,0,507,505,1,0,0,0,507,508,1,0,0,0,508,527, + 1,0,0,0,509,510,5,54,0,0,510,513,3,116,58,0,511,512,5,102,0,0,512, + 514,5,85,0,0,513,511,1,0,0,0,513,514,1,0,0,0,514,515,1,0,0,0,515, + 516,5,61,0,0,516,517,3,116,58,0,517,527,1,0,0,0,518,519,5,54,0,0, + 519,520,3,116,58,0,520,521,5,61,0,0,521,524,3,116,58,0,522,523,5, + 11,0,0,523,525,3,114,57,0,524,522,1,0,0,0,524,525,1,0,0,0,525,527, + 1,0,0,0,526,497,1,0,0,0,526,509,1,0,0,0,526,518,1,0,0,0,527,73,1, + 0,0,0,528,529,5,61,0,0,529,530,3,116,58,0,530,75,1,0,0,0,531,532, + 5,81,0,0,532,533,3,94,47,0,533,77,1,0,0,0,534,535,6,39,-1,0,535, + 537,3,136,68,0,536,538,5,28,0,0,537,536,1,0,0,0,537,538,1,0,0,0, + 538,540,1,0,0,0,539,541,3,86,43,0,540,539,1,0,0,0,540,541,1,0,0, + 0,541,547,1,0,0,0,542,543,5,130,0,0,543,544,3,78,39,0,544,545,5, + 149,0,0,545,547,1,0,0,0,546,534,1,0,0,0,546,542,1,0,0,0,547,562, + 1,0,0,0,548,549,10,3,0,0,549,550,3,82,41,0,550,551,3,78,39,4,551, + 561,1,0,0,0,552,554,10,4,0,0,553,555,3,80,40,0,554,553,1,0,0,0,554, + 555,1,0,0,0,555,556,1,0,0,0,556,557,5,47,0,0,557,558,3,78,39,0,558, + 559,3,84,42,0,559,561,1,0,0,0,560,548,1,0,0,0,560,552,1,0,0,0,561, + 564,1,0,0,0,562,560,1,0,0,0,562,563,1,0,0,0,563,79,1,0,0,0,564,562, + 1,0,0,0,565,567,7,2,0,0,566,565,1,0,0,0,566,567,1,0,0,0,567,568, + 1,0,0,0,568,575,5,44,0,0,569,571,5,44,0,0,570,572,7,2,0,0,571,570, + 1,0,0,0,571,572,1,0,0,0,572,575,1,0,0,0,573,575,7,2,0,0,574,566, + 1,0,0,0,574,569,1,0,0,0,574,573,1,0,0,0,575,609,1,0,0,0,576,578, + 7,3,0,0,577,576,1,0,0,0,577,578,1,0,0,0,578,579,1,0,0,0,579,581, + 7,4,0,0,580,582,5,65,0,0,581,580,1,0,0,0,581,582,1,0,0,0,582,591, + 1,0,0,0,583,585,7,4,0,0,584,586,5,65,0,0,585,584,1,0,0,0,585,586, + 1,0,0,0,586,588,1,0,0,0,587,589,7,3,0,0,588,587,1,0,0,0,588,589, + 1,0,0,0,589,591,1,0,0,0,590,577,1,0,0,0,590,583,1,0,0,0,591,609, + 1,0,0,0,592,594,7,5,0,0,593,592,1,0,0,0,593,594,1,0,0,0,594,595, + 1,0,0,0,595,597,5,35,0,0,596,598,5,65,0,0,597,596,1,0,0,0,597,598, + 1,0,0,0,598,607,1,0,0,0,599,601,5,35,0,0,600,602,5,65,0,0,601,600, + 1,0,0,0,601,602,1,0,0,0,602,604,1,0,0,0,603,605,7,5,0,0,604,603, + 1,0,0,0,604,605,1,0,0,0,605,607,1,0,0,0,606,593,1,0,0,0,606,599, + 1,0,0,0,607,609,1,0,0,0,608,574,1,0,0,0,608,590,1,0,0,0,608,606, + 1,0,0,0,609,81,1,0,0,0,610,611,5,17,0,0,611,614,5,47,0,0,612,614, + 5,116,0,0,613,610,1,0,0,0,613,612,1,0,0,0,614,83,1,0,0,0,615,616, + 5,62,0,0,616,625,3,114,57,0,617,618,5,96,0,0,618,619,5,130,0,0,619, + 620,3,114,57,0,620,621,5,149,0,0,621,625,1,0,0,0,622,623,5,96,0, + 0,623,625,3,114,57,0,624,615,1,0,0,0,624,617,1,0,0,0,624,622,1,0, + 0,0,625,85,1,0,0,0,626,627,5,77,0,0,627,630,3,92,46,0,628,629,5, + 61,0,0,629,631,3,92,46,0,630,628,1,0,0,0,630,631,1,0,0,0,631,87, + 1,0,0,0,632,637,3,90,45,0,633,634,5,116,0,0,634,636,3,90,45,0,635, + 633,1,0,0,0,636,639,1,0,0,0,637,635,1,0,0,0,637,638,1,0,0,0,638, + 89,1,0,0,0,639,637,1,0,0,0,640,642,3,116,58,0,641,643,7,6,0,0,642, + 641,1,0,0,0,642,643,1,0,0,0,643,646,1,0,0,0,644,645,5,60,0,0,645, + 647,7,7,0,0,646,644,1,0,0,0,646,647,1,0,0,0,647,650,1,0,0,0,648, + 649,5,16,0,0,649,651,5,110,0,0,650,648,1,0,0,0,650,651,1,0,0,0,651, + 91,1,0,0,0,652,659,3,164,82,0,653,656,3,148,74,0,654,655,5,151,0, + 0,655,657,3,148,74,0,656,654,1,0,0,0,656,657,1,0,0,0,657,659,1,0, + 0,0,658,652,1,0,0,0,658,653,1,0,0,0,659,93,1,0,0,0,660,665,3,96, + 48,0,661,662,5,116,0,0,662,664,3,96,48,0,663,661,1,0,0,0,664,667, + 1,0,0,0,665,663,1,0,0,0,665,666,1,0,0,0,666,95,1,0,0,0,667,665,1, + 0,0,0,668,669,3,160,80,0,669,670,5,122,0,0,670,671,3,150,75,0,671, + 97,1,0,0,0,672,674,3,100,50,0,673,672,1,0,0,0,673,674,1,0,0,0,674, + 676,1,0,0,0,675,677,3,102,51,0,676,675,1,0,0,0,676,677,1,0,0,0,677, + 679,1,0,0,0,678,680,3,104,52,0,679,678,1,0,0,0,679,680,1,0,0,0,680, + 99,1,0,0,0,681,682,5,67,0,0,682,683,5,11,0,0,683,684,3,114,57,0, + 684,101,1,0,0,0,685,686,5,64,0,0,686,687,5,11,0,0,687,688,3,88,44, + 0,688,103,1,0,0,0,689,690,7,8,0,0,690,691,3,106,53,0,691,105,1,0, + 0,0,692,699,3,108,54,0,693,694,5,9,0,0,694,695,3,108,54,0,695,696, + 5,2,0,0,696,697,3,108,54,0,697,699,1,0,0,0,698,692,1,0,0,0,698,693, + 1,0,0,0,699,107,1,0,0,0,700,701,5,19,0,0,701,713,5,75,0,0,702,703, + 5,94,0,0,703,713,5,68,0,0,704,705,5,94,0,0,705,713,5,32,0,0,706, + 707,3,148,74,0,707,708,5,68,0,0,708,713,1,0,0,0,709,710,3,148,74, + 0,710,711,5,32,0,0,711,713,1,0,0,0,712,700,1,0,0,0,712,702,1,0,0, + 0,712,704,1,0,0,0,712,706,1,0,0,0,712,709,1,0,0,0,713,109,1,0,0, + 0,714,715,3,116,58,0,715,716,5,0,0,1,716,111,1,0,0,0,717,774,3,160, + 80,0,718,719,3,160,80,0,719,720,5,130,0,0,720,721,3,160,80,0,721, + 728,3,112,56,0,722,723,5,116,0,0,723,724,3,160,80,0,724,725,3,112, + 56,0,725,727,1,0,0,0,726,722,1,0,0,0,727,730,1,0,0,0,728,726,1,0, + 0,0,728,729,1,0,0,0,729,732,1,0,0,0,730,728,1,0,0,0,731,733,5,116, + 0,0,732,731,1,0,0,0,732,733,1,0,0,0,733,734,1,0,0,0,734,735,5,149, + 0,0,735,774,1,0,0,0,736,737,3,160,80,0,737,738,5,130,0,0,738,743, + 3,162,81,0,739,740,5,116,0,0,740,742,3,162,81,0,741,739,1,0,0,0, + 742,745,1,0,0,0,743,741,1,0,0,0,743,744,1,0,0,0,744,747,1,0,0,0, + 745,743,1,0,0,0,746,748,5,116,0,0,747,746,1,0,0,0,747,748,1,0,0, + 0,748,749,1,0,0,0,749,750,5,149,0,0,750,774,1,0,0,0,751,752,3,160, + 80,0,752,753,5,130,0,0,753,758,3,112,56,0,754,755,5,116,0,0,755, + 757,3,112,56,0,756,754,1,0,0,0,757,760,1,0,0,0,758,756,1,0,0,0,758, + 759,1,0,0,0,759,762,1,0,0,0,760,758,1,0,0,0,761,763,5,116,0,0,762, + 761,1,0,0,0,762,763,1,0,0,0,763,764,1,0,0,0,764,765,5,149,0,0,765, + 774,1,0,0,0,766,767,3,160,80,0,767,769,5,130,0,0,768,770,3,114,57, + 0,769,768,1,0,0,0,769,770,1,0,0,0,770,771,1,0,0,0,771,772,5,149, + 0,0,772,774,1,0,0,0,773,717,1,0,0,0,773,718,1,0,0,0,773,736,1,0, + 0,0,773,751,1,0,0,0,773,766,1,0,0,0,774,113,1,0,0,0,775,780,3,116, + 58,0,776,777,5,116,0,0,777,779,3,116,58,0,778,776,1,0,0,0,779,782, + 1,0,0,0,780,778,1,0,0,0,780,781,1,0,0,0,781,784,1,0,0,0,782,780, + 1,0,0,0,783,785,5,116,0,0,784,783,1,0,0,0,784,785,1,0,0,0,785,115, + 1,0,0,0,786,787,6,58,-1,0,787,789,5,12,0,0,788,790,3,116,58,0,789, + 788,1,0,0,0,789,790,1,0,0,0,790,796,1,0,0,0,791,792,5,98,0,0,792, + 793,3,116,58,0,793,794,5,83,0,0,794,795,3,116,58,0,795,797,1,0,0, + 0,796,791,1,0,0,0,797,798,1,0,0,0,798,796,1,0,0,0,798,799,1,0,0, + 0,799,802,1,0,0,0,800,801,5,25,0,0,801,803,3,116,58,0,802,800,1, + 0,0,0,802,803,1,0,0,0,803,804,1,0,0,0,804,805,5,26,0,0,805,936,1, + 0,0,0,806,807,5,13,0,0,807,808,5,130,0,0,808,809,3,116,58,0,809, + 810,5,6,0,0,810,811,3,112,56,0,811,812,5,149,0,0,812,936,1,0,0,0, + 813,814,5,20,0,0,814,936,5,110,0,0,815,816,5,45,0,0,816,817,3,116, + 58,0,817,818,3,152,76,0,818,936,1,0,0,0,819,820,5,82,0,0,820,821, + 5,130,0,0,821,822,3,116,58,0,822,823,5,34,0,0,823,826,3,116,58,0, + 824,825,5,33,0,0,825,827,3,116,58,0,826,824,1,0,0,0,826,827,1,0, + 0,0,827,828,1,0,0,0,828,829,5,149,0,0,829,936,1,0,0,0,830,831,5, + 86,0,0,831,936,5,110,0,0,832,833,5,91,0,0,833,834,5,130,0,0,834, + 835,7,9,0,0,835,836,3,166,83,0,836,837,5,34,0,0,837,838,3,116,58, + 0,838,839,5,149,0,0,839,936,1,0,0,0,840,841,3,160,80,0,841,843,5, + 130,0,0,842,844,3,114,57,0,843,842,1,0,0,0,843,844,1,0,0,0,844,845, + 1,0,0,0,845,846,5,149,0,0,846,855,1,0,0,0,847,849,5,130,0,0,848, + 850,5,24,0,0,849,848,1,0,0,0,849,850,1,0,0,0,850,852,1,0,0,0,851, + 853,3,118,59,0,852,851,1,0,0,0,852,853,1,0,0,0,853,854,1,0,0,0,854, + 856,5,149,0,0,855,847,1,0,0,0,855,856,1,0,0,0,856,857,1,0,0,0,857, + 858,5,66,0,0,858,859,5,130,0,0,859,860,3,98,49,0,860,861,5,149,0, + 0,861,936,1,0,0,0,862,863,3,160,80,0,863,865,5,130,0,0,864,866,3, + 114,57,0,865,864,1,0,0,0,865,866,1,0,0,0,866,867,1,0,0,0,867,868, + 5,149,0,0,868,877,1,0,0,0,869,871,5,130,0,0,870,872,5,24,0,0,871, + 870,1,0,0,0,871,872,1,0,0,0,872,874,1,0,0,0,873,875,3,118,59,0,874, + 873,1,0,0,0,874,875,1,0,0,0,875,876,1,0,0,0,876,878,5,149,0,0,877, + 869,1,0,0,0,877,878,1,0,0,0,878,879,1,0,0,0,879,880,5,66,0,0,880, + 881,3,160,80,0,881,936,1,0,0,0,882,888,3,160,80,0,883,885,5,130, + 0,0,884,886,3,114,57,0,885,884,1,0,0,0,885,886,1,0,0,0,886,887,1, + 0,0,0,887,889,5,149,0,0,888,883,1,0,0,0,888,889,1,0,0,0,889,890, + 1,0,0,0,890,892,5,130,0,0,891,893,5,24,0,0,892,891,1,0,0,0,892,893, + 1,0,0,0,893,895,1,0,0,0,894,896,3,118,59,0,895,894,1,0,0,0,895,896, + 1,0,0,0,896,897,1,0,0,0,897,898,5,149,0,0,898,936,1,0,0,0,899,936, + 3,124,62,0,900,936,3,168,84,0,901,936,3,150,75,0,902,903,5,118,0, + 0,903,936,3,116,58,19,904,905,5,58,0,0,905,936,3,116,58,13,906,907, + 3,140,70,0,907,908,5,120,0,0,908,910,1,0,0,0,909,906,1,0,0,0,909, + 910,1,0,0,0,910,911,1,0,0,0,911,936,5,112,0,0,912,913,5,130,0,0, + 913,914,3,44,22,0,914,915,5,149,0,0,915,936,1,0,0,0,916,917,5,130, + 0,0,917,918,3,116,58,0,918,919,5,149,0,0,919,936,1,0,0,0,920,921, + 5,130,0,0,921,922,3,114,57,0,922,923,5,149,0,0,923,936,1,0,0,0,924, + 926,5,129,0,0,925,927,3,114,57,0,926,925,1,0,0,0,926,927,1,0,0,0, + 927,928,1,0,0,0,928,936,5,148,0,0,929,931,5,128,0,0,930,932,3,40, + 20,0,931,930,1,0,0,0,931,932,1,0,0,0,932,933,1,0,0,0,933,936,5,147, + 0,0,934,936,3,132,66,0,935,786,1,0,0,0,935,806,1,0,0,0,935,813,1, + 0,0,0,935,815,1,0,0,0,935,819,1,0,0,0,935,830,1,0,0,0,935,832,1, + 0,0,0,935,840,1,0,0,0,935,862,1,0,0,0,935,882,1,0,0,0,935,899,1, + 0,0,0,935,900,1,0,0,0,935,901,1,0,0,0,935,902,1,0,0,0,935,904,1, + 0,0,0,935,909,1,0,0,0,935,912,1,0,0,0,935,916,1,0,0,0,935,920,1, + 0,0,0,935,924,1,0,0,0,935,929,1,0,0,0,935,934,1,0,0,0,936,1041,1, + 0,0,0,937,941,10,18,0,0,938,942,5,112,0,0,939,942,5,151,0,0,940, + 942,5,138,0,0,941,938,1,0,0,0,941,939,1,0,0,0,941,940,1,0,0,0,942, + 943,1,0,0,0,943,1040,3,116,58,19,944,948,10,17,0,0,945,949,5,139, + 0,0,946,949,5,118,0,0,947,949,5,117,0,0,948,945,1,0,0,0,948,946, + 1,0,0,0,948,947,1,0,0,0,949,950,1,0,0,0,950,1040,3,116,58,18,951, + 976,10,16,0,0,952,977,5,121,0,0,953,977,5,122,0,0,954,977,5,133, + 0,0,955,977,5,131,0,0,956,977,5,132,0,0,957,977,5,123,0,0,958,977, + 5,124,0,0,959,961,5,58,0,0,960,959,1,0,0,0,960,961,1,0,0,0,961,962, + 1,0,0,0,962,964,5,42,0,0,963,965,5,15,0,0,964,963,1,0,0,0,964,965, + 1,0,0,0,965,977,1,0,0,0,966,968,5,58,0,0,967,966,1,0,0,0,967,968, + 1,0,0,0,968,969,1,0,0,0,969,977,7,10,0,0,970,977,5,145,0,0,971,977, + 5,146,0,0,972,977,5,135,0,0,973,977,5,126,0,0,974,977,5,127,0,0, + 975,977,5,134,0,0,976,952,1,0,0,0,976,953,1,0,0,0,976,954,1,0,0, + 0,976,955,1,0,0,0,976,956,1,0,0,0,976,957,1,0,0,0,976,958,1,0,0, + 0,976,960,1,0,0,0,976,967,1,0,0,0,976,970,1,0,0,0,976,971,1,0,0, + 0,976,972,1,0,0,0,976,973,1,0,0,0,976,974,1,0,0,0,976,975,1,0,0, + 0,977,978,1,0,0,0,978,1040,3,116,58,17,979,980,10,14,0,0,980,981, + 5,137,0,0,981,1040,3,116,58,15,982,983,10,12,0,0,983,984,5,2,0,0, + 984,1040,3,116,58,13,985,986,10,11,0,0,986,987,5,63,0,0,987,1040, + 3,116,58,12,988,990,10,10,0,0,989,991,5,58,0,0,990,989,1,0,0,0,990, + 991,1,0,0,0,991,992,1,0,0,0,992,993,5,9,0,0,993,994,3,116,58,0,994, + 995,5,2,0,0,995,996,3,116,58,11,996,1040,1,0,0,0,997,998,10,9,0, + 0,998,999,5,140,0,0,999,1000,3,116,58,0,1000,1001,5,115,0,0,1001, + 1002,3,116,58,9,1002,1040,1,0,0,0,1003,1004,10,25,0,0,1004,1005, + 5,129,0,0,1005,1006,3,116,58,0,1006,1007,5,148,0,0,1007,1040,1,0, + 0,0,1008,1009,10,24,0,0,1009,1010,5,120,0,0,1010,1040,5,108,0,0, + 1011,1012,10,23,0,0,1012,1013,5,120,0,0,1013,1040,3,160,80,0,1014, + 1015,10,22,0,0,1015,1016,5,136,0,0,1016,1017,5,129,0,0,1017,1018, + 3,116,58,0,1018,1019,5,148,0,0,1019,1040,1,0,0,0,1020,1021,10,21, + 0,0,1021,1022,5,136,0,0,1022,1040,5,108,0,0,1023,1024,10,20,0,0, + 1024,1025,5,136,0,0,1025,1040,3,160,80,0,1026,1027,10,15,0,0,1027, + 1029,5,46,0,0,1028,1030,5,58,0,0,1029,1028,1,0,0,0,1029,1030,1,0, + 0,0,1030,1031,1,0,0,0,1031,1040,5,59,0,0,1032,1037,10,8,0,0,1033, + 1034,5,6,0,0,1034,1038,3,160,80,0,1035,1036,5,6,0,0,1036,1038,5, + 110,0,0,1037,1033,1,0,0,0,1037,1035,1,0,0,0,1038,1040,1,0,0,0,1039, + 937,1,0,0,0,1039,944,1,0,0,0,1039,951,1,0,0,0,1039,979,1,0,0,0,1039, + 982,1,0,0,0,1039,985,1,0,0,0,1039,988,1,0,0,0,1039,997,1,0,0,0,1039, + 1003,1,0,0,0,1039,1008,1,0,0,0,1039,1011,1,0,0,0,1039,1014,1,0,0, + 0,1039,1020,1,0,0,0,1039,1023,1,0,0,0,1039,1026,1,0,0,0,1039,1032, + 1,0,0,0,1040,1043,1,0,0,0,1041,1039,1,0,0,0,1041,1042,1,0,0,0,1042, + 117,1,0,0,0,1043,1041,1,0,0,0,1044,1049,3,120,60,0,1045,1046,5,116, + 0,0,1046,1048,3,120,60,0,1047,1045,1,0,0,0,1048,1051,1,0,0,0,1049, + 1047,1,0,0,0,1049,1050,1,0,0,0,1050,1053,1,0,0,0,1051,1049,1,0,0, + 0,1052,1054,5,116,0,0,1053,1052,1,0,0,0,1053,1054,1,0,0,0,1054,119, + 1,0,0,0,1055,1058,3,122,61,0,1056,1058,3,116,58,0,1057,1055,1,0, + 0,0,1057,1056,1,0,0,0,1058,121,1,0,0,0,1059,1060,5,130,0,0,1060, + 1065,3,160,80,0,1061,1062,5,116,0,0,1062,1064,3,160,80,0,1063,1061, + 1,0,0,0,1064,1067,1,0,0,0,1065,1063,1,0,0,0,1065,1066,1,0,0,0,1066, + 1069,1,0,0,0,1067,1065,1,0,0,0,1068,1070,5,116,0,0,1069,1068,1,0, + 0,0,1069,1070,1,0,0,0,1070,1071,1,0,0,0,1071,1072,5,149,0,0,1072, + 1085,1,0,0,0,1073,1078,3,160,80,0,1074,1075,5,116,0,0,1075,1077, + 3,160,80,0,1076,1074,1,0,0,0,1077,1080,1,0,0,0,1078,1076,1,0,0,0, + 1078,1079,1,0,0,0,1079,1082,1,0,0,0,1080,1078,1,0,0,0,1081,1083, + 5,116,0,0,1082,1081,1,0,0,0,1082,1083,1,0,0,0,1083,1085,1,0,0,0, + 1084,1059,1,0,0,0,1084,1073,1,0,0,0,1085,1086,1,0,0,0,1086,1087, + 5,111,0,0,1087,1088,3,116,58,0,1088,123,1,0,0,0,1089,1090,5,132, + 0,0,1090,1094,3,160,80,0,1091,1093,3,126,63,0,1092,1091,1,0,0,0, + 1093,1096,1,0,0,0,1094,1092,1,0,0,0,1094,1095,1,0,0,0,1095,1097, + 1,0,0,0,1096,1094,1,0,0,0,1097,1098,5,151,0,0,1098,1099,5,124,0, + 0,1099,1122,1,0,0,0,1100,1101,5,132,0,0,1101,1105,3,160,80,0,1102, + 1104,3,126,63,0,1103,1102,1,0,0,0,1104,1107,1,0,0,0,1105,1103,1, + 0,0,0,1105,1106,1,0,0,0,1106,1108,1,0,0,0,1107,1105,1,0,0,0,1108, + 1114,5,124,0,0,1109,1115,3,124,62,0,1110,1111,5,128,0,0,1111,1112, + 3,116,58,0,1112,1113,5,147,0,0,1113,1115,1,0,0,0,1114,1109,1,0,0, + 0,1114,1110,1,0,0,0,1114,1115,1,0,0,0,1115,1116,1,0,0,0,1116,1117, + 5,132,0,0,1117,1118,5,151,0,0,1118,1119,3,160,80,0,1119,1120,5,124, + 0,0,1120,1122,1,0,0,0,1121,1089,1,0,0,0,1121,1100,1,0,0,0,1122,125, + 1,0,0,0,1123,1124,3,160,80,0,1124,1125,5,122,0,0,1125,1126,3,166, + 83,0,1126,1135,1,0,0,0,1127,1128,3,160,80,0,1128,1129,5,122,0,0, + 1129,1130,5,128,0,0,1130,1131,3,116,58,0,1131,1132,5,147,0,0,1132, + 1135,1,0,0,0,1133,1135,3,160,80,0,1134,1123,1,0,0,0,1134,1127,1, + 0,0,0,1134,1133,1,0,0,0,1135,127,1,0,0,0,1136,1141,3,130,65,0,1137, + 1138,5,116,0,0,1138,1140,3,130,65,0,1139,1137,1,0,0,0,1140,1143, + 1,0,0,0,1141,1139,1,0,0,0,1141,1142,1,0,0,0,1142,1145,1,0,0,0,1143, + 1141,1,0,0,0,1144,1146,5,116,0,0,1145,1144,1,0,0,0,1145,1146,1,0, + 0,0,1146,129,1,0,0,0,1147,1148,3,160,80,0,1148,1149,5,6,0,0,1149, + 1150,5,130,0,0,1150,1151,3,44,22,0,1151,1152,5,149,0,0,1152,1158, + 1,0,0,0,1153,1154,3,116,58,0,1154,1155,5,6,0,0,1155,1156,3,160,80, + 0,1156,1158,1,0,0,0,1157,1147,1,0,0,0,1157,1153,1,0,0,0,1158,131, + 1,0,0,0,1159,1167,3,164,82,0,1160,1161,3,140,70,0,1161,1162,5,120, + 0,0,1162,1164,1,0,0,0,1163,1160,1,0,0,0,1163,1164,1,0,0,0,1164,1165, + 1,0,0,0,1165,1167,3,134,67,0,1166,1159,1,0,0,0,1166,1163,1,0,0,0, + 1167,133,1,0,0,0,1168,1173,3,160,80,0,1169,1170,5,120,0,0,1170,1172, + 3,160,80,0,1171,1169,1,0,0,0,1172,1175,1,0,0,0,1173,1171,1,0,0,0, + 1173,1174,1,0,0,0,1174,135,1,0,0,0,1175,1173,1,0,0,0,1176,1177,6, + 68,-1,0,1177,1186,3,140,70,0,1178,1186,3,138,69,0,1179,1180,5,130, + 0,0,1180,1181,3,44,22,0,1181,1182,5,149,0,0,1182,1186,1,0,0,0,1183, + 1186,3,124,62,0,1184,1186,3,164,82,0,1185,1176,1,0,0,0,1185,1178, + 1,0,0,0,1185,1179,1,0,0,0,1185,1183,1,0,0,0,1185,1184,1,0,0,0,1186, + 1195,1,0,0,0,1187,1191,10,3,0,0,1188,1192,3,158,79,0,1189,1190,5, + 6,0,0,1190,1192,3,160,80,0,1191,1188,1,0,0,0,1191,1189,1,0,0,0,1192, + 1194,1,0,0,0,1193,1187,1,0,0,0,1194,1197,1,0,0,0,1195,1193,1,0,0, + 0,1195,1196,1,0,0,0,1196,137,1,0,0,0,1197,1195,1,0,0,0,1198,1199, + 3,160,80,0,1199,1201,5,130,0,0,1200,1202,3,142,71,0,1201,1200,1, + 0,0,0,1201,1202,1,0,0,0,1202,1203,1,0,0,0,1203,1204,5,149,0,0,1204, + 139,1,0,0,0,1205,1206,3,144,72,0,1206,1207,5,120,0,0,1207,1209,1, + 0,0,0,1208,1205,1,0,0,0,1208,1209,1,0,0,0,1209,1210,1,0,0,0,1210, + 1211,3,160,80,0,1211,141,1,0,0,0,1212,1217,3,116,58,0,1213,1214, + 5,116,0,0,1214,1216,3,116,58,0,1215,1213,1,0,0,0,1216,1219,1,0,0, + 0,1217,1215,1,0,0,0,1217,1218,1,0,0,0,1218,1221,1,0,0,0,1219,1217, + 1,0,0,0,1220,1222,5,116,0,0,1221,1220,1,0,0,0,1221,1222,1,0,0,0, + 1222,143,1,0,0,0,1223,1224,3,160,80,0,1224,145,1,0,0,0,1225,1234, + 5,106,0,0,1226,1227,5,120,0,0,1227,1234,7,11,0,0,1228,1229,5,108, + 0,0,1229,1231,5,120,0,0,1230,1232,7,11,0,0,1231,1230,1,0,0,0,1231, + 1232,1,0,0,0,1232,1234,1,0,0,0,1233,1225,1,0,0,0,1233,1226,1,0,0, + 0,1233,1228,1,0,0,0,1234,147,1,0,0,0,1235,1237,7,12,0,0,1236,1235, + 1,0,0,0,1236,1237,1,0,0,0,1237,1244,1,0,0,0,1238,1245,3,146,73,0, + 1239,1245,5,107,0,0,1240,1245,5,108,0,0,1241,1245,5,109,0,0,1242, + 1245,5,43,0,0,1243,1245,5,57,0,0,1244,1238,1,0,0,0,1244,1239,1,0, + 0,0,1244,1240,1,0,0,0,1244,1241,1,0,0,0,1244,1242,1,0,0,0,1244,1243, + 1,0,0,0,1245,149,1,0,0,0,1246,1250,3,148,74,0,1247,1250,5,110,0, + 0,1248,1250,5,59,0,0,1249,1246,1,0,0,0,1249,1247,1,0,0,0,1249,1248, + 1,0,0,0,1250,151,1,0,0,0,1251,1252,7,13,0,0,1252,153,1,0,0,0,1253, + 1254,7,14,0,0,1254,155,1,0,0,0,1255,1256,7,15,0,0,1256,157,1,0,0, + 0,1257,1260,5,105,0,0,1258,1260,3,156,78,0,1259,1257,1,0,0,0,1259, + 1258,1,0,0,0,1260,159,1,0,0,0,1261,1265,5,105,0,0,1262,1265,3,152, + 76,0,1263,1265,3,154,77,0,1264,1261,1,0,0,0,1264,1262,1,0,0,0,1264, + 1263,1,0,0,0,1265,161,1,0,0,0,1266,1267,3,166,83,0,1267,1268,5,122, + 0,0,1268,1269,3,148,74,0,1269,163,1,0,0,0,1270,1271,5,128,0,0,1271, + 1272,3,160,80,0,1272,1273,5,147,0,0,1273,165,1,0,0,0,1274,1277,5, + 110,0,0,1275,1277,3,168,84,0,1276,1274,1,0,0,0,1276,1275,1,0,0,0, + 1277,167,1,0,0,0,1278,1282,5,142,0,0,1279,1281,3,170,85,0,1280,1279, + 1,0,0,0,1281,1284,1,0,0,0,1282,1280,1,0,0,0,1282,1283,1,0,0,0,1283, + 1285,1,0,0,0,1284,1282,1,0,0,0,1285,1286,5,144,0,0,1286,169,1,0, + 0,0,1287,1288,5,157,0,0,1288,1289,3,116,58,0,1289,1290,5,147,0,0, + 1290,1293,1,0,0,0,1291,1293,5,156,0,0,1292,1287,1,0,0,0,1292,1291, + 1,0,0,0,1293,171,1,0,0,0,1294,1298,5,143,0,0,1295,1297,3,174,87, + 0,1296,1295,1,0,0,0,1297,1300,1,0,0,0,1298,1296,1,0,0,0,1298,1299, + 1,0,0,0,1299,1301,1,0,0,0,1300,1298,1,0,0,0,1301,1302,5,0,0,1,1302, + 173,1,0,0,0,1303,1304,5,159,0,0,1304,1305,3,116,58,0,1305,1306,5, + 147,0,0,1306,1309,1,0,0,0,1307,1309,5,158,0,0,1308,1303,1,0,0,0, + 1308,1307,1,0,0,0,1309,175,1,0,0,0,168,179,186,195,202,206,220,224, + 227,231,234,241,245,254,259,268,276,283,287,293,298,306,313,319, + 331,339,353,357,362,372,381,384,388,391,395,398,401,404,407,411, + 415,418,421,424,428,431,440,446,467,484,501,507,513,524,526,537, + 540,546,554,560,562,566,571,574,577,581,585,588,590,593,597,601, + 604,606,608,613,624,630,637,642,646,650,656,658,665,673,676,679, + 698,712,728,732,743,747,758,762,769,773,780,784,789,798,802,826, + 843,849,852,855,865,871,874,877,885,888,892,895,909,926,931,935, + 941,948,960,964,967,976,990,1029,1037,1039,1041,1049,1053,1057,1065, + 1069,1078,1082,1084,1094,1105,1114,1121,1134,1141,1145,1157,1163, + 1166,1173,1185,1191,1195,1201,1208,1217,1221,1231,1233,1236,1244, + 1249,1259,1264,1276,1282,1292,1298,1308 ] class HogQLParser ( Parser ): @@ -556,6 +575,7 @@ class HogQLParser ( Parser ): "", "", "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "'->'", "'*'", "'`'", "'\\'", "':'", "','", "'||'", "'-'", "'$'", "'.'", "'=='", "'='", "'>='", "'>'", "'#'", "'~*'", @@ -566,35 +586,35 @@ class HogQLParser ( Parser ): symbolicNames = [ "", "ALL", "AND", "ANTI", "ANY", "ARRAY", "AS", "ASCENDING", "ASOF", "BETWEEN", "BOTH", "BY", - "CASE", "CAST", "COHORT", "COLLATE", "CROSS", "CUBE", - "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", "DISTINCT", - "ELSE", "END", "EXTRACT", "FINAL", "FIRST", "FN", - "FOLLOWING", "FOR", "FROM", "FULL", "GROUP", "HAVING", - "HOUR", "ID", "IF", "ILIKE", "IN", "INF", "INNER", - "INTERVAL", "IS", "JOIN", "KEY", "LAST", "LEADING", - "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", "MONTH", - "NAN_SQL", "NOT", "NULL_SQL", "NULLS", "OFFSET", "ON", - "OR", "ORDER", "OUTER", "OVER", "PARTITION", "PRECEDING", - "PREWHERE", "QUARTER", "RANGE", "RETURN", "RIGHT", - "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", "SELECT", - "SEMI", "SETTINGS", "SUBSTRING", "THEN", "TIES", "TIMESTAMP", - "TO", "TOP", "TOTALS", "TRAILING", "TRIM", "TRUNCATE", - "UNBOUNDED", "UNION", "USING", "WEEK", "WHEN", "WHERE", - "WHILE", "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", - "IDENTIFIER", "FLOATING_LITERAL", "OCTAL_LITERAL", - "DECIMAL_LITERAL", "HEXADECIMAL_LITERAL", "STRING_LITERAL", - "ARROW", "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", - "COMMA", "CONCAT", "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", - "EQ_SINGLE", "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", - "IREGEX_DOUBLE", "LBRACE", "LBRACKET", "LPAREN", "LT_EQ", - "LT", "NOT_EQ", "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", - "NULLISH", "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", - "QUOTE_SINGLE_TEMPLATE", "QUOTE_SINGLE_TEMPLATE_FULL", - "QUOTE_SINGLE", "REGEX_SINGLE", "REGEX_DOUBLE", "RBRACE", - "RBRACKET", "RPAREN", "SEMICOLON", "SLASH", "UNDERSCORE", - "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", "WHITESPACE", - "STRING_TEXT", "STRING_ESCAPE_TRIGGER", "FULL_STRING_TEXT", - "FULL_STRING_ESCAPE_TRIGGER" ] + "CASE", "CAST", "CATCH", "COHORT", "COLLATE", "CROSS", + "CUBE", "CURRENT", "DATE", "DAY", "DESC", "DESCENDING", + "DISTINCT", "ELSE", "END", "EXTRACT", "FINAL", "FINALLY", + "FIRST", "FN", "FOLLOWING", "FOR", "FROM", "FULL", + "GROUP", "HAVING", "HOUR", "ID", "IF", "ILIKE", "IN", + "INF", "INNER", "INTERVAL", "IS", "JOIN", "KEY", "LAST", + "LEADING", "LEFT", "LET", "LIKE", "LIMIT", "MINUTE", + "MONTH", "NAN_SQL", "NOT", "NULL_SQL", "NULLS", "OFFSET", + "ON", "OR", "ORDER", "OUTER", "OVER", "PARTITION", + "PRECEDING", "PREWHERE", "QUARTER", "RANGE", "RETURN", + "RIGHT", "ROLLUP", "ROW", "ROWS", "SAMPLE", "SECOND", + "SELECT", "SEMI", "SETTINGS", "SUBSTRING", "THEN", + "THROW", "TIES", "TIMESTAMP", "TO", "TOP", "TOTALS", + "TRAILING", "TRIM", "TRUNCATE", "TRY", "UNBOUNDED", + "UNION", "USING", "WEEK", "WHEN", "WHERE", "WHILE", + "WINDOW", "WITH", "YEAR", "ESCAPE_CHAR_COMMON", "IDENTIFIER", + "FLOATING_LITERAL", "OCTAL_LITERAL", "DECIMAL_LITERAL", + "HEXADECIMAL_LITERAL", "STRING_LITERAL", "ARROW", + "ASTERISK", "BACKQUOTE", "BACKSLASH", "COLON", "COMMA", + "CONCAT", "DASH", "DOLLAR", "DOT", "EQ_DOUBLE", "EQ_SINGLE", + "GT_EQ", "GT", "HASH", "IREGEX_SINGLE", "IREGEX_DOUBLE", + "LBRACE", "LBRACKET", "LPAREN", "LT_EQ", "LT", "NOT_EQ", + "NOT_IREGEX", "NOT_REGEX", "NULL_PROPERTY", "NULLISH", + "PERCENT", "PLUS", "QUERY", "QUOTE_DOUBLE", "QUOTE_SINGLE_TEMPLATE", + "QUOTE_SINGLE_TEMPLATE_FULL", "QUOTE_SINGLE", "REGEX_SINGLE", + "REGEX_DOUBLE", "RBRACE", "RBRACKET", "RPAREN", "SEMICOLON", + "SLASH", "UNDERSCORE", "MULTI_LINE_COMMENT", "SINGLE_LINE_COMMENT", + "WHITESPACE", "STRING_TEXT", "STRING_ESCAPE_TRIGGER", + "FULL_STRING_TEXT", "FULL_STRING_ESCAPE_TRIGGER" ] RULE_program = 0 RULE_declaration = 1 @@ -603,100 +623,104 @@ class HogQLParser ( Parser ): RULE_identifierList = 4 RULE_statement = 5 RULE_returnStmt = 6 - RULE_ifStmt = 7 - RULE_whileStmt = 8 - RULE_forStmt = 9 - RULE_forInStmt = 10 - RULE_funcStmt = 11 - RULE_varAssignment = 12 - RULE_exprStmt = 13 - RULE_emptyStmt = 14 - RULE_block = 15 - RULE_kvPair = 16 - RULE_kvPairList = 17 - RULE_select = 18 - RULE_selectUnionStmt = 19 - RULE_selectStmtWithParens = 20 - RULE_selectStmt = 21 - RULE_withClause = 22 - RULE_topClause = 23 - RULE_fromClause = 24 - RULE_arrayJoinClause = 25 - RULE_windowClause = 26 - RULE_prewhereClause = 27 - RULE_whereClause = 28 - RULE_groupByClause = 29 - RULE_havingClause = 30 - RULE_orderByClause = 31 - RULE_projectionOrderByClause = 32 - RULE_limitAndOffsetClause = 33 - RULE_offsetOnlyClause = 34 - RULE_settingsClause = 35 - RULE_joinExpr = 36 - RULE_joinOp = 37 - RULE_joinOpCross = 38 - RULE_joinConstraintClause = 39 - RULE_sampleClause = 40 - RULE_orderExprList = 41 - RULE_orderExpr = 42 - RULE_ratioExpr = 43 - RULE_settingExprList = 44 - RULE_settingExpr = 45 - RULE_windowExpr = 46 - RULE_winPartitionByClause = 47 - RULE_winOrderByClause = 48 - RULE_winFrameClause = 49 - RULE_winFrameExtend = 50 - RULE_winFrameBound = 51 - RULE_expr = 52 - RULE_columnTypeExpr = 53 - RULE_columnExprList = 54 - RULE_columnExpr = 55 - RULE_columnArgList = 56 - RULE_columnArgExpr = 57 - RULE_columnLambdaExpr = 58 - RULE_hogqlxTagElement = 59 - RULE_hogqlxTagAttribute = 60 - RULE_withExprList = 61 - RULE_withExpr = 62 - RULE_columnIdentifier = 63 - RULE_nestedIdentifier = 64 - RULE_tableExpr = 65 - RULE_tableFunctionExpr = 66 - RULE_tableIdentifier = 67 - RULE_tableArgList = 68 - RULE_databaseIdentifier = 69 - RULE_floatingLiteral = 70 - RULE_numberLiteral = 71 - RULE_literal = 72 - RULE_interval = 73 - RULE_keyword = 74 - RULE_keywordForAlias = 75 - RULE_alias = 76 - RULE_identifier = 77 - RULE_enumValue = 78 - RULE_placeholder = 79 - RULE_string = 80 - RULE_templateString = 81 - RULE_stringContents = 82 - RULE_fullTemplateString = 83 - RULE_stringContentsFull = 84 + RULE_throwStmt = 7 + RULE_catchBlock = 8 + RULE_tryCatchStmt = 9 + RULE_ifStmt = 10 + RULE_whileStmt = 11 + RULE_forStmt = 12 + RULE_forInStmt = 13 + RULE_funcStmt = 14 + RULE_varAssignment = 15 + RULE_exprStmt = 16 + RULE_emptyStmt = 17 + RULE_block = 18 + RULE_kvPair = 19 + RULE_kvPairList = 20 + RULE_select = 21 + RULE_selectUnionStmt = 22 + RULE_selectStmtWithParens = 23 + RULE_selectStmt = 24 + RULE_withClause = 25 + RULE_topClause = 26 + RULE_fromClause = 27 + RULE_arrayJoinClause = 28 + RULE_windowClause = 29 + RULE_prewhereClause = 30 + RULE_whereClause = 31 + RULE_groupByClause = 32 + RULE_havingClause = 33 + RULE_orderByClause = 34 + RULE_projectionOrderByClause = 35 + RULE_limitAndOffsetClause = 36 + RULE_offsetOnlyClause = 37 + RULE_settingsClause = 38 + RULE_joinExpr = 39 + RULE_joinOp = 40 + RULE_joinOpCross = 41 + RULE_joinConstraintClause = 42 + RULE_sampleClause = 43 + RULE_orderExprList = 44 + RULE_orderExpr = 45 + RULE_ratioExpr = 46 + RULE_settingExprList = 47 + RULE_settingExpr = 48 + RULE_windowExpr = 49 + RULE_winPartitionByClause = 50 + RULE_winOrderByClause = 51 + RULE_winFrameClause = 52 + RULE_winFrameExtend = 53 + RULE_winFrameBound = 54 + RULE_expr = 55 + RULE_columnTypeExpr = 56 + RULE_columnExprList = 57 + RULE_columnExpr = 58 + RULE_columnArgList = 59 + RULE_columnArgExpr = 60 + RULE_columnLambdaExpr = 61 + RULE_hogqlxTagElement = 62 + RULE_hogqlxTagAttribute = 63 + RULE_withExprList = 64 + RULE_withExpr = 65 + RULE_columnIdentifier = 66 + RULE_nestedIdentifier = 67 + RULE_tableExpr = 68 + RULE_tableFunctionExpr = 69 + RULE_tableIdentifier = 70 + RULE_tableArgList = 71 + RULE_databaseIdentifier = 72 + RULE_floatingLiteral = 73 + RULE_numberLiteral = 74 + RULE_literal = 75 + RULE_interval = 76 + RULE_keyword = 77 + RULE_keywordForAlias = 78 + RULE_alias = 79 + RULE_identifier = 80 + RULE_enumValue = 81 + RULE_placeholder = 82 + RULE_string = 83 + RULE_templateString = 84 + RULE_stringContents = 85 + RULE_fullTemplateString = 86 + RULE_stringContentsFull = 87 ruleNames = [ "program", "declaration", "expression", "varDecl", "identifierList", - "statement", "returnStmt", "ifStmt", "whileStmt", "forStmt", - "forInStmt", "funcStmt", "varAssignment", "exprStmt", - "emptyStmt", "block", "kvPair", "kvPairList", "select", - "selectUnionStmt", "selectStmtWithParens", "selectStmt", - "withClause", "topClause", "fromClause", "arrayJoinClause", - "windowClause", "prewhereClause", "whereClause", "groupByClause", - "havingClause", "orderByClause", "projectionOrderByClause", - "limitAndOffsetClause", "offsetOnlyClause", "settingsClause", - "joinExpr", "joinOp", "joinOpCross", "joinConstraintClause", - "sampleClause", "orderExprList", "orderExpr", "ratioExpr", - "settingExprList", "settingExpr", "windowExpr", "winPartitionByClause", - "winOrderByClause", "winFrameClause", "winFrameExtend", - "winFrameBound", "expr", "columnTypeExpr", "columnExprList", - "columnExpr", "columnArgList", "columnArgExpr", "columnLambdaExpr", + "statement", "returnStmt", "throwStmt", "catchBlock", + "tryCatchStmt", "ifStmt", "whileStmt", "forStmt", "forInStmt", + "funcStmt", "varAssignment", "exprStmt", "emptyStmt", + "block", "kvPair", "kvPairList", "select", "selectUnionStmt", + "selectStmtWithParens", "selectStmt", "withClause", "topClause", + "fromClause", "arrayJoinClause", "windowClause", "prewhereClause", + "whereClause", "groupByClause", "havingClause", "orderByClause", + "projectionOrderByClause", "limitAndOffsetClause", "offsetOnlyClause", + "settingsClause", "joinExpr", "joinOp", "joinOpCross", + "joinConstraintClause", "sampleClause", "orderExprList", + "orderExpr", "ratioExpr", "settingExprList", "settingExpr", + "windowExpr", "winPartitionByClause", "winOrderByClause", + "winFrameClause", "winFrameExtend", "winFrameBound", + "expr", "columnTypeExpr", "columnExprList", "columnExpr", + "columnArgList", "columnArgExpr", "columnLambdaExpr", "hogqlxTagElement", "hogqlxTagAttribute", "withExprList", "withExpr", "columnIdentifier", "nestedIdentifier", "tableExpr", "tableFunctionExpr", "tableIdentifier", "tableArgList", @@ -720,148 +744,152 @@ class HogQLParser ( Parser ): BY=11 CASE=12 CAST=13 - COHORT=14 - COLLATE=15 - CROSS=16 - CUBE=17 - CURRENT=18 - DATE=19 - DAY=20 - DESC=21 - DESCENDING=22 - DISTINCT=23 - ELSE=24 - END=25 - EXTRACT=26 - FINAL=27 - FIRST=28 - FN=29 - FOLLOWING=30 - FOR=31 - FROM=32 - FULL=33 - GROUP=34 - HAVING=35 - HOUR=36 - ID=37 - IF=38 - ILIKE=39 - IN=40 - INF=41 - INNER=42 - INTERVAL=43 - IS=44 - JOIN=45 - KEY=46 - LAST=47 - LEADING=48 - LEFT=49 - LET=50 - LIKE=51 - LIMIT=52 - MINUTE=53 - MONTH=54 - NAN_SQL=55 - NOT=56 - NULL_SQL=57 - NULLS=58 - OFFSET=59 - ON=60 - OR=61 - ORDER=62 - OUTER=63 - OVER=64 - PARTITION=65 - PRECEDING=66 - PREWHERE=67 - QUARTER=68 - RANGE=69 - RETURN=70 - RIGHT=71 - ROLLUP=72 - ROW=73 - ROWS=74 - SAMPLE=75 - SECOND=76 - SELECT=77 - SEMI=78 - SETTINGS=79 - SUBSTRING=80 - THEN=81 - TIES=82 - TIMESTAMP=83 - TO=84 - TOP=85 - TOTALS=86 - TRAILING=87 - TRIM=88 - TRUNCATE=89 - UNBOUNDED=90 - UNION=91 - USING=92 - WEEK=93 - WHEN=94 - WHERE=95 - WHILE=96 - WINDOW=97 - WITH=98 - YEAR=99 - ESCAPE_CHAR_COMMON=100 - IDENTIFIER=101 - FLOATING_LITERAL=102 - OCTAL_LITERAL=103 - DECIMAL_LITERAL=104 - HEXADECIMAL_LITERAL=105 - STRING_LITERAL=106 - ARROW=107 - ASTERISK=108 - BACKQUOTE=109 - BACKSLASH=110 - COLON=111 - COMMA=112 - CONCAT=113 - DASH=114 - DOLLAR=115 - DOT=116 - EQ_DOUBLE=117 - EQ_SINGLE=118 - GT_EQ=119 - GT=120 - HASH=121 - IREGEX_SINGLE=122 - IREGEX_DOUBLE=123 - LBRACE=124 - LBRACKET=125 - LPAREN=126 - LT_EQ=127 - LT=128 - NOT_EQ=129 - NOT_IREGEX=130 - NOT_REGEX=131 - NULL_PROPERTY=132 - NULLISH=133 - PERCENT=134 - PLUS=135 - QUERY=136 - QUOTE_DOUBLE=137 - QUOTE_SINGLE_TEMPLATE=138 - QUOTE_SINGLE_TEMPLATE_FULL=139 - QUOTE_SINGLE=140 - REGEX_SINGLE=141 - REGEX_DOUBLE=142 - RBRACE=143 - RBRACKET=144 - RPAREN=145 - SEMICOLON=146 - SLASH=147 - UNDERSCORE=148 - MULTI_LINE_COMMENT=149 - SINGLE_LINE_COMMENT=150 - WHITESPACE=151 - STRING_TEXT=152 - STRING_ESCAPE_TRIGGER=153 - FULL_STRING_TEXT=154 - FULL_STRING_ESCAPE_TRIGGER=155 + CATCH=14 + COHORT=15 + COLLATE=16 + CROSS=17 + CUBE=18 + CURRENT=19 + DATE=20 + DAY=21 + DESC=22 + DESCENDING=23 + DISTINCT=24 + ELSE=25 + END=26 + EXTRACT=27 + FINAL=28 + FINALLY=29 + FIRST=30 + FN=31 + FOLLOWING=32 + FOR=33 + FROM=34 + FULL=35 + GROUP=36 + HAVING=37 + HOUR=38 + ID=39 + IF=40 + ILIKE=41 + IN=42 + INF=43 + INNER=44 + INTERVAL=45 + IS=46 + JOIN=47 + KEY=48 + LAST=49 + LEADING=50 + LEFT=51 + LET=52 + LIKE=53 + LIMIT=54 + MINUTE=55 + MONTH=56 + NAN_SQL=57 + NOT=58 + NULL_SQL=59 + NULLS=60 + OFFSET=61 + ON=62 + OR=63 + ORDER=64 + OUTER=65 + OVER=66 + PARTITION=67 + PRECEDING=68 + PREWHERE=69 + QUARTER=70 + RANGE=71 + RETURN=72 + RIGHT=73 + ROLLUP=74 + ROW=75 + ROWS=76 + SAMPLE=77 + SECOND=78 + SELECT=79 + SEMI=80 + SETTINGS=81 + SUBSTRING=82 + THEN=83 + THROW=84 + TIES=85 + TIMESTAMP=86 + TO=87 + TOP=88 + TOTALS=89 + TRAILING=90 + TRIM=91 + TRUNCATE=92 + TRY=93 + UNBOUNDED=94 + UNION=95 + USING=96 + WEEK=97 + WHEN=98 + WHERE=99 + WHILE=100 + WINDOW=101 + WITH=102 + YEAR=103 + ESCAPE_CHAR_COMMON=104 + IDENTIFIER=105 + FLOATING_LITERAL=106 + OCTAL_LITERAL=107 + DECIMAL_LITERAL=108 + HEXADECIMAL_LITERAL=109 + STRING_LITERAL=110 + ARROW=111 + ASTERISK=112 + BACKQUOTE=113 + BACKSLASH=114 + COLON=115 + COMMA=116 + CONCAT=117 + DASH=118 + DOLLAR=119 + DOT=120 + EQ_DOUBLE=121 + EQ_SINGLE=122 + GT_EQ=123 + GT=124 + HASH=125 + IREGEX_SINGLE=126 + IREGEX_DOUBLE=127 + LBRACE=128 + LBRACKET=129 + LPAREN=130 + LT_EQ=131 + LT=132 + NOT_EQ=133 + NOT_IREGEX=134 + NOT_REGEX=135 + NULL_PROPERTY=136 + NULLISH=137 + PERCENT=138 + PLUS=139 + QUERY=140 + QUOTE_DOUBLE=141 + QUOTE_SINGLE_TEMPLATE=142 + QUOTE_SINGLE_TEMPLATE_FULL=143 + QUOTE_SINGLE=144 + REGEX_SINGLE=145 + REGEX_DOUBLE=146 + RBRACE=147 + RBRACKET=148 + RPAREN=149 + SEMICOLON=150 + SLASH=151 + UNDERSCORE=152 + MULTI_LINE_COMMENT=153 + SINGLE_LINE_COMMENT=154 + WHITESPACE=155 + STRING_TEXT=156 + STRING_ESCAPE_TRIGGER=157 + FULL_STRING_TEXT=158 + FULL_STRING_ESCAPE_TRIGGER=159 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) @@ -908,17 +936,17 @@ def program(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 173 + self.state = 179 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & -2) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106351341731839) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 263297) != 0): - self.state = 170 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & -536887298) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493105500848127) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 4212759) != 0): + self.state = 176 self.declaration() - self.state = 175 + self.state = 181 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 176 + self.state = 182 self.match(HogQLParser.EOF) except RecognitionException as re: localctx.exception = re @@ -961,17 +989,17 @@ def declaration(self): localctx = HogQLParser.DeclarationContext(self, self._ctx, self.state) self.enterRule(localctx, 2, self.RULE_declaration) try: - self.state = 180 + self.state = 186 self._errHandler.sync(self) token = self._input.LA(1) - if token in [50]: + if token in [52]: self.enterOuterAlt(localctx, 1) - self.state = 178 + self.state = 184 self.varDecl() pass - elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 108, 114, 116, 124, 125, 126, 128, 135, 138, 146]: + elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110, 112, 118, 120, 128, 129, 130, 132, 139, 142, 150]: self.enterOuterAlt(localctx, 2) - self.state = 179 + self.state = 185 self.statement() pass else: @@ -1015,7 +1043,7 @@ def expression(self): self.enterRule(localctx, 4, self.RULE_expression) try: self.enterOuterAlt(localctx, 1) - self.state = 182 + self.state = 188 self.columnExpr(0) except RecognitionException as re: localctx.exception = re @@ -1069,19 +1097,19 @@ def varDecl(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 184 + self.state = 190 self.match(HogQLParser.LET) - self.state = 185 + self.state = 191 self.identifier() - self.state = 189 + self.state = 195 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==111: - self.state = 186 + if _la==115: + self.state = 192 self.match(HogQLParser.COLON) - self.state = 187 + self.state = 193 self.match(HogQLParser.EQ_SINGLE) - self.state = 188 + self.state = 194 self.expression() @@ -1133,26 +1161,26 @@ def identifierList(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 191 + self.state = 197 self.identifier() - self.state = 196 + self.state = 202 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,3,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 192 + self.state = 198 self.match(HogQLParser.COMMA) - self.state = 193 + self.state = 199 self.identifier() - self.state = 198 + self.state = 204 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,3,self._ctx) - self.state = 200 + self.state = 206 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 199 + if _la==116: + self.state = 205 self.match(HogQLParser.COMMA) @@ -1176,6 +1204,14 @@ def returnStmt(self): return self.getTypedRuleContext(HogQLParser.ReturnStmtContext,0) + def throwStmt(self): + return self.getTypedRuleContext(HogQLParser.ThrowStmtContext,0) + + + def tryCatchStmt(self): + return self.getTypedRuleContext(HogQLParser.TryCatchStmtContext,0) + + def ifStmt(self): return self.getTypedRuleContext(HogQLParser.IfStmtContext,0) @@ -1229,66 +1265,78 @@ def statement(self): localctx = HogQLParser.StatementContext(self, self._ctx, self.state) self.enterRule(localctx, 10, self.RULE_statement) try: - self.state = 212 + self.state = 220 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,5,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 202 + self.state = 208 self.returnStmt() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 203 - self.ifStmt() + self.state = 209 + self.throwStmt() pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 204 - self.whileStmt() + self.state = 210 + self.tryCatchStmt() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 205 - self.forInStmt() + self.state = 211 + self.ifStmt() pass elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 206 - self.forStmt() + self.state = 212 + self.whileStmt() pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 207 - self.funcStmt() + self.state = 213 + self.forInStmt() pass elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 208 - self.varAssignment() + self.state = 214 + self.forStmt() pass elif la_ == 8: self.enterOuterAlt(localctx, 8) - self.state = 209 - self.block() + self.state = 215 + self.funcStmt() pass elif la_ == 9: self.enterOuterAlt(localctx, 9) - self.state = 210 - self.exprStmt() + self.state = 216 + self.varAssignment() pass elif la_ == 10: self.enterOuterAlt(localctx, 10) - self.state = 211 + self.state = 217 + self.block() + pass + + elif la_ == 11: + self.enterOuterAlt(localctx, 11) + self.state = 218 + self.exprStmt() + pass + + elif la_ == 12: + self.enterOuterAlt(localctx, 12) + self.state = 219 self.emptyStmt() pass @@ -1337,21 +1385,83 @@ def returnStmt(self): self.enterRule(localctx, 12, self.RULE_returnStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 214 + self.state = 222 self.match(HogQLParser.RETURN) - self.state = 216 + self.state = 224 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,6,self._ctx) if la_ == 1: - self.state = 215 + self.state = 223 self.expression() - self.state = 219 + self.state = 227 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,7,self._ctx) if la_ == 1: - self.state = 218 + self.state = 226 + self.match(HogQLParser.SEMICOLON) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ThrowStmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def THROW(self): + return self.getToken(HogQLParser.THROW, 0) + + def expression(self): + return self.getTypedRuleContext(HogQLParser.ExpressionContext,0) + + + def SEMICOLON(self): + return self.getToken(HogQLParser.SEMICOLON, 0) + + def getRuleIndex(self): + return HogQLParser.RULE_throwStmt + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitThrowStmt" ): + return visitor.visitThrowStmt(self) + else: + return visitor.visitChildren(self) + + + + + def throwStmt(self): + + localctx = HogQLParser.ThrowStmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 14, self.RULE_throwStmt) + try: + self.enterOuterAlt(localctx, 1) + self.state = 229 + self.match(HogQLParser.THROW) + self.state = 231 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,8,self._ctx) + if la_ == 1: + self.state = 230 + self.expression() + + + self.state = 234 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,9,self._ctx) + if la_ == 1: + self.state = 233 self.match(HogQLParser.SEMICOLON) @@ -1364,6 +1474,174 @@ def returnStmt(self): return localctx + class CatchBlockContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.catchVar = None # IdentifierContext + self.catchType = None # IdentifierContext + self.catchStmt = None # BlockContext + + def CATCH(self): + return self.getToken(HogQLParser.CATCH, 0) + + def block(self): + return self.getTypedRuleContext(HogQLParser.BlockContext,0) + + + def LPAREN(self): + return self.getToken(HogQLParser.LPAREN, 0) + + def RPAREN(self): + return self.getToken(HogQLParser.RPAREN, 0) + + def identifier(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(HogQLParser.IdentifierContext) + else: + return self.getTypedRuleContext(HogQLParser.IdentifierContext,i) + + + def COLON(self): + return self.getToken(HogQLParser.COLON, 0) + + def getRuleIndex(self): + return HogQLParser.RULE_catchBlock + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCatchBlock" ): + return visitor.visitCatchBlock(self) + else: + return visitor.visitChildren(self) + + + + + def catchBlock(self): + + localctx = HogQLParser.CatchBlockContext(self, self._ctx, self.state) + self.enterRule(localctx, 16, self.RULE_catchBlock) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 236 + self.match(HogQLParser.CATCH) + self.state = 245 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==130: + self.state = 237 + self.match(HogQLParser.LPAREN) + self.state = 238 + localctx.catchVar = self.identifier() + self.state = 241 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==115: + self.state = 239 + self.match(HogQLParser.COLON) + self.state = 240 + localctx.catchType = self.identifier() + + + self.state = 243 + self.match(HogQLParser.RPAREN) + + + self.state = 247 + localctx.catchStmt = self.block() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TryCatchStmtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.tryStmt = None # BlockContext + self.finallyStmt = None # BlockContext + + def TRY(self): + return self.getToken(HogQLParser.TRY, 0) + + def block(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(HogQLParser.BlockContext) + else: + return self.getTypedRuleContext(HogQLParser.BlockContext,i) + + + def catchBlock(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(HogQLParser.CatchBlockContext) + else: + return self.getTypedRuleContext(HogQLParser.CatchBlockContext,i) + + + def FINALLY(self): + return self.getToken(HogQLParser.FINALLY, 0) + + def getRuleIndex(self): + return HogQLParser.RULE_tryCatchStmt + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTryCatchStmt" ): + return visitor.visitTryCatchStmt(self) + else: + return visitor.visitChildren(self) + + + + + def tryCatchStmt(self): + + localctx = HogQLParser.TryCatchStmtContext(self, self._ctx, self.state) + self.enterRule(localctx, 18, self.RULE_tryCatchStmt) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 249 + self.match(HogQLParser.TRY) + self.state = 250 + localctx.tryStmt = self.block() + self.state = 254 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==14: + self.state = 251 + self.catchBlock() + self.state = 256 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 259 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==29: + self.state = 257 + self.match(HogQLParser.FINALLY) + self.state = 258 + localctx.finallyStmt = self.block() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class IfStmtContext(ParserRuleContext): __slots__ = 'parser' @@ -1409,26 +1687,26 @@ def accept(self, visitor:ParseTreeVisitor): def ifStmt(self): localctx = HogQLParser.IfStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 14, self.RULE_ifStmt) + self.enterRule(localctx, 20, self.RULE_ifStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 221 + self.state = 261 self.match(HogQLParser.IF) - self.state = 222 + self.state = 262 self.match(HogQLParser.LPAREN) - self.state = 223 + self.state = 263 self.expression() - self.state = 224 + self.state = 264 self.match(HogQLParser.RPAREN) - self.state = 225 + self.state = 265 self.statement() - self.state = 228 + self.state = 268 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,8,self._ctx) + la_ = self._interp.adaptivePredict(self._input,14,self._ctx) if la_ == 1: - self.state = 226 + self.state = 266 self.match(HogQLParser.ELSE) - self.state = 227 + self.state = 267 self.statement() @@ -1483,24 +1761,24 @@ def accept(self, visitor:ParseTreeVisitor): def whileStmt(self): localctx = HogQLParser.WhileStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 16, self.RULE_whileStmt) + self.enterRule(localctx, 22, self.RULE_whileStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 230 + self.state = 270 self.match(HogQLParser.WHILE) - self.state = 231 + self.state = 271 self.match(HogQLParser.LPAREN) - self.state = 232 + self.state = 272 self.expression() - self.state = 233 + self.state = 273 self.match(HogQLParser.RPAREN) - self.state = 234 + self.state = 274 self.statement() - self.state = 236 + self.state = 276 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,9,self._ctx) + la_ = self._interp.adaptivePredict(self._input,15,self._ctx) if la_ == 1: - self.state = 235 + self.state = 275 self.match(HogQLParser.SEMICOLON) @@ -1582,67 +1860,67 @@ def accept(self, visitor:ParseTreeVisitor): def forStmt(self): localctx = HogQLParser.ForStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 18, self.RULE_forStmt) + self.enterRule(localctx, 24, self.RULE_forStmt) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 238 + self.state = 278 self.match(HogQLParser.FOR) - self.state = 239 + self.state = 279 self.match(HogQLParser.LPAREN) - self.state = 243 + self.state = 283 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,10,self._ctx) + la_ = self._interp.adaptivePredict(self._input,16,self._ctx) if la_ == 1: - self.state = 240 + self.state = 280 localctx.initializerVarDeclr = self.varDecl() elif la_ == 2: - self.state = 241 + self.state = 281 localctx.initializerVarAssignment = self.varAssignment() elif la_ == 3: - self.state = 242 + self.state = 282 localctx.initializerExpression = self.expression() - self.state = 245 + self.state = 285 self.match(HogQLParser.SEMICOLON) - self.state = 247 + self.state = 287 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 246 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 286 localctx.condition = self.expression() - self.state = 249 + self.state = 289 self.match(HogQLParser.SEMICOLON) - self.state = 253 + self.state = 293 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,12,self._ctx) + la_ = self._interp.adaptivePredict(self._input,18,self._ctx) if la_ == 1: - self.state = 250 + self.state = 290 localctx.incrementVarDeclr = self.varDecl() elif la_ == 2: - self.state = 251 + self.state = 291 localctx.incrementVarAssignment = self.varAssignment() elif la_ == 3: - self.state = 252 + self.state = 292 localctx.incrementExpression = self.expression() - self.state = 255 + self.state = 295 self.match(HogQLParser.RPAREN) - self.state = 256 + self.state = 296 self.statement() - self.state = 258 + self.state = 298 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,13,self._ctx) + la_ = self._interp.adaptivePredict(self._input,19,self._ctx) if la_ == 1: - self.state = 257 + self.state = 297 self.match(HogQLParser.SEMICOLON) @@ -1713,41 +1991,41 @@ def accept(self, visitor:ParseTreeVisitor): def forInStmt(self): localctx = HogQLParser.ForInStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 20, self.RULE_forInStmt) + self.enterRule(localctx, 26, self.RULE_forInStmt) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 260 + self.state = 300 self.match(HogQLParser.FOR) - self.state = 261 + self.state = 301 self.match(HogQLParser.LPAREN) - self.state = 262 + self.state = 302 self.match(HogQLParser.LET) - self.state = 263 + self.state = 303 self.identifier() - self.state = 266 + self.state = 306 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 264 + if _la==116: + self.state = 304 self.match(HogQLParser.COMMA) - self.state = 265 + self.state = 305 self.identifier() - self.state = 268 + self.state = 308 self.match(HogQLParser.IN) - self.state = 269 + self.state = 309 self.expression() - self.state = 270 + self.state = 310 self.match(HogQLParser.RPAREN) - self.state = 271 + self.state = 311 self.statement() - self.state = 273 + self.state = 313 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,15,self._ctx) + la_ = self._interp.adaptivePredict(self._input,21,self._ctx) if la_ == 1: - self.state = 272 + self.state = 312 self.match(HogQLParser.SEMICOLON) @@ -1803,27 +2081,27 @@ def accept(self, visitor:ParseTreeVisitor): def funcStmt(self): localctx = HogQLParser.FuncStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 22, self.RULE_funcStmt) + self.enterRule(localctx, 28, self.RULE_funcStmt) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 275 + self.state = 315 self.match(HogQLParser.FN) - self.state = 276 + self.state = 316 self.identifier() - self.state = 277 + self.state = 317 self.match(HogQLParser.LPAREN) - self.state = 279 + self.state = 319 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -181272084561788930) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 201863462911) != 0): - self.state = 278 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -725088338784043010) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 3229277487103) != 0): + self.state = 318 self.identifierList() - self.state = 281 + self.state = 321 self.match(HogQLParser.RPAREN) - self.state = 282 + self.state = 322 self.block() except RecognitionException as re: localctx.exception = re @@ -1869,16 +2147,16 @@ def accept(self, visitor:ParseTreeVisitor): def varAssignment(self): localctx = HogQLParser.VarAssignmentContext(self, self._ctx, self.state) - self.enterRule(localctx, 24, self.RULE_varAssignment) + self.enterRule(localctx, 30, self.RULE_varAssignment) try: self.enterOuterAlt(localctx, 1) - self.state = 284 + self.state = 324 self.expression() - self.state = 285 + self.state = 325 self.match(HogQLParser.COLON) - self.state = 286 + self.state = 326 self.match(HogQLParser.EQ_SINGLE) - self.state = 287 + self.state = 327 self.expression() except RecognitionException as re: localctx.exception = re @@ -1918,16 +2196,16 @@ def accept(self, visitor:ParseTreeVisitor): def exprStmt(self): localctx = HogQLParser.ExprStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 26, self.RULE_exprStmt) + self.enterRule(localctx, 32, self.RULE_exprStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 289 + self.state = 329 self.expression() - self.state = 291 + self.state = 331 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,17,self._ctx) + la_ = self._interp.adaptivePredict(self._input,23,self._ctx) if la_ == 1: - self.state = 290 + self.state = 330 self.match(HogQLParser.SEMICOLON) @@ -1965,10 +2243,10 @@ def accept(self, visitor:ParseTreeVisitor): def emptyStmt(self): localctx = HogQLParser.EmptyStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 28, self.RULE_emptyStmt) + self.enterRule(localctx, 34, self.RULE_emptyStmt) try: self.enterOuterAlt(localctx, 1) - self.state = 293 + self.state = 333 self.match(HogQLParser.SEMICOLON) except RecognitionException as re: localctx.exception = re @@ -2014,23 +2292,23 @@ def accept(self, visitor:ParseTreeVisitor): def block(self): localctx = HogQLParser.BlockContext(self, self._ctx, self.state) - self.enterRule(localctx, 30, self.RULE_block) + self.enterRule(localctx, 36, self.RULE_block) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 295 + self.state = 335 self.match(HogQLParser.LBRACE) - self.state = 299 + self.state = 339 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & -2) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106351341731839) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 263297) != 0): - self.state = 296 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & -536887298) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493105500848127) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 4212759) != 0): + self.state = 336 self.declaration() - self.state = 301 + self.state = 341 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 302 + self.state = 342 self.match(HogQLParser.RBRACE) except RecognitionException as re: localctx.exception = re @@ -2073,14 +2351,14 @@ def accept(self, visitor:ParseTreeVisitor): def kvPair(self): localctx = HogQLParser.KvPairContext(self, self._ctx, self.state) - self.enterRule(localctx, 32, self.RULE_kvPair) + self.enterRule(localctx, 38, self.RULE_kvPair) try: self.enterOuterAlt(localctx, 1) - self.state = 304 + self.state = 344 self.expression() - self.state = 305 + self.state = 345 self.match(HogQLParser.COLON) - self.state = 306 + self.state = 346 self.expression() except RecognitionException as re: localctx.exception = re @@ -2126,30 +2404,30 @@ def accept(self, visitor:ParseTreeVisitor): def kvPairList(self): localctx = HogQLParser.KvPairListContext(self, self._ctx, self.state) - self.enterRule(localctx, 34, self.RULE_kvPairList) + self.enterRule(localctx, 40, self.RULE_kvPairList) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 308 + self.state = 348 self.kvPair() - self.state = 313 + self.state = 353 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,19,self._ctx) + _alt = self._interp.adaptivePredict(self._input,25,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 309 + self.state = 349 self.match(HogQLParser.COMMA) - self.state = 310 + self.state = 350 self.kvPair() - self.state = 315 + self.state = 355 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,19,self._ctx) + _alt = self._interp.adaptivePredict(self._input,25,self._ctx) - self.state = 317 + self.state = 357 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 316 + if _la==116: + self.state = 356 self.match(HogQLParser.COMMA) @@ -2199,29 +2477,29 @@ def accept(self, visitor:ParseTreeVisitor): def select(self): localctx = HogQLParser.SelectContext(self, self._ctx, self.state) - self.enterRule(localctx, 36, self.RULE_select) + self.enterRule(localctx, 42, self.RULE_select) try: self.enterOuterAlt(localctx, 1) - self.state = 322 + self.state = 362 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,21,self._ctx) + la_ = self._interp.adaptivePredict(self._input,27,self._ctx) if la_ == 1: - self.state = 319 + self.state = 359 self.selectUnionStmt() pass elif la_ == 2: - self.state = 320 + self.state = 360 self.selectStmt() pass elif la_ == 3: - self.state = 321 + self.state = 361 self.hogqlxTagElement() pass - self.state = 324 + self.state = 364 self.match(HogQLParser.EOF) except RecognitionException as re: localctx.exception = re @@ -2273,23 +2551,23 @@ def accept(self, visitor:ParseTreeVisitor): def selectUnionStmt(self): localctx = HogQLParser.SelectUnionStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 38, self.RULE_selectUnionStmt) + self.enterRule(localctx, 44, self.RULE_selectUnionStmt) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 326 + self.state = 366 self.selectStmtWithParens() - self.state = 332 + self.state = 372 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==91: - self.state = 327 + while _la==95: + self.state = 367 self.match(HogQLParser.UNION) - self.state = 328 + self.state = 368 self.match(HogQLParser.ALL) - self.state = 329 + self.state = 369 self.selectStmtWithParens() - self.state = 334 + self.state = 374 self._errHandler.sync(self) _la = self._input.LA(1) @@ -2342,28 +2620,28 @@ def accept(self, visitor:ParseTreeVisitor): def selectStmtWithParens(self): localctx = HogQLParser.SelectStmtWithParensContext(self, self._ctx, self.state) - self.enterRule(localctx, 40, self.RULE_selectStmtWithParens) + self.enterRule(localctx, 46, self.RULE_selectStmtWithParens) try: - self.state = 341 + self.state = 381 self._errHandler.sync(self) token = self._input.LA(1) - if token in [77, 98]: + if token in [79, 102]: self.enterOuterAlt(localctx, 1) - self.state = 335 + self.state = 375 self.selectStmt() pass - elif token in [126]: + elif token in [130]: self.enterOuterAlt(localctx, 2) - self.state = 336 + self.state = 376 self.match(HogQLParser.LPAREN) - self.state = 337 + self.state = 377 self.selectUnionStmt() - self.state = 338 + self.state = 378 self.match(HogQLParser.RPAREN) pass - elif token in [124]: + elif token in [128]: self.enterOuterAlt(localctx, 3) - self.state = 340 + self.state = 380 self.placeholder() pass else: @@ -2481,147 +2759,147 @@ def accept(self, visitor:ParseTreeVisitor): def selectStmt(self): localctx = HogQLParser.SelectStmtContext(self, self._ctx, self.state) - self.enterRule(localctx, 42, self.RULE_selectStmt) + self.enterRule(localctx, 48, self.RULE_selectStmt) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 344 + self.state = 384 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==98: - self.state = 343 + if _la==102: + self.state = 383 localctx.with_ = self.withClause() - self.state = 346 + self.state = 386 self.match(HogQLParser.SELECT) - self.state = 348 + self.state = 388 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,25,self._ctx) + la_ = self._interp.adaptivePredict(self._input,31,self._ctx) if la_ == 1: - self.state = 347 + self.state = 387 self.match(HogQLParser.DISTINCT) - self.state = 351 + self.state = 391 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,26,self._ctx) + la_ = self._interp.adaptivePredict(self._input,32,self._ctx) if la_ == 1: - self.state = 350 + self.state = 390 self.topClause() - self.state = 353 + self.state = 393 localctx.columns = self.columnExprList() - self.state = 355 + self.state = 395 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==32: - self.state = 354 + if _la==34: + self.state = 394 localctx.from_ = self.fromClause() - self.state = 358 + self.state = 398 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 567347999932448) != 0): - self.state = 357 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 2269391999729696) != 0): + self.state = 397 self.arrayJoinClause() - self.state = 361 + self.state = 401 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==67: - self.state = 360 + if _la==69: + self.state = 400 self.prewhereClause() - self.state = 364 + self.state = 404 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==95: - self.state = 363 + if _la==99: + self.state = 403 localctx.where = self.whereClause() - self.state = 367 + self.state = 407 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==34: - self.state = 366 + if _la==36: + self.state = 406 self.groupByClause() - self.state = 371 + self.state = 411 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,32,self._ctx) + la_ = self._interp.adaptivePredict(self._input,38,self._ctx) if la_ == 1: - self.state = 369 + self.state = 409 self.match(HogQLParser.WITH) - self.state = 370 + self.state = 410 _la = self._input.LA(1) - if not(_la==17 or _la==72): + if not(_la==18 or _la==74): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 375 + self.state = 415 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==98: - self.state = 373 + if _la==102: + self.state = 413 self.match(HogQLParser.WITH) - self.state = 374 + self.state = 414 self.match(HogQLParser.TOTALS) - self.state = 378 + self.state = 418 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==35: - self.state = 377 + if _la==37: + self.state = 417 self.havingClause() - self.state = 381 + self.state = 421 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==97: - self.state = 380 + if _la==101: + self.state = 420 self.windowClause() - self.state = 384 + self.state = 424 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==62: - self.state = 383 + if _la==64: + self.state = 423 self.orderByClause() - self.state = 388 + self.state = 428 self._errHandler.sync(self) token = self._input.LA(1) - if token in [52]: - self.state = 386 + if token in [54]: + self.state = 426 self.limitAndOffsetClause() pass - elif token in [59]: - self.state = 387 + elif token in [61]: + self.state = 427 self.offsetOnlyClause() pass - elif token in [-1, 79, 91, 145]: + elif token in [-1, 81, 95, 149]: pass else: pass - self.state = 391 + self.state = 431 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==79: - self.state = 390 + if _la==81: + self.state = 430 self.settingsClause() @@ -2663,12 +2941,12 @@ def accept(self, visitor:ParseTreeVisitor): def withClause(self): localctx = HogQLParser.WithClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 44, self.RULE_withClause) + self.enterRule(localctx, 50, self.RULE_withClause) try: self.enterOuterAlt(localctx, 1) - self.state = 393 + self.state = 433 self.match(HogQLParser.WITH) - self.state = 394 + self.state = 434 self.withExprList() except RecognitionException as re: localctx.exception = re @@ -2713,20 +2991,20 @@ def accept(self, visitor:ParseTreeVisitor): def topClause(self): localctx = HogQLParser.TopClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 46, self.RULE_topClause) + self.enterRule(localctx, 52, self.RULE_topClause) try: self.enterOuterAlt(localctx, 1) - self.state = 396 + self.state = 436 self.match(HogQLParser.TOP) - self.state = 397 + self.state = 437 self.match(HogQLParser.DECIMAL_LITERAL) - self.state = 400 + self.state = 440 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,39,self._ctx) + la_ = self._interp.adaptivePredict(self._input,45,self._ctx) if la_ == 1: - self.state = 398 + self.state = 438 self.match(HogQLParser.WITH) - self.state = 399 + self.state = 439 self.match(HogQLParser.TIES) @@ -2768,12 +3046,12 @@ def accept(self, visitor:ParseTreeVisitor): def fromClause(self): localctx = HogQLParser.FromClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 48, self.RULE_fromClause) + self.enterRule(localctx, 54, self.RULE_fromClause) try: self.enterOuterAlt(localctx, 1) - self.state = 402 + self.state = 442 self.match(HogQLParser.FROM) - self.state = 403 + self.state = 443 self.joinExpr(0) except RecognitionException as re: localctx.exception = re @@ -2822,28 +3100,28 @@ def accept(self, visitor:ParseTreeVisitor): def arrayJoinClause(self): localctx = HogQLParser.ArrayJoinClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 50, self.RULE_arrayJoinClause) + self.enterRule(localctx, 56, self.RULE_arrayJoinClause) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 406 + self.state = 446 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==42 or _la==49: - self.state = 405 + if _la==44 or _la==51: + self.state = 445 _la = self._input.LA(1) - if not(_la==42 or _la==49): + if not(_la==44 or _la==51): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 408 + self.state = 448 self.match(HogQLParser.ARRAY) - self.state = 409 + self.state = 449 self.match(HogQLParser.JOIN) - self.state = 410 + self.state = 450 self.columnExprList() except RecognitionException as re: localctx.exception = re @@ -2917,39 +3195,39 @@ def accept(self, visitor:ParseTreeVisitor): def windowClause(self): localctx = HogQLParser.WindowClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 52, self.RULE_windowClause) + self.enterRule(localctx, 58, self.RULE_windowClause) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 412 + self.state = 452 self.match(HogQLParser.WINDOW) - self.state = 413 + self.state = 453 self.identifier() - self.state = 414 + self.state = 454 self.match(HogQLParser.AS) - self.state = 415 + self.state = 455 self.match(HogQLParser.LPAREN) - self.state = 416 + self.state = 456 self.windowExpr() - self.state = 417 + self.state = 457 self.match(HogQLParser.RPAREN) - self.state = 427 + self.state = 467 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==112: - self.state = 418 + while _la==116: + self.state = 458 self.match(HogQLParser.COMMA) - self.state = 419 + self.state = 459 self.identifier() - self.state = 420 + self.state = 460 self.match(HogQLParser.AS) - self.state = 421 + self.state = 461 self.match(HogQLParser.LPAREN) - self.state = 422 + self.state = 462 self.windowExpr() - self.state = 423 + self.state = 463 self.match(HogQLParser.RPAREN) - self.state = 429 + self.state = 469 self._errHandler.sync(self) _la = self._input.LA(1) @@ -2991,12 +3269,12 @@ def accept(self, visitor:ParseTreeVisitor): def prewhereClause(self): localctx = HogQLParser.PrewhereClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 54, self.RULE_prewhereClause) + self.enterRule(localctx, 60, self.RULE_prewhereClause) try: self.enterOuterAlt(localctx, 1) - self.state = 430 + self.state = 470 self.match(HogQLParser.PREWHERE) - self.state = 431 + self.state = 471 self.columnExpr(0) except RecognitionException as re: localctx.exception = re @@ -3036,12 +3314,12 @@ def accept(self, visitor:ParseTreeVisitor): def whereClause(self): localctx = HogQLParser.WhereClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 56, self.RULE_whereClause) + self.enterRule(localctx, 62, self.RULE_whereClause) try: self.enterOuterAlt(localctx, 1) - self.state = 433 + self.state = 473 self.match(HogQLParser.WHERE) - self.state = 434 + self.state = 474 self.columnExpr(0) except RecognitionException as re: localctx.exception = re @@ -3096,35 +3374,35 @@ def accept(self, visitor:ParseTreeVisitor): def groupByClause(self): localctx = HogQLParser.GroupByClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 58, self.RULE_groupByClause) + self.enterRule(localctx, 64, self.RULE_groupByClause) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 436 + self.state = 476 self.match(HogQLParser.GROUP) - self.state = 437 + self.state = 477 self.match(HogQLParser.BY) - self.state = 444 + self.state = 484 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,42,self._ctx) + la_ = self._interp.adaptivePredict(self._input,48,self._ctx) if la_ == 1: - self.state = 438 + self.state = 478 _la = self._input.LA(1) - if not(_la==17 or _la==72): + if not(_la==18 or _la==74): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 439 + self.state = 479 self.match(HogQLParser.LPAREN) - self.state = 440 + self.state = 480 self.columnExprList() - self.state = 441 + self.state = 481 self.match(HogQLParser.RPAREN) pass elif la_ == 2: - self.state = 443 + self.state = 483 self.columnExprList() pass @@ -3167,12 +3445,12 @@ def accept(self, visitor:ParseTreeVisitor): def havingClause(self): localctx = HogQLParser.HavingClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 60, self.RULE_havingClause) + self.enterRule(localctx, 66, self.RULE_havingClause) try: self.enterOuterAlt(localctx, 1) - self.state = 446 + self.state = 486 self.match(HogQLParser.HAVING) - self.state = 447 + self.state = 487 self.columnExpr(0) except RecognitionException as re: localctx.exception = re @@ -3215,14 +3493,14 @@ def accept(self, visitor:ParseTreeVisitor): def orderByClause(self): localctx = HogQLParser.OrderByClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 62, self.RULE_orderByClause) + self.enterRule(localctx, 68, self.RULE_orderByClause) try: self.enterOuterAlt(localctx, 1) - self.state = 449 + self.state = 489 self.match(HogQLParser.ORDER) - self.state = 450 + self.state = 490 self.match(HogQLParser.BY) - self.state = 451 + self.state = 491 self.orderExprList() except RecognitionException as re: localctx.exception = re @@ -3265,14 +3543,14 @@ def accept(self, visitor:ParseTreeVisitor): def projectionOrderByClause(self): localctx = HogQLParser.ProjectionOrderByClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 64, self.RULE_projectionOrderByClause) + self.enterRule(localctx, 70, self.RULE_projectionOrderByClause) try: self.enterOuterAlt(localctx, 1) - self.state = 453 + self.state = 493 self.match(HogQLParser.ORDER) - self.state = 454 + self.state = 494 self.match(HogQLParser.BY) - self.state = 455 + self.state = 495 self.columnExprList() except RecognitionException as re: localctx.exception = re @@ -3334,44 +3612,44 @@ def accept(self, visitor:ParseTreeVisitor): def limitAndOffsetClause(self): localctx = HogQLParser.LimitAndOffsetClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 66, self.RULE_limitAndOffsetClause) + self.enterRule(localctx, 72, self.RULE_limitAndOffsetClause) self._la = 0 # Token type try: - self.state = 486 + self.state = 526 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,47,self._ctx) + la_ = self._interp.adaptivePredict(self._input,53,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 457 + self.state = 497 self.match(HogQLParser.LIMIT) - self.state = 458 + self.state = 498 self.columnExpr(0) - self.state = 461 + self.state = 501 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 459 + if _la==116: + self.state = 499 self.match(HogQLParser.COMMA) - self.state = 460 + self.state = 500 self.columnExpr(0) - self.state = 467 + self.state = 507 self._errHandler.sync(self) token = self._input.LA(1) - if token in [98]: - self.state = 463 + if token in [102]: + self.state = 503 self.match(HogQLParser.WITH) - self.state = 464 + self.state = 504 self.match(HogQLParser.TIES) pass elif token in [11]: - self.state = 465 + self.state = 505 self.match(HogQLParser.BY) - self.state = 466 + self.state = 506 self.columnExprList() pass - elif token in [-1, 79, 91, 145]: + elif token in [-1, 81, 95, 149]: pass else: pass @@ -3379,43 +3657,43 @@ def limitAndOffsetClause(self): elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 469 + self.state = 509 self.match(HogQLParser.LIMIT) - self.state = 470 + self.state = 510 self.columnExpr(0) - self.state = 473 + self.state = 513 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==98: - self.state = 471 + if _la==102: + self.state = 511 self.match(HogQLParser.WITH) - self.state = 472 + self.state = 512 self.match(HogQLParser.TIES) - self.state = 475 + self.state = 515 self.match(HogQLParser.OFFSET) - self.state = 476 + self.state = 516 self.columnExpr(0) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 478 + self.state = 518 self.match(HogQLParser.LIMIT) - self.state = 479 + self.state = 519 self.columnExpr(0) - self.state = 480 + self.state = 520 self.match(HogQLParser.OFFSET) - self.state = 481 + self.state = 521 self.columnExpr(0) - self.state = 484 + self.state = 524 self._errHandler.sync(self) _la = self._input.LA(1) if _la==11: - self.state = 482 + self.state = 522 self.match(HogQLParser.BY) - self.state = 483 + self.state = 523 self.columnExprList() @@ -3460,12 +3738,12 @@ def accept(self, visitor:ParseTreeVisitor): def offsetOnlyClause(self): localctx = HogQLParser.OffsetOnlyClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 68, self.RULE_offsetOnlyClause) + self.enterRule(localctx, 74, self.RULE_offsetOnlyClause) try: self.enterOuterAlt(localctx, 1) - self.state = 488 + self.state = 528 self.match(HogQLParser.OFFSET) - self.state = 489 + self.state = 529 self.columnExpr(0) except RecognitionException as re: localctx.exception = re @@ -3505,12 +3783,12 @@ def accept(self, visitor:ParseTreeVisitor): def settingsClause(self): localctx = HogQLParser.SettingsClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 70, self.RULE_settingsClause) + self.enterRule(localctx, 76, self.RULE_settingsClause) try: self.enterOuterAlt(localctx, 1) - self.state = 491 + self.state = 531 self.match(HogQLParser.SETTINGS) - self.state = 492 + self.state = 532 self.settingExprList() except RecognitionException as re: localctx.exception = re @@ -3637,34 +3915,34 @@ def joinExpr(self, _p:int=0): _parentState = self.state localctx = HogQLParser.JoinExprContext(self, self._ctx, _parentState) _prevctx = localctx - _startState = 72 - self.enterRecursionRule(localctx, 72, self.RULE_joinExpr, _p) + _startState = 78 + self.enterRecursionRule(localctx, 78, self.RULE_joinExpr, _p) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 506 + self.state = 546 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,50,self._ctx) + la_ = self._interp.adaptivePredict(self._input,56,self._ctx) if la_ == 1: localctx = HogQLParser.JoinExprTableContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 495 + self.state = 535 self.tableExpr(0) - self.state = 497 + self.state = 537 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,48,self._ctx) + la_ = self._interp.adaptivePredict(self._input,54,self._ctx) if la_ == 1: - self.state = 496 + self.state = 536 self.match(HogQLParser.FINAL) - self.state = 500 + self.state = 540 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,49,self._ctx) + la_ = self._interp.adaptivePredict(self._input,55,self._ctx) if la_ == 1: - self.state = 499 + self.state = 539 self.sampleClause() @@ -3674,67 +3952,67 @@ def joinExpr(self, _p:int=0): localctx = HogQLParser.JoinExprParensContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 502 + self.state = 542 self.match(HogQLParser.LPAREN) - self.state = 503 + self.state = 543 self.joinExpr(0) - self.state = 504 + self.state = 544 self.match(HogQLParser.RPAREN) pass self._ctx.stop = self._input.LT(-1) - self.state = 522 + self.state = 562 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,53,self._ctx) + _alt = self._interp.adaptivePredict(self._input,59,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 520 + self.state = 560 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,52,self._ctx) + la_ = self._interp.adaptivePredict(self._input,58,self._ctx) if la_ == 1: localctx = HogQLParser.JoinExprCrossOpContext(self, HogQLParser.JoinExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_joinExpr) - self.state = 508 + self.state = 548 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") - self.state = 509 + self.state = 549 self.joinOpCross() - self.state = 510 + self.state = 550 self.joinExpr(4) pass elif la_ == 2: localctx = HogQLParser.JoinExprOpContext(self, HogQLParser.JoinExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_joinExpr) - self.state = 512 + self.state = 552 if not self.precpred(self._ctx, 4): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") - self.state = 514 + self.state = 554 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 567356589867290) != 0) or _la==71 or _la==78: - self.state = 513 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 2269426359468314) != 0) or _la==73 or _la==80: + self.state = 553 self.joinOp() - self.state = 516 + self.state = 556 self.match(HogQLParser.JOIN) - self.state = 517 + self.state = 557 self.joinExpr(0) - self.state = 518 + self.state = 558 self.joinConstraintClause() pass - self.state = 524 + self.state = 564 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,53,self._ctx) + _alt = self._interp.adaptivePredict(self._input,59,self._ctx) except RecognitionException as re: localctx.exception = re @@ -3840,24 +4118,24 @@ def accept(self, visitor:ParseTreeVisitor): def joinOp(self): localctx = HogQLParser.JoinOpContext(self, self._ctx, self.state) - self.enterRule(localctx, 74, self.RULE_joinOp) + self.enterRule(localctx, 80, self.RULE_joinOp) self._la = 0 # Token type try: - self.state = 568 + self.state = 608 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,67,self._ctx) + la_ = self._interp.adaptivePredict(self._input,73,self._ctx) if la_ == 1: localctx = HogQLParser.JoinOpInnerContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 534 + self.state = 574 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,56,self._ctx) + la_ = self._interp.adaptivePredict(self._input,62,self._ctx) if la_ == 1: - self.state = 526 + self.state = 566 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0): - self.state = 525 + self.state = 565 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)): self._errHandler.recoverInline(self) @@ -3866,18 +4144,18 @@ def joinOp(self): self.consume() - self.state = 528 + self.state = 568 self.match(HogQLParser.INNER) pass elif la_ == 2: - self.state = 529 + self.state = 569 self.match(HogQLParser.INNER) - self.state = 531 + self.state = 571 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0): - self.state = 530 + self.state = 570 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)): self._errHandler.recoverInline(self) @@ -3889,7 +4167,7 @@ def joinOp(self): pass elif la_ == 3: - self.state = 533 + self.state = 573 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 274) != 0)): self._errHandler.recoverInline(self) @@ -3904,63 +4182,63 @@ def joinOp(self): elif la_ == 2: localctx = HogQLParser.JoinOpLeftRightContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 550 + self.state = 590 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,61,self._ctx) + la_ = self._interp.adaptivePredict(self._input,67,self._ctx) if la_ == 1: - self.state = 537 + self.state = 577 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==78: - self.state = 536 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==80: + self.state = 576 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==78): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==80): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 539 + self.state = 579 _la = self._input.LA(1) - if not(_la==49 or _la==71): + if not(_la==51 or _la==73): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 541 + self.state = 581 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==63: - self.state = 540 + if _la==65: + self.state = 580 self.match(HogQLParser.OUTER) pass elif la_ == 2: - self.state = 543 + self.state = 583 _la = self._input.LA(1) - if not(_la==49 or _la==71): + if not(_la==51 or _la==73): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 545 + self.state = 585 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==63: - self.state = 544 + if _la==65: + self.state = 584 self.match(HogQLParser.OUTER) - self.state = 548 + self.state = 588 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==78: - self.state = 547 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==80: + self.state = 587 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==78): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282) != 0) or _la==80): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -3975,15 +4253,15 @@ def joinOp(self): elif la_ == 3: localctx = HogQLParser.JoinOpFullContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 566 + self.state = 606 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,66,self._ctx) + la_ = self._interp.adaptivePredict(self._input,72,self._ctx) if la_ == 1: - self.state = 553 + self.state = 593 self._errHandler.sync(self) _la = self._input.LA(1) if _la==1 or _la==4: - self.state = 552 + self.state = 592 _la = self._input.LA(1) if not(_la==1 or _la==4): self._errHandler.recoverInline(self) @@ -3992,34 +4270,34 @@ def joinOp(self): self.consume() - self.state = 555 + self.state = 595 self.match(HogQLParser.FULL) - self.state = 557 + self.state = 597 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==63: - self.state = 556 + if _la==65: + self.state = 596 self.match(HogQLParser.OUTER) pass elif la_ == 2: - self.state = 559 + self.state = 599 self.match(HogQLParser.FULL) - self.state = 561 + self.state = 601 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==63: - self.state = 560 + if _la==65: + self.state = 600 self.match(HogQLParser.OUTER) - self.state = 564 + self.state = 604 self._errHandler.sync(self) _la = self._input.LA(1) if _la==1 or _la==4: - self.state = 563 + self.state = 603 _la = self._input.LA(1) if not(_la==1 or _la==4): self._errHandler.recoverInline(self) @@ -4074,21 +4352,21 @@ def accept(self, visitor:ParseTreeVisitor): def joinOpCross(self): localctx = HogQLParser.JoinOpCrossContext(self, self._ctx, self.state) - self.enterRule(localctx, 76, self.RULE_joinOpCross) + self.enterRule(localctx, 82, self.RULE_joinOpCross) try: - self.state = 573 + self.state = 613 self._errHandler.sync(self) token = self._input.LA(1) - if token in [16]: + if token in [17]: self.enterOuterAlt(localctx, 1) - self.state = 570 + self.state = 610 self.match(HogQLParser.CROSS) - self.state = 571 + self.state = 611 self.match(HogQLParser.JOIN) pass - elif token in [112]: + elif token in [116]: self.enterOuterAlt(localctx, 2) - self.state = 572 + self.state = 612 self.match(HogQLParser.COMMA) pass else: @@ -4141,36 +4419,36 @@ def accept(self, visitor:ParseTreeVisitor): def joinConstraintClause(self): localctx = HogQLParser.JoinConstraintClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 78, self.RULE_joinConstraintClause) + self.enterRule(localctx, 84, self.RULE_joinConstraintClause) try: - self.state = 584 + self.state = 624 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,69,self._ctx) + la_ = self._interp.adaptivePredict(self._input,75,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 575 + self.state = 615 self.match(HogQLParser.ON) - self.state = 576 + self.state = 616 self.columnExprList() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 577 + self.state = 617 self.match(HogQLParser.USING) - self.state = 578 + self.state = 618 self.match(HogQLParser.LPAREN) - self.state = 579 + self.state = 619 self.columnExprList() - self.state = 580 + self.state = 620 self.match(HogQLParser.RPAREN) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 582 + self.state = 622 self.match(HogQLParser.USING) - self.state = 583 + self.state = 623 self.columnExprList() pass @@ -4219,20 +4497,20 @@ def accept(self, visitor:ParseTreeVisitor): def sampleClause(self): localctx = HogQLParser.SampleClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 80, self.RULE_sampleClause) + self.enterRule(localctx, 86, self.RULE_sampleClause) try: self.enterOuterAlt(localctx, 1) - self.state = 586 + self.state = 626 self.match(HogQLParser.SAMPLE) - self.state = 587 + self.state = 627 self.ratioExpr() - self.state = 590 + self.state = 630 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,70,self._ctx) + la_ = self._interp.adaptivePredict(self._input,76,self._ctx) if la_ == 1: - self.state = 588 + self.state = 628 self.match(HogQLParser.OFFSET) - self.state = 589 + self.state = 629 self.ratioExpr() @@ -4280,21 +4558,21 @@ def accept(self, visitor:ParseTreeVisitor): def orderExprList(self): localctx = HogQLParser.OrderExprListContext(self, self._ctx, self.state) - self.enterRule(localctx, 82, self.RULE_orderExprList) + self.enterRule(localctx, 88, self.RULE_orderExprList) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 592 + self.state = 632 self.orderExpr() - self.state = 597 + self.state = 637 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==112: - self.state = 593 + while _la==116: + self.state = 633 self.match(HogQLParser.COMMA) - self.state = 594 + self.state = 634 self.orderExpr() - self.state = 599 + self.state = 639 self._errHandler.sync(self) _la = self._input.LA(1) @@ -4357,47 +4635,47 @@ def accept(self, visitor:ParseTreeVisitor): def orderExpr(self): localctx = HogQLParser.OrderExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 84, self.RULE_orderExpr) + self.enterRule(localctx, 90, self.RULE_orderExpr) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 600 + self.state = 640 self.columnExpr(0) - self.state = 602 + self.state = 642 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & 6291584) != 0): - self.state = 601 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 12583040) != 0): + self.state = 641 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 6291584) != 0)): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 12583040) != 0)): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 606 + self.state = 646 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==58: - self.state = 604 + if _la==60: + self.state = 644 self.match(HogQLParser.NULLS) - self.state = 605 + self.state = 645 _la = self._input.LA(1) - if not(_la==28 or _la==47): + if not(_la==30 or _la==49): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 610 + self.state = 650 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==15: - self.state = 608 + if _la==16: + self.state = 648 self.match(HogQLParser.COLLATE) - self.state = 609 + self.state = 649 self.match(HogQLParser.STRING_LITERAL) @@ -4446,27 +4724,27 @@ def accept(self, visitor:ParseTreeVisitor): def ratioExpr(self): localctx = HogQLParser.RatioExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 86, self.RULE_ratioExpr) + self.enterRule(localctx, 92, self.RULE_ratioExpr) try: - self.state = 618 + self.state = 658 self._errHandler.sync(self) token = self._input.LA(1) - if token in [124]: + if token in [128]: self.enterOuterAlt(localctx, 1) - self.state = 612 + self.state = 652 self.placeholder() pass - elif token in [41, 55, 102, 103, 104, 105, 114, 116, 135]: + elif token in [43, 57, 106, 107, 108, 109, 118, 120, 139]: self.enterOuterAlt(localctx, 2) - self.state = 613 + self.state = 653 self.numberLiteral() - self.state = 616 + self.state = 656 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,75,self._ctx) + la_ = self._interp.adaptivePredict(self._input,81,self._ctx) if la_ == 1: - self.state = 614 + self.state = 654 self.match(HogQLParser.SLASH) - self.state = 615 + self.state = 655 self.numberLiteral() @@ -4518,21 +4796,21 @@ def accept(self, visitor:ParseTreeVisitor): def settingExprList(self): localctx = HogQLParser.SettingExprListContext(self, self._ctx, self.state) - self.enterRule(localctx, 88, self.RULE_settingExprList) + self.enterRule(localctx, 94, self.RULE_settingExprList) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 620 + self.state = 660 self.settingExpr() - self.state = 625 + self.state = 665 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==112: - self.state = 621 + while _la==116: + self.state = 661 self.match(HogQLParser.COMMA) - self.state = 622 + self.state = 662 self.settingExpr() - self.state = 627 + self.state = 667 self._errHandler.sync(self) _la = self._input.LA(1) @@ -4578,14 +4856,14 @@ def accept(self, visitor:ParseTreeVisitor): def settingExpr(self): localctx = HogQLParser.SettingExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 90, self.RULE_settingExpr) + self.enterRule(localctx, 96, self.RULE_settingExpr) try: self.enterOuterAlt(localctx, 1) - self.state = 628 + self.state = 668 self.identifier() - self.state = 629 + self.state = 669 self.match(HogQLParser.EQ_SINGLE) - self.state = 630 + self.state = 670 self.literal() except RecognitionException as re: localctx.exception = re @@ -4630,31 +4908,31 @@ def accept(self, visitor:ParseTreeVisitor): def windowExpr(self): localctx = HogQLParser.WindowExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 92, self.RULE_windowExpr) + self.enterRule(localctx, 98, self.RULE_windowExpr) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 633 + self.state = 673 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==65: - self.state = 632 + if _la==67: + self.state = 672 self.winPartitionByClause() - self.state = 636 + self.state = 676 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==62: - self.state = 635 + if _la==64: + self.state = 675 self.winOrderByClause() - self.state = 639 + self.state = 679 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==69 or _la==74: - self.state = 638 + if _la==71 or _la==76: + self.state = 678 self.winFrameClause() @@ -4699,14 +4977,14 @@ def accept(self, visitor:ParseTreeVisitor): def winPartitionByClause(self): localctx = HogQLParser.WinPartitionByClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 94, self.RULE_winPartitionByClause) + self.enterRule(localctx, 100, self.RULE_winPartitionByClause) try: self.enterOuterAlt(localctx, 1) - self.state = 641 + self.state = 681 self.match(HogQLParser.PARTITION) - self.state = 642 + self.state = 682 self.match(HogQLParser.BY) - self.state = 643 + self.state = 683 self.columnExprList() except RecognitionException as re: localctx.exception = re @@ -4749,14 +5027,14 @@ def accept(self, visitor:ParseTreeVisitor): def winOrderByClause(self): localctx = HogQLParser.WinOrderByClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 96, self.RULE_winOrderByClause) + self.enterRule(localctx, 102, self.RULE_winOrderByClause) try: self.enterOuterAlt(localctx, 1) - self.state = 645 + self.state = 685 self.match(HogQLParser.ORDER) - self.state = 646 + self.state = 686 self.match(HogQLParser.BY) - self.state = 647 + self.state = 687 self.orderExprList() except RecognitionException as re: localctx.exception = re @@ -4799,18 +5077,18 @@ def accept(self, visitor:ParseTreeVisitor): def winFrameClause(self): localctx = HogQLParser.WinFrameClauseContext(self, self._ctx, self.state) - self.enterRule(localctx, 98, self.RULE_winFrameClause) + self.enterRule(localctx, 104, self.RULE_winFrameClause) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 649 + self.state = 689 _la = self._input.LA(1) - if not(_la==69 or _la==74): + if not(_la==71 or _la==76): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 650 + self.state = 690 self.winFrameExtend() except RecognitionException as re: localctx.exception = re @@ -4883,27 +5161,27 @@ def accept(self, visitor:ParseTreeVisitor): def winFrameExtend(self): localctx = HogQLParser.WinFrameExtendContext(self, self._ctx, self.state) - self.enterRule(localctx, 100, self.RULE_winFrameExtend) + self.enterRule(localctx, 106, self.RULE_winFrameExtend) try: - self.state = 658 + self.state = 698 self._errHandler.sync(self) token = self._input.LA(1) - if token in [18, 41, 55, 90, 102, 103, 104, 105, 114, 116, 135]: + if token in [19, 43, 57, 94, 106, 107, 108, 109, 118, 120, 139]: localctx = HogQLParser.FrameStartContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 652 + self.state = 692 self.winFrameBound() pass elif token in [9]: localctx = HogQLParser.FrameBetweenContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 653 + self.state = 693 self.match(HogQLParser.BETWEEN) - self.state = 654 + self.state = 694 self.winFrameBound() - self.state = 655 + self.state = 695 self.match(HogQLParser.AND) - self.state = 656 + self.state = 696 self.winFrameBound() pass else: @@ -4959,44 +5237,44 @@ def accept(self, visitor:ParseTreeVisitor): def winFrameBound(self): localctx = HogQLParser.WinFrameBoundContext(self, self._ctx, self.state) - self.enterRule(localctx, 102, self.RULE_winFrameBound) + self.enterRule(localctx, 108, self.RULE_winFrameBound) try: self.enterOuterAlt(localctx, 1) - self.state = 672 + self.state = 712 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,82,self._ctx) + la_ = self._interp.adaptivePredict(self._input,88,self._ctx) if la_ == 1: - self.state = 660 + self.state = 700 self.match(HogQLParser.CURRENT) - self.state = 661 + self.state = 701 self.match(HogQLParser.ROW) pass elif la_ == 2: - self.state = 662 + self.state = 702 self.match(HogQLParser.UNBOUNDED) - self.state = 663 + self.state = 703 self.match(HogQLParser.PRECEDING) pass elif la_ == 3: - self.state = 664 + self.state = 704 self.match(HogQLParser.UNBOUNDED) - self.state = 665 + self.state = 705 self.match(HogQLParser.FOLLOWING) pass elif la_ == 4: - self.state = 666 + self.state = 706 self.numberLiteral() - self.state = 667 + self.state = 707 self.match(HogQLParser.PRECEDING) pass elif la_ == 5: - self.state = 669 + self.state = 709 self.numberLiteral() - self.state = 670 + self.state = 710 self.match(HogQLParser.FOLLOWING) pass @@ -5039,12 +5317,12 @@ def accept(self, visitor:ParseTreeVisitor): def expr(self): localctx = HogQLParser.ExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 104, self.RULE_expr) + self.enterRule(localctx, 110, self.RULE_expr) try: self.enterOuterAlt(localctx, 1) - self.state = 674 + self.state = 714 self.columnExpr(0) - self.state = 675 + self.state = 715 self.match(HogQLParser.EOF) except RecognitionException as re: localctx.exception = re @@ -5216,141 +5494,141 @@ def accept(self, visitor:ParseTreeVisitor): def columnTypeExpr(self): localctx = HogQLParser.ColumnTypeExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 106, self.RULE_columnTypeExpr) + self.enterRule(localctx, 112, self.RULE_columnTypeExpr) self._la = 0 # Token type try: - self.state = 733 + self.state = 773 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,90,self._ctx) + la_ = self._interp.adaptivePredict(self._input,96,self._ctx) if la_ == 1: localctx = HogQLParser.ColumnTypeExprSimpleContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 677 + self.state = 717 self.identifier() pass elif la_ == 2: localctx = HogQLParser.ColumnTypeExprNestedContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 678 + self.state = 718 self.identifier() - self.state = 679 + self.state = 719 self.match(HogQLParser.LPAREN) - self.state = 680 + self.state = 720 self.identifier() - self.state = 681 + self.state = 721 self.columnTypeExpr() - self.state = 688 + self.state = 728 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,83,self._ctx) + _alt = self._interp.adaptivePredict(self._input,89,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 682 + self.state = 722 self.match(HogQLParser.COMMA) - self.state = 683 + self.state = 723 self.identifier() - self.state = 684 + self.state = 724 self.columnTypeExpr() - self.state = 690 + self.state = 730 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,83,self._ctx) + _alt = self._interp.adaptivePredict(self._input,89,self._ctx) - self.state = 692 + self.state = 732 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 691 + if _la==116: + self.state = 731 self.match(HogQLParser.COMMA) - self.state = 694 + self.state = 734 self.match(HogQLParser.RPAREN) pass elif la_ == 3: localctx = HogQLParser.ColumnTypeExprEnumContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 696 + self.state = 736 self.identifier() - self.state = 697 + self.state = 737 self.match(HogQLParser.LPAREN) - self.state = 698 + self.state = 738 self.enumValue() - self.state = 703 + self.state = 743 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,85,self._ctx) + _alt = self._interp.adaptivePredict(self._input,91,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 699 + self.state = 739 self.match(HogQLParser.COMMA) - self.state = 700 + self.state = 740 self.enumValue() - self.state = 705 + self.state = 745 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,85,self._ctx) + _alt = self._interp.adaptivePredict(self._input,91,self._ctx) - self.state = 707 + self.state = 747 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 706 + if _la==116: + self.state = 746 self.match(HogQLParser.COMMA) - self.state = 709 + self.state = 749 self.match(HogQLParser.RPAREN) pass elif la_ == 4: localctx = HogQLParser.ColumnTypeExprComplexContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 711 + self.state = 751 self.identifier() - self.state = 712 + self.state = 752 self.match(HogQLParser.LPAREN) - self.state = 713 + self.state = 753 self.columnTypeExpr() - self.state = 718 + self.state = 758 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,87,self._ctx) + _alt = self._interp.adaptivePredict(self._input,93,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 714 + self.state = 754 self.match(HogQLParser.COMMA) - self.state = 715 + self.state = 755 self.columnTypeExpr() - self.state = 720 + self.state = 760 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,87,self._ctx) + _alt = self._interp.adaptivePredict(self._input,93,self._ctx) - self.state = 722 + self.state = 762 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 721 + if _la==116: + self.state = 761 self.match(HogQLParser.COMMA) - self.state = 724 + self.state = 764 self.match(HogQLParser.RPAREN) pass elif la_ == 5: localctx = HogQLParser.ColumnTypeExprParamContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 726 + self.state = 766 self.identifier() - self.state = 727 + self.state = 767 self.match(HogQLParser.LPAREN) - self.state = 729 + self.state = 769 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 728 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 768 self.columnExprList() - self.state = 731 + self.state = 771 self.match(HogQLParser.RPAREN) pass @@ -5399,29 +5677,29 @@ def accept(self, visitor:ParseTreeVisitor): def columnExprList(self): localctx = HogQLParser.ColumnExprListContext(self, self._ctx, self.state) - self.enterRule(localctx, 108, self.RULE_columnExprList) + self.enterRule(localctx, 114, self.RULE_columnExprList) try: self.enterOuterAlt(localctx, 1) - self.state = 735 + self.state = 775 self.columnExpr(0) - self.state = 740 + self.state = 780 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,91,self._ctx) + _alt = self._interp.adaptivePredict(self._input,97,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 736 + self.state = 776 self.match(HogQLParser.COMMA) - self.state = 737 + self.state = 777 self.columnExpr(0) - self.state = 742 + self.state = 782 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,91,self._ctx) + _alt = self._interp.adaptivePredict(self._input,97,self._ctx) - self.state = 744 + self.state = 784 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,92,self._ctx) + la_ = self._interp.adaptivePredict(self._input,98,self._ctx) if la_ == 1: - self.state = 743 + self.state = 783 self.match(HogQLParser.COMMA) @@ -6409,58 +6687,58 @@ def columnExpr(self, _p:int=0): _parentState = self.state localctx = HogQLParser.ColumnExprContext(self, self._ctx, _parentState) _prevctx = localctx - _startState = 110 - self.enterRecursionRule(localctx, 110, self.RULE_columnExpr, _p) + _startState = 116 + self.enterRecursionRule(localctx, 116, self.RULE_columnExpr, _p) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 895 + self.state = 935 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,112,self._ctx) + la_ = self._interp.adaptivePredict(self._input,118,self._ctx) if la_ == 1: localctx = HogQLParser.ColumnExprCaseContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 747 + self.state = 787 self.match(HogQLParser.CASE) - self.state = 749 + self.state = 789 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,93,self._ctx) + la_ = self._interp.adaptivePredict(self._input,99,self._ctx) if la_ == 1: - self.state = 748 + self.state = 788 localctx.caseExpr = self.columnExpr(0) - self.state = 756 + self.state = 796 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 751 + self.state = 791 self.match(HogQLParser.WHEN) - self.state = 752 + self.state = 792 localctx.whenExpr = self.columnExpr(0) - self.state = 753 + self.state = 793 self.match(HogQLParser.THEN) - self.state = 754 + self.state = 794 localctx.thenExpr = self.columnExpr(0) - self.state = 758 + self.state = 798 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==94): + if not (_la==98): break - self.state = 762 + self.state = 802 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==24: - self.state = 760 + if _la==25: + self.state = 800 self.match(HogQLParser.ELSE) - self.state = 761 + self.state = 801 localctx.elseExpr = self.columnExpr(0) - self.state = 764 + self.state = 804 self.match(HogQLParser.END) pass @@ -6468,17 +6746,17 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprCastContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 766 + self.state = 806 self.match(HogQLParser.CAST) - self.state = 767 + self.state = 807 self.match(HogQLParser.LPAREN) - self.state = 768 + self.state = 808 self.columnExpr(0) - self.state = 769 + self.state = 809 self.match(HogQLParser.AS) - self.state = 770 + self.state = 810 self.columnTypeExpr() - self.state = 771 + self.state = 811 self.match(HogQLParser.RPAREN) pass @@ -6486,9 +6764,9 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprDateContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 773 + self.state = 813 self.match(HogQLParser.DATE) - self.state = 774 + self.state = 814 self.match(HogQLParser.STRING_LITERAL) pass @@ -6496,11 +6774,11 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprIntervalContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 775 + self.state = 815 self.match(HogQLParser.INTERVAL) - self.state = 776 + self.state = 816 self.columnExpr(0) - self.state = 777 + self.state = 817 self.interval() pass @@ -6508,27 +6786,27 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprSubstringContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 779 + self.state = 819 self.match(HogQLParser.SUBSTRING) - self.state = 780 + self.state = 820 self.match(HogQLParser.LPAREN) - self.state = 781 + self.state = 821 self.columnExpr(0) - self.state = 782 + self.state = 822 self.match(HogQLParser.FROM) - self.state = 783 + self.state = 823 self.columnExpr(0) - self.state = 786 + self.state = 826 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==31: - self.state = 784 + if _la==33: + self.state = 824 self.match(HogQLParser.FOR) - self.state = 785 + self.state = 825 self.columnExpr(0) - self.state = 788 + self.state = 828 self.match(HogQLParser.RPAREN) pass @@ -6536,9 +6814,9 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprTimestampContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 790 + self.state = 830 self.match(HogQLParser.TIMESTAMP) - self.state = 791 + self.state = 831 self.match(HogQLParser.STRING_LITERAL) pass @@ -6546,24 +6824,24 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprTrimContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 792 + self.state = 832 self.match(HogQLParser.TRIM) - self.state = 793 + self.state = 833 self.match(HogQLParser.LPAREN) - self.state = 794 + self.state = 834 _la = self._input.LA(1) - if not(_la==10 or _la==48 or _la==87): + if not(_la==10 or _la==50 or _la==90): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 795 + self.state = 835 self.string() - self.state = 796 + self.state = 836 self.match(HogQLParser.FROM) - self.state = 797 + self.state = 837 self.columnExpr(0) - self.state = 798 + self.state = 838 self.match(HogQLParser.RPAREN) pass @@ -6571,54 +6849,54 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprWinFunctionContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 800 + self.state = 840 self.identifier() - self.state = 801 + self.state = 841 self.match(HogQLParser.LPAREN) - self.state = 803 + self.state = 843 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 802 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 842 self.columnExprList() - self.state = 805 + self.state = 845 self.match(HogQLParser.RPAREN) - self.state = 815 + self.state = 855 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==126: - self.state = 807 + if _la==130: + self.state = 847 self.match(HogQLParser.LPAREN) - self.state = 809 + self.state = 849 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,98,self._ctx) + la_ = self._interp.adaptivePredict(self._input,104,self._ctx) if la_ == 1: - self.state = 808 + self.state = 848 self.match(HogQLParser.DISTINCT) - self.state = 812 + self.state = 852 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 811 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 851 self.columnArgList() - self.state = 814 + self.state = 854 self.match(HogQLParser.RPAREN) - self.state = 817 + self.state = 857 self.match(HogQLParser.OVER) - self.state = 818 + self.state = 858 self.match(HogQLParser.LPAREN) - self.state = 819 + self.state = 859 self.windowExpr() - self.state = 820 + self.state = 860 self.match(HogQLParser.RPAREN) pass @@ -6626,50 +6904,50 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprWinFunctionTargetContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 822 + self.state = 862 self.identifier() - self.state = 823 + self.state = 863 self.match(HogQLParser.LPAREN) - self.state = 825 + self.state = 865 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 824 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 864 self.columnExprList() - self.state = 827 + self.state = 867 self.match(HogQLParser.RPAREN) - self.state = 837 + self.state = 877 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==126: - self.state = 829 + if _la==130: + self.state = 869 self.match(HogQLParser.LPAREN) - self.state = 831 + self.state = 871 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,102,self._ctx) + la_ = self._interp.adaptivePredict(self._input,108,self._ctx) if la_ == 1: - self.state = 830 + self.state = 870 self.match(HogQLParser.DISTINCT) - self.state = 834 + self.state = 874 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 833 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 873 self.columnArgList() - self.state = 836 + self.state = 876 self.match(HogQLParser.RPAREN) - self.state = 839 + self.state = 879 self.match(HogQLParser.OVER) - self.state = 840 + self.state = 880 self.identifier() pass @@ -6677,45 +6955,45 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprFunctionContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 842 + self.state = 882 self.identifier() - self.state = 848 + self.state = 888 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,106,self._ctx) + la_ = self._interp.adaptivePredict(self._input,112,self._ctx) if la_ == 1: - self.state = 843 + self.state = 883 self.match(HogQLParser.LPAREN) - self.state = 845 + self.state = 885 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 844 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 884 self.columnExprList() - self.state = 847 + self.state = 887 self.match(HogQLParser.RPAREN) - self.state = 850 + self.state = 890 self.match(HogQLParser.LPAREN) - self.state = 852 + self.state = 892 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,107,self._ctx) + la_ = self._interp.adaptivePredict(self._input,113,self._ctx) if la_ == 1: - self.state = 851 + self.state = 891 self.match(HogQLParser.DISTINCT) - self.state = 855 + self.state = 895 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 854 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 894 self.columnArgList() - self.state = 857 + self.state = 897 self.match(HogQLParser.RPAREN) pass @@ -6723,7 +7001,7 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprTagElementContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 859 + self.state = 899 self.hogqlxTagElement() pass @@ -6731,7 +7009,7 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprTemplateStringContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 860 + self.state = 900 self.templateString() pass @@ -6739,7 +7017,7 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprLiteralContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 861 + self.state = 901 self.literal() pass @@ -6747,9 +7025,9 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprNegateContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 862 + self.state = 902 self.match(HogQLParser.DASH) - self.state = 863 + self.state = 903 self.columnExpr(19) pass @@ -6757,9 +7035,9 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprNotContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 864 + self.state = 904 self.match(HogQLParser.NOT) - self.state = 865 + self.state = 905 self.columnExpr(13) pass @@ -6767,17 +7045,17 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprAsteriskContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 869 + self.state = 909 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -181272084561788930) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 201863462911) != 0): - self.state = 866 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -725088338784043010) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 3229277487103) != 0): + self.state = 906 self.tableIdentifier() - self.state = 867 + self.state = 907 self.match(HogQLParser.DOT) - self.state = 871 + self.state = 911 self.match(HogQLParser.ASTERISK) pass @@ -6785,11 +7063,11 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprSubqueryContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 872 + self.state = 912 self.match(HogQLParser.LPAREN) - self.state = 873 + self.state = 913 self.selectUnionStmt() - self.state = 874 + self.state = 914 self.match(HogQLParser.RPAREN) pass @@ -6797,11 +7075,11 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprParensContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 876 + self.state = 916 self.match(HogQLParser.LPAREN) - self.state = 877 + self.state = 917 self.columnExpr(0) - self.state = 878 + self.state = 918 self.match(HogQLParser.RPAREN) pass @@ -6809,11 +7087,11 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprTupleContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 880 + self.state = 920 self.match(HogQLParser.LPAREN) - self.state = 881 + self.state = 921 self.columnExprList() - self.state = 882 + self.state = 922 self.match(HogQLParser.RPAREN) pass @@ -6821,17 +7099,17 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprArrayContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 884 + self.state = 924 self.match(HogQLParser.LBRACKET) - self.state = 886 + self.state = 926 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 885 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 925 self.columnExprList() - self.state = 888 + self.state = 928 self.match(HogQLParser.RBRACKET) pass @@ -6839,17 +7117,17 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprDictContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 889 + self.state = 929 self.match(HogQLParser.LBRACE) - self.state = 891 + self.state = 931 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 890 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 930 self.kvPairList() - self.state = 893 + self.state = 933 self.match(HogQLParser.RBRACE) pass @@ -6857,50 +7135,50 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprIdentifierContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 894 + self.state = 934 self.columnIdentifier() pass self._ctx.stop = self._input.LT(-1) - self.state = 1001 + self.state = 1041 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,123,self._ctx) + _alt = self._interp.adaptivePredict(self._input,129,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 999 + self.state = 1039 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,122,self._ctx) + la_ = self._interp.adaptivePredict(self._input,128,self._ctx) if la_ == 1: localctx = HogQLParser.ColumnExprPrecedence1Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 897 + self.state = 937 if not self.precpred(self._ctx, 18): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 18)") - self.state = 901 + self.state = 941 self._errHandler.sync(self) token = self._input.LA(1) - if token in [108]: - self.state = 898 + if token in [112]: + self.state = 938 localctx.operator = self.match(HogQLParser.ASTERISK) pass - elif token in [147]: - self.state = 899 + elif token in [151]: + self.state = 939 localctx.operator = self.match(HogQLParser.SLASH) pass - elif token in [134]: - self.state = 900 + elif token in [138]: + self.state = 940 localctx.operator = self.match(HogQLParser.PERCENT) pass else: raise NoViableAltException(self) - self.state = 903 + self.state = 943 localctx.right = self.columnExpr(19) pass @@ -6908,29 +7186,29 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprPrecedence2Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 904 + self.state = 944 if not self.precpred(self._ctx, 17): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 17)") - self.state = 908 + self.state = 948 self._errHandler.sync(self) token = self._input.LA(1) - if token in [135]: - self.state = 905 + if token in [139]: + self.state = 945 localctx.operator = self.match(HogQLParser.PLUS) pass - elif token in [114]: - self.state = 906 + elif token in [118]: + self.state = 946 localctx.operator = self.match(HogQLParser.DASH) pass - elif token in [113]: - self.state = 907 + elif token in [117]: + self.state = 947 localctx.operator = self.match(HogQLParser.CONCAT) pass else: raise NoViableAltException(self) - self.state = 910 + self.state = 950 localctx.right = self.columnExpr(18) pass @@ -6938,81 +7216,81 @@ def columnExpr(self, _p:int=0): localctx = HogQLParser.ColumnExprPrecedence3Context(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) localctx.left = _prevctx self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 911 + self.state = 951 if not self.precpred(self._ctx, 16): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 16)") - self.state = 936 + self.state = 976 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,118,self._ctx) + la_ = self._interp.adaptivePredict(self._input,124,self._ctx) if la_ == 1: - self.state = 912 + self.state = 952 localctx.operator = self.match(HogQLParser.EQ_DOUBLE) pass elif la_ == 2: - self.state = 913 + self.state = 953 localctx.operator = self.match(HogQLParser.EQ_SINGLE) pass elif la_ == 3: - self.state = 914 + self.state = 954 localctx.operator = self.match(HogQLParser.NOT_EQ) pass elif la_ == 4: - self.state = 915 + self.state = 955 localctx.operator = self.match(HogQLParser.LT_EQ) pass elif la_ == 5: - self.state = 916 + self.state = 956 localctx.operator = self.match(HogQLParser.LT) pass elif la_ == 6: - self.state = 917 + self.state = 957 localctx.operator = self.match(HogQLParser.GT_EQ) pass elif la_ == 7: - self.state = 918 + self.state = 958 localctx.operator = self.match(HogQLParser.GT) pass elif la_ == 8: - self.state = 920 + self.state = 960 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==56: - self.state = 919 + if _la==58: + self.state = 959 localctx.operator = self.match(HogQLParser.NOT) - self.state = 922 + self.state = 962 self.match(HogQLParser.IN) - self.state = 924 + self.state = 964 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,116,self._ctx) + la_ = self._interp.adaptivePredict(self._input,122,self._ctx) if la_ == 1: - self.state = 923 + self.state = 963 self.match(HogQLParser.COHORT) pass elif la_ == 9: - self.state = 927 + self.state = 967 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==56: - self.state = 926 + if _la==58: + self.state = 966 localctx.operator = self.match(HogQLParser.NOT) - self.state = 929 + self.state = 969 _la = self._input.LA(1) - if not(_la==39 or _la==51): + if not(_la==41 or _la==53): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -7020,247 +7298,247 @@ def columnExpr(self, _p:int=0): pass elif la_ == 10: - self.state = 930 + self.state = 970 localctx.operator = self.match(HogQLParser.REGEX_SINGLE) pass elif la_ == 11: - self.state = 931 + self.state = 971 localctx.operator = self.match(HogQLParser.REGEX_DOUBLE) pass elif la_ == 12: - self.state = 932 + self.state = 972 localctx.operator = self.match(HogQLParser.NOT_REGEX) pass elif la_ == 13: - self.state = 933 + self.state = 973 localctx.operator = self.match(HogQLParser.IREGEX_SINGLE) pass elif la_ == 14: - self.state = 934 + self.state = 974 localctx.operator = self.match(HogQLParser.IREGEX_DOUBLE) pass elif la_ == 15: - self.state = 935 + self.state = 975 localctx.operator = self.match(HogQLParser.NOT_IREGEX) pass - self.state = 938 + self.state = 978 localctx.right = self.columnExpr(17) pass elif la_ == 4: localctx = HogQLParser.ColumnExprNullishContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 939 + self.state = 979 if not self.precpred(self._ctx, 14): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 14)") - self.state = 940 + self.state = 980 self.match(HogQLParser.NULLISH) - self.state = 941 + self.state = 981 self.columnExpr(15) pass elif la_ == 5: localctx = HogQLParser.ColumnExprAndContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 942 + self.state = 982 if not self.precpred(self._ctx, 12): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 12)") - self.state = 943 + self.state = 983 self.match(HogQLParser.AND) - self.state = 944 + self.state = 984 self.columnExpr(13) pass elif la_ == 6: localctx = HogQLParser.ColumnExprOrContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 945 + self.state = 985 if not self.precpred(self._ctx, 11): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 11)") - self.state = 946 + self.state = 986 self.match(HogQLParser.OR) - self.state = 947 + self.state = 987 self.columnExpr(12) pass elif la_ == 7: localctx = HogQLParser.ColumnExprBetweenContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 948 + self.state = 988 if not self.precpred(self._ctx, 10): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 10)") - self.state = 950 + self.state = 990 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==56: - self.state = 949 + if _la==58: + self.state = 989 self.match(HogQLParser.NOT) - self.state = 952 + self.state = 992 self.match(HogQLParser.BETWEEN) - self.state = 953 + self.state = 993 self.columnExpr(0) - self.state = 954 + self.state = 994 self.match(HogQLParser.AND) - self.state = 955 + self.state = 995 self.columnExpr(11) pass elif la_ == 8: localctx = HogQLParser.ColumnExprTernaryOpContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 957 + self.state = 997 if not self.precpred(self._ctx, 9): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 9)") - self.state = 958 + self.state = 998 self.match(HogQLParser.QUERY) - self.state = 959 + self.state = 999 self.columnExpr(0) - self.state = 960 + self.state = 1000 self.match(HogQLParser.COLON) - self.state = 961 + self.state = 1001 self.columnExpr(9) pass elif la_ == 9: localctx = HogQLParser.ColumnExprArrayAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 963 + self.state = 1003 if not self.precpred(self._ctx, 25): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 25)") - self.state = 964 + self.state = 1004 self.match(HogQLParser.LBRACKET) - self.state = 965 + self.state = 1005 self.columnExpr(0) - self.state = 966 + self.state = 1006 self.match(HogQLParser.RBRACKET) pass elif la_ == 10: localctx = HogQLParser.ColumnExprTupleAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 968 + self.state = 1008 if not self.precpred(self._ctx, 24): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 24)") - self.state = 969 + self.state = 1009 self.match(HogQLParser.DOT) - self.state = 970 + self.state = 1010 self.match(HogQLParser.DECIMAL_LITERAL) pass elif la_ == 11: localctx = HogQLParser.ColumnExprPropertyAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 971 + self.state = 1011 if not self.precpred(self._ctx, 23): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 23)") - self.state = 972 + self.state = 1012 self.match(HogQLParser.DOT) - self.state = 973 + self.state = 1013 self.identifier() pass elif la_ == 12: localctx = HogQLParser.ColumnExprNullArrayAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 974 + self.state = 1014 if not self.precpred(self._ctx, 22): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 22)") - self.state = 975 + self.state = 1015 self.match(HogQLParser.NULL_PROPERTY) - self.state = 976 + self.state = 1016 self.match(HogQLParser.LBRACKET) - self.state = 977 + self.state = 1017 self.columnExpr(0) - self.state = 978 + self.state = 1018 self.match(HogQLParser.RBRACKET) pass elif la_ == 13: localctx = HogQLParser.ColumnExprNullTupleAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 980 + self.state = 1020 if not self.precpred(self._ctx, 21): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 21)") - self.state = 981 + self.state = 1021 self.match(HogQLParser.NULL_PROPERTY) - self.state = 982 + self.state = 1022 self.match(HogQLParser.DECIMAL_LITERAL) pass elif la_ == 14: localctx = HogQLParser.ColumnExprNullPropertyAccessContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 983 + self.state = 1023 if not self.precpred(self._ctx, 20): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 20)") - self.state = 984 + self.state = 1024 self.match(HogQLParser.NULL_PROPERTY) - self.state = 985 + self.state = 1025 self.identifier() pass elif la_ == 15: localctx = HogQLParser.ColumnExprIsNullContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 986 + self.state = 1026 if not self.precpred(self._ctx, 15): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 15)") - self.state = 987 + self.state = 1027 self.match(HogQLParser.IS) - self.state = 989 + self.state = 1029 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==56: - self.state = 988 + if _la==58: + self.state = 1028 self.match(HogQLParser.NOT) - self.state = 991 + self.state = 1031 self.match(HogQLParser.NULL_SQL) pass elif la_ == 16: localctx = HogQLParser.ColumnExprAliasContext(self, HogQLParser.ColumnExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_columnExpr) - self.state = 992 + self.state = 1032 if not self.precpred(self._ctx, 8): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 8)") - self.state = 997 + self.state = 1037 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,121,self._ctx) + la_ = self._interp.adaptivePredict(self._input,127,self._ctx) if la_ == 1: - self.state = 993 + self.state = 1033 self.match(HogQLParser.AS) - self.state = 994 + self.state = 1034 self.identifier() pass elif la_ == 2: - self.state = 995 + self.state = 1035 self.match(HogQLParser.AS) - self.state = 996 + self.state = 1036 self.match(HogQLParser.STRING_LITERAL) pass @@ -7268,9 +7546,9 @@ def columnExpr(self, _p:int=0): pass - self.state = 1003 + self.state = 1043 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,123,self._ctx) + _alt = self._interp.adaptivePredict(self._input,129,self._ctx) except RecognitionException as re: localctx.exception = re @@ -7316,30 +7594,30 @@ def accept(self, visitor:ParseTreeVisitor): def columnArgList(self): localctx = HogQLParser.ColumnArgListContext(self, self._ctx, self.state) - self.enterRule(localctx, 112, self.RULE_columnArgList) + self.enterRule(localctx, 118, self.RULE_columnArgList) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1004 + self.state = 1044 self.columnArgExpr() - self.state = 1009 + self.state = 1049 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,124,self._ctx) + _alt = self._interp.adaptivePredict(self._input,130,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 1005 + self.state = 1045 self.match(HogQLParser.COMMA) - self.state = 1006 + self.state = 1046 self.columnArgExpr() - self.state = 1011 + self.state = 1051 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,124,self._ctx) + _alt = self._interp.adaptivePredict(self._input,130,self._ctx) - self.state = 1013 + self.state = 1053 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 1012 + if _la==116: + self.state = 1052 self.match(HogQLParser.COMMA) @@ -7382,20 +7660,20 @@ def accept(self, visitor:ParseTreeVisitor): def columnArgExpr(self): localctx = HogQLParser.ColumnArgExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 114, self.RULE_columnArgExpr) + self.enterRule(localctx, 120, self.RULE_columnArgExpr) try: - self.state = 1017 + self.state = 1057 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,126,self._ctx) + la_ = self._interp.adaptivePredict(self._input,132,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 1015 + self.state = 1055 self.columnLambdaExpr() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 1016 + self.state = 1056 self.columnExpr(0) pass @@ -7457,63 +7735,63 @@ def accept(self, visitor:ParseTreeVisitor): def columnLambdaExpr(self): localctx = HogQLParser.ColumnLambdaExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 116, self.RULE_columnLambdaExpr) + self.enterRule(localctx, 122, self.RULE_columnLambdaExpr) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1044 + self.state = 1084 self._errHandler.sync(self) token = self._input.LA(1) - if token in [126]: - self.state = 1019 + if token in [130]: + self.state = 1059 self.match(HogQLParser.LPAREN) - self.state = 1020 + self.state = 1060 self.identifier() - self.state = 1025 + self.state = 1065 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,127,self._ctx) + _alt = self._interp.adaptivePredict(self._input,133,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 1021 + self.state = 1061 self.match(HogQLParser.COMMA) - self.state = 1022 + self.state = 1062 self.identifier() - self.state = 1027 + self.state = 1067 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,127,self._ctx) + _alt = self._interp.adaptivePredict(self._input,133,self._ctx) - self.state = 1029 + self.state = 1069 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 1028 + if _la==116: + self.state = 1068 self.match(HogQLParser.COMMA) - self.state = 1031 + self.state = 1071 self.match(HogQLParser.RPAREN) pass - elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 101]: - self.state = 1033 + elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 101, 102, 103, 105]: + self.state = 1073 self.identifier() - self.state = 1038 + self.state = 1078 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,129,self._ctx) + _alt = self._interp.adaptivePredict(self._input,135,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 1034 + self.state = 1074 self.match(HogQLParser.COMMA) - self.state = 1035 + self.state = 1075 self.identifier() - self.state = 1040 + self.state = 1080 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,129,self._ctx) + _alt = self._interp.adaptivePredict(self._input,135,self._ctx) - self.state = 1042 + self.state = 1082 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 1041 + if _la==116: + self.state = 1081 self.match(HogQLParser.COMMA) @@ -7521,9 +7799,9 @@ def columnLambdaExpr(self): else: raise NoViableAltException(self) - self.state = 1046 + self.state = 1086 self.match(HogQLParser.ARROW) - self.state = 1047 + self.state = 1087 self.columnExpr(0) except RecognitionException as re: localctx.exception = re @@ -7613,6 +7891,13 @@ def hogqlxTagAttribute(self, i:int=None): def hogqlxTagElement(self): return self.getTypedRuleContext(HogQLParser.HogqlxTagElementContext,0) + def LBRACE(self): + return self.getToken(HogQLParser.LBRACE, 0) + def columnExpr(self): + return self.getTypedRuleContext(HogQLParser.ColumnExprContext,0) + + def RBRACE(self): + return self.getToken(HogQLParser.RBRACE, 0) def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitHogqlxTagElementNested" ): @@ -7625,69 +7910,77 @@ def accept(self, visitor:ParseTreeVisitor): def hogqlxTagElement(self): localctx = HogQLParser.HogqlxTagElementContext(self, self._ctx, self.state) - self.enterRule(localctx, 118, self.RULE_hogqlxTagElement) + self.enterRule(localctx, 124, self.RULE_hogqlxTagElement) self._la = 0 # Token type try: - self.state = 1077 + self.state = 1121 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,135,self._ctx) + la_ = self._interp.adaptivePredict(self._input,141,self._ctx) if la_ == 1: localctx = HogQLParser.HogqlxTagElementClosedContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 1049 + self.state = 1089 self.match(HogQLParser.LT) - self.state = 1050 + self.state = 1090 self.identifier() - self.state = 1054 + self.state = 1094 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & -181272084561788930) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 201863462911) != 0): - self.state = 1051 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & -725088338784043010) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 3229277487103) != 0): + self.state = 1091 self.hogqlxTagAttribute() - self.state = 1056 + self.state = 1096 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 1057 + self.state = 1097 self.match(HogQLParser.SLASH) - self.state = 1058 + self.state = 1098 self.match(HogQLParser.GT) pass elif la_ == 2: localctx = HogQLParser.HogqlxTagElementNestedContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 1060 + self.state = 1100 self.match(HogQLParser.LT) - self.state = 1061 + self.state = 1101 self.identifier() - self.state = 1065 + self.state = 1105 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & -181272084561788930) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 201863462911) != 0): - self.state = 1062 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & -725088338784043010) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 3229277487103) != 0): + self.state = 1102 self.hogqlxTagAttribute() - self.state = 1067 + self.state = 1107 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 1068 + self.state = 1108 self.match(HogQLParser.GT) - self.state = 1070 + self.state = 1114 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,134,self._ctx) + la_ = self._interp.adaptivePredict(self._input,140,self._ctx) if la_ == 1: - self.state = 1069 + self.state = 1109 self.hogqlxTagElement() + elif la_ == 2: + self.state = 1110 + self.match(HogQLParser.LBRACE) + self.state = 1111 + self.columnExpr(0) + self.state = 1112 + self.match(HogQLParser.RBRACE) + - self.state = 1072 + self.state = 1116 self.match(HogQLParser.LT) - self.state = 1073 + self.state = 1117 self.match(HogQLParser.SLASH) - self.state = 1074 + self.state = 1118 self.identifier() - self.state = 1075 + self.state = 1119 self.match(HogQLParser.GT) pass @@ -7744,38 +8037,38 @@ def accept(self, visitor:ParseTreeVisitor): def hogqlxTagAttribute(self): localctx = HogQLParser.HogqlxTagAttributeContext(self, self._ctx, self.state) - self.enterRule(localctx, 120, self.RULE_hogqlxTagAttribute) + self.enterRule(localctx, 126, self.RULE_hogqlxTagAttribute) try: - self.state = 1090 + self.state = 1134 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,136,self._ctx) + la_ = self._interp.adaptivePredict(self._input,142,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 1079 + self.state = 1123 self.identifier() - self.state = 1080 + self.state = 1124 self.match(HogQLParser.EQ_SINGLE) - self.state = 1081 + self.state = 1125 self.string() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 1083 + self.state = 1127 self.identifier() - self.state = 1084 + self.state = 1128 self.match(HogQLParser.EQ_SINGLE) - self.state = 1085 + self.state = 1129 self.match(HogQLParser.LBRACE) - self.state = 1086 + self.state = 1130 self.columnExpr(0) - self.state = 1087 + self.state = 1131 self.match(HogQLParser.RBRACE) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 1089 + self.state = 1133 self.identifier() pass @@ -7824,30 +8117,30 @@ def accept(self, visitor:ParseTreeVisitor): def withExprList(self): localctx = HogQLParser.WithExprListContext(self, self._ctx, self.state) - self.enterRule(localctx, 122, self.RULE_withExprList) + self.enterRule(localctx, 128, self.RULE_withExprList) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1092 + self.state = 1136 self.withExpr() - self.state = 1097 + self.state = 1141 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,137,self._ctx) + _alt = self._interp.adaptivePredict(self._input,143,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 1093 + self.state = 1137 self.match(HogQLParser.COMMA) - self.state = 1094 + self.state = 1138 self.withExpr() - self.state = 1099 + self.state = 1143 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,137,self._ctx) + _alt = self._interp.adaptivePredict(self._input,143,self._ctx) - self.state = 1101 + self.state = 1145 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 1100 + if _la==116: + self.state = 1144 self.match(HogQLParser.COMMA) @@ -7929,34 +8222,34 @@ def accept(self, visitor:ParseTreeVisitor): def withExpr(self): localctx = HogQLParser.WithExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 124, self.RULE_withExpr) + self.enterRule(localctx, 130, self.RULE_withExpr) try: - self.state = 1113 + self.state = 1157 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,139,self._ctx) + la_ = self._interp.adaptivePredict(self._input,145,self._ctx) if la_ == 1: localctx = HogQLParser.WithExprSubqueryContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 1103 + self.state = 1147 self.identifier() - self.state = 1104 + self.state = 1148 self.match(HogQLParser.AS) - self.state = 1105 + self.state = 1149 self.match(HogQLParser.LPAREN) - self.state = 1106 + self.state = 1150 self.selectUnionStmt() - self.state = 1107 + self.state = 1151 self.match(HogQLParser.RPAREN) pass elif la_ == 2: localctx = HogQLParser.WithExprColumnContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 1109 + self.state = 1153 self.columnExpr(0) - self.state = 1110 + self.state = 1154 self.match(HogQLParser.AS) - self.state = 1111 + self.state = 1155 self.identifier() pass @@ -8007,29 +8300,29 @@ def accept(self, visitor:ParseTreeVisitor): def columnIdentifier(self): localctx = HogQLParser.ColumnIdentifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 126, self.RULE_columnIdentifier) + self.enterRule(localctx, 132, self.RULE_columnIdentifier) try: - self.state = 1122 + self.state = 1166 self._errHandler.sync(self) token = self._input.LA(1) - if token in [124]: + if token in [128]: self.enterOuterAlt(localctx, 1) - self.state = 1115 + self.state = 1159 self.placeholder() pass - elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99, 101]: + elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 55, 56, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 101, 102, 103, 105]: self.enterOuterAlt(localctx, 2) - self.state = 1119 + self.state = 1163 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,140,self._ctx) + la_ = self._interp.adaptivePredict(self._input,146,self._ctx) if la_ == 1: - self.state = 1116 + self.state = 1160 self.tableIdentifier() - self.state = 1117 + self.state = 1161 self.match(HogQLParser.DOT) - self.state = 1121 + self.state = 1165 self.nestedIdentifier() pass else: @@ -8079,23 +8372,23 @@ def accept(self, visitor:ParseTreeVisitor): def nestedIdentifier(self): localctx = HogQLParser.NestedIdentifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 128, self.RULE_nestedIdentifier) + self.enterRule(localctx, 134, self.RULE_nestedIdentifier) try: self.enterOuterAlt(localctx, 1) - self.state = 1124 + self.state = 1168 self.identifier() - self.state = 1129 + self.state = 1173 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,142,self._ctx) + _alt = self._interp.adaptivePredict(self._input,148,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 1125 + self.state = 1169 self.match(HogQLParser.DOT) - self.state = 1126 + self.state = 1170 self.identifier() - self.state = 1131 + self.state = 1175 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,142,self._ctx) + _alt = self._interp.adaptivePredict(self._input,148,self._ctx) except RecognitionException as re: localctx.exception = re @@ -8242,19 +8535,19 @@ def tableExpr(self, _p:int=0): _parentState = self.state localctx = HogQLParser.TableExprContext(self, self._ctx, _parentState) _prevctx = localctx - _startState = 130 - self.enterRecursionRule(localctx, 130, self.RULE_tableExpr, _p) + _startState = 136 + self.enterRecursionRule(localctx, 136, self.RULE_tableExpr, _p) try: self.enterOuterAlt(localctx, 1) - self.state = 1141 + self.state = 1185 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,143,self._ctx) + la_ = self._interp.adaptivePredict(self._input,149,self._ctx) if la_ == 1: localctx = HogQLParser.TableExprIdentifierContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 1133 + self.state = 1177 self.tableIdentifier() pass @@ -8262,7 +8555,7 @@ def tableExpr(self, _p:int=0): localctx = HogQLParser.TableExprFunctionContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 1134 + self.state = 1178 self.tableFunctionExpr() pass @@ -8270,11 +8563,11 @@ def tableExpr(self, _p:int=0): localctx = HogQLParser.TableExprSubqueryContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 1135 + self.state = 1179 self.match(HogQLParser.LPAREN) - self.state = 1136 + self.state = 1180 self.selectUnionStmt() - self.state = 1137 + self.state = 1181 self.match(HogQLParser.RPAREN) pass @@ -8282,7 +8575,7 @@ def tableExpr(self, _p:int=0): localctx = HogQLParser.TableExprTagContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 1139 + self.state = 1183 self.hogqlxTagElement() pass @@ -8290,15 +8583,15 @@ def tableExpr(self, _p:int=0): localctx = HogQLParser.TableExprPlaceholderContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 1140 + self.state = 1184 self.placeholder() pass self._ctx.stop = self._input.LT(-1) - self.state = 1151 + self.state = 1195 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,145,self._ctx) + _alt = self._interp.adaptivePredict(self._input,151,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: @@ -8306,29 +8599,29 @@ def tableExpr(self, _p:int=0): _prevctx = localctx localctx = HogQLParser.TableExprAliasContext(self, HogQLParser.TableExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_tableExpr) - self.state = 1143 + self.state = 1187 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") - self.state = 1147 + self.state = 1191 self._errHandler.sync(self) token = self._input.LA(1) - if token in [19, 28, 37, 46, 101]: - self.state = 1144 + if token in [20, 30, 39, 48, 105]: + self.state = 1188 self.alias() pass elif token in [6]: - self.state = 1145 + self.state = 1189 self.match(HogQLParser.AS) - self.state = 1146 + self.state = 1190 self.identifier() pass else: raise NoViableAltException(self) - self.state = 1153 + self.state = 1197 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,145,self._ctx) + _alt = self._interp.adaptivePredict(self._input,151,self._ctx) except RecognitionException as re: localctx.exception = re @@ -8375,23 +8668,23 @@ def accept(self, visitor:ParseTreeVisitor): def tableFunctionExpr(self): localctx = HogQLParser.TableFunctionExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 132, self.RULE_tableFunctionExpr) + self.enterRule(localctx, 138, self.RULE_tableFunctionExpr) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1154 + self.state = 1198 self.identifier() - self.state = 1155 + self.state = 1199 self.match(HogQLParser.LPAREN) - self.state = 1157 + self.state = 1201 self._errHandler.sync(self) _la = self._input.LA(1) - if (((_la) & ~0x3f) == 0 and ((1 << _la) & -1125900443713538) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 8076106347046764543) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 1153) != 0): - self.state = 1156 + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -4503602311741442) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 90493036243451903) != 0) or ((((_la - 128)) & ~0x3f) == 0 and ((1 << (_la - 128)) & 18455) != 0): + self.state = 1200 self.tableArgList() - self.state = 1159 + self.state = 1203 self.match(HogQLParser.RPAREN) except RecognitionException as re: localctx.exception = re @@ -8435,20 +8728,20 @@ def accept(self, visitor:ParseTreeVisitor): def tableIdentifier(self): localctx = HogQLParser.TableIdentifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 134, self.RULE_tableIdentifier) + self.enterRule(localctx, 140, self.RULE_tableIdentifier) try: self.enterOuterAlt(localctx, 1) - self.state = 1164 + self.state = 1208 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,147,self._ctx) + la_ = self._interp.adaptivePredict(self._input,153,self._ctx) if la_ == 1: - self.state = 1161 + self.state = 1205 self.databaseIdentifier() - self.state = 1162 + self.state = 1206 self.match(HogQLParser.DOT) - self.state = 1166 + self.state = 1210 self.identifier() except RecognitionException as re: localctx.exception = re @@ -8494,30 +8787,30 @@ def accept(self, visitor:ParseTreeVisitor): def tableArgList(self): localctx = HogQLParser.TableArgListContext(self, self._ctx, self.state) - self.enterRule(localctx, 136, self.RULE_tableArgList) + self.enterRule(localctx, 142, self.RULE_tableArgList) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1168 + self.state = 1212 self.columnExpr(0) - self.state = 1173 + self.state = 1217 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,148,self._ctx) + _alt = self._interp.adaptivePredict(self._input,154,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 1169 + self.state = 1213 self.match(HogQLParser.COMMA) - self.state = 1170 + self.state = 1214 self.columnExpr(0) - self.state = 1175 + self.state = 1219 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,148,self._ctx) + _alt = self._interp.adaptivePredict(self._input,154,self._ctx) - self.state = 1177 + self.state = 1221 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==112: - self.state = 1176 + if _la==116: + self.state = 1220 self.match(HogQLParser.COMMA) @@ -8556,10 +8849,10 @@ def accept(self, visitor:ParseTreeVisitor): def databaseIdentifier(self): localctx = HogQLParser.DatabaseIdentifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 138, self.RULE_databaseIdentifier) + self.enterRule(localctx, 144, self.RULE_databaseIdentifier) try: self.enterOuterAlt(localctx, 1) - self.state = 1179 + self.state = 1223 self.identifier() except RecognitionException as re: localctx.exception = re @@ -8607,42 +8900,42 @@ def accept(self, visitor:ParseTreeVisitor): def floatingLiteral(self): localctx = HogQLParser.FloatingLiteralContext(self, self._ctx, self.state) - self.enterRule(localctx, 140, self.RULE_floatingLiteral) + self.enterRule(localctx, 146, self.RULE_floatingLiteral) self._la = 0 # Token type try: - self.state = 1189 + self.state = 1233 self._errHandler.sync(self) token = self._input.LA(1) - if token in [102]: + if token in [106]: self.enterOuterAlt(localctx, 1) - self.state = 1181 + self.state = 1225 self.match(HogQLParser.FLOATING_LITERAL) pass - elif token in [116]: + elif token in [120]: self.enterOuterAlt(localctx, 2) - self.state = 1182 + self.state = 1226 self.match(HogQLParser.DOT) - self.state = 1183 + self.state = 1227 _la = self._input.LA(1) - if not(_la==103 or _la==104): + if not(_la==107 or _la==108): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() pass - elif token in [104]: + elif token in [108]: self.enterOuterAlt(localctx, 3) - self.state = 1184 + self.state = 1228 self.match(HogQLParser.DECIMAL_LITERAL) - self.state = 1185 + self.state = 1229 self.match(HogQLParser.DOT) - self.state = 1187 + self.state = 1231 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,150,self._ctx) + la_ = self._interp.adaptivePredict(self._input,156,self._ctx) if la_ == 1: - self.state = 1186 + self.state = 1230 _la = self._input.LA(1) - if not(_la==103 or _la==104): + if not(_la==107 or _la==108): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -8709,53 +9002,53 @@ def accept(self, visitor:ParseTreeVisitor): def numberLiteral(self): localctx = HogQLParser.NumberLiteralContext(self, self._ctx, self.state) - self.enterRule(localctx, 142, self.RULE_numberLiteral) + self.enterRule(localctx, 148, self.RULE_numberLiteral) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1192 + self.state = 1236 self._errHandler.sync(self) _la = self._input.LA(1) - if _la==114 or _la==135: - self.state = 1191 + if _la==118 or _la==139: + self.state = 1235 _la = self._input.LA(1) - if not(_la==114 or _la==135): + if not(_la==118 or _la==139): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() - self.state = 1200 + self.state = 1244 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,153,self._ctx) + la_ = self._interp.adaptivePredict(self._input,159,self._ctx) if la_ == 1: - self.state = 1194 + self.state = 1238 self.floatingLiteral() pass elif la_ == 2: - self.state = 1195 + self.state = 1239 self.match(HogQLParser.OCTAL_LITERAL) pass elif la_ == 3: - self.state = 1196 + self.state = 1240 self.match(HogQLParser.DECIMAL_LITERAL) pass elif la_ == 4: - self.state = 1197 + self.state = 1241 self.match(HogQLParser.HEXADECIMAL_LITERAL) pass elif la_ == 5: - self.state = 1198 + self.state = 1242 self.match(HogQLParser.INF) pass elif la_ == 6: - self.state = 1199 + self.state = 1243 self.match(HogQLParser.NAN_SQL) pass @@ -8801,24 +9094,24 @@ def accept(self, visitor:ParseTreeVisitor): def literal(self): localctx = HogQLParser.LiteralContext(self, self._ctx, self.state) - self.enterRule(localctx, 144, self.RULE_literal) + self.enterRule(localctx, 150, self.RULE_literal) try: - self.state = 1205 + self.state = 1249 self._errHandler.sync(self) token = self._input.LA(1) - if token in [41, 55, 102, 103, 104, 105, 114, 116, 135]: + if token in [43, 57, 106, 107, 108, 109, 118, 120, 139]: self.enterOuterAlt(localctx, 1) - self.state = 1202 + self.state = 1246 self.numberLiteral() pass - elif token in [106]: + elif token in [110]: self.enterOuterAlt(localctx, 2) - self.state = 1203 + self.state = 1247 self.match(HogQLParser.STRING_LITERAL) pass - elif token in [57]: + elif token in [59]: self.enterOuterAlt(localctx, 3) - self.state = 1204 + self.state = 1248 self.match(HogQLParser.NULL_SQL) pass else: @@ -8879,13 +9172,13 @@ def accept(self, visitor:ParseTreeVisitor): def interval(self): localctx = HogQLParser.IntervalContext(self, self._ctx, self.state) - self.enterRule(localctx, 146, self.RULE_interval) + self.enterRule(localctx, 152, self.RULE_interval) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1207 + self.state = 1251 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 27021666484748288) != 0) or ((((_la - 68)) & ~0x3f) == 0 and ((1 << (_la - 68)) & 2181038337) != 0)): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 108086665936896000) != 0) or ((((_la - 70)) & ~0x3f) == 0 and ((1 << (_la - 70)) & 8724152577) != 0)): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -9176,13 +9469,13 @@ def accept(self, visitor:ParseTreeVisitor): def keyword(self): localctx = HogQLParser.KeywordContext(self, self._ctx, self.state) - self.enterRule(localctx, 148, self.RULE_keyword) + self.enterRule(localctx, 154, self.RULE_keyword) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1209 + self.state = 1253 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & -208293751046537218) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 29527896047) != 0)): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & -833175004720939010) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 471908466623) != 0)): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -9230,13 +9523,13 @@ def accept(self, visitor:ParseTreeVisitor): def keywordForAlias(self): localctx = HogQLParser.KeywordForAliasContext(self, self._ctx, self.state) - self.enterRule(localctx, 150, self.RULE_keywordForAlias) + self.enterRule(localctx, 156, self.RULE_keywordForAlias) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1211 + self.state = 1255 _la = self._input.LA(1) - if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 70506452090880) != 0)): + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 282025807314944) != 0)): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) @@ -9279,19 +9572,19 @@ def accept(self, visitor:ParseTreeVisitor): def alias(self): localctx = HogQLParser.AliasContext(self, self._ctx, self.state) - self.enterRule(localctx, 152, self.RULE_alias) + self.enterRule(localctx, 158, self.RULE_alias) try: - self.state = 1215 + self.state = 1259 self._errHandler.sync(self) token = self._input.LA(1) - if token in [101]: + if token in [105]: self.enterOuterAlt(localctx, 1) - self.state = 1213 + self.state = 1257 self.match(HogQLParser.IDENTIFIER) pass - elif token in [19, 28, 37, 46]: + elif token in [20, 30, 39, 48]: self.enterOuterAlt(localctx, 2) - self.state = 1214 + self.state = 1258 self.keywordForAlias() pass else: @@ -9339,24 +9632,24 @@ def accept(self, visitor:ParseTreeVisitor): def identifier(self): localctx = HogQLParser.IdentifierContext(self, self._ctx, self.state) - self.enterRule(localctx, 154, self.RULE_identifier) + self.enterRule(localctx, 160, self.RULE_identifier) try: - self.state = 1220 + self.state = 1264 self._errHandler.sync(self) token = self._input.LA(1) - if token in [101]: + if token in [105]: self.enterOuterAlt(localctx, 1) - self.state = 1217 + self.state = 1261 self.match(HogQLParser.IDENTIFIER) pass - elif token in [20, 36, 53, 54, 68, 76, 93, 99]: + elif token in [21, 38, 55, 56, 70, 78, 97, 103]: self.enterOuterAlt(localctx, 2) - self.state = 1218 + self.state = 1262 self.interval() pass - elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 97, 98]: + elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 53, 54, 58, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 98, 99, 101, 102]: self.enterOuterAlt(localctx, 3) - self.state = 1219 + self.state = 1263 self.keyword() pass else: @@ -9404,14 +9697,14 @@ def accept(self, visitor:ParseTreeVisitor): def enumValue(self): localctx = HogQLParser.EnumValueContext(self, self._ctx, self.state) - self.enterRule(localctx, 156, self.RULE_enumValue) + self.enterRule(localctx, 162, self.RULE_enumValue) try: self.enterOuterAlt(localctx, 1) - self.state = 1222 + self.state = 1266 self.string() - self.state = 1223 + self.state = 1267 self.match(HogQLParser.EQ_SINGLE) - self.state = 1224 + self.state = 1268 self.numberLiteral() except RecognitionException as re: localctx.exception = re @@ -9454,14 +9747,14 @@ def accept(self, visitor:ParseTreeVisitor): def placeholder(self): localctx = HogQLParser.PlaceholderContext(self, self._ctx, self.state) - self.enterRule(localctx, 158, self.RULE_placeholder) + self.enterRule(localctx, 164, self.RULE_placeholder) try: self.enterOuterAlt(localctx, 1) - self.state = 1226 + self.state = 1270 self.match(HogQLParser.LBRACE) - self.state = 1227 + self.state = 1271 self.identifier() - self.state = 1228 + self.state = 1272 self.match(HogQLParser.RBRACE) except RecognitionException as re: localctx.exception = re @@ -9501,19 +9794,19 @@ def accept(self, visitor:ParseTreeVisitor): def string(self): localctx = HogQLParser.StringContext(self, self._ctx, self.state) - self.enterRule(localctx, 160, self.RULE_string) + self.enterRule(localctx, 166, self.RULE_string) try: - self.state = 1232 + self.state = 1276 self._errHandler.sync(self) token = self._input.LA(1) - if token in [106]: + if token in [110]: self.enterOuterAlt(localctx, 1) - self.state = 1230 + self.state = 1274 self.match(HogQLParser.STRING_LITERAL) pass - elif token in [138]: + elif token in [142]: self.enterOuterAlt(localctx, 2) - self.state = 1231 + self.state = 1275 self.templateString() pass else: @@ -9563,23 +9856,23 @@ def accept(self, visitor:ParseTreeVisitor): def templateString(self): localctx = HogQLParser.TemplateStringContext(self, self._ctx, self.state) - self.enterRule(localctx, 162, self.RULE_templateString) + self.enterRule(localctx, 168, self.RULE_templateString) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1234 + self.state = 1278 self.match(HogQLParser.QUOTE_SINGLE_TEMPLATE) - self.state = 1238 + self.state = 1282 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==152 or _la==153: - self.state = 1235 + while _la==156 or _la==157: + self.state = 1279 self.stringContents() - self.state = 1240 + self.state = 1284 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 1241 + self.state = 1285 self.match(HogQLParser.QUOTE_SINGLE) except RecognitionException as re: localctx.exception = re @@ -9625,23 +9918,23 @@ def accept(self, visitor:ParseTreeVisitor): def stringContents(self): localctx = HogQLParser.StringContentsContext(self, self._ctx, self.state) - self.enterRule(localctx, 164, self.RULE_stringContents) + self.enterRule(localctx, 170, self.RULE_stringContents) try: - self.state = 1248 + self.state = 1292 self._errHandler.sync(self) token = self._input.LA(1) - if token in [153]: + if token in [157]: self.enterOuterAlt(localctx, 1) - self.state = 1243 + self.state = 1287 self.match(HogQLParser.STRING_ESCAPE_TRIGGER) - self.state = 1244 + self.state = 1288 self.columnExpr(0) - self.state = 1245 + self.state = 1289 self.match(HogQLParser.RBRACE) pass - elif token in [152]: + elif token in [156]: self.enterOuterAlt(localctx, 2) - self.state = 1247 + self.state = 1291 self.match(HogQLParser.STRING_TEXT) pass else: @@ -9691,23 +9984,23 @@ def accept(self, visitor:ParseTreeVisitor): def fullTemplateString(self): localctx = HogQLParser.FullTemplateStringContext(self, self._ctx, self.state) - self.enterRule(localctx, 166, self.RULE_fullTemplateString) + self.enterRule(localctx, 172, self.RULE_fullTemplateString) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 1250 + self.state = 1294 self.match(HogQLParser.QUOTE_SINGLE_TEMPLATE_FULL) - self.state = 1254 + self.state = 1298 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==154 or _la==155: - self.state = 1251 + while _la==158 or _la==159: + self.state = 1295 self.stringContentsFull() - self.state = 1256 + self.state = 1300 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 1257 + self.state = 1301 self.match(HogQLParser.EOF) except RecognitionException as re: localctx.exception = re @@ -9753,23 +10046,23 @@ def accept(self, visitor:ParseTreeVisitor): def stringContentsFull(self): localctx = HogQLParser.StringContentsFullContext(self, self._ctx, self.state) - self.enterRule(localctx, 168, self.RULE_stringContentsFull) + self.enterRule(localctx, 174, self.RULE_stringContentsFull) try: - self.state = 1264 + self.state = 1308 self._errHandler.sync(self) token = self._input.LA(1) - if token in [155]: + if token in [159]: self.enterOuterAlt(localctx, 1) - self.state = 1259 + self.state = 1303 self.match(HogQLParser.FULL_STRING_ESCAPE_TRIGGER) - self.state = 1260 + self.state = 1304 self.columnExpr(0) - self.state = 1261 + self.state = 1305 self.match(HogQLParser.RBRACE) pass - elif token in [154]: + elif token in [158]: self.enterOuterAlt(localctx, 2) - self.state = 1263 + self.state = 1307 self.match(HogQLParser.FULL_STRING_TEXT) pass else: @@ -9788,9 +10081,9 @@ def stringContentsFull(self): def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): if self._predicates == None: self._predicates = dict() - self._predicates[36] = self.joinExpr_sempred - self._predicates[55] = self.columnExpr_sempred - self._predicates[65] = self.tableExpr_sempred + self._predicates[39] = self.joinExpr_sempred + self._predicates[58] = self.columnExpr_sempred + self._predicates[68] = self.tableExpr_sempred pred = self._predicates.get(ruleIndex, None) if pred is None: raise Exception("No predicate with index:" + str(ruleIndex)) diff --git a/posthog/hogql/grammar/HogQLParser.tokens b/posthog/hogql/grammar/HogQLParser.tokens index 3ba82bf92c17b..320718e97710b 100644 --- a/posthog/hogql/grammar/HogQLParser.tokens +++ b/posthog/hogql/grammar/HogQLParser.tokens @@ -11,186 +11,190 @@ BOTH=10 BY=11 CASE=12 CAST=13 -COHORT=14 -COLLATE=15 -CROSS=16 -CUBE=17 -CURRENT=18 -DATE=19 -DAY=20 -DESC=21 -DESCENDING=22 -DISTINCT=23 -ELSE=24 -END=25 -EXTRACT=26 -FINAL=27 -FIRST=28 -FN=29 -FOLLOWING=30 -FOR=31 -FROM=32 -FULL=33 -GROUP=34 -HAVING=35 -HOUR=36 -ID=37 -IF=38 -ILIKE=39 -IN=40 -INF=41 -INNER=42 -INTERVAL=43 -IS=44 -JOIN=45 -KEY=46 -LAST=47 -LEADING=48 -LEFT=49 -LET=50 -LIKE=51 -LIMIT=52 -MINUTE=53 -MONTH=54 -NAN_SQL=55 -NOT=56 -NULL_SQL=57 -NULLS=58 -OFFSET=59 -ON=60 -OR=61 -ORDER=62 -OUTER=63 -OVER=64 -PARTITION=65 -PRECEDING=66 -PREWHERE=67 -QUARTER=68 -RANGE=69 -RETURN=70 -RIGHT=71 -ROLLUP=72 -ROW=73 -ROWS=74 -SAMPLE=75 -SECOND=76 -SELECT=77 -SEMI=78 -SETTINGS=79 -SUBSTRING=80 -THEN=81 -TIES=82 -TIMESTAMP=83 -TO=84 -TOP=85 -TOTALS=86 -TRAILING=87 -TRIM=88 -TRUNCATE=89 -UNBOUNDED=90 -UNION=91 -USING=92 -WEEK=93 -WHEN=94 -WHERE=95 -WHILE=96 -WINDOW=97 -WITH=98 -YEAR=99 -ESCAPE_CHAR_COMMON=100 -IDENTIFIER=101 -FLOATING_LITERAL=102 -OCTAL_LITERAL=103 -DECIMAL_LITERAL=104 -HEXADECIMAL_LITERAL=105 -STRING_LITERAL=106 -ARROW=107 -ASTERISK=108 -BACKQUOTE=109 -BACKSLASH=110 -COLON=111 -COMMA=112 -CONCAT=113 -DASH=114 -DOLLAR=115 -DOT=116 -EQ_DOUBLE=117 -EQ_SINGLE=118 -GT_EQ=119 -GT=120 -HASH=121 -IREGEX_SINGLE=122 -IREGEX_DOUBLE=123 -LBRACE=124 -LBRACKET=125 -LPAREN=126 -LT_EQ=127 -LT=128 -NOT_EQ=129 -NOT_IREGEX=130 -NOT_REGEX=131 -NULL_PROPERTY=132 -NULLISH=133 -PERCENT=134 -PLUS=135 -QUERY=136 -QUOTE_DOUBLE=137 -QUOTE_SINGLE_TEMPLATE=138 -QUOTE_SINGLE_TEMPLATE_FULL=139 -QUOTE_SINGLE=140 -REGEX_SINGLE=141 -REGEX_DOUBLE=142 -RBRACE=143 -RBRACKET=144 -RPAREN=145 -SEMICOLON=146 -SLASH=147 -UNDERSCORE=148 -MULTI_LINE_COMMENT=149 -SINGLE_LINE_COMMENT=150 -WHITESPACE=151 -STRING_TEXT=152 -STRING_ESCAPE_TRIGGER=153 -FULL_STRING_TEXT=154 -FULL_STRING_ESCAPE_TRIGGER=155 -'->'=107 -'*'=108 -'`'=109 -'\\'=110 -':'=111 -','=112 -'||'=113 -'-'=114 -'$'=115 -'.'=116 -'=='=117 -'='=118 -'>='=119 -'>'=120 -'#'=121 -'~*'=122 -'=~*'=123 -'{'=124 -'['=125 -'('=126 -'<='=127 -'<'=128 -'!~*'=130 -'!~'=131 -'?.'=132 -'??'=133 -'%'=134 -'+'=135 -'?'=136 -'"'=137 -'f\''=138 -'F\''=139 -'\''=140 -'~'=141 -'=~'=142 -'}'=143 -']'=144 -')'=145 -';'=146 -'/'=147 -'_'=148 +CATCH=14 +COHORT=15 +COLLATE=16 +CROSS=17 +CUBE=18 +CURRENT=19 +DATE=20 +DAY=21 +DESC=22 +DESCENDING=23 +DISTINCT=24 +ELSE=25 +END=26 +EXTRACT=27 +FINAL=28 +FINALLY=29 +FIRST=30 +FN=31 +FOLLOWING=32 +FOR=33 +FROM=34 +FULL=35 +GROUP=36 +HAVING=37 +HOUR=38 +ID=39 +IF=40 +ILIKE=41 +IN=42 +INF=43 +INNER=44 +INTERVAL=45 +IS=46 +JOIN=47 +KEY=48 +LAST=49 +LEADING=50 +LEFT=51 +LET=52 +LIKE=53 +LIMIT=54 +MINUTE=55 +MONTH=56 +NAN_SQL=57 +NOT=58 +NULL_SQL=59 +NULLS=60 +OFFSET=61 +ON=62 +OR=63 +ORDER=64 +OUTER=65 +OVER=66 +PARTITION=67 +PRECEDING=68 +PREWHERE=69 +QUARTER=70 +RANGE=71 +RETURN=72 +RIGHT=73 +ROLLUP=74 +ROW=75 +ROWS=76 +SAMPLE=77 +SECOND=78 +SELECT=79 +SEMI=80 +SETTINGS=81 +SUBSTRING=82 +THEN=83 +THROW=84 +TIES=85 +TIMESTAMP=86 +TO=87 +TOP=88 +TOTALS=89 +TRAILING=90 +TRIM=91 +TRUNCATE=92 +TRY=93 +UNBOUNDED=94 +UNION=95 +USING=96 +WEEK=97 +WHEN=98 +WHERE=99 +WHILE=100 +WINDOW=101 +WITH=102 +YEAR=103 +ESCAPE_CHAR_COMMON=104 +IDENTIFIER=105 +FLOATING_LITERAL=106 +OCTAL_LITERAL=107 +DECIMAL_LITERAL=108 +HEXADECIMAL_LITERAL=109 +STRING_LITERAL=110 +ARROW=111 +ASTERISK=112 +BACKQUOTE=113 +BACKSLASH=114 +COLON=115 +COMMA=116 +CONCAT=117 +DASH=118 +DOLLAR=119 +DOT=120 +EQ_DOUBLE=121 +EQ_SINGLE=122 +GT_EQ=123 +GT=124 +HASH=125 +IREGEX_SINGLE=126 +IREGEX_DOUBLE=127 +LBRACE=128 +LBRACKET=129 +LPAREN=130 +LT_EQ=131 +LT=132 +NOT_EQ=133 +NOT_IREGEX=134 +NOT_REGEX=135 +NULL_PROPERTY=136 +NULLISH=137 +PERCENT=138 +PLUS=139 +QUERY=140 +QUOTE_DOUBLE=141 +QUOTE_SINGLE_TEMPLATE=142 +QUOTE_SINGLE_TEMPLATE_FULL=143 +QUOTE_SINGLE=144 +REGEX_SINGLE=145 +REGEX_DOUBLE=146 +RBRACE=147 +RBRACKET=148 +RPAREN=149 +SEMICOLON=150 +SLASH=151 +UNDERSCORE=152 +MULTI_LINE_COMMENT=153 +SINGLE_LINE_COMMENT=154 +WHITESPACE=155 +STRING_TEXT=156 +STRING_ESCAPE_TRIGGER=157 +FULL_STRING_TEXT=158 +FULL_STRING_ESCAPE_TRIGGER=159 +'->'=111 +'*'=112 +'`'=113 +'\\'=114 +':'=115 +','=116 +'||'=117 +'-'=118 +'$'=119 +'.'=120 +'=='=121 +'='=122 +'>='=123 +'>'=124 +'#'=125 +'~*'=126 +'=~*'=127 +'{'=128 +'['=129 +'('=130 +'<='=131 +'<'=132 +'!~*'=134 +'!~'=135 +'?.'=136 +'??'=137 +'%'=138 +'+'=139 +'?'=140 +'"'=141 +'f\''=142 +'F\''=143 +'\''=144 +'~'=145 +'=~'=146 +'}'=147 +']'=148 +')'=149 +';'=150 +'/'=151 +'_'=152 diff --git a/posthog/hogql/grammar/HogQLParserVisitor.py b/posthog/hogql/grammar/HogQLParserVisitor.py index 47f93b5fbfb16..bcd327d6abc68 100644 --- a/posthog/hogql/grammar/HogQLParserVisitor.py +++ b/posthog/hogql/grammar/HogQLParserVisitor.py @@ -44,6 +44,21 @@ def visitReturnStmt(self, ctx:HogQLParser.ReturnStmtContext): return self.visitChildren(ctx) + # Visit a parse tree produced by HogQLParser#throwStmt. + def visitThrowStmt(self, ctx:HogQLParser.ThrowStmtContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by HogQLParser#catchBlock. + def visitCatchBlock(self, ctx:HogQLParser.CatchBlockContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by HogQLParser#tryCatchStmt. + def visitTryCatchStmt(self, ctx:HogQLParser.TryCatchStmtContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by HogQLParser#ifStmt. def visitIfStmt(self, ctx:HogQLParser.IfStmtContext): return self.visitChildren(ctx) diff --git a/posthog/hogql/hogqlx.py b/posthog/hogql/hogqlx.py index 3971c19f74cfb..81fb926eff1d4 100644 --- a/posthog/hogql/hogqlx.py +++ b/posthog/hogql/hogqlx.py @@ -2,7 +2,7 @@ from posthog.hogql import ast -HOGQLX_COMPONENTS = ["Sparkline"] +HOGQLX_COMPONENTS = ["Sparkline", "a", "em", "strong"] def convert_tag_to_hx(node: ast.HogQLXTag) -> ast.Tuple: diff --git a/posthog/hogql/parser.py b/posthog/hogql/parser.py index 090185bf7c238..a056d9fc682f6 100644 --- a/posthog/hogql/parser.py +++ b/posthog/hogql/parser.py @@ -245,6 +245,23 @@ def visitExprStmt(self, ctx: HogQLParser.ExprStmtContext): def visitReturnStmt(self, ctx: HogQLParser.ReturnStmtContext): return ast.ReturnStatement(expr=self.visit(ctx.expression()) if ctx.expression() else None) + def visitThrowStmt(self, ctx: HogQLParser.ThrowStmtContext): + return ast.ThrowStatement(expr=self.visit(ctx.expression()) if ctx.expression() else None) + + def visitCatchBlock(self, ctx: HogQLParser.CatchBlockContext): + return ( + self.visit(ctx.catchVar) if ctx.catchVar else None, + self.visit(ctx.catchType) if ctx.catchType else None, + self.visit(ctx.catchStmt), + ) + + def visitTryCatchStmt(self, ctx: HogQLParser.TryCatchStmtContext): + return ast.TryCatchStatement( + try_stmt=self.visit(ctx.tryStmt), + catches=[self.visit(catch) for catch in ctx.catchBlock()], + finally_stmt=self.visit(ctx.finallyStmt) if ctx.finallyStmt else None, + ) + def visitIfStmt(self, ctx: HogQLParser.IfStmtContext): return ast.IfStatement( expr=self.visit(ctx.expression()), @@ -1085,6 +1102,12 @@ def visitHogqlxTagElementNested(self, ctx: HogQLParser.HogqlxTagElementNestedCon if a.name == "source": raise SyntaxError(f"Nested HogQLX tags cannot have a source attribute") attributes.append(ast.HogQLXAttribute(name="source", value=source)) + if ctx.columnExpr(): + source = self.visit(ctx.columnExpr()) + for a in attributes: + if a.name == "source": + raise SyntaxError(f"Nested HogQLX tags cannot have a source attribute") + attributes.append(ast.HogQLXAttribute(name="source", value=source)) return ast.HogQLXTag(kind=opening, attributes=attributes) def visitHogqlxTagAttribute(self, ctx: HogQLParser.HogqlxTagAttributeContext): diff --git a/posthog/hogql/property.py b/posthog/hogql/property.py index 52236b64fb6dd..afceaf8f3edf8 100644 --- a/posthog/hogql/property.py +++ b/posthog/hogql/property.py @@ -1,5 +1,4 @@ -import re -from typing import Literal, Optional, Union, cast +from typing import Literal, Optional, cast from pydantic import BaseModel @@ -22,16 +21,28 @@ Team, ) from posthog.models.event import Selector -from posthog.models.property import PropertyGroup +from posthog.models.element import Element +from posthog.models.property import PropertyGroup, ValueT from posthog.models.property.util import build_selector_regex from posthog.models.property_definition import PropertyType from posthog.schema import ( - EmptyPropertyFilter, FilterLogicalOperator, PropertyGroupFilter, PropertyGroupFilterValue, PropertyOperator, RetentionEntity, + EventPropertyFilter, + PersonPropertyFilter, + ElementPropertyFilter, + SessionPropertyFilter, + CohortPropertyFilter, + RecordingPropertyFilter, + GroupPropertyFilter, + FeaturePropertyFilter, + HogQLPropertyFilter, + EmptyPropertyFilter, + DataWarehousePropertyFilter, + DataWarehousePersonPropertyFilter, ) from posthog.warehouse.models import DataWarehouseJoin, DataWarehouseSavedQuery, DataWarehouseTable from posthog.utils import get_from_dict_or_attr @@ -67,8 +78,194 @@ def visit_call(self, node: ast.Call): self.visit(arg) +def _handle_bool_values(value: ValueT, field: ast.Field, property: Property, team: Team) -> ValueT | bool: + if value != "true" and value != "false": + return value + if property.type == "person": + property_types = PropertyDefinition.objects.filter( + team=team, + name=property.key, + type=PropertyDefinition.Type.PERSON, + ) + elif property.type == "group": + property_types = PropertyDefinition.objects.filter( + team=team, + name=property.key, + type=PropertyDefinition.Type.GROUP, + group_type_index=property.group_type_index, + ) + elif property.type == "data_warehouse_person_property": + key = field.chain[-2] + + # TODO: pass id of table item being filtered on instead of searching through joins + current_join: DataWarehouseJoin | None = ( + DataWarehouseJoin.objects.filter(Q(deleted__isnull=True) | Q(deleted=False)) + .filter(team=team, source_table_name="persons", field_name=key) + .first() + ) + + if not current_join: + raise Exception(f"Could not find join for key {key}") + + prop_type = None + + maybe_view = ( + DataWarehouseSavedQuery.objects.filter(Q(deleted__isnull=True) | Q(deleted=False)) + .filter(team=team, name=current_join.joining_table_name) + .first() + ) + + if maybe_view: + prop_type_dict = maybe_view.columns.get(property.key, None) + prop_type = prop_type_dict.get("hogql") + + maybe_table = ( + DataWarehouseTable.objects.filter(Q(deleted__isnull=True) | Q(deleted=False)) + .filter(team=team, name=current_join.joining_table_name) + .first() + ) + + if maybe_table: + prop_type_dict = maybe_table.columns.get(property.key, None) + prop_type = prop_type_dict.get("hogql") + + if not maybe_view and not maybe_table: + raise Exception(f"Could not find table or view for key {key}") + + if prop_type == "BooleanDatabaseField": + if value == "true": + value = True + if value == "false": + value = False + + return value + + else: + property_types = PropertyDefinition.objects.filter( + team=team, + name=property.key, + type=PropertyDefinition.Type.EVENT, + ) + property_type = property_types[0].property_type if len(property_types) > 0 else None + + if property_type == PropertyType.Boolean: + if value == "true": + return True + if value == "false": + return False + return value + + +def _field_to_compare_op( + field: ast.Field, value: ValueT, operator: PropertyOperator, property: Property, is_json_field: bool, team: Team +) -> ast.Expr: + if operator == PropertyOperator.IS_SET: + return ast.CompareOperation( + op=ast.CompareOperationOp.NotEq, + left=field, + right=ast.Constant(value=None), + ) + elif operator == PropertyOperator.IS_NOT_SET: + return ast.Or( + exprs=[ + ast.CompareOperation( + op=ast.CompareOperationOp.Eq, + left=field, + right=ast.Constant(value=None), + ) + ] + + ( + [ + ast.Not( + expr=ast.Call( + name="JSONHas", + args=[ast.Field(chain=field.chain[:-1]), ast.Constant(value=property.key)], + ) + ) + ] + if is_json_field + else [] + ) + ) + elif operator == PropertyOperator.ICONTAINS: + return ast.CompareOperation( + op=ast.CompareOperationOp.ILike, + left=field, + right=ast.Constant(value=f"%{value}%"), + ) + elif operator == PropertyOperator.NOT_ICONTAINS: + return ast.CompareOperation( + op=ast.CompareOperationOp.NotILike, + left=field, + right=ast.Constant(value=f"%{value}%"), + ) + elif operator == PropertyOperator.REGEX: + return ast.Call( + name="ifNull", + args=[ + ast.Call(name="match", args=[ast.Call(name="toString", args=[field]), ast.Constant(value=value)]), + ast.Constant(value=0), + ], + ) + elif operator == PropertyOperator.NOT_REGEX: + return ast.Call( + name="ifNull", + args=[ + ast.Call( + name="not", + args=[ + ast.Call( + name="match", args=[ast.Call(name="toString", args=[field]), ast.Constant(value=value)] + ) + ], + ), + ast.Constant(value=1), + ], + ) + elif operator == PropertyOperator.EXACT or operator == PropertyOperator.IS_DATE_EXACT: + return ast.CompareOperation( + op=ast.CompareOperationOp.Eq, + left=field, + right=ast.Constant(value=_handle_bool_values(value, field, property, team)), + ) + elif operator == PropertyOperator.IS_NOT: + return ast.CompareOperation( + op=ast.CompareOperationOp.NotEq, + left=field, + right=ast.Constant(value=_handle_bool_values(value, field, property, team)), + ) + elif operator == PropertyOperator.LT or operator == PropertyOperator.IS_DATE_BEFORE: + return ast.CompareOperation(op=ast.CompareOperationOp.Lt, left=field, right=ast.Constant(value=value)) + elif operator == PropertyOperator.GT or operator == PropertyOperator.IS_DATE_AFTER: + return ast.CompareOperation(op=ast.CompareOperationOp.Gt, left=field, right=ast.Constant(value=value)) + elif operator == PropertyOperator.LTE: + return ast.CompareOperation(op=ast.CompareOperationOp.LtEq, left=field, right=ast.Constant(value=value)) + elif operator == PropertyOperator.GTE: + return ast.CompareOperation(op=ast.CompareOperationOp.GtEq, left=field, right=ast.Constant(value=value)) + else: + raise NotImplementedError(f"PropertyOperator {operator} not implemented") + + def property_to_expr( - property: Union[BaseModel, PropertyGroup, Property, dict, list, ast.Expr], + property: list + | dict + | PropertyGroup + | PropertyGroupFilter + | PropertyGroupFilterValue + | Property + | ast.Expr + | EventPropertyFilter + | PersonPropertyFilter + | ElementPropertyFilter + | SessionPropertyFilter + | CohortPropertyFilter + | RecordingPropertyFilter + | GroupPropertyFilter + | FeaturePropertyFilter + | HogQLPropertyFilter + | EmptyPropertyFilter + | DataWarehousePropertyFilter + | DataWarehousePersonPropertyFilter, team: Team, scope: Literal["event", "person", "session", "replay", "replay_entity", "replay_pdi"] = "event", ) -> ast.Expr: @@ -170,16 +367,11 @@ def property_to_expr( else: chain = ["properties"] - if property.type == "session": - properties_field = None - else: - properties_field = ast.Field(chain=chain) - field = ast.Field(chain=[*chain, property.key]) if isinstance(value, list): if len(value) == 0: - return ast.Constant(value=True) + return ast.Constant(value=1) elif len(value) == 1: value = value[0] else: @@ -206,164 +398,14 @@ def property_to_expr( return ast.And(exprs=exprs) return ast.Or(exprs=exprs) - if operator == PropertyOperator.IS_SET: - return ast.CompareOperation( - op=ast.CompareOperationOp.NotEq, - left=field, - right=ast.Constant(value=None), - ) - elif operator == PropertyOperator.IS_NOT_SET: - return ast.Or( - exprs=[ - ast.CompareOperation( - op=ast.CompareOperationOp.Eq, - left=field, - right=ast.Constant(value=None), - ) - ] - + ( - [] - if not properties_field or properties_field == field - else [ - ast.Not( - expr=ast.Call( - name="JSONHas", - args=[properties_field, ast.Constant(value=property.key)], - ) - ) - ] - ) - ) - elif operator == PropertyOperator.ICONTAINS: - return ast.CompareOperation( - op=ast.CompareOperationOp.ILike, - left=field, - right=ast.Constant(value=f"%{value}%"), - ) - elif operator == PropertyOperator.NOT_ICONTAINS: - return ast.CompareOperation( - op=ast.CompareOperationOp.NotILike, - left=field, - right=ast.Constant(value=f"%{value}%"), - ) - elif operator == PropertyOperator.REGEX: - return ast.Call( - name="ifNull", - args=[ - ast.Call(name="match", args=[ast.Call(name="toString", args=[field]), ast.Constant(value=value)]), - ast.Constant(value=0), - ], - ) - elif operator == PropertyOperator.NOT_REGEX: - return ast.Call( - name="ifNull", - args=[ - ast.Call( - name="not", - args=[ - ast.Call( - name="match", args=[ast.Call(name="toString", args=[field]), ast.Constant(value=value)] - ) - ], - ), - ast.Constant(value=1), - ], - ) - elif operator == PropertyOperator.EXACT or operator == PropertyOperator.IS_DATE_EXACT: - op = ast.CompareOperationOp.Eq - elif operator == PropertyOperator.IS_NOT: - op = ast.CompareOperationOp.NotEq - elif operator == PropertyOperator.LT or operator == PropertyOperator.IS_DATE_BEFORE: - op = ast.CompareOperationOp.Lt - elif operator == PropertyOperator.GT or operator == PropertyOperator.IS_DATE_AFTER: - op = ast.CompareOperationOp.Gt - elif operator == PropertyOperator.LTE: - op = ast.CompareOperationOp.LtEq - elif operator == PropertyOperator.GTE: - op = ast.CompareOperationOp.GtEq - else: - raise NotImplementedError(f"PropertyOperator {operator} not implemented") - - # For Boolean and untyped properties, treat "true" and "false" as boolean values - if ( - (op == ast.CompareOperationOp.Eq or op == ast.CompareOperationOp.NotEq) - and team is not None - and (value == "true" or value == "false") - ): - if property.type == "person": - property_types = PropertyDefinition.objects.filter( - team=team, - name=property.key, - type=PropertyDefinition.Type.PERSON, - ) - elif property.type == "group": - property_types = PropertyDefinition.objects.filter( - team=team, - name=property.key, - type=PropertyDefinition.Type.GROUP, - group_type_index=property.group_type_index, - ) - elif property.type == "data_warehouse_person_property": - key = chain[-1] - - # TODO: pass id of table item being filtered on instead of searching through joins - current_join: DataWarehouseJoin | None = ( - DataWarehouseJoin.objects.filter(Q(deleted__isnull=True) | Q(deleted=False)) - .filter(team=team, source_table_name="persons", field_name=key) - .first() - ) - - if not current_join: - raise Exception(f"Could not find join for key {key}") - - prop_type = None - - maybe_view = ( - DataWarehouseSavedQuery.objects.filter(Q(deleted__isnull=True) | Q(deleted=False)) - .filter(team=team, name=current_join.joining_table_name) - .first() - ) - - if maybe_view: - prop_type_dict = maybe_view.columns.get(property.key, None) - prop_type = prop_type_dict.get("hogql") - - maybe_table = ( - DataWarehouseTable.objects.filter(Q(deleted__isnull=True) | Q(deleted=False)) - .filter(team=team, name=current_join.joining_table_name) - .first() - ) - - if maybe_table: - prop_type_dict = maybe_table.columns.get(property.key, None) - prop_type = prop_type_dict.get("hogql") - - if not maybe_view and not maybe_table: - raise Exception(f"Could not find table or view for key {key}") - - if prop_type == "BooleanDatabaseField": - if value == "true": - value = True - if value == "false": - value = False - - return ast.CompareOperation(op=op, left=field, right=ast.Constant(value=value)) - - else: - property_types = PropertyDefinition.objects.filter( - team=team, - name=property.key, - type=PropertyDefinition.Type.EVENT, - ) - property_type = property_types[0].property_type if len(property_types) > 0 else None - - if property_type == PropertyType.Boolean: - if value == "true": - value = True - if value == "false": - value = False - - return ast.CompareOperation(op=op, left=field, right=ast.Constant(value=value)) + return _field_to_compare_op( + field=field, + value=value, + operator=operator, + team=team, + property=property, + is_json_field=property.type != "session", + ) elif property.type == "element": if scope == "person": @@ -407,10 +449,29 @@ def property_to_expr( return expr if property.key == "href": - return element_chain_key_filter("href", str(value), operator) + return _field_to_compare_op( + field=ast.Field(chain=["elements_chain_href"]), + value=value, + operator=operator, + team=team, + property=property, + is_json_field=False, + ) if property.key == "text": - return element_chain_key_filter("text", str(value), operator) + return parse_expr( + "arrayExists(text -> {compare}, elements_chain_texts)", + { + "compare": _field_to_compare_op( + field=ast.Field(chain=["text"]), + value=value, + operator=operator, + team=team, + property=property, + is_json_field=False, + ) + }, + ) raise NotImplementedError(f"property_to_expr for type element not implemented for key {property.key}") elif property.type == "cohort" or property.type == "static-cohort" or property.type == "precalculated-cohort": @@ -449,21 +510,49 @@ def action_to_expr(action: Action) -> ast.Expr: exprs.append(tag_name_to_expr(step.tag_name)) if step.href is not None: if step.href_matching == "regex": - operator = PropertyOperator.REGEX + exprs.append( + ast.CompareOperation( + op=ast.CompareOperationOp.Regex, + left=ast.Field(chain=["elements_chain_href"]), + right=ast.Constant(value=step.href), + ) + ) elif step.href_matching == "contains": - operator = PropertyOperator.ICONTAINS + exprs.append( + ast.CompareOperation( + op=ast.CompareOperationOp.ILike, + left=ast.Field(chain=["elements_chain_href"]), + right=ast.Constant(value=f"%{step.href}%"), + ) + ) else: - operator = PropertyOperator.EXACT - exprs.append(element_chain_key_filter("href", step.href, operator)) + exprs.append( + ast.CompareOperation( + op=ast.CompareOperationOp.Eq, + left=ast.Field(chain=["elements_chain_href"]), + right=ast.Constant(value=step.href), + ) + ) if step.text is not None: + value = step.text if step.text_matching == "regex": - operator = PropertyOperator.REGEX + match = ast.CompareOperationOp.Regex elif step.text_matching == "contains": - operator = PropertyOperator.ICONTAINS + match = ast.CompareOperationOp.ILike + value = f"%{value}%" else: - operator = PropertyOperator.EXACT - exprs.append(element_chain_key_filter("text", step.text, operator)) - + match = ast.CompareOperationOp.Eq + + exprs.append( + parse_expr( + "arrayExists(x -> {match}, elements_chain_texts)", + { + "match": ast.CompareOperation( + op=match, left=ast.Field(chain=["x"]), right=ast.Constant(value=value) + ) + }, + ) + ) if step.url: if step.url_matching == "exact": expr = parse_expr( @@ -512,45 +601,43 @@ def entity_to_expr(entity: RetentionEntity) -> ast.Expr: ) -def element_chain_key_filter(key: str, text: str, operator: PropertyOperator): - escaped = text.replace('"', r"\"") - if operator == PropertyOperator.IS_SET or operator == PropertyOperator.IS_NOT_SET: - value = r'[^"]+' - elif operator == PropertyOperator.ICONTAINS or operator == PropertyOperator.NOT_ICONTAINS: - value = rf'[^"]*{re.escape(escaped)}[^"]*' - elif operator == PropertyOperator.REGEX or operator == PropertyOperator.NOT_REGEX: - value = escaped - elif operator == PropertyOperator.EXACT or operator == PropertyOperator.IS_NOT: - value = re.escape(escaped) - else: - raise NotImplementedError(f"element_href_to_expr not implemented for operator {operator}") - - regex = f'({key}="{value}")' - if operator == PropertyOperator.ICONTAINS or operator == PropertyOperator.NOT_ICONTAINS: - expr = parse_expr("elements_chain =~* {regex}", {"regex": ast.Constant(value=str(regex))}) - else: - expr = parse_expr("elements_chain =~ {regex}", {"regex": ast.Constant(value=str(regex))}) - - if ( - operator == PropertyOperator.IS_NOT_SET - or operator == PropertyOperator.NOT_ICONTAINS - or operator == PropertyOperator.IS_NOT - or operator == PropertyOperator.NOT_REGEX - ): - expr = ast.Call(name="not", args=[expr]) - return expr - - def tag_name_to_expr(tag_name: str): regex = rf"(^|;){tag_name}(\.|$|;|:)" expr = parse_expr("elements_chain =~ {regex}", {"regex": ast.Constant(value=str(regex))}) return expr -def selector_to_expr(selector: str): - regex = build_selector_regex(Selector(selector, escape_slashes=False)) - expr = parse_expr("elements_chain =~ {regex}", {"regex": ast.Constant(value=regex)}) - return expr +def selector_to_expr(selector_string: str): + selector = Selector(selector_string, escape_slashes=False) + exprs = [] + regex = build_selector_regex(selector) + exprs.append(parse_expr("elements_chain =~ {regex}", {"regex": ast.Constant(value=regex)})) + + useful_elements: list[ast.Expr] = [] + for part in selector.parts: + if "tag_name" in part.data: + if part.data["tag_name"] in Element.USEFUL_ELEMENTS: + useful_elements.append(ast.Constant(value=part.data["tag_name"])) + + if "attr_id" in part.data: + id_expr = parse_expr( + "indexOf(elements_chain_ids, {value}) > 0", {"value": ast.Constant(value=part.data["attr_id"])} + ) + if len(selector.parts) == 1 and len(part.data.keys()) == 1: + # OPTIMIZATION: if there's only one selector part and that only filters on an ID, we don't need to also query elements_chain separately + return id_expr + exprs.append(id_expr) + if len(useful_elements) > 0: + exprs.append( + parse_expr( + "arrayCount(x -> x IN {value}, elements_chain_elements) > 0", + {"value": ast.Array(exprs=useful_elements)}, + ) + ) + + if len(exprs) == 1: + return exprs[0] + return ast.And(exprs=exprs) def get_property_type(property): diff --git a/posthog/hogql/test/__snapshots__/test_resolver.ambr b/posthog/hogql/test/__snapshots__/test_resolver.ambr index d7d042252c55d..9907d46ee7f89 100644 --- a/posthog/hogql/test/__snapshots__/test_resolver.ambr +++ b/posthog/hogql/test/__snapshots__/test_resolver.ambr @@ -32,6 +32,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -120,6 +124,34 @@ table_type: } }, + elements_chain_elements: { + alias: "elements_chain_elements" + type: { + name: "elements_chain_elements" + table_type: + } + }, + elements_chain_href: { + alias: "elements_chain_href" + type: { + name: "elements_chain_href" + table_type: + } + }, + elements_chain_ids: { + alias: "elements_chain_ids" + type: { + name: "elements_chain_ids" + table_type: + } + }, + elements_chain_texts: { + alias: "elements_chain_texts" + type: { + name: "elements_chain_texts" + table_type: + } + }, event: { alias: "event" type: { @@ -382,6 +414,74 @@ alias: "$group_4" type: } + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: { + name: "elements_chain_href" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_href" + type: + } + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: { + name: "elements_chain_texts" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_texts" + type: + } + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: { + name: "elements_chain_ids" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_ids" + type: + } + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: { + name: "elements_chain_elements" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_elements" + type: + } } ] select_from: { @@ -540,6 +640,50 @@ } hidden: True type: + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: + } + hidden: True + type: + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: + } + hidden: True + type: + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: + } + hidden: True + type: + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: + } + hidden: True + type: } ] select_from: { @@ -571,6 +715,10 @@ created_at: , distinct_id: , elements_chain: , + elements_chain_elements: , + elements_chain_href: , + elements_chain_ids: , + elements_chain_texts: , event: , properties: , timestamp: , @@ -607,6 +755,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -859,6 +1011,74 @@ alias: "$group_4" type: } + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: { + name: "elements_chain_href" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_href" + type: + } + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: { + name: "elements_chain_texts" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_texts" + type: + } + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: { + name: "elements_chain_ids" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_ids" + type: + } + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: { + name: "elements_chain_elements" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_elements" + type: + } } ] select_from: { @@ -884,6 +1104,10 @@ created_at: , distinct_id: , elements_chain: , + elements_chain_elements: , + elements_chain_href: , + elements_chain_ids: , + elements_chain_texts: , event: , properties: , timestamp: , @@ -930,6 +1154,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -1018,6 +1246,34 @@ table_type: } }, + elements_chain_elements: { + alias: "elements_chain_elements" + type: { + name: "elements_chain_elements" + table_type: + } + }, + elements_chain_href: { + alias: "elements_chain_href" + type: { + name: "elements_chain_href" + table_type: + } + }, + elements_chain_ids: { + alias: "elements_chain_ids" + type: { + name: "elements_chain_ids" + table_type: + } + }, + elements_chain_texts: { + alias: "elements_chain_texts" + type: { + name: "elements_chain_texts" + table_type: + } + }, event: { alias: "event" type: { @@ -1280,6 +1536,74 @@ alias: "$group_4" type: } + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: { + name: "elements_chain_href" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_href" + type: + } + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: { + name: "elements_chain_texts" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_texts" + type: + } + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: { + name: "elements_chain_ids" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_ids" + type: + } + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: { + name: "elements_chain_elements" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_elements" + type: + } } ] select_from: { @@ -1440,6 +1764,50 @@ } hidden: True type: + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: + } + hidden: True + type: + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: + } + hidden: True + type: + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: + } + hidden: True + type: + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: + } + hidden: True + type: } ] select_from: { @@ -1476,6 +1844,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -1727,6 +2099,74 @@ alias: "$group_4" type: } + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: { + name: "elements_chain_href" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_href" + type: + } + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: { + name: "elements_chain_texts" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_texts" + type: + } + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: { + name: "elements_chain_ids" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_ids" + type: + } + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: { + name: "elements_chain_elements" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_elements" + type: + } } ] select_from: { @@ -1752,6 +2192,10 @@ created_at: , distinct_id: , elements_chain: , + elements_chain_elements: , + elements_chain_href: , + elements_chain_ids: , + elements_chain_texts: , event: , properties: , timestamp: , @@ -1789,6 +2233,10 @@ created_at: , distinct_id: , elements_chain: , + elements_chain_elements: , + elements_chain_href: , + elements_chain_ids: , + elements_chain_texts: , event: , properties: , timestamp: , @@ -2037,6 +2485,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -2288,6 +2740,74 @@ alias: "$group_4" type: } + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: { + name: "elements_chain_href" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_href" + type: + } + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: { + name: "elements_chain_texts" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_texts" + type: + } + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: { + name: "elements_chain_ids" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_ids" + type: + } + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: { + name: "elements_chain_elements" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_elements" + type: + } } ] select_from: { @@ -2313,6 +2833,10 @@ created_at: , distinct_id: , elements_chain: , + elements_chain_elements: , + elements_chain_href: , + elements_chain_ids: , + elements_chain_texts: , event: , properties: , timestamp: , @@ -2353,6 +2877,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -2605,6 +3133,74 @@ alias: "$group_4" type: } + }, + { + alias: "elements_chain_href" + expr: { + chain: [ + "elements_chain_href" + ] + type: { + name: "elements_chain_href" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_href" + type: + } + }, + { + alias: "elements_chain_texts" + expr: { + chain: [ + "elements_chain_texts" + ] + type: { + name: "elements_chain_texts" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_texts" + type: + } + }, + { + alias: "elements_chain_ids" + expr: { + chain: [ + "elements_chain_ids" + ] + type: { + name: "elements_chain_ids" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_ids" + type: + } + }, + { + alias: "elements_chain_elements" + expr: { + chain: [ + "elements_chain_elements" + ] + type: { + name: "elements_chain_elements" + table_type: + } + } + hidden: True + type: { + alias: "elements_chain_elements" + type: + } } ] select_from: { @@ -2631,6 +3227,10 @@ created_at: , distinct_id: , elements_chain: , + elements_chain_elements: , + elements_chain_href: , + elements_chain_ids: , + elements_chain_texts: , event: , properties: , timestamp: , @@ -2671,6 +3271,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -2770,6 +3374,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -3149,6 +3757,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -3282,6 +3894,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -3419,6 +4035,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -3592,6 +4212,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -3770,6 +4394,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -3901,6 +4529,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -4033,6 +4665,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -4152,6 +4788,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -4358,6 +4998,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -4452,6 +5096,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, @@ -4558,6 +5206,10 @@ created_at: {}, distinct_id: {}, elements_chain: {}, + elements_chain_elements: {}, + elements_chain_href: {}, + elements_chain_ids: {}, + elements_chain_texts: {}, event: {}, goe_0: {}, goe_1: {}, diff --git a/posthog/hogql/test/_test_parser.py b/posthog/hogql/test/_test_parser.py index 30a4ef910ef7d..e612a156762e6 100644 --- a/posthog/hogql/test/_test_parser.py +++ b/posthog/hogql/test/_test_parser.py @@ -1704,6 +1704,19 @@ def test_visit_hogqlx_tag_source(self): ], ) + def test_visit_hogqlx_tag_column_source(self): + query = """ + select {event} from events + """ + node = self._select(query) + assert isinstance(node, ast.SelectQuery) and cast(ast.HogQLXTag, node.select[0]) == ast.HogQLXTag( + kind="a", + attributes=[ + ast.HogQLXAttribute(name="href", value=Constant(value="https://google.com")), + ast.HogQLXAttribute(name="source", value=ast.Field(chain=["event"])), + ], + ) + def test_select_extract_as_function(self): node = self._select("select extract('string', 'other string') from events") @@ -2229,6 +2242,119 @@ def test_program_simple_return_twice(self): ) self.assertEqual(program, expected) + def test_program_exceptions_throw_simple(self): + code = "return" + program = self._program(code) + expected = Program( + declarations=[ast.ReturnStatement(expr=None)], + ) + self.assertEqual(program, expected) + + def test_program_exceptions_try_catch_blocks(self): + code = "try { 1 } catch (e) { 2 }" + program = self._program(code) + expected = Program( + declarations=[ + ast.TryCatchStatement( + try_stmt=ast.Block(declarations=[ast.ExprStatement(expr=ast.Constant(value=1))]), + catches=[("e", None, ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=2))]))], + ) + ] + ) + self.assertEqual(program, expected) + + def test_program_exceptions_try_finally_simple(self): + code = "try {1 } finally { 2 }" + program = self._program(code) + expected = Program( + declarations=[ + ast.TryCatchStatement( + try_stmt=ast.Block(declarations=[ast.ExprStatement(expr=ast.Constant(value=1))]), + catches=[], + finally_stmt=ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=2))]), + ) + ] + ) + self.assertEqual(program, expected) + + def test_program_exceptions_try_catch_finally(self): + code = "try {1} catch (e) {2} finally {3}" + program = self._program(code) + expected = Program( + declarations=[ + ast.TryCatchStatement( + try_stmt=ast.Block(declarations=[ast.ExprStatement(expr=ast.Constant(value=1))]), + catches=[("e", None, ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=2))]))], + finally_stmt=ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=3))]), + ) + ] + ) + self.assertEqual(program, expected) + + def test_program_exceptions_try_alone(self): + # This parses, but will throw later when printing bytecode. + code = "try {1}" + program = self._program(code) + expected = Program( + declarations=[ + ast.TryCatchStatement( + try_stmt=ast.Block(declarations=[ast.ExprStatement(expr=ast.Constant(value=1))]), catches=[] + ) + ] + ) + self.assertEqual(program, expected) + + def test_program_exceptions_try_catch_type(self): + code = "try {1} catch (e: DodgyError) {2}" + program = self._program(code) + expected = Program( + declarations=[ + ast.TryCatchStatement( + try_stmt=ast.Block(declarations=[ast.ExprStatement(expr=ast.Constant(value=1))]), + catches=[ + ("e", "DodgyError", ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=2))])) + ], + finally_stmt=None, + ) + ] + ) + self.assertEqual(program, expected) + + def test_program_exceptions_try_catch_multiple(self): + code = "try {1} catch (e: DodgyError) {2} catch (e: FishyError) {3}" + program = self._program(code) + expected = Program( + declarations=[ + ast.TryCatchStatement( + try_stmt=ast.Block(declarations=[ast.ExprStatement(expr=ast.Constant(value=1))]), + catches=[ + ("e", "DodgyError", ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=2))])), + ("e", "FishyError", ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=3))])), + ], + finally_stmt=None, + ) + ] + ) + self.assertEqual(program, expected) + + def test_program_exceptions_try_catch_multiple_plain(self): + code = "try {1} catch (e: DodgyError) {2} catch (e: FishyError) {3} catch {4}" + program = self._program(code) + expected = Program( + declarations=[ + ast.TryCatchStatement( + try_stmt=ast.Block(declarations=[ast.ExprStatement(expr=ast.Constant(value=1))]), + catches=[ + ("e", "DodgyError", ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=2))])), + ("e", "FishyError", ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=3))])), + (None, None, ast.Block(declarations=[ast.ExprStatement(expr=Constant(value=4))])), + ], + finally_stmt=None, + ) + ] + ) + self.assertEqual(program, expected) + def test_pop_empty_stack(self): with self.assertRaises(SyntaxError) as e: self._select("select } from events") diff --git a/posthog/hogql/test/test_property.py b/posthog/hogql/test/test_property.py index 19b48e652808b..02aa63b9cb856 100644 --- a/posthog/hogql/test/test_property.py +++ b/posthog/hogql/test/test_property.py @@ -1,4 +1,6 @@ from typing import Union, cast, Optional, Any, Literal +from posthog.hogql.parser import parse_select +from posthog.hogql.query import execute_hogql_query from unittest.mock import MagicMock, patch from posthog.constants import PropertyOperatorType, TREND_FILTER_TYPE_ACTIONS, TREND_FILTER_TYPE_EVENTS @@ -6,7 +8,6 @@ from posthog.hogql.parser import parse_expr from posthog.hogql.property import ( action_to_expr, - element_chain_key_filter, has_aggregation, property_to_expr, selector_to_expr, @@ -23,8 +24,8 @@ ) from posthog.models.property import PropertyGroup from posthog.models.property_definition import PropertyType -from posthog.schema import HogQLPropertyFilter, PropertyOperator, RetentionEntity, EmptyPropertyFilter -from posthog.test.base import BaseTest +from posthog.schema import HogQLPropertyFilter, RetentionEntity, EmptyPropertyFilter +from posthog.test.base import BaseTest, _create_event from posthog.warehouse.models import DataWarehouseTable, DataWarehouseJoin, DataWarehouseCredential elements_chain_match = lambda x: parse_expr("elements_chain =~ {regex}", {"regex": ast.Constant(value=str(x))}) @@ -341,7 +342,18 @@ def test_property_to_expr_element(self): "operator": "exact", } ), - clear_locations(element_chain_key_filter("href", "href-text.", PropertyOperator.EXACT)), + self._parse_expr("elements_chain_href = 'href-text.'"), + ) + self.assertEqual( + self._property_to_expr( + { + "type": "element", + "key": "href", + "value": "href-text.", + "operator": "icontains", + } + ), + self._parse_expr("elements_chain_href ilike '%href-text.%'"), ) self.assertEqual( self._property_to_expr( @@ -352,7 +364,9 @@ def test_property_to_expr_element(self): "operator": "regex", } ), - clear_locations(element_chain_key_filter("text", "text-text.", PropertyOperator.REGEX)), + self._parse_expr( + "arrayExists(text -> ifNull(match(toString(text), 'text-text.'), false), elements_chain_texts)" + ), ) def test_property_groups(self): @@ -470,7 +484,14 @@ def test_selector_to_expr(self): self.assertEqual( self._selector_to_expr("a[href='boo']"), clear_locations( - elements_chain_match('(^|;)a.*?href="boo".*?([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))') + parse_expr( + "{regex} and arrayCount(x -> x IN ['a'], elements_chain_elements) > 0", + { + "regex": elements_chain_match( + '(^|;)a.*?href="boo".*?([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))' + ) + }, + ) ), ) self.assertEqual( @@ -480,19 +501,37 @@ def test_selector_to_expr(self): ), ) self.assertEqual( - self._selector_to_expr("#withid"), + self._selector_to_expr("a#withid"), clear_locations( - elements_chain_match('(^|;).*?attr_id="withid".*?([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))') + parse_expr( + """{regex} and indexOf(elements_chain_ids, 'withid') > 0 and arrayCount(x -> x IN ['a'], elements_chain_elements) > 0""", + { + "regex": elements_chain_match( + '(^|;)a.*?attr_id="withid".*?([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))' + ) + }, + ) ), ) + self.assertEqual( - self._selector_to_expr("#with-dashed-id"), + self._selector_to_expr("a#with-dashed-id"), clear_locations( - elements_chain_match( - '(^|;).*?attr_id="with\\-dashed\\-id".*?([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))' + parse_expr( + """{regex} and indexOf(elements_chain_ids, 'with-dashed-id') > 0 and arrayCount(x -> x IN ['a'], elements_chain_elements) > 0""", + { + "regex": elements_chain_match( + '(^|;)a.*?attr_id="with\\-dashed\\-id".*?([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))' + ) + }, ) ), ) + # test optimization + self.assertEqual( + self._selector_to_expr("#with-dashed-id"), + clear_locations(parse_expr("""indexOf(elements_chain_ids, 'with-dashed-id') > 0""")), + ) self.assertEqual( self._selector_to_expr("#with-dashed-id"), self._selector_to_expr("[id='with-dashed-id']"), @@ -500,69 +539,50 @@ def test_selector_to_expr(self): self.assertEqual( self._selector_to_expr("#with\\slashed\\id"), clear_locations( - elements_chain_match( - '(^|;).*?attr_id="with\\\\slashed\\\\id".*?([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))' + parse_expr( + "indexOf(elements_chain_ids, 'with\\\\slashed\\\\id') > 0", ) ), ) - def test_elements_chain_key_filter(self): - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.IS_SET)), - clear_locations(elements_chain_match('(href="[^"]+")')), - ) - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.IS_NOT_SET)), - clear_locations(not_call(elements_chain_match('(href="[^"]+")'))), - ) - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.ICONTAINS)), - clear_locations(elements_chain_imatch('(href="[^"]*boo\\.\\.[^"]*")')), - ) - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.NOT_ICONTAINS)), - clear_locations(not_call(elements_chain_imatch('(href="[^"]*boo\\.\\.[^"]*")'))), - ) - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.REGEX)), - clear_locations(elements_chain_match('(href="boo..")')), - ) - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.NOT_REGEX)), - clear_locations(not_call(elements_chain_match('(href="boo..")'))), - ) - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.EXACT)), - clear_locations(elements_chain_match('(href="boo\\.\\.")')), - ) - self.assertEqual( - clear_locations(element_chain_key_filter("href", "boo..", PropertyOperator.IS_NOT)), - clear_locations(not_call(elements_chain_match('(href="boo\\.\\.")'))), - ) - def test_action_to_expr(self): + _create_event( + event="$autocapture", team=self.team, distinct_id="some_id", elements_chain='a.active.nav-link:text="text"' + ) action1 = Action.objects.create( team=self.team, steps_json=[ { "event": "$autocapture", "selector": "a.nav-link.active", - "tag_name": "a", } ], ) self.assertEqual( clear_locations(action_to_expr(action1)), self._parse_expr( - "event = '$autocapture' and elements_chain =~ {regex1} and elements_chain =~ {regex2}", + "event = '$autocapture' and {regex1}", { - "regex1": ast.Constant( - value='(^|;)a.*?\\.active\\..*?nav\\-link([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))' + "regex1": ast.And( + exprs=[ + self._parse_expr( + "elements_chain =~ {regex}", + { + "regex": ast.Constant( + value='(^|;)a.*?\\.active\\..*?nav\\-link([-_a-zA-Z0-9\\.:"= ]*?)?($|;|:([^;^\\s]*(;|$|\\s)))' + ) + }, + ), + self._parse_expr("arrayCount(x -> x IN ['a'], elements_chain_elements) > 0"), + ] ), - "regex2": ast.Constant(value="(^|;)a(\\.|$|;|:)"), }, ), ) + resp = execute_hogql_query( + parse_select("select count() from events where {prop}", {"prop": action_to_expr(action1)}), self.team + ) + self.assertEqual(resp.results[0][0], 1) action2 = Action.objects.create( team=self.team, @@ -611,6 +631,24 @@ def test_action_to_expr(self): self._parse_expr("event = '$pageview' OR true"), # All events just resolve to "true" ) + action5 = Action.objects.create( + team=self.team, + steps_json=[{"event": "$autocapture", "href": "https://example4.com", "href_matching": "regex"}], + ) + self.assertEqual( + clear_locations(action_to_expr(action5)), + self._parse_expr("event = '$autocapture' and elements_chain_href =~ 'https://example4.com'"), + ) + + action6 = Action.objects.create( + team=self.team, + steps_json=[{"event": "$autocapture", "text": "blabla", "text_matching": "regex"}], + ) + self.assertEqual( + clear_locations(action_to_expr(action6)), + self._parse_expr("event = '$autocapture' and arrayExists(x -> x =~ 'blabla', elements_chain_texts)"), + ) + def test_cohort_filter_static(self): cohort = Cohort.objects.create( team=self.team, diff --git a/posthog/hogql/visitor.py b/posthog/hogql/visitor.py index 536a482c14236..00eb6723d1071 100644 --- a/posthog/hogql/visitor.py +++ b/posthog/hogql/visitor.py @@ -310,6 +310,16 @@ def visit_return_statement(self, node: ast.ReturnStatement): if node.expr: self.visit(node.expr) + def visit_throw_statement(self, node: ast.ThrowStatement): + if node.expr: + self.visit(node.expr) + + def visit_try_catch_statement(self, node: ast.TryCatchStatement): + self.visit(node.try_stmt) + for catch in node.catches: + self.visit(catch[2]) + self.visit(node.finally_stmt) + def visit_function(self, node: ast.Function): self.visit(node.body) @@ -677,6 +687,22 @@ def visit_return_statement(self, node: ast.ReturnStatement): expr=self.visit(node.expr) if node.expr else None, ) + def visit_throw_statement(self, node: ast.ThrowStatement): + return ast.ThrowStatement( + start=None if self.clear_locations else node.start, + end=None if self.clear_locations else node.end, + expr=self.visit(node.expr) if node.expr else None, + ) + + def visit_try_catch_statement(self, node: ast.TryCatchStatement): + return ast.TryCatchStatement( + start=None if self.clear_locations else node.start, + end=None if self.clear_locations else node.end, + try_stmt=self.visit(node.try_stmt), + catches=[(c[0], c[1], self.visit(c[2])) for c in node.catches], + finally_stmt=self.visit(node.finally_stmt), + ) + def visit_function(self, node: ast.Function): return ast.Function( start=None if self.clear_locations else node.start, diff --git a/posthog/hogql_queries/error_tracking_query_runner.py b/posthog/hogql_queries/error_tracking_query_runner.py index 3219fd497f965..6631972fc3da2 100644 --- a/posthog/hogql_queries/error_tracking_query_runner.py +++ b/posthog/hogql_queries/error_tracking_query_runner.py @@ -54,6 +54,10 @@ def select(self): alias="description", expr=ast.Call(name="any", args=[ast.Field(chain=["properties", "$exception_message"])]), ), + ast.Alias( + alias="exception_type", + expr=ast.Call(name="any", args=[ast.Field(chain=["properties", "$exception_type"])]), + ), ] if self.query.eventColumns: diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr index 9822999809a62..d733159ba5ee0 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr @@ -317,9 +317,9 @@ if(not(empty(e__override.distinct_id)), e__override.person_id, e.person_id) AS aggregation_target, if(equals(e.event, 'user signed up'), 1, 0) AS step_0, if(ifNull(equals(step_0, 1), 0), timestamp, NULL) AS latest_0, - if(and(equals(e.event, '$autocapture'), match(e.elements_chain, '(^|;)button(\\.|$|;|:)'), match(e.elements_chain, '(text="Pay\\ \\$10")')), 1, 0) AS step_1, + if(and(equals(e.event, '$autocapture'), match(e.elements_chain, '(^|;)button(\\.|$|;|:)'), arrayExists(x -> ifNull(equals(x, 'Pay $10'), 0), e.elements_chain_texts)), 1, 0) AS step_1, if(ifNull(equals(step_1, 1), 0), timestamp, NULL) AS latest_1, - if(and(equals(e.event, '$autocapture'), match(e.elements_chain, '(^|;)a(\\.|$|;|:)'), match(e.elements_chain, '(href="/movie")')), 1, 0) AS step_2, + if(and(equals(e.event, '$autocapture'), match(e.elements_chain, '(^|;)a(\\.|$|;|:)'), equals(e.elements_chain_href, '/movie')), 1, 0) AS step_2, if(ifNull(equals(step_2, 1), 0), timestamp, NULL) AS latest_2 FROM events AS e LEFT OUTER JOIN diff --git a/posthog/hogql_queries/test/__snapshots__/test_error_tracking_query_runner.ambr b/posthog/hogql_queries/test/__snapshots__/test_error_tracking_query_runner.ambr index ea4a62a503a93..5063b17d2a1c5 100644 --- a/posthog/hogql_queries/test/__snapshots__/test_error_tracking_query_runner.ambr +++ b/posthog/hogql_queries/test/__snapshots__/test_error_tracking_query_runner.ambr @@ -7,6 +7,7 @@ max(toTimeZone(events.timestamp, 'UTC')) AS last_seen, min(toTimeZone(events.timestamp, 'UTC')) AS first_seen, any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description, + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_type'), ''), 'null'), '^"|"$', '')) AS exception_type, replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_fingerprint'), ''), 'null'), '^"|"$', '') AS fingerprint FROM events INNER JOIN @@ -47,7 +48,8 @@ count(DISTINCT events.distinct_id) AS users, max(toTimeZone(events.timestamp, 'UTC')) AS last_seen, min(toTimeZone(events.timestamp, 'UTC')) AS first_seen, - any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description, + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_type'), ''), 'null'), '^"|"$', '')) AS exception_type FROM events INNER JOIN (SELECT argMax(person_distinct_id2.person_id, person_distinct_id2.version) AS events__pdi___person_id, @@ -87,6 +89,7 @@ max(toTimeZone(events.timestamp, 'UTC')) AS last_seen, min(toTimeZone(events.timestamp, 'UTC')) AS first_seen, any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description, + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_type'), ''), 'null'), '^"|"$', '')) AS exception_type, groupArray(tuple(events.uuid, events.distinct_id, events.distinct_id)) AS events FROM events INNER JOIN @@ -126,7 +129,8 @@ count(DISTINCT events.distinct_id) AS users, max(toTimeZone(events.timestamp, 'UTC')) AS last_seen, min(toTimeZone(events.timestamp, 'UTC')) AS first_seen, - any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description, + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_type'), ''), 'null'), '^"|"$', '')) AS exception_type FROM events WHERE and(equals(events.team_id, 2), equals(events.event, '$exception'), 1, ifNull(in(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_fingerprint'), ''), 'null'), '^"|"$', ''), ['SyntaxError']), 0)) LIMIT 101 @@ -148,6 +152,7 @@ max(toTimeZone(events.timestamp, 'UTC')) AS last_seen, min(toTimeZone(events.timestamp, 'UTC')) AS first_seen, any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description, + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_type'), ''), 'null'), '^"|"$', '')) AS exception_type, replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_fingerprint'), ''), 'null'), '^"|"$', '') AS fingerprint FROM events INNER JOIN @@ -189,6 +194,7 @@ max(toTimeZone(events.timestamp, 'UTC')) AS last_seen, min(toTimeZone(events.timestamp, 'UTC')) AS first_seen, any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_message'), ''), 'null'), '^"|"$', '')) AS description, + any(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, '$exception_type'), ''), 'null'), '^"|"$', '')) AS exception_type, groupArray(tuple(events.uuid, events.distinct_id, events.distinct_id)) AS events FROM events INNER JOIN diff --git a/posthog/hogql_queries/test/test_error_tracking_query_runner.py b/posthog/hogql_queries/test/test_error_tracking_query_runner.py index 7521a611b0a8a..1d2b171d8c368 100644 --- a/posthog/hogql_queries/test/test_error_tracking_query_runner.py +++ b/posthog/hogql_queries/test/test_error_tracking_query_runner.py @@ -53,6 +53,7 @@ def setUp(self): team=self.team, properties={ "$exception_fingerprint": "SyntaxError", + "$exception_type": "SyntaxError", "$exception_message": "this is the same error message", }, ) @@ -62,6 +63,7 @@ def setUp(self): team=self.team, properties={ "$exception_fingerprint": "TypeError", + "$exception_type": "TypeError", }, ) _create_event( @@ -70,6 +72,7 @@ def setUp(self): team=self.team, properties={ "$exception_fingerprint": "SyntaxError", + "$exception_type": "SyntaxError", "$exception_message": "this is the same error message", }, ) @@ -79,6 +82,7 @@ def setUp(self): team=self.team, properties={ "$exception_fingerprint": "custom_fingerprint", + "$exception_type": "SyntaxError", "$exception_message": "this is the same error message", }, ) @@ -102,7 +106,17 @@ def test_column_names(self): columns = self._calculate(runner)["columns"] self.assertEqual( - columns, ["occurrences", "sessions", "users", "last_seen", "first_seen", "description", "fingerprint"] + columns, + [ + "occurrences", + "sessions", + "users", + "last_seen", + "first_seen", + "description", + "exception_type", + "fingerprint", + ], ) runner = ErrorTrackingQueryRunner( @@ -125,6 +139,7 @@ def test_column_names(self): "last_seen", "first_seen", "description", + "exception_type", ], ) @@ -143,7 +158,8 @@ def test_column_names(self): columns = result["columns"] # only adds the events column when fields are specificed in `eventColumns` self.assertEqual( - columns, ["occurrences", "sessions", "users", "last_seen", "first_seen", "description", "events"] + columns, + ["occurrences", "sessions", "users", "last_seen", "first_seen", "description", "exception_type", "events"], ) @snapshot_clickhouse_queries @@ -279,6 +295,7 @@ def test_merges_and_defaults_groups(self): { "assignee": self.user.id, "description": "this is the same error message", + "exception_type": "SyntaxError", "events": None, "fingerprint": "SyntaxError", "first_seen": datetime(2020, 1, 10, 12, 11, tzinfo=ZoneInfo("UTC")), @@ -294,6 +311,7 @@ def test_merges_and_defaults_groups(self): { "assignee": None, "description": None, + "exception_type": "TypeError", "events": None, "fingerprint": "TypeError", "first_seen": datetime(2020, 1, 10, 12, 11, tzinfo=ZoneInfo("UTC")), diff --git a/posthog/management/commands/change_plugin_config_referenced_plugin.py b/posthog/management/commands/change_plugin_config_referenced_plugin.py new file mode 100644 index 0000000000000..79b4704faf19f --- /dev/null +++ b/posthog/management/commands/change_plugin_config_referenced_plugin.py @@ -0,0 +1,38 @@ +import time +from django.core.management.base import BaseCommand +from posthog.models import PluginConfig, Plugin + + +class Command(BaseCommand): + help = "Set the plugin_id of a given config or set of configs to something else" + + def add_arguments(self, parser): + parser.add_argument("config_ids", type=str, help="Plugin config ID or list of ID's, separated by commas") + parser.add_argument("new_plugin_id", type=int, help="New Plugin ID") + parser.add_argument("--dry-run", type=bool, help="Print information instead of storing it") + + def handle(self, *args, **options): + dry_run = options["dry_run"] + config_ids = options["config_ids"] + new_plugin_id = options["new_plugin_id"] + + if "," in config_ids: + config_ids = {int(x) for x in config_ids.split(",")} + else: + config_ids = {int(config_ids)} + + new_plugin = Plugin.objects.get(id=new_plugin_id) + found_configs = PluginConfig.objects.filter(id__in=config_ids) + + existing_plugins = [(config.id, Plugin.objects.get(id=config.plugin_id).name) for config in found_configs] + + print(f"Going to update {len(found_configs)} rows, setting plugin_id to {new_plugin_id} ({new_plugin.name})") # noqa T201 + print(f"Current plugins (config_id, plugin_name) - MAKE SURE THESE MAKE SENSE: {existing_plugins}") # noqa T201 + print("Sleeping for 10 seconds, now is your chance to cancel") # noqa T201 + time.sleep(10) + print("Starting") # noqa T201 + if not dry_run: + updated = found_configs.update(plugin=new_plugin) + print(f"Updated {updated} rows") # noqa T201 + else: + print(f"Would update {len(config_ids)} rows") # noqa T201 diff --git a/posthog/models/async_deletion/async_deletion.py b/posthog/models/async_deletion/async_deletion.py index d86ca18e8697a..a851fa513f526 100644 --- a/posthog/models/async_deletion/async_deletion.py +++ b/posthog/models/async_deletion/async_deletion.py @@ -1,9 +1,6 @@ from django.db import models -MAX_QUERY_SIZE = 2_621_440 - - class DeletionType(models.IntegerChoices): Team = 0 Person = 1 diff --git a/posthog/models/async_deletion/delete.py b/posthog/models/async_deletion/delete.py index 1ab75b353e898..005e93c583c19 100644 --- a/posthog/models/async_deletion/delete.py +++ b/posthog/models/async_deletion/delete.py @@ -3,12 +3,16 @@ import structlog from django.utils import timezone +from prometheus_client import Counter from posthog.models.async_deletion import AsyncDeletion, DeletionType logger = structlog.get_logger(__name__) +deletions_counter = Counter("deletions_confirmed", "Total number of deletions marked confirmed", ["deletion_type"]) + + class AsyncDeletionProcess(ABC): CLICKHOUSE_MUTATION_CHUNK_SIZE = 1_000_000 CLICKHOUSE_VERIFY_CHUNK_SIZE = 1_000 @@ -35,7 +39,9 @@ def mark_deletions_done(self): for i in range(0, len(async_deletions), self.CLICKHOUSE_VERIFY_CHUNK_SIZE): chunk = async_deletions[i : i + self.CLICKHOUSE_VERIFY_CHUNK_SIZE] to_verify = self._verify_by_group(deletion_type, chunk) - if len(to_verify) > 0: + count_to_verify = len(to_verify) + deletions_counter.labels(deletion_type=deletion_type).inc(count_to_verify) + if count_to_verify > 0: AsyncDeletion.objects.filter(pk__in=[row.pk for row in to_verify]).update( delete_verified_at=timezone.now() ) diff --git a/posthog/models/async_deletion/delete_cohorts.py b/posthog/models/async_deletion/delete_cohorts.py index 3593365657325..cbc6de0b75fd0 100644 --- a/posthog/models/async_deletion/delete_cohorts.py +++ b/posthog/models/async_deletion/delete_cohorts.py @@ -1,7 +1,7 @@ from typing import Any from posthog.client import sync_execute -from posthog.models.async_deletion import AsyncDeletion, DeletionType, MAX_QUERY_SIZE +from posthog.models.async_deletion import AsyncDeletion, DeletionType from posthog.models.async_deletion.delete import AsyncDeletionProcess, logger @@ -29,7 +29,7 @@ def process(self, deletions: list[AsyncDeletion]): WHERE {" OR ".join(conditions)} """, args, - settings={"max_query_size": MAX_QUERY_SIZE}, + settings={}, ) def _verify_by_group(self, deletion_type: int, async_deletions: list[AsyncDeletion]) -> list[AsyncDeletion]: @@ -50,7 +50,7 @@ def _verify_by_column(self, distinct_columns: str, async_deletions: list[AsyncDe WHERE {" OR ".join(conditions)} """, args, - settings={"max_query_size": MAX_QUERY_SIZE}, + settings={}, ) return {tuple(row) for row in clickhouse_result} diff --git a/posthog/models/async_deletion/delete_events.py b/posthog/models/async_deletion/delete_events.py index 9c94af5203c6e..fa1c59679df33 100644 --- a/posthog/models/async_deletion/delete_events.py +++ b/posthog/models/async_deletion/delete_events.py @@ -1,10 +1,18 @@ from typing import Any +from prometheus_client import Counter + from posthog.client import sync_execute -from posthog.models.async_deletion import AsyncDeletion, DeletionType, MAX_QUERY_SIZE +from posthog.models.async_deletion import AsyncDeletion, DeletionType from posthog.models.async_deletion.delete import AsyncDeletionProcess, logger from posthog.settings.data_stores import CLICKHOUSE_CLUSTER + +deletions_counter = Counter("deletions_executed", "Total number of deletions sent to clickhouse", ["deletion_type"]) + + +MAX_PREDICATE_SIZE = 240_000 # 240KB + # Note: Session recording, dead letter queue, logs deletion will be handled by TTL TABLES_TO_DELETE_TEAM_DATA_FROM = [ "person", @@ -21,6 +29,8 @@ class AsyncEventDeletion(AsyncDeletionProcess): DELETION_TYPES = [DeletionType.Team, DeletionType.Group, DeletionType.Person] def process(self, deletions: list[AsyncDeletion]): + deletions_counter.labels(deletion_type="event").inc(len(deletions)) + if len(deletions) == 0: logger.debug("No AsyncDeletion to perform") return @@ -36,19 +46,47 @@ def process(self, deletions: list[AsyncDeletion]): ) conditions, args = self._conditions(deletions) + + # Split the deletions into chunks to avoid hitting the max query size + query_predicate = [] + for condition in conditions: + query_predicate.append(condition) + + # Get estimated byte size of the query + str_predicate = " OR ".join(query_predicate) + query_size = len(str_predicate.encode("utf-8")) + + # If the query size is greater than the max predicate size, execute the query and reset the query predicate + if query_size > MAX_PREDICATE_SIZE: + next_args, rest_args = split_dict(args, len(query_predicate) - 1) + sync_execute( + f""" + DELETE FROM posthog.sharded_events + ON CLUSTER '{CLICKHOUSE_CLUSTER}' + WHERE {str_predicate} + """, + next_args, + settings={}, + ) + # Reset the query predicate and predicate args + args = rest_args + query_predicate = [] + + # This is the default condition if we don't hit the MAX_PREDICATE_SIZE sync_execute( f""" - ALTER TABLE sharded_events + DELETE FROM sharded_events ON CLUSTER '{CLICKHOUSE_CLUSTER}' - DELETE WHERE {" OR ".join(conditions)} + WHERE {str_predicate} """, args, - settings={"max_query_size": MAX_QUERY_SIZE}, + settings={}, ) # Team data needs to be deleted from other models as well, groups/persons handles deletions on a schema level team_deletions = [row for row in deletions if row.deletion_type == DeletionType.Team] + deletions_counter.labels(deletion_type=DeletionType.Team).inc(len(team_deletions)) if len(team_deletions) == 0: return @@ -63,12 +101,12 @@ def process(self, deletions: list[AsyncDeletion]): for table in TABLES_TO_DELETE_TEAM_DATA_FROM: sync_execute( f""" - ALTER TABLE {table} + DELETE FROM {table} ON CLUSTER '{CLICKHOUSE_CLUSTER}' - DELETE WHERE {" OR ".join(conditions)} + WHERE {" OR ".join(conditions)} """, args, - settings={"max_query_size": MAX_QUERY_SIZE}, + settings={}, ) def _verify_by_group(self, deletion_type: int, async_deletions: list[AsyncDeletion]) -> list[AsyncDeletion]: @@ -91,7 +129,7 @@ def _verify_by_column(self, distinct_columns: str, async_deletions: list[AsyncDe WHERE {" OR ".join(conditions)} """, args, - settings={"max_query_size": MAX_QUERY_SIZE, "max_execution_time": 30 * 60}, + settings={"max_execution_time": 30 * 60}, ) return {tuple(row) for row in clickhouse_result} @@ -125,3 +163,13 @@ def _condition(self, async_deletion: AsyncDeletion, suffix: str) -> tuple[str, d f"key{suffix}": async_deletion.key, }, ) + + +def split_dict(original_dict, n): + items = list(original_dict.items()) + + # Split the items + first_n = dict(items[:n]) + rest = dict(items[n:]) + + return first_n, rest diff --git a/posthog/models/async_deletion/delete_person.py b/posthog/models/async_deletion/delete_person.py index 5b906a761b604..92768e4e151d4 100644 --- a/posthog/models/async_deletion/delete_person.py +++ b/posthog/models/async_deletion/delete_person.py @@ -1,12 +1,10 @@ from posthog.clickhouse.client import sync_execute -from posthog.models.async_deletion import MAX_QUERY_SIZE - from posthog.clickhouse.client.connection import Workload def remove_deleted_person_data(mutations_sync=False): - settings = {"mutations_sync": 1 if mutations_sync else 0, "max_query_size": MAX_QUERY_SIZE} + settings = {"mutations_sync": 1 if mutations_sync else 0} sync_execute( """ ALTER TABLE person diff --git a/posthog/models/error_tracking/error_tracking.py b/posthog/models/error_tracking/error_tracking.py index 9ec2fa296c13d..cc8ef2140335a 100644 --- a/posthog/models/error_tracking/error_tracking.py +++ b/posthog/models/error_tracking/error_tracking.py @@ -36,17 +36,17 @@ def filter_fingerprints(cls, queryset, fingerprints: list[str]) -> QuerySet: return queryset.filter(query) @transaction.atomic - def merge(self, groups: list["ErrorTrackingGroup"]) -> None: - if not groups: + def merge(self, fingerprints: list[str]) -> None: + if not fingerprints: return merged_fingerprints = set(self.merged_fingerprints) - for group in groups: - fingerprints = [group.fingerprint, *group.merged_fingerprints] - merged_fingerprints |= set(fingerprints) + merged_fingerprints.update(fingerprints) + merging_groups = ErrorTrackingGroup.objects.filter(team=self.team, fingerprint__in=fingerprints) + for group in merging_groups: + merged_fingerprints |= set(group.merged_fingerprints) + + merging_groups.delete() self.merged_fingerprints = list(merged_fingerprints) self.save() - - for group in groups: - group.delete() diff --git a/posthog/models/error_tracking/test/test_error_tracking.py b/posthog/models/error_tracking/test/test_error_tracking.py index 6baa6701b5815..148cbc2aabf01 100644 --- a/posthog/models/error_tracking/test/test_error_tracking.py +++ b/posthog/models/error_tracking/test/test_error_tracking.py @@ -22,18 +22,18 @@ def test_filtering(self): ) matching_groups = ErrorTrackingGroup.objects.filter(fingerprint__in=["first_error", "second_error"]) - assert len(matching_groups) == 2 + assert matching_groups.count() == 2 matching_groups = ErrorTrackingGroup.objects.filter(merged_fingerprints__contains=["previously_merged"]) - assert len(matching_groups) == 1 + assert matching_groups.count() == 1 matching_groups = ErrorTrackingGroup.filter_fingerprints( queryset=ErrorTrackingGroup.objects, fingerprints=["first_error", "previously_merged"] ) - assert len(matching_groups) == 2 + assert matching_groups.count() == 2 def test_merge(self): - root_group = ErrorTrackingGroup.objects.create( + primary_group = ErrorTrackingGroup.objects.create( status="active", team=self.team, fingerprint="a_fingerprint", @@ -49,14 +49,16 @@ def test_merge(self): merged_fingerprints=["merged_fingerprint"], ) - root_group.merge([merge_group_1, merge_group_2]) + merging_fingerprints = [merge_group_1.fingerprint, merge_group_2.fingerprint, "no_group_fingerprint"] + primary_group.merge(merging_fingerprints) - assert sorted(root_group.merged_fingerprints) == [ + assert sorted(primary_group.merged_fingerprints) == [ "already_merged_fingerprint", "another_fingerprint", "merged_fingerprint", "new_fingerprint", + "no_group_fingerprint", ] # deletes the old groups - assert len(ErrorTrackingGroup.objects.filter(fingerprint="new_fingerprint")) == 0 + assert ErrorTrackingGroup.objects.count() == 1 diff --git a/posthog/models/event/sql.py b/posthog/models/event/sql.py index 33e7d2a2c3062..8219bece6572b 100644 --- a/posthog/models/event/sql.py +++ b/posthog/models/event/sql.py @@ -65,6 +65,10 @@ , $group_4 VARCHAR MATERIALIZED {trim_quotes_expr("JSONExtractRaw(properties, '$group_4')")} COMMENT 'column_materializer::$group_4' , $window_id VARCHAR MATERIALIZED {trim_quotes_expr("JSONExtractRaw(properties, '$window_id')")} COMMENT 'column_materializer::$window_id' , $session_id VARCHAR MATERIALIZED {trim_quotes_expr("JSONExtractRaw(properties, '$session_id')")} COMMENT 'column_materializer::$session_id' + , elements_chain_href String MATERIALIZED extract(elements_chain, '(?::|\")href="(.*?)"') + , elements_chain_texts Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|\")text="(.*?)"')) + , elements_chain_ids Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|\")attr_id="(.*?)"')) + , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?:^|;)(a|button|form|input|select|textarea|label)(?:\\.|$|:)')) , INDEX `minmax_$group_0` `$group_0` TYPE minmax GRANULARITY 1 , INDEX `minmax_$group_1` `$group_1` TYPE minmax GRANULARITY 1 , INDEX `minmax_$group_2` `$group_2` TYPE minmax GRANULARITY 1 @@ -72,10 +76,6 @@ , INDEX `minmax_$group_4` `$group_4` TYPE minmax GRANULARITY 1 , INDEX `minmax_$window_id` `$window_id` TYPE minmax GRANULARITY 1 , INDEX `minmax_$session_id` `$session_id` TYPE minmax GRANULARITY 1 - , elements_chain_href String MATERIALIZED extract(elements_chain, '(?::|\")href="(.*?)"') - , elements_chain_texts Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|\")text="(.*?)"')) - , elements_chain_ids Array(String) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?::|\")attr_id="(.*?)"')) - , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) MATERIALIZED arrayDistinct(extractAll(elements_chain, '(?:^|;)(a|button|form|input|select|textarea|label)(?:\\.|$|:)')) """ EVENTS_TABLE_PROXY_MATERIALIZED_COLUMNS = """ @@ -86,6 +86,10 @@ , $group_4 VARCHAR COMMENT 'column_materializer::$group_4' , $window_id VARCHAR COMMENT 'column_materializer::$window_id' , $session_id VARCHAR COMMENT 'column_materializer::$session_id' + , elements_chain_href String COMMENT 'column_materializer::elements_chain::href' + , elements_chain_texts Array(String) COMMENT 'column_materializer::elements_chain::texts' + , elements_chain_ids Array(String) COMMENT 'column_materializer::elements_chain::ids' + , elements_chain_elements Array(Enum('a', 'button', 'form', 'input', 'select', 'textarea', 'label')) COMMENT 'column_materializer::elements_chain::elements' """ EVENTS_DATA_TABLE_ENGINE = lambda: ReplacingMergeTree( diff --git a/posthog/models/event/util.py b/posthog/models/event/util.py index 8aa798cc12916..609d7974f7cdd 100644 --- a/posthog/models/event/util.py +++ b/posthog/models/event/util.py @@ -136,8 +136,12 @@ def bulk_create_events( timestamp = timestamp.astimezone(ZoneInfo("UTC")).strftime("%Y-%m-%d %H:%M:%S.%f") elements_chain = "" - if event.get("elements") and len(event["elements"]) > 0: - elements_chain = elements_to_string(elements=event.get("elements")) # type: ignore + if tentative_elements_chain := event.get("elements_chain"): + assert isinstance(tentative_elements_chain, str) + elements_chain = tentative_elements_chain + elif tentative_elements := event.get("elements"): + assert isinstance(tentative_elements, list) + elements_chain = elements_to_string(elements=tentative_elements) inserts.append( """( diff --git a/posthog/models/personal_api_key.py b/posthog/models/personal_api_key.py index e671194e700ae..fe23d8f66fdff 100644 --- a/posthog/models/personal_api_key.py +++ b/posthog/models/personal_api_key.py @@ -75,7 +75,6 @@ class PersonalAPIKey(models.Model): # WARNING: Make sure to keep in sync with the frontend! APIScopeObject = Literal[ - "alert", "action", "activity_log", "annotation", diff --git a/posthog/models/raw_sessions/sql.py b/posthog/models/raw_sessions/sql.py index 9a144f278c2e8..f682fe3ed48c6 100644 --- a/posthog/models/raw_sessions/sql.py +++ b/posthog/models/raw_sessions/sql.py @@ -215,7 +215,7 @@ def source_int_column(column_name: str) -> str: -- replay false as maybe_has_session_replay -FROM {database}.sharded_events +FROM {database}.events WHERE bitAnd(bitShiftRight(toUInt128(accurateCastOrNull(`$session_id`, 'UUID')), 76), 0xF) == 7 -- has a session id and is valid uuidv7 """.format( database=settings.CLICKHOUSE_DATABASE, diff --git a/posthog/pagerduty/__init__.py b/posthog/pagerduty/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/posthog/pagerduty/pd.py b/posthog/pagerduty/pd.py new file mode 100644 index 0000000000000..a6f74b8dd8384 --- /dev/null +++ b/posthog/pagerduty/pd.py @@ -0,0 +1,20 @@ +from pdpyras import EventsAPISession +from structlog import get_logger + +from django.conf import settings + +from posthog.utils import get_instance_region + + +logger = get_logger(__name__) +routing_key = settings.PAGERDUTY_API_KEY + + +def create_incident(summary, source, severity="critical"): + try: + session = EventsAPISession(routing_key) + logger.info(f"Creating PagerDuty incident with summary: {summary}, source: {source}, severity: {severity}") + env = get_instance_region() + session.trigger(summary=f"{summary}-{env}", source=source, severity=severity) + except Exception as e: + logger.warn(f"Error creating PagerDuty Incident incident: {e}") diff --git a/posthog/schema.py b/posthog/schema.py index cd957832fd843..e7503a693ffb9 100644 --- a/posthog/schema.py +++ b/posthog/schema.py @@ -155,6 +155,7 @@ class ChartAxis(BaseModel): class ChartDisplayType(StrEnum): ACTIONS_LINE_GRAPH = "ActionsLineGraph" ACTIONS_BAR = "ActionsBar" + ACTIONS_STACKED_BAR = "ActionsStackedBar" ACTIONS_AREA_GRAPH = "ActionsAreaGraph" ACTIONS_LINE_GRAPH_CUMULATIVE = "ActionsLineGraphCumulative" BOLD_NUMBER = "BoldNumber" @@ -338,6 +339,7 @@ class ErrorTrackingGroup(BaseModel): assignee: Optional[float] = None description: Optional[str] = None events: Optional[list[dict[str, Any]]] = None + exception_type: Optional[str] = None fingerprint: str first_seen: AwareDatetime last_seen: AwareDatetime @@ -843,7 +845,9 @@ class QueryStatus(BaseModel): ), ) dashboard_id: Optional[int] = None - end_time: Optional[AwareDatetime] = None + end_time: Optional[AwareDatetime] = Field( + default=None, description="When did the query execution task finish (whether successfully or not)." + ) error: Optional[bool] = Field( default=False, description=( @@ -855,10 +859,13 @@ class QueryStatus(BaseModel): id: str insight_id: Optional[int] = None labels: Optional[list[str]] = None + pickup_time: Optional[AwareDatetime] = Field( + default=None, description="When was the query execution task picked up by a worker." + ) query_async: Literal[True] = Field(default=True, description="ONLY async queries use QueryStatus.") query_progress: Optional[ClickhouseQueryProgress] = None results: Optional[Any] = None - start_time: Optional[AwareDatetime] = None + start_time: Optional[AwareDatetime] = Field(default=None, description="When was query execution task enqueued.") task_id: Optional[str] = None team_id: int diff --git a/posthog/settings/__init__.py b/posthog/settings/__init__.py index 09b36671416f4..86a0e3d798787 100644 --- a/posthog/settings/__init__.py +++ b/posthog/settings/__init__.py @@ -42,6 +42,7 @@ from posthog.settings.data_warehouse import * from posthog.settings.session_replay import * from posthog.settings.integrations import * +from posthog.settings.pagerduty import * from posthog.settings.utils import get_from_env, str_to_bool diff --git a/posthog/settings/pagerduty.py b/posthog/settings/pagerduty.py new file mode 100644 index 0000000000000..dccc6e3c88314 --- /dev/null +++ b/posthog/settings/pagerduty.py @@ -0,0 +1,3 @@ +from posthog.settings.utils import get_from_env + +PAGERDUTY_API_KEY = get_from_env("PAGERDUTY_API_KEY", "") diff --git a/posthog/tasks/tasks.py b/posthog/tasks/tasks.py index 3d76426d98b34..e192aa2932bec 100644 --- a/posthog/tasks/tasks.py +++ b/posthog/tasks/tasks.py @@ -484,6 +484,7 @@ def clickhouse_mutation_count() -> None: def clickhouse_clear_removed_data() -> None: from posthog.models.async_deletion.delete_cohorts import AsyncCohortDeletion from posthog.models.async_deletion.delete_events import AsyncEventDeletion + from posthog.pagerduty.pd import create_incident runner = AsyncEventDeletion() @@ -491,11 +492,13 @@ def clickhouse_clear_removed_data() -> None: runner.mark_deletions_done() except Exception as e: logger.error("Failed to mark deletions done", error=e, exc_info=True) + create_incident("Failed to mark deletions done", "clickhouse_clear_removed_data", severity="error") try: runner.run() except Exception as e: logger.error("Failed to run deletions", error=e, exc_info=True) + create_incident("Failed to run deletions", "clickhouse_clear_removed_data", severity="error") cohort_runner = AsyncCohortDeletion() @@ -503,11 +506,13 @@ def clickhouse_clear_removed_data() -> None: cohort_runner.mark_deletions_done() except Exception as e: logger.error("Failed to mark cohort deletions done", error=e, exc_info=True) + create_incident("Failed to mark cohort deletions done", "clickhouse_clear_removed_data", severity="error") try: cohort_runner.run() except Exception as e: logger.error("Failed to run cohort deletions", error=e, exc_info=True) + create_incident("Failed to run cohort deletions", "clickhouse_clear_removed_data", severity="error") @shared_task(ignore_result=True) diff --git a/posthog/tasks/test/test_warehouse.py b/posthog/tasks/test/test_warehouse.py index b03c04146a582..a665d8bd95616 100644 --- a/posthog/tasks/test/test_warehouse.py +++ b/posthog/tasks/test/test_warehouse.py @@ -1,10 +1,16 @@ from posthog.test.base import APIBaseTest from unittest.mock import patch, MagicMock -from posthog.tasks.warehouse import check_synced_row_limits_of_team, capture_workspace_rows_synced_by_team +from posthog.tasks.warehouse import ( + check_synced_row_limits_of_team, + capture_workspace_rows_synced_by_team, + validate_data_warehouse_table_columns, +) from posthog.warehouse.models import ExternalDataSource, ExternalDataJob from freezegun import freeze_time import datetime +from posthog.warehouse.models.table import DataWarehouseTable + class TestWarehouse(APIBaseTest): @patch("posthog.tasks.warehouse.MONTHLY_LIMIT", 100) @@ -144,3 +150,24 @@ def test_capture_workspace_rows_synced_by_team_month_cutoff_field_set(self, mock self.team.external_data_workspace_last_synced_at, datetime.datetime(2023, 11, 7, 16, 50, 49, tzinfo=datetime.UTC), ) + + @patch("posthog.tasks.warehouse.get_ph_client") + def test_validate_data_warehouse_table_columns(self, mock_get_ph_client: MagicMock) -> None: + mock_ph_client = MagicMock() + mock_get_ph_client.return_value = mock_ph_client + + table = DataWarehouseTable.objects.create( + name="table_name", + format="Parquet", + team=self.team, + columns={"some_columns": {"hogql": "StringDatabaseField", "clickhouse": "Nullable(String)"}}, + ) + + with patch.object(DataWarehouseTable, "validate_column_type", return_value=True): + validate_data_warehouse_table_columns(self.team.pk, str(table.id)) + + table.refresh_from_db() + + assert table.columns.get("some_columns").get("valid") is True + mock_ph_client.capture.assert_called_once() + mock_ph_client.shutdown.assert_called_once() diff --git a/posthog/tasks/warehouse.py b/posthog/tasks/warehouse.py index 0bff919c739d9..69970ff9d558d 100644 --- a/posthog/tasks/warehouse.py +++ b/posthog/tasks/warehouse.py @@ -114,3 +114,28 @@ def capture_workspace_rows_synced_by_team(team_id: int) -> None: team.save() ph_client.shutdown() + + +@shared_task(ignore_result=True) +def validate_data_warehouse_table_columns(team_id: int, table_id: str) -> None: + from posthog.warehouse.models import DataWarehouseTable + + ph_client = get_ph_client() + + try: + table = DataWarehouseTable.objects.get(team_id=team_id, id=table_id) + for column in table.columns.keys(): + table.columns[column]["valid"] = table.validate_column_type(column) + table.save() + + ph_client.capture(team_id, "validate_data_warehouse_table_columns succeeded") + except Exception as e: + logger.exception( + f"validate_data_warehouse_table_columns raised an exception for table: {table_id}", + exc_info=e, + team_id=team_id, + ) + + ph_client.capture(team_id, "validate_data_warehouse_table_columns errored") + finally: + ph_client.shutdown() diff --git a/posthog/temporal/batch_exports/batch_exports.py b/posthog/temporal/batch_exports/batch_exports.py index e0d629c54e35c..5dd306cd85ec9 100644 --- a/posthog/temporal/batch_exports/batch_exports.py +++ b/posthog/temporal/batch_exports/batch_exports.py @@ -48,6 +48,9 @@ interval_end={interval_end} ) AS persons FORMAT ArrowStream +-- This is half of configured MAX_MEMORY_USAGE for batch exports. +-- TODO: Make the setting available to all queries. +SETTINGS max_bytes_before_external_group_by=50000000000 """ SELECT_FROM_EVENTS_VIEW = Template(""" diff --git a/posthog/temporal/batch_exports/bigquery_batch_export.py b/posthog/temporal/batch_exports/bigquery_batch_export.py index 735df5b7f3505..5c57c8a8038f2 100644 --- a/posthog/temporal/batch_exports/bigquery_batch_export.py +++ b/posthog/temporal/batch_exports/bigquery_batch_export.py @@ -507,7 +507,7 @@ def get_batch_export_writer( return writer -@workflow.defn(name="bigquery-export") +@workflow.defn(name="bigquery-export", failure_exception_types=[workflow.NondeterminismError]) class BigQueryBatchExportWorkflow(PostHogWorkflow): """A Temporal Workflow to export ClickHouse data into BigQuery. diff --git a/posthog/temporal/batch_exports/postgres_batch_export.py b/posthog/temporal/batch_exports/postgres_batch_export.py index 75093fe444986..fbf233d89e483 100644 --- a/posthog/temporal/batch_exports/postgres_batch_export.py +++ b/posthog/temporal/batch_exports/postgres_batch_export.py @@ -571,7 +571,7 @@ async def flush_to_postgres( return writer.records_total -@workflow.defn(name="postgres-export") +@workflow.defn(name="postgres-export", failure_exception_types=[workflow.NondeterminismError]) class PostgresBatchExportWorkflow(PostHogWorkflow): """A Temporal Workflow to export ClickHouse data into Postgres. diff --git a/posthog/temporal/batch_exports/redshift_batch_export.py b/posthog/temporal/batch_exports/redshift_batch_export.py index b4816feb220ed..88cde6a238c2f 100644 --- a/posthog/temporal/batch_exports/redshift_batch_export.py +++ b/posthog/temporal/batch_exports/redshift_batch_export.py @@ -490,7 +490,7 @@ async def record_generator() -> collections.abc.AsyncGenerator[dict[str, typing. return records_completed -@workflow.defn(name="redshift-export") +@workflow.defn(name="redshift-export", failure_exception_types=[workflow.NondeterminismError]) class RedshiftBatchExportWorkflow(PostHogWorkflow): """A Temporal Workflow to export ClickHouse data into Postgres. diff --git a/posthog/temporal/batch_exports/s3_batch_export.py b/posthog/temporal/batch_exports/s3_batch_export.py index 7150d116feb71..f26e1418f3681 100644 --- a/posthog/temporal/batch_exports/s3_batch_export.py +++ b/posthog/temporal/batch_exports/s3_batch_export.py @@ -595,7 +595,7 @@ def get_batch_export_writer( return writer -@workflow.defn(name="s3-export") +@workflow.defn(name="s3-export", failure_exception_types=[workflow.NondeterminismError]) class S3BatchExportWorkflow(PostHogWorkflow): """A Temporal Workflow to export ClickHouse data into S3. diff --git a/posthog/temporal/batch_exports/snowflake_batch_export.py b/posthog/temporal/batch_exports/snowflake_batch_export.py index e7fc189b3fc28..1df81e895dad5 100644 --- a/posthog/temporal/batch_exports/snowflake_batch_export.py +++ b/posthog/temporal/batch_exports/snowflake_batch_export.py @@ -674,7 +674,7 @@ async def flush_to_snowflake( return writer.records_total -@workflow.defn(name="snowflake-export") +@workflow.defn(name="snowflake-export", failure_exception_types=[workflow.NondeterminismError]) class SnowflakeBatchExportWorkflow(PostHogWorkflow): """A Temporal Workflow to export ClickHouse data into Snowflake. diff --git a/posthog/temporal/data_imports/pipelines/sql_database/__init__.py b/posthog/temporal/data_imports/pipelines/sql_database/__init__.py index 6f9ec4c1162b7..a3524f378e1a7 100644 --- a/posthog/temporal/data_imports/pipelines/sql_database/__init__.py +++ b/posthog/temporal/data_imports/pipelines/sql_database/__init__.py @@ -46,6 +46,7 @@ def sql_source_for_type( sslmode: str, schema: str, table_names: list[str], + team_id: Optional[int] = None, incremental_field: Optional[str] = None, incremental_field_type: Optional[IncrementalFieldType] = None, ) -> DltSource: @@ -71,7 +72,9 @@ def sql_source_for_type( else: raise Exception("Unsupported source_type") - db_source = sql_database(credentials, schema=schema, table_names=table_names, incremental=incremental) + db_source = sql_database( + credentials, schema=schema, table_names=table_names, incremental=incremental, team_id=team_id + ) return db_source @@ -110,6 +113,14 @@ def snowflake_source( return db_source +# Temp while DLT doesn't support `interval` columns +def remove_interval(doc: dict, team_id: Optional[int]) -> dict: + if team_id == 1 or team_id == 2: + if "sync_frequency_interval" in doc: + del doc["sync_frequency_interval"] + return doc + + @dlt.source(max_table_nesting=0) def sql_database( credentials: Union[ConnectionStringCredentials, Engine, str] = dlt.secrets.value, @@ -117,6 +128,7 @@ def sql_database( metadata: Optional[MetaData] = None, table_names: Optional[List[str]] = dlt.config.value, # noqa: UP006 incremental: Optional[dlt.sources.incremental] = None, + team_id: Optional[int] = None, ) -> Iterable[DltResource]: """ A DLT source which loads data from an SQL database using SQLAlchemy. @@ -161,7 +173,7 @@ def sql_database( spec=SqlDatabaseTableConfiguration, table_format="delta", columns=get_column_hints(engine, schema or "", table.name), - )( + ).add_map(lambda x: remove_interval(x, team_id))( engine=engine, table=table, incremental=incremental, diff --git a/posthog/temporal/data_imports/pipelines/stripe/__init__.py b/posthog/temporal/data_imports/pipelines/stripe/__init__.py index 7bb66a63d1b06..51f3f7283f064 100644 --- a/posthog/temporal/data_imports/pipelines/stripe/__init__.py +++ b/posthog/temporal/data_imports/pipelines/stripe/__init__.py @@ -174,7 +174,7 @@ def get_resource(name: str, is_incremental: bool) -> EndpointResource: else None, # "currency": "OPTIONAL_CONFIG", # "ending_before": "OPTIONAL_CONFIG", - # "expand": "OPTIONAL_CONFIG", + "expand[]": "data.tiers", "limit": 100, # "lookup_keys": "OPTIONAL_CONFIG", # "product": "OPTIONAL_CONFIG", diff --git a/posthog/temporal/data_imports/workflow_activities/import_data.py b/posthog/temporal/data_imports/workflow_activities/import_data.py index 103408db92bd4..db6e0aedd4bcf 100644 --- a/posthog/temporal/data_imports/workflow_activities/import_data.py +++ b/posthog/temporal/data_imports/workflow_activities/import_data.py @@ -153,6 +153,7 @@ async def import_data_activity(inputs: ImportDataActivityInputs): incremental_field_type=schema.sync_type_config.get("incremental_field_type") if schema.is_incremental else None, + team_id=inputs.team_id, ) return await _run( @@ -178,6 +179,7 @@ async def import_data_activity(inputs: ImportDataActivityInputs): incremental_field_type=schema.sync_type_config.get("incremental_field_type") if schema.is_incremental else None, + team_id=inputs.team_id, ) return await _run( diff --git a/posthog/temporal/tests/batch_exports/test_import_data.py b/posthog/temporal/tests/batch_exports/test_import_data.py index 935781c3bdf34..58b2e66e9f26b 100644 --- a/posthog/temporal/tests/batch_exports/test_import_data.py +++ b/posthog/temporal/tests/batch_exports/test_import_data.py @@ -87,6 +87,7 @@ async def test_postgres_source_without_ssh_tunnel(activity_environment, team, ** table_names=["table_1"], incremental_field=None, incremental_field_type=None, + team_id=team.id, ) @@ -125,6 +126,7 @@ async def test_postgres_source_with_ssh_tunnel_disabled(activity_environment, te table_names=["table_1"], incremental_field=None, incremental_field_type=None, + team_id=team.id, ) @@ -180,4 +182,5 @@ def __exit__(self, exc_type, exc_value, exc_traceback): table_names=["table_1"], incremental_field=None, incremental_field_type=None, + team_id=team.id, ) diff --git a/posthog/test/base.py b/posthog/test/base.py index 6d1d608da930a..6f23e9d8fbc05 100644 --- a/posthog/test/base.py +++ b/posthog/test/base.py @@ -5,6 +5,7 @@ import threading import time import uuid +import unittest from collections.abc import Callable, Generator from contextlib import contextmanager from functools import wraps @@ -100,6 +101,10 @@ persons_ordering_int: int = 1 +# Expand string diffs +unittest.util._MAX_LENGTH = 2000 # type: ignore + + def _setup_test_data(klass): klass.organization = Organization.objects.create(name=klass.CONFIG_ORGANIZATION_NAME) klass.project, klass.team = Project.objects.create_with_team( diff --git a/posthog/warehouse/api/external_data_source.py b/posthog/warehouse/api/external_data_source.py index 059e1fe271154..e7a6c354dcc15 100644 --- a/posthog/warehouse/api/external_data_source.py +++ b/posthog/warehouse/api/external_data_source.py @@ -441,7 +441,7 @@ def _handle_sql_source(self, request: Request, *args: Any, **kwargs: Any) -> tup ssh_tunnel_auth_type_passphrase = ssh_tunnel_auth_type_obj.get("passphrase", None) ssh_tunnel_auth_type_private_key = ssh_tunnel_auth_type_obj.get("private_key", None) - if not self._validate_postgres_host(host, self.team_id): + if not self._validate_database_host(host, self.team_id, using_ssh_tunnel): raise InternalPostgresError() new_source_model = ExternalDataSource.objects.create( @@ -686,10 +686,10 @@ def database_schema(self, request: Request, *arg: Any, **kwargs: Any): ) # Validate internal postgres - if not self._validate_postgres_host(host, self.team_id): + if not self._validate_database_host(host, self.team_id, using_ssh_tunnel): return Response( status=status.HTTP_400_BAD_REQUEST, - data={"message": "Cannot use internal Postgres database"}, + data={"message": "Cannot use internal database"}, ) try: @@ -893,7 +893,10 @@ def _expose_snowflake_error(self, error: ProgrammingError | DatabaseError | Forb return value return None - def _validate_postgres_host(self, host: str, team_id: int) -> bool: + def _validate_database_host(self, host: str, team_id: int, using_ssh_tunnel: bool) -> bool: + if using_ssh_tunnel: + return True + if host.startswith("172") or host.startswith("10") or host.startswith("localhost"): if is_cloud(): region = get_instance_region() diff --git a/posthog/warehouse/api/table.py b/posthog/warehouse/api/table.py index d5929a9a04315..4becffd0cdc84 100644 --- a/posthog/warehouse/api/table.py +++ b/posthog/warehouse/api/table.py @@ -8,6 +8,7 @@ from posthog.hogql.context import HogQLContext from posthog.hogql.database.database import SerializedField, create_hogql_database, serialize_fields from posthog.schema import DatabaseSerializedFieldType +from posthog.tasks.warehouse import validate_data_warehouse_table_columns from posthog.warehouse.models import ( DataWarehouseCredential, DataWarehouseSavedQuery, @@ -110,9 +111,7 @@ def create(self, validated_data): raise serializers.ValidationError(str(err)) table.save() - for column in table.columns.keys(): - table.columns[column]["valid"] = table.validate_column_type(column) - table.save() + validate_data_warehouse_table_columns.delay(self.context["team_id"], str(table.id)) # type: ignore return table diff --git a/posthog/warehouse/api/test/test_external_data_source.py b/posthog/warehouse/api/test/test_external_data_source.py index 85fbec2cef0f7..5fe756047626d 100644 --- a/posthog/warehouse/api/test/test_external_data_source.py +++ b/posthog/warehouse/api/test/test_external_data_source.py @@ -635,7 +635,7 @@ def test_internal_postgres(self, patch_get_sql_schemas_for_source_type): }, ) self.assertEqual(response.status_code, 400) - self.assertEqual(response.json(), {"message": "Cannot use internal Postgres database"}) + self.assertEqual(response.json(), {"message": "Cannot use internal database"}) with override_settings(CLOUD_DEPLOYMENT="EU"): team_1 = Team.objects.create(id=1, organization=self.team.organization) @@ -679,7 +679,7 @@ def test_internal_postgres(self, patch_get_sql_schemas_for_source_type): }, ) self.assertEqual(response.status_code, 400) - self.assertEqual(response.json(), {"message": "Cannot use internal Postgres database"}) + self.assertEqual(response.json(), {"message": "Cannot use internal database"}) def test_source_jobs(self): source = self._create_external_data_source() diff --git a/posthog/warehouse/api/test/test_table.py b/posthog/warehouse/api/test/test_table.py index f8c451c35ab5b..d81172e263711 100644 --- a/posthog/warehouse/api/test/test_table.py +++ b/posthog/warehouse/api/test/test_table.py @@ -20,7 +20,8 @@ class TestTable(APIBaseTest): "posthog.warehouse.models.table.DataWarehouseTable.validate_column_type", return_value=True, ) - def test_create_columns(self, patch_get_columns, patch_validate_column_type): + @patch("posthog.tasks.warehouse.get_ph_client") + def test_create_columns(self, patch_get_columns, patch_validate_column_type, patch_get_ph_client): response = self.client.post( f"/api/projects/{self.team.id}/warehouse_tables/", { @@ -58,7 +59,8 @@ def test_create_columns(self, patch_get_columns, patch_validate_column_type): "posthog.warehouse.models.table.DataWarehouseTable.validate_column_type", return_value=False, ) - def test_create_columns_invalid_schema(self, patch_get_columns, patch_validate_column_type): + @patch("posthog.tasks.warehouse.get_ph_client") + def test_create_columns_invalid_schema(self, patch_get_columns, patch_validate_column_type, patch_get_ph_client): response = self.client.post( f"/api/projects/{self.team.id}/warehouse_tables/", { @@ -244,7 +246,8 @@ def test_update_schema_400_with_invalid_type(self): "posthog.warehouse.models.table.DataWarehouseTable.validate_column_type", return_value=True, ) - def test_table_name_duplicate(self, patch_get_columns, patch_validate_column_type): + @patch("posthog.tasks.warehouse.get_ph_client") + def test_table_name_duplicate(self, patch_get_columns, patch_validate_column_type, patch_get_ph_client): response = self.client.post( f"/api/projects/{self.team.id}/warehouse_tables/", { diff --git a/posthog/warehouse/api/test/test_view.py b/posthog/warehouse/api/test/test_view.py index 81d262964a64e..558cb1ce75135 100644 --- a/posthog/warehouse/api/test/test_view.py +++ b/posthog/warehouse/api/test/test_view.py @@ -99,7 +99,8 @@ def test_view_updated(self): "posthog.warehouse.models.datawarehouse_saved_query.DataWarehouseSavedQuery.get_columns", return_value={"id": "String", "a_column": "String"}, ) - def test_view_with_external_table(self, patch_get_columns_1, patch_get_columns_2): + @patch("posthog.tasks.warehouse.get_ph_client") + def test_view_with_external_table(self, patch_get_columns_1, patch_get_columns_2, patch_get_ph_client): response = self.client.post( f"/api/projects/{self.team.id}/warehouse_tables/", { diff --git a/posthog/warehouse/data_load/service.py b/posthog/warehouse/data_load/service.py index 9ee54510227bc..7b053dbd2d840 100644 --- a/posthog/warehouse/data_load/service.py +++ b/posthog/warehouse/data_load/service.py @@ -11,7 +11,7 @@ ScheduleSpec, ScheduleState, ) - +from temporalio.common import RetryPolicy from posthog.constants import DATA_WAREHOUSE_TASK_QUEUE from posthog.temporal.common.client import async_connect, sync_connect from posthog.temporal.common.schedule import ( @@ -56,6 +56,12 @@ def get_sync_schedule(external_data_schema: "ExternalDataSchema"): asdict(inputs), id=str(external_data_schema.id), task_queue=str(DATA_WAREHOUSE_TASK_QUEUE), + retry_policy=RetryPolicy( + initial_interval=timedelta(seconds=10), + maximum_interval=timedelta(seconds=60), + maximum_attempts=3, + non_retryable_error_types=["NondeterminismError"], + ), ), spec=ScheduleSpec( intervals=[ScheduleIntervalSpec(every=sync_frequency)], diff --git a/posthog/warehouse/models/external_table_definitions.py b/posthog/warehouse/models/external_table_definitions.py index 4ab765b60a23a..62d0289f74f59 100644 --- a/posthog/warehouse/models/external_table_definitions.py +++ b/posthog/warehouse/models/external_table_definitions.py @@ -252,6 +252,7 @@ "nickname": StringDatabaseField(name="nickname"), "recurring": StringJSONDatabaseField(name="recurring"), "tiers_mode": StringDatabaseField(name="tiers_mode"), + "tiers": StringArrayDatabaseField(name="tiers"), "unit_amount": IntegerDatabaseField(name="unit_amount"), "tax_behavior": StringDatabaseField(name="tax_behavior"), "billing_scheme": StringDatabaseField(name="billing_scheme"), diff --git a/requirements.in b/requirements.in index 004661063be43..a55aaac74941d 100644 --- a/requirements.in +++ b/requirements.in @@ -54,6 +54,7 @@ orjson==3.9.10 pandas==2.2.0 paramiko==3.4.0 Pillow==10.2.0 +pdpyras==5.2.0 posthoganalytics==3.5.0 psycopg2-binary==2.9.7 PyMySQL==1.1.1 @@ -83,7 +84,7 @@ sshtunnel==0.4.0 statshog==1.0.6 structlog==23.2.0 sqlparse==0.4.4 -temporalio==1.4.0 +temporalio==1.6.0 token-bucket==0.3.0 toronado==0.1.0 webdriver_manager==4.0.1 @@ -95,7 +96,7 @@ phonenumberslite==8.13.6 openai==1.10.0 tiktoken==0.6.0 nh3==0.2.14 -hogql-parser==1.0.29 +hogql-parser==1.0.32 zxcvbn==4.4.28 zstd==1.5.5.1 xmlsec==1.3.13 # Do not change this version - it will break SAML diff --git a/requirements.txt b/requirements.txt index c4e07d9924e01..0586b8631f540 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,12 @@ -# This file was autogenerated by uv via the following command: -# uv pip compile requirements.in -o requirements.txt +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile requirements.in +# aioboto3==12.0.0 # via -r requirements.in -aiobotocore==2.7.0 +aiobotocore[boto3]==2.7.0 # via # aioboto3 # s3fs @@ -204,7 +208,7 @@ djangorestframework-csv==2.1.1 # via -r requirements.in djangorestframework-dataclasses==1.2.0 # via -r requirements.in -dlt==0.5.2a1 +dlt[deltalake]==0.5.2a1 # via -r requirements.in dnspython==2.2.1 # via -r requirements.in @@ -236,7 +240,7 @@ gitpython==3.1.40 # via dlt giturlparse==0.12.0 # via dlt -google-api-core==2.11.1 +google-api-core[grpc]==2.11.1 # via # google-cloud-bigquery # google-cloud-core @@ -271,7 +275,7 @@ h11==0.13.0 # wsproto hexbytes==1.0.0 # via dlt -hogql-parser==1.0.29 +hogql-parser==1.0.32 # via -r requirements.in httpcore==1.0.2 # via httpx @@ -382,6 +386,8 @@ paramiko==3.4.0 # sshtunnel pathvalidate==3.2.0 # via dlt +pdpyras==5.2.0 + # via -r requirements.in pendulum==2.1.2 # via dlt phonenumberslite==8.13.6 @@ -408,13 +414,12 @@ protobuf==4.22.1 # grpcio-status # proto-plus # temporalio -psycopg==3.1.18 +psycopg[binary]==3.1.18 # via -r requirements.in psycopg-binary==3.1.18 # via psycopg psycopg2-binary==2.9.7 # via -r requirements.in -PyMySQL==1.1.1 py==1.11.0 # via retry pyarrow==15.0.0 @@ -443,6 +448,8 @@ pyjwt==2.4.0 # -r requirements.in # snowflake-connector-python # social-auth-core +pymysql==1.1.1 + # via -r requirements.in pynacl==1.5.0 # via paramiko pyopenssl==23.0.0 @@ -507,6 +514,7 @@ requests==2.32.0 # google-api-core # google-cloud-bigquery # infi-clickhouse-orm + # pdpyras # posthoganalytics # requests-oauthlib # snowflake-connector-python @@ -540,13 +548,8 @@ semantic-version==2.8.5 # via -r requirements.in semver==3.0.2 # via dlt -sentry-sdk==1.44.1 +sentry-sdk[celery,clickhouse-driver,django,openai]==1.44.1 # via -r requirements.in -setuptools==70.2.0 - # via - # dlt - # gunicorn - # infi-clickhouse-orm simplejson==3.19.2 # via dlt six==1.16.0 @@ -601,7 +604,7 @@ structlog==23.2.0 # via # -r requirements.in # django-structlog -temporalio==1.4.0 +temporalio==1.6.0 # via -r requirements.in tenacity==8.2.3 # via @@ -656,12 +659,13 @@ unicodecsv==0.14.1 # via djangorestframework-csv uritemplate==4.1.1 # via drf-spectacular -urllib3==1.26.18 +urllib3[secure,socks]==1.26.18 # via # botocore # django-revproxy # geoip2 # google-auth + # pdpyras # requests # selenium # sentry-sdk @@ -694,3 +698,6 @@ zstd==1.5.5.1 # via -r requirements.in zxcvbn==4.4.28 # via -r requirements.in + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/rust/hook-worker/src/worker.rs b/rust/hook-worker/src/worker.rs index 422030d2a48b5..678e866ad087c 100644 --- a/rust/hook-worker/src/worker.rs +++ b/rust/hook-worker/src/worker.rs @@ -7,7 +7,7 @@ use futures::channel::oneshot::Canceled; use futures::future::join_all; use health::HealthHandle; use http::StatusCode; -use rdkafka::error::KafkaError; +use rdkafka::error::{KafkaError, RDKafkaErrorCode}; use rdkafka::producer::{FutureProducer, FutureRecord}; use reqwest::{header, Client}; use serde_json::{json, Value}; @@ -278,6 +278,30 @@ async fn process_batch<'a>( headers: None, }) { Ok(future) => kafka_ack_futures.push(future), + Err(( + KafkaError::MessageProduction( + RDKafkaErrorCode::MessageSizeTooLarge, + ), + _, + )) => { + // HACK: While under development, we are dropping messages that + // are too large. This is temporary, as we expect the webhook + // handler for Hog to change soon. In the meantime, nobody needs + // to be alerted about this. + let team_id = metadata + .get("teamId") + .and_then(|t| t.as_number()) + .map(|t| t.to_string()) + .unwrap_or_else(|| "?".to_string()); + + let hog_function_id = metadata + .get("hogFunctionId") + .and_then(|h| h.as_str()) + .map(|h| h.to_string()) + .unwrap_or_else(|| "?".to_string()); + + error!("dropping message due to size limit, team_id: {}, hog_function_id: {}", team_id, hog_function_id); + } Err((error, _)) => { // Return early to avoid committing the batch. return log_kafka_error_and_sleep("send", Some(error)).await; @@ -928,6 +952,79 @@ mod tests { ); } + #[sqlx::test(migrations = "../migrations")] + async fn test_hoghook_drops_large_payloads(db: PgPool) { + use httpmock::prelude::*; + + let worker_id = worker_id(); + let queue_name = "test_hoghook_drops_large_payloads".to_string(); + let queue = PgQueue::new_from_pool(&queue_name, db).await; + let topic = "cdp_function_callbacks"; + + let server = MockServer::start(); + + server.mock(|when, then| { + when.method(POST).path("/"); + then.status(200) + .header("content-type", "application/json; charset=UTF-8") + .body(r#"{"message": "hello, world"}"#); + }); + + let mock_url = server.url("/"); + + let webhook_job_parameters = WebhookJobParameters { + body: "".to_owned(), + headers: collections::HashMap::new(), + method: HttpMethod::POST, + url: mock_url, + }; + + let webhook_job_metadata = json!({"hugeField": "a".repeat(2 * 1024 * 1024)}); + + enqueue_job( + &queue, + 1, + webhook_job_parameters.clone(), + serde_json::to_value(webhook_job_metadata).unwrap(), + ) + .await + .expect("failed to enqueue job"); + + let registry = HealthRegistry::new("liveness"); + let liveness = registry + .register("worker".to_string(), ::time::Duration::seconds(30)) + .await; + + let (_, mock_producer) = create_mock_kafka().await; + let hog_mode = true; + let worker = WebhookWorker::new( + &worker_id, + &queue, + 1, + time::Duration::from_millis(100), + time::Duration::from_millis(5000), + 10, + RetryPolicy::default(), + false, + mock_producer, + topic.to_string(), + hog_mode, + liveness, + ); + + let batch = worker.wait_for_jobs_tx().await; + + process_batch( + batch, + worker.http_client, + worker.retry_policy, + worker.kafka_producer, + worker.cdp_function_callbacks_topic, + hog_mode, + ) + .await; + } + #[tokio::test] async fn test_send_webhook() { let method = HttpMethod::POST;