[mapserver] 01/05: Imported Upstream version 7.0.3

Bas Couwenberg sebastic at debian.org
Mon Dec 5 20:57:52 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository mapserver.

commit 7bf4afe50414515fdacb957b0d8f192a3dab7a7d
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Dec 5 21:22:54 2016 +0100

    Imported Upstream version 7.0.3
---
 CMakeLists.txt               |    4 +-
 README                       |    3 +-
 README.WIN32                 |    2 +-
 cmake/FindICONV.cmake        |    2 +-
 cmake/FindPHP5.cmake         |   29 +-
 fontcache.c                  |    6 +
 maplayer.c                   |   29 +-
 maplexer.c                   | 2387 +++++++++++++++++++++---------------------
 maplexer.l                   |    2 +-
 mapmssql2008.c               |  158 ++-
 mapogcfilter.c               |   65 +-
 mapogcfilter.h               |    2 +
 mapogcfiltercommon.c         |   42 +-
 mapogr.cpp                   |  614 ++++++++---
 mappostgis.c                 |   10 +-
 mapquery.c                   |    4 +-
 mapscript/csharp/csmodule.i  |    6 +
 mapscript/php/CMakeLists.txt |   10 +-
 mapscript/php/error.c        |   11 +
 mapscript/php/owsrequest.c   |    5 +-
 mapserv.c                    |    2 +
 mapserver.h                  |    9 +-
 maputfgrid.cpp               |    8 +-
 mapwfs.c                     |   14 +-
 24 files changed, 2032 insertions(+), 1392 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ca6472..0e1b8fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ include(CheckCSourceCompiles)
 
 set (MapServer_VERSION_MAJOR 7)
 set (MapServer_VERSION_MINOR 0)
-set (MapServer_VERSION_REVISION 2)
+set (MapServer_VERSION_REVISION 3)
 set (MapServer_VERSION_SUFFIX "")
 
 set(TARGET_VERSION_MAJOR ${MapServer_VERSION_MAJOR})
@@ -857,7 +857,7 @@ ms_link_libraries( ${CMAKE_DL_LIBS} m )
 endif(UNIX)
 
 if (WIN32)
-ms_link_libraries( ${MS_EXTERNAL_LIBS})
+ms_link_libraries( ${MS_EXTERNAL_LIBS} ws2_32.lib)
 endif (WIN32)
 
 configure_file (
diff --git a/README b/README
index 416d414..b8c1926 100644
--- a/README
+++ b/README
@@ -67,7 +67,8 @@ License
 
 ::
 
-  Copyright (c) 1996-2007 Regents of the University of Minnesota.
+  Copyright (c) 2008-2016 Open Source Geospatial Foundation.
+  Copyright (c) 1996-2008 Regents of the University of Minnesota.
 
   Permission is hereby granted, free of charge, to any person obtaining a copy 
   of this software and associated documentation files (the "Software"), to deal 
diff --git a/README.WIN32 b/README.WIN32
index dedf704..a9c8550 100644
--- a/README.WIN32
+++ b/README.WIN32
@@ -9,7 +9,7 @@ IMPORTANT - READ THIS FIRST:
   So it is strongly recommended that you use one of the precompiled 
   binaries available on the MapServer site:
  
-    http://mapserver.gis.umn.edu/download/current/windows
+    http://www.mapserver.org/download.html#windows
 
   There are precompiled Win32 binaries available for the last stable
   release and the latest nightly build and they include the most common
diff --git a/cmake/FindICONV.cmake b/cmake/FindICONV.cmake
index fe83fd3..2e36b64 100644
--- a/cmake/FindICONV.cmake
+++ b/cmake/FindICONV.cmake
@@ -48,7 +48,7 @@ if(WIN32)
 	find_file(ICONV_DLL   
 					NAMES ${ICONV_DLL_NAMES}
 					PATHS ENV PATH
-					NO_DEFAULT_PATH)
+					${ICONV_INCLUDE_DIR}/../bin)
 	find_file(ICONV_DLL_HELP   
 					NAMES ${ICONV_DLL_NAMES}
 					PATHS ENV PATH
diff --git a/cmake/FindPHP5.cmake b/cmake/FindPHP5.cmake
index eeca42c..92261b8 100644
--- a/cmake/FindPHP5.cmake
+++ b/cmake/FindPHP5.cmake
@@ -17,22 +17,31 @@ SET(PHP5_POSSIBLE_INCLUDE_PATHS
   /usr/include/php
   /usr/local/include/php
   /usr/local/apache/php
+  ${PHP5_INCLUDES}
   )
 
 SET(PHP5_POSSIBLE_LIB_PATHS
   /usr/lib
+if(WIN32)
+  ${PHP5_INCLUDES}/Release_TS
+endif(WIN32)
   )
 
-#FIND_PATH(PHP5_FOUND_INCLUDE_PATH main/php.h
-#  ${PHP5_POSSIBLE_INCLUDE_PATHS})
-#
-#IF(PHP5_FOUND_INCLUDE_PATH)
-#  SET(php5_paths "${PHP5_POSSIBLE_INCLUDE_PATHS}")
-#  FOREACH(php5_path Zend main TSRM)
-#    SET(php5_paths ${php5_paths} "${PHP5_FOUND_INCLUDE_PATH}/${php5_path}")
-#  ENDFOREACH(php5_path Zend main TSRM)
-#  SET(PHP5_INCLUDE_PATH "${php5_paths}" INTERNAL "PHP5 include paths")
-#ENDIF(PHP5_FOUND_INCLUDE_PATH)
+find_library(PHP5_LIBRARY
+   NAMES php5ts.lib
+   PATHS /sw /opt/local ${PHP5_INCLUDES}/Release_TS
+)
+  
+FIND_PATH(PHP5_FOUND_INCLUDE_PATH main/php.h
+  ${PHP5_POSSIBLE_INCLUDE_PATHS})
+
+IF(PHP5_FOUND_INCLUDE_PATH)
+  SET(php5_paths "${PHP5_POSSIBLE_INCLUDE_PATHS}")
+  FOREACH(php5_path Zend main TSRM)
+    SET(php5_paths ${php5_paths} "${PHP5_FOUND_INCLUDE_PATH}/${php5_path}")
+  ENDFOREACH(php5_path Zend main TSRM)
+  SET(PHP5_INCLUDE_PATH "${php5_paths}" INTERNAL "PHP5 include paths")
+ENDIF(PHP5_FOUND_INCLUDE_PATH)
 
 FIND_PROGRAM(PHP5_EXECUTABLE
   NAMES php5 php
diff --git a/fontcache.c b/fontcache.c
index a6eace5..bc19c0e 100644
--- a/fontcache.c
+++ b/fontcache.c
@@ -273,11 +273,17 @@ outline_element* msGetGlyphOutline(face_element *face, glyph_element *glyph) {
   key.glyph = glyph;
   UT_HASH_FIND(hh,face->outline_cache,&key, sizeof(outline_element_key),oc);
   if(!oc) {
+    FT_Matrix matrix;
+    FT_Vector pen;
     FT_Error error;
     oc = msSmallMalloc(sizeof(outline_element));
     if(MS_NINT(glyph->key.size * 96.0/72.0) != face->face->size->metrics.x_ppem) {
       FT_Set_Pixel_Sizes(face->face,0,MS_NINT(glyph->key.size * 96/72.0));
     }
+    matrix.xx = matrix.yy = 0x10000L;
+    matrix.xy = matrix.yx = 0x00000L;
+    pen.x = pen.y = 0;
+    FT_Set_Transform(face->face, &matrix, &pen);
     error = FT_Load_Glyph(face->face,glyph->key.codepoint,FT_LOAD_DEFAULT/*|FT_LOAD_IGNORE_TRANSFORM*/|FT_LOAD_NO_HINTING|FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH);
     if(error) {
       msSetError(MS_MISCERR, "unable to load glyph %ud for font \"%s\"", "msGetGlyphByIndex()",glyph->key.codepoint, face->font);
diff --git a/maplayer.c b/maplayer.c
index 5d6b279..c0b721d 100644
--- a/maplayer.c
+++ b/maplayer.c
@@ -65,6 +65,13 @@ void msLayerFreeItemInfo(layerObj *layer)
       return;
   }
   layer->vtable->LayerFreeItemInfo(layer);
+
+  /*
+   * Layer expressions with attribute binding hold a numeric index pointing
+   * to an iteminfo (node->tokenval.bindval.index). If iteminfo changes,
+   * an expression may be no longer valid. (#5161)
+   */
+  msLayerFreeExpressions(layer);
 }
 
 int msLayerRestoreFromScaletokens(layerObj *layer)
@@ -415,8 +422,6 @@ int msLayerGetShape(layerObj *layer, shapeObj *shape, resultObj *record)
 */
 void msLayerClose(layerObj *layer)
 {
-  int i,j,k;
-
   /* no need for items once the layer is closed */
   msLayerFreeItemInfo(layer);
   if(layer->items) {
@@ -426,6 +431,21 @@ void msLayerClose(layerObj *layer)
   }
 
   /* clear out items used as part of expressions (bug #2702) -- what about the layer filter? */
+  msLayerFreeExpressions(layer);
+
+  if (layer->vtable) {
+    layer->vtable->LayerClose(layer);
+  }
+  msLayerRestoreFromScaletokens(layer);
+}
+
+/*
+** Clear out items used as part of expressions.
+*/
+void msLayerFreeExpressions(layerObj *layer)
+{
+  int i,j,k;
+
   msFreeExpressionTokens(&(layer->filter));
   msFreeExpressionTokens(&(layer->cluster.group));
   msFreeExpressionTokens(&(layer->cluster.filter));
@@ -439,11 +459,6 @@ void msLayerClose(layerObj *layer)
       msFreeExpressionTokens(&(layer->class[i]->labels[k]->text));
     }
   }
-
-  if (layer->vtable) {
-    layer->vtable->LayerClose(layer);
-  }
-  msLayerRestoreFromScaletokens(layer);
 }
 
 /*
diff --git a/maplexer.c b/maplexer.c
index ef6aa22..63c7fa2 100644
--- a/maplexer.c
+++ b/maplexer.c
@@ -1,6 +1,6 @@
-#line 2 "/Users/tbonfort/dev/mapserver/maplexer.c"
+#line 2 "/home/tbonfort/dev/mapserver/maplexer.c"
 
-#line 4 "/Users/tbonfort/dev/mapserver/maplexer.c"
+#line 4 "/home/tbonfort/dev/mapserver/maplexer.c"
 
 #define  YY_INT_ALIGNED short int
 
@@ -27,8 +27,8 @@
 
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 0
 #if YY_FLEX_SUBMINOR_VERSION > 0
 #define FLEX_BETA
 #endif
@@ -66,7 +66,6 @@ typedef int16_t flex_int16_t;
 typedef uint16_t flex_uint16_t;
 typedef int32_t flex_int32_t;
 typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
 #else
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
@@ -74,7 +73,6 @@ typedef int flex_int32_t;
 typedef unsigned char flex_uint8_t; 
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
 
 /* Limits of integral types. */
 #ifndef INT8_MIN
@@ -105,6 +103,8 @@ typedef unsigned int flex_uint32_t;
 #define UINT32_MAX             (4294967295U)
 #endif
 
+#endif /* ! C99 */
+
 #endif /* ! FLEXINT_H */
 
 #ifdef __cplusplus
@@ -161,7 +161,15 @@ typedef unsigned int flex_uint32_t;
 
 /* Size of default input buffer. */
 #ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
 #define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
 #endif
 
 /* The state buf must be large enough to hold one state per character in the main buffer.
@@ -187,6 +195,7 @@ extern FILE *msyyin, *msyyout;
 #define EOB_ACT_LAST_MATCH 2
 
     #define YY_LESS_LINENO(n)
+    #define YY_LINENO_REWIND_TO(ptr)
     
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
@@ -221,7 +230,7 @@ struct yy_buffer_state
 	/* Number of characters read into yy_ch_buf, not including EOB
 	 * characters.
 	 */
-	yy_size_t yy_n_chars;
+	int yy_n_chars;
 
 	/* Whether we "own" the buffer - i.e., we know we created it,
 	 * and can realloc() it to grow it, and should free() it to
@@ -291,7 +300,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
 
 /* yy_hold_char holds the character lost when msyytext is formed. */
 static char yy_hold_char;
-static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
 yy_size_t msyyleng;
 
 /* Points to current character in buffer. */
@@ -363,11 +372,17 @@ extern int msyylineno;
 int msyylineno = 1;
 
 extern char *msyytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
 #define yytext_ptr msyytext
 
 static yy_state_type yy_get_previous_state (void );
 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
 static int yy_get_next_buffer (void );
+#if defined(__GNUC__) && __GNUC__ >= 3
+__attribute__((__noreturn__))
+#endif
 static void yy_fatal_error (yyconst char msg[]  );
 
 /* Done after the current pattern has been matched and before the
@@ -375,7 +390,7 @@ static void yy_fatal_error (yyconst char msg[]  );
  */
 #define YY_DO_BEFORE_ACTION \
 	(yytext_ptr) = yy_bp; \
-	msyyleng = (yy_size_t) (yy_cp - yy_bp); \
+	msyyleng = (size_t) (yy_cp - yy_bp); \
 	(yy_hold_char) = *yy_cp; \
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
@@ -614,7 +629,7 @@ static yyconst flex_int16_t yy_accept[2005] =
       341,  341,  176,    0
     } ;
 
-static yyconst flex_int32_t yy_ec[256] =
+static yyconst YY_CHAR yy_ec[256] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
@@ -646,7 +661,7 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[89] =
+static yyconst YY_CHAR yy_meta[89] =
     {   0,
         1,    1,    2,    1,    3,    1,    4,    1,    1,    5,
         1,    1,    1,    1,    6,    7,    7,    7,    7,    3,
@@ -659,231 +674,231 @@ static yyconst flex_int32_t yy_meta[89] =
         1,    1,    1,    1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[2025] =
+static yyconst flex_uint16_t yy_base[2025] =
     {   0,
         0,    0,   86,  172,  260,    0,  348,    0,   89,   93,
-       97,   99, 1016, 4555,  115, 4555, 4555,    0,  944,  115,
+       97,   99,  936, 4574,  115, 4574, 4574,    0,  922,  115,
       119,  436,  151,  127,  430,  499,  162,  428,  504,  511,
       173,  424,   54,   83,  560,  561,  428,  612,  620,   80,
-      444,  667,  622,  676,  449,  725,    0,  900,  864,  852,
-     4555, 4555, 4555,   98,  116,  126,  145,  173,  456,  195,
+      444,  667,  622,  676,  449,  725,    0,  863,  824,  815,
+     4574, 4574, 4574,   98,  116,  126,  145,  173,  456,  195,
       183,  182,  442,  564,  437,  442,  453,  528,  179,  562,
-      502,  730,  576,  669,  676,  509,  501,  629,  516,  745,
-      559,  514,  735,  774,  580,  785,  781,  781,  613, 4555,
-      254,  549,  878,  847,  883,  840,  595,  704,  823,  861,
-
-      646,  812,  714,  732,  789,  789,  554,  830,  817,  565,
-      685,  835,  837,  827,  680,  838,  839,  723,  738,  871,
-       51,  741,  768, 4555, 4555,  723,  771,  757,    0,  762,
-      804,  874,  884,    0,  708,  678,  896,  900,    0,  902,
-      917,  657,  961,  806,  921,  927,  824,  953,  836,  950,
-      850,  917,  874,  957,    0,  880,  898,  886,  933,  957,
-        0,  944,  952,    0,  972,  966,  963,  967,  980,  977,
-      965, 1012,  974, 1028,  987, 1022, 1000, 1000, 1003, 1030,
-     1041, 1015, 1037, 1027, 1040, 1071, 1040, 1039, 1033, 1040,
-     1075,    0, 1091, 1039,    0, 1047,    0, 1083, 1074, 1100,
-
-     1043, 1038, 1083, 1101, 1084, 1085, 1105, 1115, 1116, 1098,
-     1131, 1119, 1122, 1118, 1131, 1144, 1145, 1150, 1143, 1183,
-     1154, 1144, 1165, 1160, 1173, 1193, 1176, 1157, 1179, 1172,
-     1168, 1180, 1201, 1203, 1186, 1215, 1185,    0,    0, 1209,
-        0, 1216, 1209, 1216, 1231, 1237, 1221, 1237, 1222, 1224,
-     1243,  619, 4555,  586,  584,  524, 1244, 1251, 1251, 1240,
-     1260, 1260, 1256, 1248, 1251, 1263, 1270, 1268, 1251, 1253,
-     1278, 1271, 1279,  530, 1306, 4555, 1299, 1281, 1285, 1284,
-     1267, 1284, 1301, 1301, 1306, 1302, 1316, 1308, 1323, 1329,
-     1300, 1331, 1333, 1320, 1329, 1321, 1337,    0, 1326, 1342,
-
-     1328, 1327, 1349, 1337, 1343, 1364, 1340, 1366, 1362, 1363,
-     1372, 1369, 1364, 1377, 4555,  503, 4555,  497, 1398, 1409,
-     1405, 1429, 1431, 1437, 4555, 4555, 4555, 4555, 1384, 1403,
-     1384, 1405, 1417, 1398, 1416, 1428, 1417, 1431, 1428, 1432,
-     1434, 4555, 1440, 1428, 1437, 1429, 4555, 1434, 4555, 1450,
-     1435, 1444, 1443, 1444, 1438, 1448, 1450,  403, 1470, 1471,
-     1468, 4555,  397,  199, 4555, 4555,  245, 4555,  238,    0,
-     4555, 4555, 4555, 1509, 1517,  154,  559,  813, 1466,    0,
-     1515, 1526,  915,  932, 1477, 1484, 1481, 1483, 1507, 1504,
-     1514, 1522, 1522, 1524, 1517, 1508, 1526, 1513, 1514, 1517,
-
-     1533, 1518, 1519, 1524, 1524, 1535,    0, 1541, 1522, 1559,
-     1522, 1532, 1543, 1548, 1534, 1561,    0, 1563, 1563, 1577,
-     1568, 1568, 1569, 1578, 1580, 1573, 1574, 1592, 1583,    0,
-     1584, 1585, 1580, 1597, 1581, 1600, 1600, 1597, 1603, 1603,
-     1609, 1596, 1612, 1609, 1624, 1625, 1631, 1628, 1639, 1642,
-     1639, 1647, 1650, 1635, 1651, 1652,    0,    0, 1647, 1648,
-     1690, 1653, 1671, 1659, 1662, 1744, 1668, 1657, 1667, 1695,
-     1681, 1701, 1698, 1693,    0,  226, 1713, 1715, 1722, 1703,
-     1704, 1706, 1726, 1749, 1728, 1725, 1758, 1752, 1743, 1765,
-     1753, 1766, 1754, 1773, 1771, 1785, 1783, 1770, 1781, 1789,
-
-     1786, 1789, 1802, 1804, 1794, 1805, 1808, 1803, 1815, 1798,
-     1809,    0, 1821, 1812, 1809, 1806, 1824, 1805, 1821, 1829,
-     1821, 1835, 1832, 1835, 1830, 1844, 1841, 1849, 1839,    0,
-        0, 1842,    0,    0, 1847, 4555, 1857, 1853, 1856, 1870,
-     1870, 1873, 1875, 1877, 4555, 1873, 1867, 1881, 1872, 1876,
-     1886, 1880, 1881, 1876, 4555,  142, 4555, 1878, 1883, 1885,
-     1901, 1903, 1902, 1890, 1892, 1908, 1912, 1916, 1915, 1920,
-     1926, 1913, 1924, 1919, 1934, 1926, 1933, 1940, 1940, 1945,
-     1932, 1944, 1930,  135,  768,  128,  181, 1048, 1163, 1964,
-     1962, 1180, 1665, 1960, 1949, 1960, 1959, 1954, 1958, 1976,
-
-     1973, 1964, 1984, 1967, 1968, 1975, 1984, 1970, 1986, 1992,
-     1987, 1991, 4555, 1980, 1985, 1985, 1987, 1984, 2003, 2002,
-     2004, 2002, 2014, 2007, 2010,  462,  610, 1670, 4555, 1683,
-     1724, 2012, 2013, 2026, 2024, 2044,  158, 2039, 2028, 2036,
-     2027, 2049, 2032, 2047,    0, 2048, 2054, 2044, 2039, 2040,
-     2043, 2057, 2055, 2061, 2052, 2052, 2062, 2050, 2068, 2080,
-        0, 2072, 2086, 2068, 2092, 2088, 2102, 2094, 2104, 2089,
-        0, 2106, 2107, 2098, 2095, 2110, 2112, 2117,    0, 2100,
-     2102, 2114, 2106, 2110, 2120, 2124, 2110, 2126, 2127, 2112,
-     2110, 2126, 2118, 2128,    0, 2145, 2139, 2159, 2142, 2146,
-
-     2164, 2155, 2153, 2167,    0, 2159, 2174, 2169,    0, 2158,
-     2164, 2171, 2177, 2180, 2173, 2183, 2168, 2188, 2187, 2184,
-     2173, 2191, 2178, 2179, 2192, 2196, 2202, 2211, 2225, 2226,
-     2218, 2228, 2232, 2229, 2227, 2219, 2229, 2227,    0, 2233,
-        0, 2243, 2241, 2227, 2240, 2240, 2245, 2234, 2244, 2248,
-     2253, 2254, 2248, 2270, 2265, 2256, 2261, 2275, 2272, 2286,
-     2276, 2290, 2291, 2272, 2294, 2295, 2283, 2288, 2284, 2305,
-     2299, 2297, 2291, 2308, 2309, 2312, 2301, 2312, 2306, 2307,
-     2299, 2309, 2304, 2312, 2331, 2323, 2336, 2342,    0, 2346,
-        0, 2339, 2338, 2338, 2345, 2340,    0, 2347, 2343, 2362,
-
-     2346, 2349, 2366, 2366, 2358, 2366,    0, 2371, 2358, 2373,
-     2365, 2375, 2369, 2364, 2369, 2379, 2370, 2380, 2388, 2398,
-     4555, 2401, 2397, 2398, 2399, 2401,    0, 2406,    0, 2416,
-     2404, 2414, 2412, 2420, 2415, 2408,    0, 2415, 2420,    0,
-     4555, 2440, 2443, 4555, 2419, 2435, 2432, 2441, 2424, 2439,
-     2430, 2438, 2445, 2455, 2442, 2445, 2448, 2464, 2450, 2450,
-     2450, 2460, 2467, 2476, 2469, 2462, 2465, 2476, 4555, 2467,
-     2477, 2489, 2465, 2473, 4555,    0, 2474,    0, 2502, 2492,
-        0, 2487, 2497,    0, 2506, 2492, 2514, 2504, 2506, 2522,
-        0, 2521, 2520, 2523, 2512, 2522, 2524, 2525, 2530, 2520,
-
-     2541, 2543,    0, 2533, 2527, 2529, 2529,    0,    0, 2540,
-        0, 2532, 2546,    0, 2534, 2550, 2549, 2545, 2564, 2552,
-        0, 2561, 2566,    0, 2583, 2567,    0,    0, 2570, 2584,
-     2589, 2571, 2587,    0, 2592, 2582,    0, 2583, 2602, 2581,
-     2607, 2606, 2640,    0, 2599,    0, 2596, 2612, 2627, 2614,
-     2612, 2628, 2608, 2629, 2649, 2636, 2632, 2640, 2650, 2655,
-     2631, 2662, 2652, 2662, 2654, 2667, 2650,    0, 2645, 2668,
-     2648, 2654, 2674, 2661, 2658, 2676, 2690, 2666, 2691, 2681,
-     2701,    0, 2692,    0, 2707, 2699, 2692, 2693, 2699, 2695,
-     2711, 2703, 2698, 2718, 2719, 2708, 2713, 2709, 2713, 2716,
-
-     2712, 2717, 2718, 2725, 2757, 2736, 2729, 2721, 2749, 2761,
-     2744, 2736, 2750, 2742, 2761, 2752, 2755, 2755,    0,    0,
-     2775, 2758, 2757, 2765, 2777, 2783, 2775,    0, 2785, 2772,
-     2783, 2781,    0, 2793, 2795, 2814, 2781,    0, 2799, 2823,
-     2795, 2789,    0,    0, 2795, 2811, 2797, 2817, 2813, 2817,
-        0, 4555, 4555, 2817, 2817, 2835, 4555, 4555, 2836, 2838,
-     2829, 2838, 2823, 2848, 4555, 2835, 4555, 2845,    0, 2833,
-     2853, 2835, 2871, 2860, 2843, 2852, 2875, 2873, 2860, 2873,
-     2881, 2886, 2876, 2887, 2888, 2879, 4555, 2896, 2895, 2900,
-     2901, 2884, 2901, 2897, 4555, 2905, 4555, 2903, 2905, 2905,
-
-     2910, 4555, 2902, 2888, 2920, 2919, 2903, 2906, 2929, 2924,
-     2920, 2929,    0, 2936,    0,    0, 2931,    0, 2934, 2933,
-     2938, 2957, 2947,    0, 2951,    0, 2941, 2944, 2943, 2950,
-     2945, 2951,    0, 2962, 2954, 2955, 2966,    0, 2971,    0,
-     2968,    0, 2958,    0, 2964, 2979, 2960, 2980,    0,    0,
-     2971, 2973, 2999, 2980, 2977, 2985,    0, 2999, 3001, 3013,
-     3014, 3014, 3013, 3016, 3019, 3003, 3023, 3010, 3006, 3027,
-     3022,    0,    0, 3023, 3014, 3028, 3019, 3020, 3021, 3021,
-     3022, 3020, 3042, 3041, 3032, 3050, 3058, 3060, 3049, 3046,
-        0, 3055,    0, 3060, 3058, 3061, 3062, 3063, 3061, 3080,
-
-     3079, 3075, 3083, 3085, 3074, 3071, 3080, 3097,    0,    0,
-     3094,  150, 3075, 3082, 3097, 3097, 3079, 3093, 3095, 3090,
-        0,    0,    0,    0, 3106, 3110, 3110, 3107, 3122, 3126,
-     3117, 3119, 3119, 3127, 3143, 3125,    0, 3132,    0, 3125,
-     3144, 3144, 3130, 3150, 3147, 3138, 3149, 3168, 3159,    0,
-        0, 3152,    0,    0, 3142, 3144, 3144, 3145, 3162, 3162,
-     3153, 3160, 3171, 3187, 3177, 3174, 3198, 3187, 3196, 3184,
-        0,    0, 3191, 4555, 3192, 3183, 4555, 3189, 3209, 3197,
-     3192, 3212, 3213, 3190,    0, 3196, 4555, 4555, 3197, 3209,
-     3205, 3220, 3212, 3213, 4555, 3227, 3205, 3221, 3218, 3231,
-
-     3230, 4555, 3233, 3244, 3232, 3238, 3242, 4555, 3259, 3258,
-       88, 3251, 3259, 3268, 3249, 3266, 3253, 3258, 3269, 3260,
-     3271,    0, 3263, 3258, 3264, 3276,    0, 3266, 3282,    0,
-     3278,    0, 3284, 3286, 3281,    0, 3278,    0, 3294, 3297,
-     3300, 3297, 3302, 3314, 3299, 3322, 3308, 3313,    0, 3321,
-     3327, 3319, 3327, 3328,    0, 3325, 3330, 3333, 3319, 3333,
-     3315, 3326, 3329, 3332,    0, 3334, 3342,    0, 3343, 3352,
-     3336, 3349, 3342, 3352, 3361, 3369,    0, 3366, 3364, 3372,
-     3380, 3380,    0, 3377, 3386, 3369, 3383, 3375, 3374, 3390,
-        0, 3387, 3385, 3390, 3394, 3388,    0, 3395,    0, 3385,
-
-     3399, 3394, 3432, 3394,    0, 3414, 3413,    0, 3422,    0,
-     3418, 3433, 3417, 3434, 3439, 3431, 3436, 3449, 3452, 3451,
-     3448, 3439, 3450, 3442, 3447, 3451, 3459, 3449, 3461, 3451,
-     3452, 3470, 3493, 3472, 3473, 3479, 3484,    0, 3496, 3482,
-     3486, 3500, 3502,    0,    0, 3491, 3501, 3499, 3501, 3498,
-     3507, 3501, 3515, 3510, 3502, 3503, 3551, 3519, 4555, 3506,
-     4555, 3512, 3512, 4555, 3517, 3514, 3528, 4555, 3540, 3537,
-     3539, 3534, 3551, 3554, 4555, 3557, 3559, 4555, 3558, 3554,
-     3553, 3559, 3562,    0, 3558, 3560, 3558, 3567, 3574, 3577,
-     3578, 3572, 3589, 3590, 3575,    0, 3584, 3591, 3603, 3595,
-
-     3597, 3612,    0, 3604, 3615, 3613, 3610, 3618,    0, 3623,
-     3623, 3610, 3617,    0, 3618, 3615, 3626, 3622, 3624, 3619,
-     3621, 3620, 3624, 3630, 3618, 3619, 3635, 3638, 3653, 3636,
-     3653, 3666, 3666, 3655, 3677,    0,    0,    0, 3653, 3667,
-     3664, 3679, 3662, 3677, 3682, 3668, 3690,    0,    0, 3680,
-     3693, 3681, 3695, 3682, 3690, 3682, 3701, 3688, 3710, 3683,
-     3698,    0, 3698, 3687,    0, 3701, 3708,    0, 3715, 3717,
-     3726,    0, 3727, 3736, 3723, 3725,    0, 3730,    0, 3731,
-     3742,    0, 3736, 3726, 3745, 3736, 3743, 3756, 3738, 3743,
-        0, 3737,    0, 3757, 3751, 3760,    0,    0,    0, 3751,
-
-     3746, 3753, 3764, 3758, 4555, 3775, 3766, 4555, 3777,    0,
-     4555, 3782, 4555, 4555, 4555, 3765, 3774, 3785, 4555, 3786,
-     3802, 4555, 3794, 3795, 3791, 3794,    0, 3805,    0, 3797,
-        0, 3798,    0, 3810, 3799,    0, 3804, 3801,    0, 3800,
-     3807,    0, 3813, 3818, 3822,    0, 3811,    0,    0, 3821,
-        0, 3815,    0,    0, 3816, 3835, 3824, 3839, 3846,    0,
-     3850, 3851, 3846, 3843, 3862, 3859, 3860, 3864, 3863, 3849,
-     3869,    0, 3855, 3867, 3867, 3857, 3874, 3877, 3876, 3862,
-     3882,    0, 3883, 3880, 3870, 3882, 3878, 3888, 3877, 3892,
-     3901, 3893, 3906, 3903, 3892, 3903, 3898, 3899, 3913, 3922,
-
-     3924, 3918, 3928, 3925, 3919, 3933,    0,    0, 3923, 3919,
-     3927, 3929, 3929, 3929, 3940,    0,    0,    0, 3938,    0,
-     3950,    0, 3931,    0, 3939, 3940, 3935, 3941, 4555, 3952,
-     4555, 3953, 3954, 3966, 3972, 3959, 3959, 3960, 4555, 3975,
-     3972, 3968,    0, 3986, 3991,    0,    0,    0, 3973, 3980,
-     3986,    0,    0, 3981, 3985,    0, 3983,    0, 3996,    0,
-        0,    0, 3986, 4006, 4011, 3995, 4013, 3991,    0,    0,
-     4011, 3998, 4013, 4016, 4028, 4016, 4028, 4028,    0, 4030,
-     4020, 4032, 4029, 4028, 4045, 4045, 4039, 4028,    0, 4045,
-     4040, 4036, 4056, 4047, 4047, 4046, 4048, 4056, 4064, 4072,
-
-     4056, 4056,    0, 4076,    0,    0, 4058,    0, 4078,    0,
-        0,    0, 4065,    0, 4085, 4071, 4078, 4091,    0, 4086,
-     4555, 4555, 4555, 4077, 4555, 4555, 4555, 4555, 4555, 4083,
-     4095,    0, 4086, 4083, 4088,    0, 4100, 4102, 4099, 4093,
-     4099,    0, 4108, 4115, 4124, 4110, 4112,    0,    0,    0,
-        0, 4122, 4122, 4133,    0,    0, 4130,    0,    0, 4125,
-     4136,    0, 4138,    0, 4144, 4134, 4145, 4134, 4148, 4138,
-     4148, 4150, 4154,    0, 4149,    0,    0, 4162,    0, 4152,
-        0, 4169, 4155, 4168, 4153,    0, 4164, 4555, 4171, 4163,
-     4169,    0, 4166, 4177,    0, 4180,    0, 4173, 4194, 4196,
-
-     4183,    0, 4194, 4198, 4194,    0, 4188, 4202,    0, 4197,
-     4205,    0,    0,    0, 4200,    0, 4193, 4195, 4209, 4213,
-     4218, 4224, 4223, 4226, 4215,    0, 4223, 4213, 4235, 4226,
-     4238,    0,    0,    0, 4240, 4247,    0, 4227, 4243,    0,
-     4255,    0,    0,    0, 4246, 4258, 4260, 4262,    0, 4264,
-     4268, 4262, 4259, 4259, 4555, 4274,   64, 4262,    0, 4276,
-     4278, 4280, 4282,    0, 4267,    0,    0, 4286,    0,    0,
-     4275, 4279,    0,   56, 4555,    0, 4281, 4283,    0,    0,
-     4285, 4286, 4289,    0, 4555, 4290, 4291, 4309, 4303,    0,
-     4304, 4309, 4320, 4310,    0,    0, 4312, 4311, 4319,    0,
-
-     4319, 4317,    0, 4555, 4389, 4398, 4407, 4416, 4425, 4429,
-     4436, 4445, 4454, 4457, 4466, 4475, 4484, 4493, 4502, 4511,
-     4518, 4527, 4536, 4545
+      502,  730,  576,  669,  676,  509,  501,  726,  516,  748,
+      559,  514,  738,  777,  580,  773,  792,  782,  613, 4574,
+      254,  549,  865,  825,  857,  787,  595,  810,  825,  804,
+
+      646,  800,  723,  795,  793,  813,  554,  836,  814,  565,
+      641,  843,  844,  822,  628,  842,  842,  670,  686,  868,
+       51,  696,  757, 4574, 4574,  718,  748,  741,    0,  747,
+      749,  882,  723,    0,  720,  678,  878,  900,    0,  903,
+      924,  657,  962,  816,  927,  933,  861,  954,  858,  924,
+      878,  950,  887,  959,    0,  890,  905,  936,  954,  959,
+        0,  944,  947,    0,  974,  968,  965,  969,  998, 1012,
+      964, 1012,  975, 1028, 1005, 1022, 1004, 1014, 1020, 1037,
+     1040, 1019, 1041, 1031, 1043, 1073, 1047, 1044, 1060, 1044,
+     1077,    0, 1093, 1043,    0, 1051,    0, 1087, 1092, 1078,
+
+     1089, 1085, 1125, 1100, 1111, 1101, 1115, 1138, 1139, 1121,
+     1139, 1134, 1129, 1129, 1134, 1147, 1148, 1153, 1146, 1186,
+     1157, 1147, 1172, 1164, 1178, 1187, 1179, 1160, 1205, 1201,
+     1196, 1212, 1202, 1205, 1204, 1234, 1202,    0,    0, 1211,
+        0, 1215, 1204, 1215, 1225, 1236, 1222, 1238, 1234, 1241,
+     1261,  619, 4574,  586,  584,  524, 1256, 1263, 1259, 1247,
+     1267, 1275, 1263, 1255, 1260, 1271, 1273, 1277, 1254, 1256,
+     1281, 1274, 1282,  530, 1292, 4574, 1310, 1286, 1296, 1291,
+     1284, 1310, 1316, 1315, 1306, 1313, 1325, 1312, 1328, 1342,
+     1307, 1331, 1332, 1321, 1330, 1322, 1338,    0, 1326, 1347,
+
+     1334, 1335, 1369, 1350, 1349, 1366, 1353, 1379, 1368, 1371,
+     1374, 1375, 1368, 1382, 4574,  503, 4574,  497, 1408, 1428,
+     1411, 1436, 1434, 1445, 4574, 4574, 4574, 4574, 1410, 1429,
+     1410, 1432, 1429, 1431, 1442, 1440, 1429, 1439, 1434, 1438,
+     1440, 4574, 1447, 1433, 1443, 1435, 4574, 1439, 4574, 1455,
+     1441, 1450, 1453, 1457, 1450, 1456, 1455,  403, 1494, 1495,
+     1489, 4574,  397,  199, 4574, 4574,  245, 4574,  238,    0,
+     4574, 4574, 4574, 1505, 1520,  154,  559,  755, 1495,    0,
+     1524, 1541,  988, 1166, 1501, 1505, 1502, 1502, 1512, 1507,
+     1514, 1526, 1526, 1530, 1525, 1517, 1536, 1523, 1526, 1529,
+
+     1546, 1531, 1532, 1539, 1539, 1552,    0, 1556, 1538, 1566,
+     1541, 1548, 1559, 1565, 1555, 1561,    0, 1564, 1565, 1582,
+     1572, 1572, 1573, 1584, 1588, 1582, 1585, 1606, 1595,    0,
+     1598, 1598, 1593, 1612, 1596, 1617, 1617, 1616, 1619, 1620,
+     1624, 1610, 1629, 1624, 1624, 1627, 1636, 1631, 1644, 1646,
+     1642, 1653, 1658, 1644, 1661, 1662,    0,    0, 1659, 1660,
+     1702, 1665, 1687, 1674, 1676, 1756, 1677, 1667, 1679, 1694,
+     1680, 1702, 1702, 1697,    0,  226, 1717, 1721, 1738, 1710,
+     1713, 1716, 1738, 1756, 1736, 1735, 1765, 1762, 1755, 1774,
+     1755, 1771, 1763, 1781, 1778, 1794, 1793, 1782, 1790, 1803,
+
+     1798, 1804, 1814, 1816, 1806, 1816, 1819, 1813, 1826, 1808,
+     1818,    0, 1829, 1821, 1819, 1817, 1833, 1814, 1828, 1836,
+     1830, 1844, 1841, 1843, 1837, 1856, 1848, 1864, 1847,    0,
+        0, 1854,    0,    0, 1862, 4574, 1869, 1863, 1866, 1881,
+     1880, 1884, 1885, 1887, 4574, 1883, 1876, 1890, 1882, 1887,
+     1895, 1889, 1888, 1883, 4574,  142, 4574, 1887, 1892, 1894,
+     1909, 1910, 1909, 1899, 1902, 1920, 1921, 1930, 1927, 1935,
+     1938, 1925, 1935, 1930, 1944, 1937, 1943, 1950, 1950, 1954,
+     1941, 1954, 1941,  135,  878,  128,  181, 1404, 1406, 1967,
+     1973, 1695, 1998, 1969, 1958, 1970, 1968, 1964, 1970, 1985,
+
+     1985, 1976, 1996, 1979, 1980, 1987, 1997, 1985, 2001, 2007,
+     2002, 2005, 4574, 1993, 1999, 1998, 2001, 1997, 2015, 2014,
+     2016, 2015, 2005, 2022, 2031,  462,  610, 2062, 4574, 2066,
+     2069, 2010, 2020, 2038, 2026, 2052,  158, 2052, 2048, 2056,
+     2048, 2070, 2053, 2068,    0, 2070, 2075, 2066, 2060, 2060,
+     2063, 2076, 2074, 2080, 2071, 2071, 2081, 2071, 2088, 2089,
+        0, 2080, 2093, 2075, 2101, 2090, 2110, 2107, 2124, 2109,
+        0, 2127, 2128, 2119, 2116, 2132, 2133, 2139,    0, 2121,
+     2122, 2134, 2125, 2129, 2139, 2143, 2129, 2145, 2146, 2132,
+     2130, 2146, 2138, 2138,    0, 2153, 2146, 2161, 2149, 2155,
+
+     2178, 2176, 2174, 2189,    0, 2181, 2193, 2192,    0, 2181,
+     2185, 2193, 2199, 2200, 2192, 2202, 2187, 2208, 2205, 2203,
+     2192, 2211, 2198, 2199, 2199, 2202, 2206, 2215, 2227, 2234,
+     2231, 2248, 2253, 2249, 2248, 2240, 2250, 2249,    0, 2255,
+        0, 2264, 2262, 2246, 2259, 2257, 2263, 2252, 2263, 2268,
+     2273, 2274, 2268, 2280, 2273, 2263, 2268, 2284, 2274, 2308,
+     2283, 2302, 2311, 2293, 2314, 2316, 2305, 2309, 2306, 2326,
+     2319, 2317, 2310, 2327, 2328, 2331, 2320, 2331, 2325, 2327,
+     2319, 2329, 2324, 2322, 2339, 2330, 2343, 2365,    0, 2344,
+        0, 2351, 2351, 2359, 2366, 2362,    0, 2369, 2366, 2385,
+
+     2368, 2370, 2386, 2386, 2377, 2385,    0, 2390, 2377, 2392,
+     2384, 2394, 2389, 2384, 2389, 2399, 2380, 2388, 2395, 2405,
+     4574, 2410, 2399, 2406, 2412, 2421,    0, 2426,    0, 2437,
+     2425, 2435, 2433, 2442, 2436, 2430,    0, 2436, 2440,    0,
+     4574, 2458, 2462, 4574, 2441, 2454, 2451, 2460, 2444, 2459,
+     2450, 2458, 2455, 2463, 2449, 2452, 2459, 2477, 2466, 2466,
+     2467, 2470, 2477, 2489, 2489, 2482, 2486, 2497, 4574, 2488,
+     2498, 2511, 2480, 2497, 4574,    0, 2496,    0, 2516, 2509,
+        0, 2504, 2514,    0, 2524, 2511, 2523, 2511, 2512, 2528,
+        0, 2529, 2532, 2537, 2528, 2538, 2547, 2542, 2547, 2530,
+
+     2554, 2556,    0, 2552, 2548, 2550, 2550,    0,    0, 2562,
+        0, 2555, 2556,    0, 2561, 2579, 2566, 2562, 2582, 2571,
+        0, 2570, 2573,    0, 2589, 2573,    0,    0, 2578, 2596,
+     2622, 2584, 2605,    0, 2612, 2607,    0, 2605, 2625, 2602,
+     2629, 2626, 2662,    0, 2619,    0, 2618, 2637, 2644, 2631,
+     2629, 2648, 2628, 2634, 2653, 2640, 2638, 2649, 2674, 2680,
+     2661, 2686, 2677, 2687, 2679, 2692, 2676,    0, 2672, 2695,
+     2676, 2682, 2702, 2689, 2685, 2693, 2707, 2683, 2711, 2701,
+     2711,    0, 2700,    0, 2714, 2708, 2705, 2707, 2715, 2713,
+     2732, 2727, 2722, 2742, 2748, 2732, 2738, 2734, 2738, 2741,
+
+     2738, 2744, 2745, 2753, 2757, 2762, 2756, 2748, 2766, 2764,
+     2762, 2758, 2773, 2765, 2773, 2767, 2771, 2771,    0,    0,
+     2801, 2775, 2776, 2788, 2806, 2807, 2800,    0, 2810, 2797,
+     2808, 2807,    0, 2821, 2823, 2811, 2809,    0, 2827, 2823,
+     2825, 2808,    0,    0, 2817, 2833, 2820, 2840, 2825, 2831,
+        0, 4574, 4574, 2832, 2834, 2854, 4574, 4574, 2857, 2862,
+     2853, 2862, 2852, 2874, 4574, 2861, 4574, 2872,    0, 2858,
+     2880, 2862, 2877, 2886, 2870, 2878, 2890, 2889, 2876, 2893,
+     2891, 2896, 2884, 2894, 2897, 2892, 4574, 2910, 2911, 2918,
+     2922, 2908, 2925, 2921, 4574, 2934, 4574, 2927, 2930, 2930,
+
+     2935, 4574, 2927, 2582, 2945, 2944, 2929, 2926, 2942, 2937,
+     2933, 2943,    0, 2950,    0,    0, 2937,    0, 2943, 2942,
+     2945, 2963, 2953,    0, 2959,    0, 2955, 2960, 2961, 2971,
+     2969, 2975,    0, 2986, 2983, 2979, 2991,    0, 2996,    0,
+     2993,    0, 2983,    0, 2989, 3004, 2986, 3003,    0,    0,
+     2995, 2996, 3012, 2993, 2990, 2999,    0, 3013, 3007, 3022,
+     3023, 3021, 3019, 3022, 3027, 3017, 3039, 3028, 3027, 3050,
+     3047,    0,    0, 3047, 3044, 3053, 3044, 3045, 3046, 3046,
+     3047, 3046, 3065, 3065, 3055, 3063, 3071, 3073, 3063, 3060,
+        0, 3061,    0, 3069, 3067, 3068, 3068, 3069, 3069, 3094,
+
+     3095, 3093, 3104, 3109, 3098, 3095, 3109, 3121,    0,    0,
+     3119,  150, 3100, 3107, 3122, 3122, 3104, 3119, 3118, 3114,
+        0,    0,    0,    0, 3129, 3123, 3123, 3120, 3136, 3140,
+     3123, 3128, 3128, 3134, 3149, 3131,    0, 3140,    0, 3139,
+     3160, 3162, 3151, 3174, 3171, 3162, 3178, 3181, 3185,    0,
+        0, 3178,    0,    0, 3168, 3170, 3170, 3171, 3189, 3189,
+     3177, 3183, 3184, 3200, 3191, 3188, 3204, 3196, 3205, 3191,
+        0,    0, 3197, 4574, 3198, 3191, 4574, 3203, 3225, 3215,
+     3213, 3236, 3237, 3214,    0, 3225, 4574, 4574, 3221, 3234,
+     3230, 3245, 3237, 3238, 4574, 3252, 3231, 3244, 3242, 3254,
+
+     3243, 4574, 3246, 3257, 3246, 3252, 3248, 4574, 3270, 3266,
+       88, 3257, 3265, 3274, 3257, 3280, 3269, 3276, 3295, 3286,
+     3302,    0, 3294, 3290, 3291, 3303,    0, 3293, 3307,    0,
+     3303,    0, 3310, 3309, 3305,    0, 3301,    0, 3307, 3310,
+     3313, 3310, 3315, 3324, 3309, 3329, 3317, 3322,    0, 3328,
+     3333, 3325, 3335, 3342,    0, 3341, 3348, 3359, 3345, 3364,
+     3346, 3358, 3356, 3359,    0, 3361, 3367,    0, 3368, 3378,
+     3359, 3373, 3365, 3365, 3374, 3382,    0, 3379, 3377, 3382,
+     3390, 3387,    0, 3386, 3395, 3376, 3389, 3381, 3382, 3404,
+        0, 3403, 3403, 3416, 3420, 3419,    0, 3419,    0, 3419,
+
+     3434, 3421, 3439, 3419,    0, 3438, 3438,    0, 3431,    0,
+     3428, 3443, 3424, 3441, 3442, 3435, 3443, 3455, 3458, 3459,
+     3462, 3455, 3468, 3468, 3473, 3482, 3490, 3481, 3488, 3478,
+     3479, 3495, 3498, 3499, 3498, 3502, 3496,    0, 3507, 3493,
+     3494, 3508, 3509,    0,    0, 3497, 3507, 3507, 3508, 3505,
+     3513, 3507, 3523, 3524, 3518, 3521, 3546, 3550, 4574, 3537,
+     4574, 3544, 3539, 4574, 3544, 3542, 3554, 4574, 3563, 3559,
+     3550, 3546, 3563, 3566, 4574, 3569, 3566, 4574, 3566, 3561,
+     3558, 3567, 3569,    0, 3565, 3566, 3564, 3575, 3594, 3605,
+     3606, 3602, 3613, 3615, 3600,    0, 3607, 3609, 3619, 3605,
+
+     3607, 3622,    0, 3613, 3624, 3622, 3619, 3628,    0, 3633,
+     3630, 3617, 3623,    0, 3624, 3621, 3632, 3630, 3631, 3626,
+     3627, 3626, 3632, 3650, 3646, 3647, 3665, 3662, 3678, 3661,
+     3676, 3684, 3682, 3665, 3687,    0,    0,    0, 3663, 3676,
+     3673, 3688, 3671, 3687, 3692, 3675, 3697,    0,    0, 3686,
+     3699, 3687, 3701, 3690, 3697, 3689, 3707, 3694, 3733, 3691,
+     3716,    0, 3728, 3725,    0, 3728, 3734,    0, 3733, 3733,
+     3736,    0, 3737, 3746, 3732, 3734,    0, 3739,    0, 3740,
+     3752,    0, 3746, 3733, 3752, 3742, 3749, 3762, 3744, 3751,
+        0, 3744,    0, 3764, 3757, 3766,    0,    0,    0, 3759,
+
+     3766, 3781, 3792, 3788, 4574, 3799, 3791, 4574, 3802,    0,
+     4574, 3805, 4574, 4574, 4574, 3783, 3790, 3795, 4574, 3796,
+     3812, 4574, 3802, 3803, 3802, 3803,    0, 3815,    0, 3807,
+        0, 3805,    0, 3817, 3805,    0, 3810, 3807,    0, 3806,
+     3815,    0, 3817, 3824, 3830,    0, 3831,    0,    0, 3849,
+        0, 3843,    0,    0, 3843, 3856, 3846, 3861, 3867,    0,
+     3866, 3867, 3862, 3859, 3872, 3869, 3870, 3873, 3872, 3858,
+     3878,    0, 3865, 3877, 3874, 3864, 3880, 3883, 3882, 3868,
+     3890,    0, 3887, 3886, 3878, 3902, 3906, 3916, 3904, 3913,
+     3923, 3915, 3927, 3919, 3908, 3919, 3914, 3909, 3923, 3932,
+
+     3933, 3927, 3937, 3934, 3929, 3943,    0,    0, 3930, 3926,
+     3933, 3935, 3935, 3935, 3948,    0,    0,    0, 3942,    0,
+     3956,    0, 3939,    0, 3959, 3968, 3963, 3968, 4574, 3973,
+     4574, 3975, 3976, 3987, 3988, 3975, 3975, 3976, 4574, 3986,
+     3978, 3979,    0, 3997, 4000,    0,    0,    0, 3982, 3989,
+     3996,    0,    0, 3991, 3993,    0, 3989,    0, 4001,    0,
+        0,    0, 3991, 4011, 4015, 4001, 4021, 4011,    0,    0,
+     4033, 4025, 4037, 4034, 4047, 4035, 4047, 4047,    0, 4049,
+     4036, 4048, 4045, 4044, 4055, 4055, 4049, 4037,    0, 4054,
+     4049, 4045, 4066, 4057, 4055, 4052, 4053, 4061, 4069, 4076,
+
+     4062, 4064,    0, 4096,    0,    0, 4080,    0, 4105,    0,
+        0,    0, 4089,    0, 4103, 4090, 4097, 4110,    0, 4105,
+     4574, 4574, 4574, 4096, 4574, 4574, 4574, 4574, 4574, 4098,
+     4111,    0, 4103, 4099, 4096,    0, 4107, 4109, 4106, 4100,
+     4106,    0, 4117, 4120, 4128, 4114, 4116,    0,    0,    0,
+        0, 4122, 4128, 4141,    0,    0, 4149,    0,    0, 4144,
+     4157,    0, 4163,    0, 4168, 4152, 4163, 4152, 4166, 4157,
+     4167, 4169, 4170,    0, 4165,    0,    0, 4178,    0, 4168,
+        0, 4179, 4164, 4176, 4161,    0, 4172, 4574, 4179, 4165,
+     4180,    0, 4179, 4182,    0, 4184,    0, 4173, 4200, 4215,
+
+     4202,    0, 4215, 4218, 4217,    0, 4205, 4219,    0, 4214,
+     4222,    0,    0,    0, 4217,    0, 4211, 4212, 4225, 4228,
+     4233, 4239, 4238, 4239, 4225,    0, 4232, 4221, 4252, 4233,
+     4244,    0,    0,    0, 4249, 4250,    0, 4232, 4247,    0,
+     4255,    0,    0,    0, 4252, 4277, 4278, 4281,    0, 4282,
+     4287, 4279, 4276, 4276, 4574, 4291,   64, 4279,    0, 4294,
+     4295, 4296, 4297,    0, 4282,    0,    0, 4301,    0,    0,
+     4290, 4292,    0,   56, 4574,    0, 4293, 4294,    0,    0,
+     4295, 4295, 4298,    0, 4574, 4297, 4300, 4312, 4307,    0,
+     4308, 4309, 4326, 4329,    0,    0, 4330, 4330, 4337,    0,
+
+     4336, 4336,    0, 4574, 4408, 4417, 4426, 4435, 4444, 4448,
+     4455, 4464, 4473, 4476, 4485, 4494, 4503, 4512, 4521, 4530,
+     4537, 4546, 4555, 4564
     } ;
 
 static yyconst flex_int16_t yy_def[2025] =
@@ -1113,7 +1128,7 @@ static yyconst flex_int16_t yy_def[2025] =
      2004, 2004, 2004, 2004
     } ;
 
-static yyconst flex_int16_t yy_nxt[4644] =
+static yyconst flex_uint16_t yy_nxt[4663] =
     {   0,
        14,   15,   16,   15,   15,   14,   17,   18,   14,   17,
        19,   14,   14,   14,   20,   21,   22,   23,   23,   14,
@@ -1187,448 +1202,450 @@ static yyconst flex_int16_t yy_nxt[4644] =
       281,  197,  343,  164,  282,  201,  149,  270,  305,  202,
       205,  206,  221,  212,  248,  232,  249,  213,  207,  233,
       208,  214,  209,  234,  215,  210,  211,  216,  326,  235,
-      217,  627,  236,  875,  289,  290,  255,  327,  255,  237,
+      217,  627,  236,  875,  344,  351,  255,  327,  255,  237,
       253,  205,  206,  379,  212,  248,  232,  249,  213,  207,
       233,  208,  214,  209,  234,  215,  210,  211,  216,  136,
-      235,  217,  223,  236,  224,  289,  290,  225,  226,  173,
-
-      237,  238,  227,  174,  283,  284,  228,  286,  344,  229,
-      239,  230,  240,  287,  231,  285,  241,  351,  242,  136,
-      243,  321,  321,  223,  133,  224,  133,  133,  225,  226,
-      173,  322,  238,  227,  174,  283,  284,  228,  286,  344,
-      229,  239,  230,  240,  287,  231,  285,  241,  351,  242,
-      329,  243,  246,  247,  330,  155,  248,  156,  249,  331,
-      250,  356,  322,  297,  279,  251,  368,  280,  292,  357,
-      161,  298,  293,  208,  841,  332,  139,  368,  299,  300,
-      366,  329,  139,  246,  247,  330,  155,  248,  156,  249,
-      331,  250,  356,  371,  297,  279,  251,  301,  280,  292,
-
-      357,  161,  298,  293,  208,  302,  332,  139,  310,  299,
-      300,  303,  311,  139,  304,  306,  307,  314,  312,  585,
-      335,  313,  349,  139,  371,  139,  333,  308,  301,  334,
-      378,  378,  309,  328,  336,  372,  302,  380,  323,  310,
-      320,  320,  303,  311,  341,  304,  306,  307,  314,  312,
-      324,  335,  313,  338,  139,  385,  139,  333,  308,  342,
-      334,  339,  345,  309,  315,  336,  372,  349,  380,  352,
-      340,  350,  346,  353,  348,  341,  354,  347,  390,  355,
-      373,  324,  325,  373,  338,  133,  385,  133,  133,  318,
-      342,  317,  339,  345,  393,  315,  316,  359,  349,  315,
-
-      352,  340,  350,  346,  353,  348,  360,  354,  347,  390,
-      355,  396,  361,  374,  374,  145,  399,  138,  138,  140,
-      140,  400,  362,  375,  373,  393,  401,  146,  359,  141,
-      376,  377,  384,  384,  378,  378,  256,  360,  381,  381,
-      383,  383,  396,  361,  384,  384,  255,  399,  382,  384,
-      384,  253,  400,  394,  375,  136,  402,  401,  146,  395,
-      141,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-      142,  142,  142,  142,  142,  391,  403,  144,  386,  382,
-      142,  142,  387,  142,  394,  397,  392,  402,  407,  388,
-      395,  404,  405,  406,  408,  389,  409,  411,  412,  398,
-
-      410,  413,  416,  417,  414,  418,  391,  403,  421,  386,
-      142,  142,  142,  387,  142, 2004,  397,  392,  415,  407,
-      388,  424,  404,  405,  406,  408,  389,  409,  411,  412,
-      398,  410,  413,  416,  417,  414,  418,  429,  430,  421,
-      431,  142,  142,  142,  142,  142,  142,  142,  142,  415,
-      419,  422,  424,  432,  420,  423,  425,  436,  426,  427,
-      437,  438,  428,  439,  433,  589,  589,  444,  429,  430,
-      445,  431,  434,  446,  448,  456,  457,  468,  435,  469,
-      447,  419,  422, 2004,  432,  420,  423,  425,  436,  426,
-      427,  437,  438,  428,  439,  433,  440,  441,  444,  449,
-
-      462,  445,  442,  434,  446,  448,  456,  457,  468,  435,
-      469,  447,  474,  443,  453,  450,  463,  451,  470,  454,
-      455,  458,  452,  459,  460,  475,  471,  440,  441,  461,
-      449,  462,  476,  442,  464,  465,  466,  472,  477,  478,
-      479,  473,  467,  474,  443,  453,  450,  463,  451,  470,
-      454,  455,  458,  452,  459,  460,  475,  471,  480,  481,
-      461,  482,  483,  476,  484,  464,  465,  466,  472,  477,
-      478,  479,  473,  467,  485,  486,  489,  491,  487,  492,
-      589,  589,  490,  500,  493,  488, 2004,  501,  502,  480,
-      481, 2004,  482,  483,  503,  484,  504,  593,  593,  508,
-
-      509,  512,  510,  513,  514,  485,  486,  489,  491,  487,
-      492,  494,  495,  490,  500,  493,  488,  496,  501,  502,
-      520,  497,  498,  524,  499,  503,  511,  504,  505,  506,
-      508,  509,  512,  510,  513,  514,  515,  517,  521,  518,
-      525,  507,  494,  495,  526,  519,  522,  516,  496,  527,
-      528,  520,  497,  498,  524,  499,  529,  511,  523,  505,
-      506,  530,  531,  532,  533,  534,  535,  515,  517,  521,
-      518,  525,  507,  537,  538,  526,  519,  522,  516,  539,
-      527,  528,  540,  541,  542,  544,  545,  529,  546,  523,
-      547,  550,  530,  531,  532,  533,  534,  535,  548,  551,
-
-      552,  553,  554,  555,  537,  538,  391,  543,  558,  561,
-      539,  549,  562,  540,  541,  542,  544,  545,  559,  546,
-      560,  547,  550,  275,  275,  414, 2004,  417,  387,  548,
-      551,  552,  553,  554,  555,  388,  564,  391,  543,  558,
-      561,  389,  549,  562,  419,  435,  566,  569,  563,  559,
-      425,  560,  565,  427,  567,  570,  414,  276,  417,  387,
-      442,  454,  571,  464,  471,  572,  388,  564,  573,  574,
-      482,  568,  389,  575,  490,  419,  435,  566,  569,  563,
-      576,  425,  498,  565,  427,  567,  570,  578,  579,  510,
-      577,  442,  454,  571,  464,  471,  572,  580,  581,  573,
-
-      574,  482,  568,  520,  575,  490,  517,  582,  583,  516,
-      317,  576, 2004,  498,  519,  321,  321, 2004,  578,  579,
-      510,  577,  321,  321,  323,  322,  320,  320,  580,  581,
-      594,  595,  322,  596,  520,  599,  324,  517,  582,  583,
-      516,  317,  588,  588,  600,  519,  589,  589,  590,  590,
-      592,  592,  597,  598,  593,  593,  322,  601,  591,  602,
-      603,  594,  595,  322,  596,  604,  599,  324,  605,  606,
-      607,  608,  610,  611,  612,  600,  613,  614,  615,  616,
-      617,  620,  609,  597,  598,  618,  621,  619,  601,  591,
-      602,  603,  622,  623,  624, 2004,  604,  629,  625,  605,
-
-      606,  607,  608,  610,  611,  612,  632,  613,  614,  615,
-      616,  617,  620,  609,  633,  634,  618,  621,  619,  362,
-      635,  362,  362,  622,  623,  624,  374,  374,  629,  625,
-      376,  376,  381,  381,  628,  628,  375,  632,  636,  630,
-      630,  637,  382,  631,  631,  633,  634,  638,  639,  640,
-      641,  635,  642,  643,  644,  645,  646,  647,  648,  649,
-      650,  651,  652,  653,  656,  657,  660,  375, 2004,  636,
-      661,  654,  637,  382,  662,  663,  664,  655,  638,  639,
-      640,  641,  658,  642,  643,  644,  645,  646,  647,  648,
-      649,  650,  651,  652,  653,  656,  657,  660,  665,  659,
-
-      666,  661,  654,  667,  668,  662,  663,  664,  655,  669,
-      670,  671,  672,  658,  674,  675,  676,  677,  679,  680,
-      673,  681,  682,  683,  684,  685,  686,  678,  687,  665,
-      659,  666,  688,  689,  667,  668,  691,  690,  692,  693,
-      669,  670,  671,  672,  694,  674,  675,  676,  677,  679,
-      680,  673,  681,  682,  683,  684,  685,  686,  678,  687,
-      695,  696,  697,  688,  689,  699,  700,  691,  690,  692,
-      693,  701,  698,  702,  703,  694,  704,  705,  706,  707,
-      708,  709,  593,  593,  721, 2004,  724,  628,  628,  725,
-     2004,  695,  696,  697,  722,  736,  699,  700,  723,  737,
-
-      631,  631,  701,  698,  702,  703,  738,  704,  705,  706,
-      707,  708,  709,  710,  711,  721,  712,  724,  713,  714,
-      725,  715,  739,  740,  716,  722,  736,  717,  741,  723,
-      737,  718,  719,  742,  743,  720, 2004,  738,  745, 2004,
-      746,  631,  631,  749,  710,  711,  750,  712,  751,  713,
-      714,  752,  715,  739,  740,  716,  747,  755,  717,  741,
-      748,  756,  718,  719,  742,  743,  720,  726,  727,  745,
-      728,  746,  729,  730,  749,  731,  753,  750,  732,  751,
-      761,  757,  752,  759,  754,  733,  734,  747,  755,  735,
-      762,  748,  756,  764,  760,  765,  766,  763,  726,  727,
-
-      767,  728,  768,  729,  730,  758,  731,  753,  769,  732,
-      770,  761,  757,  771,  759,  754,  733,  734,  772,  773,
-      735,  762,  774,  775,  764,  760,  765,  766,  763,  776,
-      777,  767,  779,  768,  780,  781,  758,  782,  783,  769,
-      784,  770,  778,  785,  771,  786,  787,  788,  789,  772,
-      773,  790,  791,  774,  775,  792,  793,  794,  795,  796,
-      776,  777,  797,  779,  802,  780,  781,  798,  782,  783,
-      800,  784,  799,  778,  785,  801,  786,  787,  788,  789,
-      803,  805,  790,  791,  806,  807,  792,  793,  794,  795,
-      796,  808,  804,  797,  809,  802,  810,  811,  798,  812,
-
-      813,  800,  814,  799,  815,  816,  801,  817,  818,  819,
-      820,  803,  805,  821,  822,  806,  807,  823,  824,  825,
-      826,  654,  808,  804,  827,  809,  658,  810,  811,  828,
-      812,  813,  673,  814,  829,  815,  816,  830,  817,  818,
-      819,  820,  689,  831,  821,  822,  697,  833,  823,  824,
-      825,  826,  654,  723,  834,  827,  832,  658,  747,  835,
-      828,  753,  836,  673,  759,  829,  777,  837,  830,  838,
-      839,  840,  799,  689,  831,  842,  842,  697,  833,  843,
-      843,  590,  590,  844,  723,  834,  845,  832,  846,  747,
-      835,  591,  753,  836,  847,  759,  848,  777,  837,  849,
-
-      838,  839,  840,  799,  850,  851,  852,  853,  854,  855,
-      856,  857,  858,  859,  844,  860,  861,  845,  862,  846,
-      863,  864,  591,  865,  866,  847,  867,  848,  868,  869,
-      849,  870,  871,  874, 2004,  850,  851,  852,  853,  854,
-      855,  856,  857,  858,  859,  873,  860,  861,  876,  862,
-      877,  863,  864,  878,  865,  866,  872,  867,  362,  868,
-      869,  362,  870,  871,  874,  362,  879,  880,  882,  883,
-      884,  885,  886,  887,  888,  889,  873,  890,  892,  876,
-      893,  877,  894,  895,  878,  896,  898,  872,  899,  900,
-      901,  903,  902,  904,  897,  905,  891,  879,  880,  882,
-
-      883,  884,  885,  886,  887,  888,  889,  906,  890,  892,
-      907,  893,  908,  894,  895,  909,  896,  898,  910,  899,
-      900,  901,  903,  902,  904,  897,  905,  891,  911,  912,
-      913,  914,  915,  916,  917,  918,  919,  920,  906,  921,
-      922,  907,  923,  908,  924,  925,  909,  926,  927,  910,
-      928,  929,  930,  931,  932,  933,  934,  935,  936,  911,
-      912,  913,  914,  915,  916,  917,  918,  919,  920,  937,
-      921,  922,  938,  923,  939,  924,  925,  942,  926,  927,
-      943,  928,  929,  930,  931,  932,  933,  934,  935,  936,
-      940,  944,  945,  946,  947,  948,  951,  941,  952,  949,
-
-      937,  953,  954,  938,  955,  939,  950,  956,  942,  957,
-      958,  943,  959,  960,  963,  964,  965,  966,  967,  961,
-      968,  940,  944,  945,  946,  947,  948,  951,  941,  952,
-      949,  962,  953,  954,  969,  955,  970,  950,  956,  971,
-      957,  958,  972,  959,  960,  963,  964,  965,  966,  967,
-      961,  968,  973,  974,  975,  976,  980,  977,  981,  982,
-      983,  984,  962,  978,  985,  969,  986,  970,  987,  989,
-      971,  990,  988,  972,  991,  979,  992,  993,  994,  995,
-      996,  997,  998,  973,  974,  975,  976,  980,  977,  981,
-      982,  983,  984,  999,  978,  985, 1000,  986, 1001,  987,
-
-      989, 1002,  990,  988, 1003,  991,  979,  992,  993,  994,
-      995,  996,  997,  998, 1004, 1005, 1007, 1008, 1009, 1010,
-     1006, 1011, 1012, 1013,  999, 1014, 1015, 1000, 1016, 1001,
-     1017, 1018, 1002, 1019, 1020, 1003, 1021, 1022, 1023, 1024,
-     1025, 1026, 1027, 1028, 1029, 1004, 1005, 1007, 1008, 1009,
-     1010, 1006, 1011, 1012, 1013, 1030, 1014, 1015, 1031, 1016,
-     1032, 1017, 1018, 1033, 1019, 1020, 1038, 1021, 1022, 1023,
-     1024, 1025, 1026, 1027, 1028, 1029, 1034, 1036, 1039, 1040,
-     1035, 1041, 1042, 1043, 1044, 1045, 1030, 1037, 1046, 1031,
-     1047, 1032, 1048, 1049, 1033, 1050, 1051, 1038, 1052, 1053,
-
-     1054, 1055, 1056, 1057, 1058, 1059, 1060, 1034, 1036, 1039,
-     1040, 1035, 1041, 1042, 1043, 1044, 1045, 1061, 1037, 1046,
-     1062, 1047, 1063, 1048, 1049, 1064, 1050, 1051, 1065, 1052,
-     1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1066, 1067,
-     1068, 1069, 1070, 1071, 1072,  940, 1073,  987, 1061, 1074,
-     1075, 1062, 1076, 1063, 1077, 1078, 1064,  843,  843, 1065,
-      843,  843, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1066,
-     1067, 1068, 1069, 1070, 1071, 1072,  940, 1073,  987, 1086,
-     1074, 1075, 1087, 1076, 1088, 1077, 1078, 1089, 1090, 1091,
-     1092, 1093, 1094, 1079, 1080, 1081, 1082, 1083, 1084, 1085,
-
-     1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 2004,
-     1086, 1106, 1104, 1087, 1107, 1088,  362, 1105, 1089, 1090,
-     1091, 1092, 1093, 1094,  362, 1108, 1109, 1110, 1111, 1112,
-     1113, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103,
-      362, 1114, 1106, 1104, 1115, 1107, 1116, 1117, 1118, 1119,
-     1121, 1120, 1122, 1123, 1126, 1127, 1108, 1109, 1110, 1111,
-     1112, 1113, 1124, 1128, 1129, 1125, 1130, 1131, 1132, 1133,
-     1134, 1135, 1114, 1136, 1139, 1115, 1140, 1116, 1117, 1118,
-     1119, 1121, 1120, 1122, 1123, 1126, 1127, 1137, 1138, 1141,
-     1142, 1143, 1144, 1124, 1128, 1129, 1125, 1130, 1131, 1132,
-
-     1133, 1134, 1135, 1145, 1136, 1139, 1146, 1140, 1147, 1148,
-     1149, 1150, 1157, 1158, 1151, 1159, 1160, 1162, 1137, 1138,
-     1141, 1142, 1143, 1144, 1152, 1163, 1161, 1153, 1154, 1164,
-     1165, 1155, 1156, 1166, 1145, 1172, 1173, 1146, 1174, 1147,
-     1148, 1149, 1150, 1157, 1158, 1151, 1159, 1160, 1162, 2004,
-     1175, 1176, 1177, 1178, 1179, 1152, 1163, 1161, 1153, 1154,
-     1164, 1165, 1155, 1156, 1166, 1167, 1172, 1173, 1168, 1174,
-     1180, 1169, 1181, 1182, 1183, 1170, 1184, 1185, 1186, 1187,
-     1171, 1175, 1176, 1177, 1178, 1179, 1188, 1189, 1190, 1191,
-     1192, 1193, 1194, 1195, 1196, 1197, 1167, 1198, 1199, 1168,
-
-     1200, 1180, 1169, 1181, 1182, 1183, 1170, 1184, 1185, 1186,
-     1187, 1171, 1201, 1202, 1203, 1204, 1205, 1188, 1189, 1190,
-     1191, 1192, 1193, 1194, 1195, 1196, 1197, 1206, 1198, 1199,
-     1207, 1200, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215,
-     1216, 1217, 1218, 1201, 1202, 1203, 1204, 1205, 1219, 1220,
-     1221, 1222, 1223, 1224, 1225, 1226, 1227, 2004, 1206, 1230,
-     1231, 1207, 1232, 1208, 1209, 1210, 1211, 1212, 1213, 1214,
-     1215, 1216, 1217, 1218, 1233, 1236, 1237, 1238, 1239, 1219,
-     1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1234,
-     1230, 1231, 1240, 1232, 1241, 1242, 1235, 1229, 1243, 1244,
-
-     1247, 1245, 1248, 1249, 1250, 1233, 1236, 1237, 1238, 1239,
-     1251, 1252, 1253, 1254, 1255, 1256, 1257, 1246, 1258, 1228,
-     1234, 1261, 1262, 1240, 1265, 1241, 1242, 1235, 1229, 1243,
-     1244, 1247, 1245, 1248, 1249, 1250, 1266, 1267, 1268, 1269,
-     1270, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1246, 1258,
-     1259, 1263, 1261, 1262, 1271, 1265, 1260, 1272, 1273, 1274,
-     1275, 1264, 1277, 1278, 1279, 1280, 1281, 1266, 1267, 1268,
-     1269, 1270, 1282, 1283, 1119, 1138, 1120, 1276, 1151, 1161,
-     2004, 1259, 1263, 1284, 1224, 1271, 1285, 1260, 1272, 1273,
-     1274, 1275, 1264, 1277, 1278, 1279, 1280, 1281, 1286, 1287,
-
-     1288, 1289, 1169, 1282, 1283, 1119, 1138, 1120, 1276, 1151,
-     1161, 1171, 1290, 1291, 1284, 1224, 1292, 1285, 1293, 1294,
-     1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1286,
-     1287, 1288, 1289, 1169, 1304, 1305, 1306, 1307, 1308,  362,
-     1309, 1312, 1171, 1290, 1291, 1310, 1311, 1292, 1313, 1293,
-     1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303,
-     1314, 1315, 1316, 1317, 1318, 1304, 1305, 1306, 1307, 1308,
-      362,  362, 1312, 1319, 1320, 1321, 1310, 1311, 1322, 1313,
-     1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332,
-     1333, 1314, 1315, 1316, 1317, 1318, 1334, 1335, 1336, 1337,
-
-     1338, 1339, 1340, 1341, 1319, 1320, 1321, 1342, 1343, 1322,
-     1344, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331,
-     1332, 1333, 1345, 1346, 1347, 1348, 1349, 1334, 1335, 1336,
-     1337, 1338, 1339, 1340, 1341, 1350, 1351, 1352, 1342, 1343,
-     1353, 1344, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1363,
-     1361, 1364, 1365, 1345, 1346, 1347, 1348, 1349, 1362, 1366,
-     1367, 1368, 1369, 1370, 1371, 1372, 1350, 1351, 1352, 1373,
-     1374, 1353, 1375, 1354, 1355, 1356, 1357, 1358, 1359, 1360,
-     1363, 1361, 1364, 1365, 1376, 1377, 1378, 1379, 1380, 1362,
-     1366, 1367, 1368, 1369, 1370, 1371, 1372, 1381, 1382, 1383,
-
-     1373, 1374, 1384, 1375, 1385, 1386, 1387, 1388, 1389, 1390,
-     1391, 1392, 1393, 1394, 1395, 1376, 1377, 1378, 1379, 1380,
-     1396, 1397, 1399, 1400, 1401, 1402, 1403, 1404, 1381, 1382,
-     1383, 1405, 1406, 1384, 1407, 1385, 1386, 1387, 1388, 1389,
-     1390, 1391, 1392, 1393, 1394, 1395, 1408, 1409, 1410, 1411,
-     1412, 1396, 1397, 1399, 1400, 1401, 1402, 1403, 1404, 1413,
-     1414, 1415, 1405, 1406, 1416, 1407, 1417, 1418, 1419, 1420,
-     1421, 1422, 1423, 1424, 1425, 1426, 1427, 1408, 1409, 1410,
-     1411, 1412, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437,
-     1413, 1414, 1415, 1428, 1438, 1416, 1439, 1417, 1418, 1419,
-
-     1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1440, 1429,
-     1441, 1442, 1443, 1430, 1431, 1432, 1433, 1434, 1435, 1436,
-     1437, 1444, 1445, 1446, 1428, 1438, 1447, 1439, 1448, 1449,
-     1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1440,
-     1429, 1441, 1442, 1443, 1459, 1460, 1461, 1462, 1463, 1464,
-     1465, 1466, 1444, 1445, 1446, 1467, 1468, 1447, 1469, 1448,
-     1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458,
-     1470, 1471, 1472, 1473, 1474, 1459, 1460, 1461, 1462, 1463,
-     1464, 1465, 1466, 1475, 1476, 1477, 1467, 1468, 1479, 1469,
-     1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489,
-
-     1490, 1470, 1471, 1472, 1473, 1474, 1491, 1492, 1493,  362,
-      362, 1494, 1495, 1496, 1475, 1476, 1477, 1497, 1498, 1479,
-     1499, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488,
-     1489, 1490, 1500, 1501, 1502, 1503, 1504, 1491, 1492, 1493,
-     1505, 1506, 1494, 1495, 1496, 1507, 1508, 1509, 1497, 1498,
-     1510, 1499, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518,
-     1519, 1520, 1521, 1500, 1501, 1502, 1503, 1504, 1522, 1523,
-     1524, 1505, 1506, 1525, 1526, 1527, 1507, 1508, 1509, 1528,
-     1529, 1510, 1530, 1511, 1512, 1513, 1514, 1515, 1516, 1517,
-     1518, 1519, 1520, 1521, 1531, 1532, 1533, 1534, 1535, 1522,
-
-     1523, 1524, 1536, 1537, 1525, 1526, 1527, 1538, 1539, 1540,
-     1528, 1529, 1541, 1530, 1542, 1543, 1544, 1545, 1546, 1547,
-     1548, 1549, 1550, 1553, 1554, 1531, 1532, 1533, 1534, 1535,
-     1551, 1556, 1552, 1536, 1537, 1562, 2004, 1563, 1538, 1539,
-     1540, 1564, 2004, 1541, 1555, 1542, 1543, 1544, 1545, 1546,
-     1547, 1548, 1549, 1550, 1553, 1554, 1557, 1558, 1565, 1566,
-     1567, 1551, 1556, 1552, 1568, 1569, 1562, 1559, 1563, 1560,
-     1570, 1571, 1564, 1561, 1572, 1555, 1573, 1574, 1575, 1576,
-     1577, 1578, 1579, 1580, 1581, 1582, 1583, 1557, 1558, 1565,
-     1566, 1567, 1584, 1585, 1586, 1568, 1569, 1587, 1559, 1590,
-
-     1560, 1570, 1571, 1591, 1561, 1572, 1592, 1573, 1574, 1575,
-     1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1588, 1593,
-     1589, 1594, 1595, 1584, 1585, 1586, 1596, 1597, 1587, 1598,
-     1590, 1599, 1600, 1601, 1591, 1602, 1603, 1592, 1604, 1605,
-     1606, 1607, 1608, 1609, 2004, 2004, 1610, 1611, 1612, 1588,
-     1593, 1589, 1594, 1595, 1613, 1614, 1615, 1596, 1597, 1616,
-     1598, 2004, 1599, 1600, 1601, 1617, 1602, 1603, 1618, 1604,
-     1605, 1606, 1607, 1608, 1609, 1557, 1558, 1610, 1611, 1612,
-     1619, 1620, 1621, 1622, 1623, 1613, 1614, 1615, 1560, 1625,
-     1616, 1626, 1561, 1624, 1627, 1628, 1617, 1629, 1630, 1618,
-
-     1631, 1632, 1633, 1634, 1635, 1636, 1557, 1558,  362, 1637,
-      362, 1619, 1620, 1621, 1622, 1623, 1638, 1639, 1640, 1560,
-     1625, 1641, 1626, 1561, 1624, 1627, 1628, 1642, 1629, 1630,
-     1643, 1631, 1632, 1633, 1634, 1635, 1636, 1644, 1645, 1646,
-     1637, 1647, 1648, 1649, 1650, 1651, 1652, 1638, 1639, 1640,
-     1653, 1654, 1641, 1655, 1656, 1657, 1658, 1659, 1642, 1660,
-     1661, 1643, 1662, 1663, 1664, 1665, 1666, 1667, 1644, 1645,
-     1646, 1668, 1647, 1648, 1649, 1650, 1651, 1652, 1669, 1670,
-     1671, 1653, 1654, 1672, 1655, 1656, 1657, 1658, 1659, 1673,
-     1660, 1661, 1674, 1662, 1663, 1664, 1665, 1666, 1667, 1675,
-
-     1676, 1677, 1668, 1678, 1679, 1680, 1681, 1682, 1683, 1669,
-     1670, 1671, 1684, 1685, 1672, 1686, 1687, 1688, 1689, 1690,
-     1673, 1691, 1692, 1674, 1693, 1694, 1697, 1700, 1701, 1698,
-     1675, 1676, 1677, 1695, 1678, 1679, 1680, 1681, 1682, 1683,
-     1702, 1696, 1703, 1684, 1685, 1699, 1686, 1687, 1688, 1689,
-     1690, 1704, 1691, 1692, 1705, 1693, 1694, 1697, 1700, 1701,
-     1698, 1706, 1707, 1708, 1695, 1709, 1710, 1711, 1712, 1713,
-     1714, 1702, 1696, 1703, 1715, 1716, 1699, 1717, 1718, 1719,
-     1720, 1721, 1704, 1722, 1723, 1705, 1724, 1725, 1726, 1727,
-     1728, 1729, 1706, 1707, 1708, 1730, 1709, 1710, 1711, 1712,
-
-     1713, 1714, 1731, 1732, 1733, 1715, 1716, 1734, 1717, 1718,
-     1719, 1720, 1721, 1735, 1722, 1723, 1736, 1724, 1725, 1726,
-     1727, 1728, 1729, 1737, 1738, 1739, 1730, 1742, 1740, 1741,
-     1743, 1744, 1745, 1731, 1732, 1733, 1746, 1747, 1734, 1748,
-     1749, 1750, 1751, 1752, 1735,  362,  362, 1736, 1753, 1754,
-     1755, 1756, 1757, 1758, 1737, 1738, 1739, 1759, 1742, 1740,
-     1741, 1743, 1744, 1745, 1760, 1761, 1762, 1746, 1747, 1763,
-     1748, 1749, 1750, 1751, 1752, 1764, 1765, 1766, 1767, 1753,
-     1754, 1755, 1756, 1757, 1758, 1768, 1769, 1770, 1759, 1771,
-     1772, 1773, 1774, 1775, 1776, 1760, 1761, 1762, 1777, 1778,
-
-     1763, 1779, 1780, 1781, 1782, 1783, 1764, 1765, 1766, 1767,
-     1784, 1785, 1786, 1787, 1788, 1789, 1768, 1769, 1770, 1790,
-     1771, 1772, 1773, 1774, 1775, 1776, 1791, 1792, 1793, 1777,
-     1778, 1794, 1779, 1780, 1781, 1782, 1783, 1795, 1796, 1797,
-     1798, 1784, 1785, 1786, 1787, 1788, 1789, 1799, 1800, 1801,
-     1790, 1802, 1803, 1804, 1805, 1806, 1807, 1791, 1792, 1793,
-     1808, 1809, 1794, 1810, 1811, 1812, 1813, 1814, 1795, 1796,
-     1797, 1798, 1815, 1816, 1817, 1818, 1819, 1820, 1799, 1800,
-     1801, 1821, 1802, 1803, 1804, 1805, 1806, 1807, 1822, 1823,
-     1824, 1808, 1809, 1825, 1810, 1811, 1812, 1813, 1814, 1826,
-
-     1827, 1828, 1829, 1815, 1816, 1817, 1818, 1819, 1820, 1830,
-     1832, 1833, 1821, 1831, 1834, 1835, 1836, 1837, 1838, 1822,
-     1823, 1824, 1839,  362, 1825, 1840,  362, 1841, 1842, 1843,
-     1826, 1827, 1828, 1829, 1844, 1845, 1846, 1847, 1848, 1849,
-     1830, 1832, 1833, 1850, 1831, 1834, 1835, 1836, 1837, 1838,
-     1851, 1852, 1853, 1839, 1854, 1855, 1840, 1856, 1841, 1842,
-     1843, 1857, 1858, 1859, 1860, 1844, 1845, 1846, 1847, 1848,
-     1849, 1861, 1862, 1863, 1850, 1864, 1865, 1866, 1867, 1868,
-     1869, 1851, 1852, 1853, 1870, 1854, 1855, 1871, 1856, 1872,
-     1873, 1874, 1857, 1858, 1859, 1860, 1875, 1876, 1877, 1878,
-
-     1879, 1880, 1861, 1862, 1863, 1881, 1864, 1865, 1866, 1867,
-     1868, 1869, 1882, 1883, 1884, 1870, 1885, 1887, 1871, 1888,
-     1872, 1873, 1874, 1891, 1889, 1892, 1890, 1875, 1876, 1877,
-     1878, 1879, 1880, 1886,  362, 1893, 1881, 1894, 1895, 1896,
-     1897, 1898, 1899, 1882, 1883, 1884,  362, 1885, 1887, 1900,
-     1888, 1901, 1902, 1903, 1891, 1889, 1892, 1890, 1904, 1905,
-     1906, 1907, 1908, 1909, 1886, 1910, 1893, 1911, 1894, 1895,
-     1896, 1897, 1898, 1899, 1912, 1913, 1914, 1915, 1916, 1917,
-     1900, 1918, 1901, 1902, 1903, 1919, 1920, 1921, 1922, 1904,
-     1905, 1906, 1907, 1908, 1909, 1923, 1910, 1924, 1911, 1925,
-
-     1926, 1927, 1928, 1930, 1931, 1912, 1913, 1914, 1915, 1916,
-     1917, 1929, 1918, 1932,  362, 1933, 1919, 1920, 1921, 1922,
-     1934, 1935,  362, 1936, 1937, 1938, 1923, 1939, 1924, 1940,
-     1925, 1926, 1927, 1928, 1930, 1931, 1941, 1942, 1943, 1944,
-     1945, 1946, 1929, 1947, 1932, 1948, 1933, 1949, 1950, 1951,
-     1952, 1934, 1935, 1953, 1936, 1937, 1938, 1954, 1939, 1955,
-     1940, 1956, 1957, 1958,  362, 1959, 1960, 1941, 1942, 1943,
-     1944, 1945, 1946, 1961, 1947, 1962, 1948, 1963, 1949, 1950,
-     1951, 1952, 1964, 1965, 1953, 1966,  362, 1967, 1954, 1968,
-     1955, 1969, 1956, 1957, 1958, 1970, 1959, 1960, 1971, 1972,
-
-     1973, 1974, 1976, 1977, 1961, 1978, 1962, 1979, 1963, 1980,
-     1981, 1982, 1983, 1964, 1965, 1984, 1966, 1986, 1967, 1987,
-     1968, 1988, 1969, 1989, 1990,  362, 1970, 1991, 1992, 1971,
-     1972, 1973, 1974, 1976, 1977, 1993, 1978, 1994, 1979, 1995,
-     1980, 1981, 1982, 1983, 1996, 1997, 1984, 1998, 1986, 1999,
-     1987, 2000, 1988, 2001, 1989, 1990, 2002, 2003, 1991, 1992,
-     2004, 2004, 2004, 2004, 2004, 2004, 1993, 2004, 1994, 2004,
-     1995, 2004, 2004, 2004, 2004, 1996, 1997, 2004, 1998, 2004,
-     1999, 2004, 2000, 2004, 2001, 2004, 2004, 2002, 2003,   14,
-       14,   14,   14,   14,   14,   14,   14,   14,  125,  125,
-
-      125,  125,  125,  125,  125,  125,  125,  129,  129,  129,
-      129,  129,  129,  129,  129,  129,  134, 2004,  134,  134,
-      134,  134,  134,  134,  134,  135, 2004,  135,  135,  135,
-      135,  135,  135,  135,  139,  139,  143,  143,  143,  143,
-      143,  143,  143,  143,  143,  252,  252,  252,  252,  252,
-      252,  252,  252,  252,  254, 2004,  254,  254,  254,  254,
-      254,  254,  254,  274, 2004,  274,  358,  358,  358,  358,
-      358,  358,  358,  358,  358,  363,  363,  363,  363,  363,
-      363,  363,  363,  363,  367,  367,  367,  367,  367,  367,
-      367,  367,  367,  369,  369,  369,  369,  369,  369,  369,
-
-      369,  369,  370,  370,  370, 2004, 2004,  370,  370, 2004,
-      370,  142,  142,  142,  142,  142,  142,  142,  142,  142,
-      556, 2004, 2004,  556,  556, 2004,  556,  584,  584,  584,
-     2004,  584,  584,  584,  584,  584,  586,  586,  586,  586,
-     2004,  586,  586,  586,  586,  626,  626,  626,  626,  626,
-      626,  626,  626,  626,   13, 2004, 2004, 2004, 2004, 2004,
+      235,  217,  223,  236,  224,  344,  351,  225,  226,  173,
+
+      237,  238,  227,  174,  283,  284,  228,  286,  356,  229,
+      239,  230,  240,  287,  231,  285,  241,  357,  242,  133,
+      243,  133,  133,  223,  133,  224,  133,  133,  225,  226,
+      173,  136,  238,  227,  174,  283,  284,  228,  286,  356,
+      229,  239,  230,  240,  287,  231,  285,  241,  357,  242,
+      368,  243,  246,  247,  368,  155,  248,  156,  249,  329,
+      250,  289,  290,  330,  279,  251,  297,  280,  187,  366,
+      161,  292,  378,  378,  298,  293,  208,  349,  371,  139,
+      372,  299,  300,  246,  247,  139,  155,  248,  156,  249,
+      329,  250,  289,  290,  330,  279,  251,  297,  280,  187,
+
+      301,  161,  292,  306,  307,  298,  293,  208,  302,  371,
+      139,  372,  299,  300,  303,  308,  139,  304,  314,  310,
+      309,  328,  331,  311,  139,  325,  139,  321,  321,  312,
+      333,  301,  313,  334,  306,  307,  318,  322,  332,  302,
+      323,  341,  320,  320,  335,  303,  308,  380,  304,  314,
+      310,  309,  324,  331,  311,  139,  342,  139,  336,  338,
+      312,  333,  349,  313,  334,  317,  350,  339,  322,  332,
+      345,  315,  341,  352,  316,  335,  340,  353,  380,  354,
+      346,  348,  355,  324,  841,  347,  315,  342,  373,  336,
+      338,  373,  385,  349,  359,  374,  374,  350,  339,  256,
+
+      390,  345,  315,  360,  352,  375,  255,  340,  353,  361,
+      354,  346,  348,  355,  253,  145,  347,  138,  138,  362,
+      140,  140,  393,  385,  396,  359,  399,  146,  400,  585,
+      141,  390,  373,  136,  360, 2004,  375,  376,  377, 2004,
+      361,  378,  378, 2004,  381,  381,  383,  383, 2004,  391,
+      384,  384, 2004,  393,  382,  396, 2004,  399,  146,  400,
+      392,  141,  142,  142,  142,  142,  142,  142,  142,  142,
+      142,  142,  142,  142,  142,  142,  401,  402,  144,  386,
+      391,  142,  142,  387,  142,  382,  394,  397,  407,  408,
+      388,  392,  395,  404,  405,  406,  389,  403,  409,  411,
+
+      412,  398,  410,  413,  418,  384,  384,  401,  402,  421,
+      386,  142,  142,  142,  387,  142, 2004,  394,  397,  407,
+      408,  388,  414,  395,  404,  405,  406,  389,  403,  409,
+      411,  412,  398,  410,  413,  418,  415,  416,  417,  424,
+      421,  429,  142,  142,  142,  142,  142,  142,  142,  142,
+      419,  422,  430,  414,  420,  423,  425,  431,  426,  427,
+      432,  436,  428,  433,  437,  438,  439,  415,  416,  417,
+      424,  434,  429, 2004,  444,  445, 2004,  435,  448,  456,
+      457,  419,  422,  430, 2004,  420,  423,  425,  431,  426,
+      427,  432,  436,  428,  433,  437,  438,  439,  440,  441,
+
+      446,  449,  434, 2004,  442,  444,  445,  447,  435,  448,
+      456,  457,  464,  465,  466,  443,  453,  450,  462,  451,
+      467,  454,  455,  468,  452,  458,  469,  459,  460,  440,
+      441,  446,  449,  461,  463,  442,  472, 2004,  447,  474,
+      473,  475,  476,  464,  465,  466,  443,  453,  450,  462,
+      451,  467,  454,  455,  468,  452,  458,  469,  459,  460,
+      470,  477,  478,  479,  461,  463,  480,  472,  471,  483,
+      474,  473,  475,  476,  481,  484,  482,  485,  486,  489,
+      491,  487,  492,  384,  384,  490,  500,  493,  488, 2004,
+      501,  470,  477,  478,  479,  502, 2004,  480,  503,  471,
+
+      483,  504,  508,  509, 2004,  481,  484,  482,  485,  486,
+      489,  491,  487,  492,  494,  495,  490,  500,  493,  488,
+      496,  501,  505,  506,  497,  498,  502,  499,  510,  503,
+      512,  513,  504,  508,  509,  507,  514,  515,  520,  517,
+      524,  518,  525,  526,  527,  494,  495,  519,  516,  528,
+      529,  496,  511,  505,  506,  497,  498,  521,  499,  510,
+      530,  512,  513,  531,  532,  522,  507,  514,  515,  520,
+      517,  524,  518,  525,  526,  527,  533,  523,  519,  516,
+      528,  529,  534,  511,  535,  537,  538,  539,  521,  540,
+      541,  530,  544,  545,  531,  532,  522,  546,  547,  542,
+
+      550,  548,  551,  552,  553,  554,  555,  533,  523,  275,
+      275,  391, 2004,  534,  549,  535,  537,  538,  539,  558,
+      540,  541,  543,  544,  545,  559,  561,  560,  546,  547,
+      542,  550,  548,  551,  552,  553,  554,  555,  562,  387,
+      414,  417,  391,  276,  419,  549,  388,  564,  563,  435,
+      558,  566,  389,  543,  569,  570,  559,  561,  560,  425,
+      454,  565,  427,  571,  464,  471,  572,  567,  573,  562,
+      387,  414,  417,  442,  574,  419,  482,  388,  564,  563,
+      435,  575,  566,  389,  568,  569,  570,  490,  498,  578,
+      425,  454,  565,  427,  571,  464,  471,  572,  567,  573,
+
+      576,  579,  510,  580,  442,  574,  581,  482,  517,  520,
+      577,  582,  575,  583, 2004,  568,  519,  516,  490,  498,
+      578,  589,  589,  589,  589,  321,  321, 2004,  321,  321,
+     2004,  576,  579,  510,  580,  322,  317,  581,  322,  517,
+      520,  577,  582,  323,  583,  320,  320,  519,  516,  588,
+      588,  590,  590,  589,  589,  324,  594,  595,  592,  592,
+      596,  591,  593,  593,  597,  598,  322,  317,  599,  322,
+      600,  602,  603,  604,  605,  606,  607,  610,  608,  611,
+      612,  613,  614,  601,  615,  616,  324,  594,  595,  609,
+      617,  596,  591,  620,  621,  597,  598,  622,  618,  599,
+
+      619,  600,  602,  603,  604,  605,  606,  607,  610,  608,
+      611,  612,  613,  614,  601,  615,  616,  623,  624,  625,
+      609,  617,  374,  374,  620,  621,  629, 2004,  622,  618,
+      632,  619,  375,  376,  376,  633,  634,  628,  628,  635,
+      362,  381,  381,  636,  637,  362,  362,  638,  623,  624,
+      625,  382,  639,  640,  630,  630,  641,  629,  631,  631,
+      642,  632,  643,  375,  644,  645,  633,  634,  646,  647,
+      635,  648,  649,  650,  636,  637,  651,  652,  638,  656,
+      653,  657,  382,  639,  640,  660,  661,  641,  654,  658,
+      662,  642,  663,  643,  655,  644,  645,  664,  665,  646,
+
+      647,  666,  648,  649,  650,  667,  659,  651,  652,  668,
+      656,  653,  657,  669,  670,  671,  660,  661,  672,  654,
+      658,  662,  674,  663,  675,  655,  673,  676,  664,  665,
+      679,  677,  666,  680,  681,  682,  667,  659,  683,  684,
+      668,  678,  685,  686,  669,  670,  671,  687,  688,  672,
+      689,  691,  692,  674,  690,  675,  693,  673,  676,  694,
+      695,  679,  677,  696,  680,  681,  682,  697,  699,  683,
+      684,  700,  678,  685,  686,  701,  702,  698,  687,  688,
+      703,  689,  691,  692,  704,  690,  705,  693,  706,  707,
+      694,  695,  708,  709,  696, 2004,  721, 2004,  697,  699,
+
+     2004,  724,  700,  725,  736, 2004,  701,  702,  698,  737,
+      722,  703,  593,  593,  723,  704, 2004,  705,  738,  706,
+      707,  739,  740,  708,  709,  710,  711,  721,  712,  741,
+      713,  714,  724,  715,  725,  736,  716,  742,  743,  717,
+      737,  722,  745,  718,  719,  723,  746,  720, 2004,  738,
+      749, 2004,  739,  740, 2004,  750,  710,  711,  751,  712,
+      741,  713,  714,  752,  715,  755, 2004,  716,  742,  743,
+      717,  756,  747,  745,  718,  719,  748,  746,  720,  726,
+      727,  749,  728,  753,  729,  730,  750,  731,  757,  751,
+      732,  754,  761,  759,  752,  764,  755,  733,  734,  762,
+
+      765,  735,  756,  747,  760,  766,  763,  748,  767,  768,
+      726,  727,  758,  728,  753,  729,  730,  769,  731,  757,
+      770,  732,  754,  761,  759,  771,  764,  772,  733,  734,
+      762,  765,  735,  773,  774,  760,  766,  763,  775,  767,
+      768,  776,  777,  758,  779,  780,  781,  782,  769,  783,
+      784,  770,  785,  786,  778,  787,  771,  788,  772,  789,
+      790,  791,  792,  793,  773,  774,  794,  795,  796,  775,
+      797,  802,  776,  777,  798,  779,  780,  781,  782,  799,
+      783,  784,  800,  785,  786,  778,  787,  801,  788,  805,
+      789,  790,  791,  792,  793,  803,  806,  794,  795,  796,
+
+      807,  797,  802,  808,  809,  798,  810,  804,  811,  812,
+      799,  813,  814,  800,  815,  816,  817,  818,  801,  819,
+      805,  820,  821,  822,  823,  824,  803,  806,  825,  826,
+      654,  807,  827,  658,  808,  809,  828,  810,  804,  811,
+      812,  673,  813,  814,  829,  815,  816,  817,  818,  830,
+      819,  689,  820,  821,  822,  823,  824,  831,  697,  825,
+      826,  654,  833,  827,  658,  723,  834,  828,  832,  747,
+      835,  753,  673,  836,  759,  829,  777,  837,  838,  839,
+      830,  840,  689,  799,  590,  590,  842,  842,  831,  697,
+      843,  843,  844,  833,  591,  845,  723,  834,  846,  832,
+
+      747,  835,  753,  847,  836,  759,  848,  777,  837,  838,
+      839,  849,  840,  850,  799,  593,  593,  851,  852,  853,
+      854,  855,  856,  844,  857,  591,  845,  858,  859,  846,
+      860,  861,  862,  863,  847,  864,  865,  848,  866,  867,
+      868,  869,  849,  870,  850,  871,  876,  872,  851,  852,
+      853,  854,  855,  856,  874,  857,  362,  877,  858,  859,
+      873,  860,  861,  862,  863,  878,  864,  865,  879,  866,
+      867,  868,  869,  362,  870,  880,  871,  876,  872,  628,
+      628,  882,  362,  631,  631,  874,  631,  631,  877,  883,
+      884,  873,  885,  886,  887,  888,  878,  889,  890,  879,
+
+      892,  893,  894,  895,  896,  898,  880,  899,  900,  901,
+      903,  902,  882,  897,  904,  905,  906,  891,  907,  908,
+      883,  884,  909,  885,  886,  887,  888,  910,  889,  890,
+      911,  892,  893,  894,  895,  896,  898,  912,  899,  900,
+      901,  903,  902,  913,  897,  904,  905,  906,  891,  907,
+      908,  914,  915,  909,  916,  917,  918,  919,  910,  920,
+      921,  911,  922,  923,  924,  925,  926,  927,  912,  928,
+      929,  930,  931,  932,  913,  933,  934,  935,  936,  937,
+      938,  939,  914,  915,  942,  916,  917,  918,  919,  943,
+      920,  921,  940,  922,  923,  924,  925,  926,  927,  941,
+
+      928,  929,  930,  931,  932,  944,  933,  934,  935,  936,
+      937,  938,  939,  945,  946,  942,  947,  948,  949,  951,
+      943,  952,  953,  940,  954,  950,  955,  956,  957,  958,
+      941,  959,  963,  960,  964,  965,  944,  966,  967,  961,
+      968,  969,  970,  971,  945,  946,  972,  947,  948,  949,
+      951,  962,  952,  953,  973,  954,  950,  955,  956,  957,
+      958,  974,  959,  963,  960,  964,  965,  975,  966,  967,
+      961,  968,  969,  970,  971,  976,  980,  972,  977,  981,
+      982,  983,  962,  984,  978,  973,  985,  986,  989,  987,
+      990,  991,  974,  988,  992,  993,  979,  994,  975,  995,
+
+      996,  997,  998,  999, 1000, 1001,  976,  980, 1002,  977,
+      981,  982,  983, 1003,  984,  978, 1004,  985,  986,  989,
+      987,  990,  991, 1007,  988,  992,  993,  979,  994, 1008,
+      995,  996,  997,  998,  999, 1000, 1001, 1005, 1009, 1002,
+     1010, 1011, 1006, 1012, 1003, 1013, 1014, 1004, 1015, 1016,
+     1017, 1018, 1019, 1020, 1007, 1021, 1022, 1023, 1024, 1025,
+     1008, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1005, 1009,
+     1033, 1010, 1011, 1006, 1012, 1036, 1013, 1014, 1038, 1015,
+     1016, 1017, 1018, 1019, 1020, 1037, 1021, 1022, 1023, 1024,
+     1025, 1039, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1034,
+
+     1040, 1033, 1041, 1035, 1042, 1043, 1036, 1044, 1045, 1038,
+     1046, 1047, 1048, 1049, 1050, 1051, 1037, 1052, 1053, 1054,
+     1055, 1056, 1039, 1057, 1058, 1059, 1060, 1061, 1062, 1063,
+     1034, 1040, 1064, 1041, 1035, 1042, 1043, 1065, 1044, 1045,
+     1066, 1046, 1047, 1048, 1049, 1050, 1051, 1067, 1052, 1053,
+     1054, 1055, 1056, 1068, 1057, 1058, 1059, 1060, 1061, 1062,
+     1063, 1069, 1070, 1064, 1071, 1072,  940, 1073, 1065,  987,
+     1074, 1066, 1075, 1076, 1077,  843,  843, 1078, 1067,  843,
+      843, 1079, 1080, 1081, 1068, 1082, 1083, 1084, 1085, 1086,
+     1087, 1088, 1069, 1070, 1089, 1071, 1072,  940, 1073, 1090,
+
+      987, 1074, 1091, 1075, 1076, 1077, 1092, 1093, 1078, 1094,
+     1095, 1096, 1079, 1080, 1081, 1097, 1082, 1083, 1084, 1085,
+     1086, 1087, 1088, 1098, 1099, 1089, 1100, 1101, 1102, 1103,
+     1090,  362, 1105, 1091, 1104, 1106, 1107, 1092, 1093, 1108,
+     1094, 1095, 1096, 1109, 1110, 1111, 1097, 1112,  362, 1113,
+     1114, 1115, 1116, 1117, 1098, 1099, 1118, 1100, 1101, 1102,
+     1103, 1119,  362, 1120, 1121, 1104, 1106, 1107, 1122, 1123,
+     1108, 1126, 1127, 1128, 1109, 1110, 1111, 1129, 1112, 1130,
+     1113, 1114, 1115, 1116, 1117, 1124, 1131, 1118, 1125, 1132,
+     1133, 1134, 1119, 1135, 1120, 1121, 1136, 1137, 1138, 1122,
+
+     1123, 1139, 1126, 1127, 1128, 1140, 1141, 1142, 1129, 1143,
+     1130, 1144, 1145, 1146, 1147, 1148, 1124, 1131, 1149, 1125,
+     1132, 1133, 1134, 1150, 1135, 1157, 2004, 1136, 1137, 1138,
+     2004, 1158, 1139,  362, 1309, 1159, 1140, 1141, 1142, 1162,
+     1143, 1160, 1144, 1145, 1146, 1147, 1148, 1151, 1163, 1149,
+     1164, 1161, 1165, 1166, 1150, 1172, 1157, 1152, 1173, 2004,
+     1153, 1154, 1158, 1174, 1155, 1156, 1159, 1175, 1176, 1177,
+     1162, 2004, 1160, 1178, 1179, 1180, 1181, 1182, 1151, 1163,
+     1183, 1164, 1161, 1165, 1166, 1184, 1172, 1167, 1152, 1173,
+     1168, 1153, 1154, 1169, 1174, 1155, 1156, 1170, 1175, 1176,
+
+     1177, 1185, 1171, 1186, 1178, 1179, 1180, 1181, 1182, 1187,
+     1188, 1183, 1189, 1190, 1191, 1192, 1184, 1193, 1167, 1194,
+     1195, 1168, 1196, 1197, 1169, 1198, 1199, 1200, 1170, 1201,
+     1202, 1203, 1185, 1171, 1186, 1204, 1205, 1206, 1207, 1208,
+     1187, 1188, 1209, 1189, 1190, 1191, 1192, 1210, 1193, 1211,
+     1194, 1195, 1212, 1196, 1197, 1213, 1198, 1199, 1200, 1214,
+     1201, 1202, 1203, 1215, 1216, 1217, 1204, 1205, 1206, 1207,
+     1208, 1218, 1219, 1209, 1220, 1221, 1222, 1223, 1210, 1224,
+     1211, 1225, 1226, 1212, 1227, 1230, 1213, 1231, 1228, 1232,
+     1214, 1233, 1234, 1236, 1215, 1216, 1217, 1229, 1237, 1235,
+
+     1238, 1239, 1218, 1219, 1240, 1220, 1221, 1222, 1223, 1241,
+     1224, 1242, 1225, 1226, 1243, 1227, 1230, 1247, 1231, 1228,
+     1232, 1248, 1233, 1234, 1236, 1244, 1249, 1245, 1229, 1237,
+     1235, 1238, 1239, 1250, 1251, 1240, 1252, 1253, 1254, 1255,
+     1241, 1256, 1242, 1246, 1257, 1243, 1258, 1259, 1247, 1261,
+     1262, 1263, 1248, 1260, 1265, 1266, 1244, 1249, 1245, 1267,
+     1268, 1264, 1269, 1270, 1250, 1251, 1271, 1252, 1253, 1254,
+     1255, 1272, 1256, 1273, 1246, 1257, 1274, 1258, 1259, 1275,
+     1261, 1262, 1263, 1277, 1260, 1265, 1266, 1278, 1279, 1280,
+     1267, 1268, 1264, 1269, 1270, 1281, 1276, 1271, 1282, 1283,
+
+     1138, 1119, 1272, 1120, 1273, 1151, 1161, 1274, 1169, 1284,
+     1275, 1224, 1285, 1286, 1277, 1287, 1288, 1171, 1278, 1279,
+     1280, 1289, 1290, 1291, 1292, 1293, 1281, 1276, 1294, 1282,
+     1283, 1138, 1119, 1295, 1120, 1296, 1151, 1161, 1297, 1169,
+     1284, 1298, 1224, 1285, 1286, 1299, 1287, 1288, 1171, 1300,
+     1301, 1302, 1289, 1290, 1291, 1292, 1293, 1303, 1304, 1294,
+     1305, 1306, 1307, 1308, 1295, 2004, 1296, 1312, 1313, 1297,
+     1310, 1311, 1298, 1314, 1315, 1316, 1299, 1317, 1318, 1319,
+     1300, 1301, 1302, 1320, 1321, 1322, 1323, 1324, 1303, 1304,
+     1325, 1305, 1306, 1307, 1308,  362,  362, 1326, 1312, 1313,
+
+     1327, 1310, 1311, 1328, 1314, 1315, 1316, 1329, 1317, 1318,
+     1319, 1330, 1331, 1332, 1320, 1321, 1322, 1323, 1324, 1333,
+     1334, 1325, 1335, 1336, 1337, 1338, 1339, 1340, 1326, 1341,
+     1342, 1327, 1343, 1344, 1328, 1345, 1346, 1347, 1329, 1348,
+     1349, 1350, 1330, 1331, 1332, 1351, 1352, 1353, 1354, 1355,
+     1333, 1334, 1356, 1335, 1336, 1337, 1338, 1339, 1340, 1357,
+     1341, 1342, 1358, 1343, 1344, 1359, 1345, 1346, 1347, 1360,
+     1348, 1349, 1350, 1361, 1363, 1364, 1351, 1352, 1353, 1354,
+     1355, 1362, 1365, 1356, 1366, 1367, 1368, 1369, 1370, 1371,
+     1357, 1372, 1373, 1358, 1374, 1375, 1359, 1376, 1377, 1378,
+
+     1360, 1379, 1380, 1381, 1361, 1363, 1364, 1382, 1383, 1384,
+     1385, 1386, 1362, 1365, 1387, 1366, 1367, 1368, 1369, 1370,
+     1371, 1388, 1372, 1373, 1389, 1374, 1375, 1390, 1376, 1377,
+     1378, 1391, 1379, 1380, 1381, 1392, 1393, 1394, 1382, 1383,
+     1384, 1385, 1386, 1395, 1396, 1387, 1397, 1399, 1400, 1401,
+     1402, 1403, 1388, 1404, 1405, 1389, 1406, 1407, 1390, 1408,
+     1409, 1410, 1391, 1411, 1412, 1413, 1392, 1393, 1394, 1414,
+     1415, 1416, 1417, 1418, 1395, 1396, 1419, 1397, 1399, 1400,
+     1401, 1402, 1403, 1420, 1404, 1405, 1421, 1406, 1407, 1422,
+     1408, 1409, 1410, 1423, 1411, 1412, 1413, 1424, 1425, 1426,
+
+     1414, 1415, 1416, 1417, 1418, 1427, 1428, 1419, 1430, 1431,
+     1432, 1433, 1434, 1435, 1420, 1436, 1437, 1421, 1438, 1439,
+     1422, 1440, 1429, 1441, 1423, 1442, 1443, 1444, 1424, 1425,
+     1426, 1445, 1446, 1447, 1448, 1449, 1427, 1428, 1450, 1430,
+     1431, 1432, 1433, 1434, 1435, 1451, 1436, 1437, 1452, 1438,
+     1439, 1453, 1440, 1429, 1441, 1454, 1442, 1443, 1444, 1455,
+     1456, 1457, 1445, 1446, 1447, 1448, 1449, 1458, 1459, 1450,
+     1460, 1461, 1462, 1463, 1464, 1465, 1451, 1466, 1467, 1452,
+     1468, 1469, 1453, 1470, 1471, 1472, 1454, 1473, 1474, 1475,
+     1455, 1456, 1457, 1477, 1479, 1476, 1480, 1481, 1458, 1459,
+
+     1482, 1460, 1461, 1462, 1463, 1464, 1465, 1483, 1466, 1467,
+     1484, 1468, 1469, 1485, 1470, 1471, 1472,  362, 1473, 1474,
+     1475,  362, 1486, 1487, 1477, 1479, 1476, 1480, 1481, 1488,
+     1489, 1482, 1490, 1491, 1492, 1493, 1494, 1495, 1483, 1496,
+     1497, 1484, 1498, 1499, 1485, 1500, 1501, 1502, 1503, 1504,
+     1505, 1506, 1507, 1486, 1487, 1508, 1509, 1510, 1511, 1512,
+     1488, 1489, 1513, 1490, 1491, 1492, 1493, 1494, 1495, 1514,
+     1496, 1497, 1515, 1498, 1499, 1516, 1500, 1501, 1502, 1503,
+     1504, 1505, 1506, 1507, 1517, 1518, 1508, 1509, 1510, 1511,
+     1512, 1519, 1520, 1513, 1521, 1522, 1523, 1524, 1525, 1526,
+
+     1514, 1527, 1528, 1515, 1529, 1530, 1516, 1531, 1532, 1533,
+     1534, 1535, 1536, 1537, 1538, 1517, 1518, 1539, 1540, 1541,
+     1542, 1543, 1519, 1520, 1544, 1521, 1522, 1523, 1524, 1525,
+     1526, 1545, 1527, 1528, 1546, 1529, 1530, 1547, 1531, 1532,
+     1533, 1534, 1535, 1536, 1537, 1538, 1548, 1549, 1539, 1540,
+     1541, 1542, 1543, 1550, 1551, 1544, 1552, 1553, 1556, 1554,
+     1562, 1563, 1545, 1557, 1558, 1546, 1564, 1565, 1547, 1566,
+     1567, 1568, 1569, 1570, 1559, 1571, 1560, 1548, 1549, 1555,
+     1561, 1572, 1573, 1574, 1550, 1551, 1575, 1552, 1553, 1556,
+     1554, 1562, 1563, 1576, 1557, 1558, 1577, 1564, 1565, 1578,
+
+     1566, 1567, 1568, 1569, 1570, 1559, 1571, 1560, 1579, 1580,
+     1555, 1561, 1572, 1573, 1574, 1581, 1582, 1575, 1583, 1584,
+     1585, 1586, 1587, 1588, 1576, 1589, 1590, 1577, 1591, 1592,
+     1578, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1579,
+     1580, 1601, 1602, 1603, 1604, 1605, 1581, 1582, 1606, 1583,
+     1584, 1585, 1586, 1587, 1588, 1607, 1589, 1590, 1608, 1591,
+     1592, 1609, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600,
+     1557, 1558, 1601, 1602, 1603, 1604, 1605, 1610, 1611, 1606,
+     1612, 1613, 1614, 1560, 1615, 1616, 1607, 1561, 1617, 1608,
+     1618, 1619, 1609, 1620, 1621, 1622, 1623, 1625, 1626, 1627,
+
+     1624, 1557, 1558, 1628, 1629, 1630, 1631, 1632, 1610, 1611,
+     1633, 1612, 1613, 1614, 1560, 1615, 1616,  362, 1561, 1617,
+      362, 1618, 1619, 1634, 1620, 1621, 1622, 1623, 1625, 1626,
+     1627, 1624, 1635, 1636, 1628, 1629, 1630, 1631, 1632, 1637,
+     1638, 1633, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646,
+     1647, 1648, 1649, 1650, 1634, 1651, 1652, 1653, 1654, 1655,
+     1656, 1657, 1658, 1635, 1636, 1659, 1660, 1661, 1662, 1663,
+     1637, 1638, 1664, 1639, 1640, 1641, 1642, 1643, 1644, 1645,
+     1646, 1647, 1648, 1649, 1650, 1665, 1651, 1652, 1653, 1654,
+     1655, 1656, 1657, 1658, 1666, 1667, 1659, 1660, 1661, 1662,
+
+     1663, 1668, 1669, 1664, 1670, 1671, 1672, 1673, 1674, 1675,
+     1676, 1677, 1678, 1679, 1680, 1681, 1665, 1682, 1683, 1684,
+     1685, 1686, 1687, 1688, 1689, 1666, 1667, 1690, 1691, 1692,
+     1693, 1694, 1668, 1669, 1697, 1670, 1671, 1672, 1673, 1674,
+     1675, 1676, 1677, 1678, 1679, 1680, 1681, 1698, 1682, 1683,
+     1684, 1685, 1686, 1687, 1688, 1689, 1695, 1700, 1690, 1691,
+     1692, 1693, 1694, 1699, 1696, 1697, 1701, 1702, 1703, 1704,
+     1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1698, 1713,
+     1714, 1715, 1716, 1717, 1718, 1719, 1720, 1695, 1700, 1721,
+     1722, 1723, 1724, 1725, 1699, 1696, 1726, 1701, 1702, 1703,
+
+     1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1727,
+     1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1728, 1729,
+     1721, 1722, 1723, 1724, 1725, 1730, 1731, 1726, 1732, 1733,
+     1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743,
+     1727, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1728,
+     1729, 1752, 1753,  362,  362, 1754, 1730, 1731, 1755, 1732,
+     1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742,
+     1743, 1756, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751,
+     1757, 1758, 1752, 1753, 1759, 1760, 1754, 1761, 1762, 1755,
+     1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772,
+
+     1773, 1774, 1756, 1775, 1776, 1777, 1778, 1779, 1780, 1781,
+     1782, 1757, 1758, 1783, 1784, 1759, 1760, 1785, 1761, 1762,
+     1786, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771,
+     1772, 1773, 1774, 1787, 1775, 1776, 1777, 1778, 1779, 1780,
+     1781, 1782, 1788, 1789, 1783, 1784, 1790, 1791, 1785, 1792,
+     1793, 1786, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801,
+     1802, 1803, 1804, 1805, 1787, 1806, 1807, 1808, 1809, 1810,
+     1811, 1812, 1813, 1788, 1789, 1814, 1815, 1790, 1791, 1816,
+     1792, 1793, 1817, 1794, 1795, 1796, 1797, 1798, 1799, 1800,
+     1801, 1802, 1803, 1804, 1805, 1818, 1806, 1807, 1808, 1809,
+
+     1810, 1811, 1812, 1813, 1819, 1820, 1814, 1815, 1821, 1822,
+     1816, 1823, 1824, 1817, 1825, 1826, 1827, 1828, 1829, 1831,
+     1830, 1832, 1833, 1834, 1835, 1836, 1818, 1837, 1838,  362,
+     1839, 1840, 1841, 1842, 1843, 1819, 1820,  362, 1844, 1821,
+     1822, 1845, 1823, 1824, 1846, 1825, 1826, 1827, 1828, 1829,
+     1831, 1830, 1832, 1833, 1834, 1835, 1836, 1847, 1837, 1838,
+     1848, 1839, 1840, 1841, 1842, 1843, 1849, 1850, 1851, 1844,
+     1852, 1853, 1845, 1854, 1855, 1846, 1856, 1857, 1858, 1859,
+     1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1847, 1868,
+     1869, 1848, 1870, 1871, 1872, 1873, 1874, 1849, 1850, 1851,
+
+     1875, 1852, 1853, 1876, 1854, 1855, 1877, 1856, 1857, 1858,
+     1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1878,
+     1868, 1869, 1879, 1870, 1871, 1872, 1873, 1874, 1880, 1881,
+     1882, 1875, 1883, 1884, 1876, 1885, 1887, 1877, 1888, 1889,
+     1891, 1892, 1890, 1893, 1894, 1895, 1896, 1897, 1898,  362,
+     1878, 1899, 1886, 1879, 1900, 1901, 1902, 1903, 1904, 1880,
+     1881, 1882,  362, 1883, 1884, 1905, 1885, 1887, 1906, 1888,
+     1889, 1891, 1892, 1890, 1893, 1894, 1895, 1896, 1897, 1898,
+     1907, 1908, 1899, 1886, 1909, 1900, 1901, 1902, 1903, 1904,
+     1910, 1911, 1912, 1913, 1914, 1915, 1905, 1916, 1917, 1906,
+
+     1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927,
+     1928, 1907, 1908, 1929, 1930, 1909,  362, 1931, 1932, 1933,
+     1934, 1910, 1911, 1912, 1913, 1914, 1915, 1935, 1916, 1917,
+      362, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926,
+     1927, 1928, 1936, 1937, 1929, 1930, 1938, 1939, 1931, 1932,
+     1933, 1934, 1940, 1941, 1942, 1943, 1944, 1945, 1935, 1946,
+     1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956,
+     1958, 1959,  362, 1936, 1937, 1960, 1961, 1938, 1939, 1957,
+     1962, 1963, 1964, 1940, 1941, 1942, 1943, 1944, 1945, 1965,
+     1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955,
+
+     1956, 1958, 1959,  362, 1966, 1967, 1960, 1961, 1968, 1969,
+     1957, 1962, 1963, 1964, 1970, 1971, 1972, 1973, 1974, 1976,
+     1965, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1986,
+     1987, 1988, 1989, 1990, 1991, 1966, 1967, 1992, 1993, 1968,
+     1969, 1994,  362, 1995, 1996, 1970, 1971, 1972, 1973, 1974,
+     1976, 1997, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984,
+     1986, 1987, 1988, 1989, 1990, 1991, 1998, 1999, 1992, 1993,
+     2000, 2001, 1994, 2002, 1995, 1996, 2003, 2004, 2004, 2004,
+     2004, 2004, 1997, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
+     2004, 2004, 2004, 2004, 2004, 2004, 2004, 1998, 1999, 2004,
+
+     2004, 2000, 2001, 2004, 2002, 2004, 2004, 2003,   14,   14,
+       14,   14,   14,   14,   14,   14,   14,  125,  125,  125,
+      125,  125,  125,  125,  125,  125,  129,  129,  129,  129,
+      129,  129,  129,  129,  129,  134, 2004,  134,  134,  134,
+      134,  134,  134,  134,  135, 2004,  135,  135,  135,  135,
+      135,  135,  135,  139,  139,  143,  143,  143,  143,  143,
+      143,  143,  143,  143,  252,  252,  252,  252,  252,  252,
+      252,  252,  252,  254, 2004,  254,  254,  254,  254,  254,
+      254,  254,  274, 2004,  274,  358,  358,  358,  358,  358,
+      358,  358,  358,  358,  363,  363,  363,  363,  363,  363,
+
+      363,  363,  363,  367,  367,  367,  367,  367,  367,  367,
+      367,  367,  369,  369,  369,  369,  369,  369,  369,  369,
+      369,  370,  370,  370, 2004, 2004,  370,  370, 2004,  370,
+      142,  142,  142,  142,  142,  142,  142,  142,  142,  556,
+     2004, 2004,  556,  556, 2004,  556,  584,  584,  584, 2004,
+      584,  584,  584,  584,  584,  586,  586,  586,  586, 2004,
+      586,  586,  586,  586,  626,  626,  626,  626,  626,  626,
+      626,  626,  626,   13, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
+
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
-
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
-     2004, 2004, 2004
+     2004, 2004
     } ;
 
-static yyconst flex_int16_t yy_chk[4644] =
+static yyconst flex_int16_t yy_chk[4663] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -1702,445 +1719,447 @@ static yyconst flex_int16_t yy_chk[4644] =
        73,   35,  110,   73,   73,   36,   70,   64,   85,   36,
        38,   38,   85,   39,   89,   43,   89,   39,   38,   43,
        38,   39,   38,   43,   39,   38,   38,   39,  101,   43,
-       39,  627,   43,  627,   78,   78,  255,  101,  254,   43,
+       39,  627,   43,  627,  111,  115,  255,  101,  254,   43,
       252,   38,   38,  142,   39,   89,   43,   89,   39,   38,
        43,   38,   39,   38,   43,   39,   38,   38,   39,  136,
-       43,   39,   42,   43,   42,   78,   78,   42,   42,   75,
-
-       43,   44,   42,   75,   74,   74,   42,   75,  111,   42,
-       44,   42,   44,   75,   42,   74,   44,  115,   44,  135,
-       44,   98,   98,   42,  126,   42,  126,  126,   42,   42,
-       75,   98,   44,   42,   75,   74,   74,   42,   75,  111,
-       42,   44,   42,   44,   75,   42,   74,   44,  115,   44,
-      103,   44,   46,   46,  103,   72,   46,   72,   46,  104,
-       46,  118,   98,   83,   72,   46,  128,   72,   80,  119,
-       72,   83,   80,   83,  585,  104,   80,  127,   83,   83,
-      123,  103,   80,   46,   46,  103,   72,   46,   72,   46,
-      104,   46,  118,  130,   83,   72,   46,   84,   72,   80,
-
-      119,   72,   83,   80,   83,   84,  104,   80,   87,   83,
-       83,   84,   87,   80,   84,   86,   86,   88,   87,  585,
-      106,   87,  122,   88,  130,   88,  105,   86,   84,  105,
-      378,  378,   86,  102,  106,  131,   84,  144,   99,   87,
-       99,   99,   84,   87,  109,   84,   86,   86,   88,   87,
-       99,  106,   87,  108,   88,  147,   88,  105,   86,  109,
-      105,  108,  112,   86,  113,  106,  131,  114,  144,  116,
-      108,  114,  112,  116,  113,  109,  117,  112,  149,  117,
-      132,   99,  100,  132,  108,  133,  147,  133,  133,   96,
-      109,   95,  108,  112,  151,  113,   94,  120,  114,   93,
-
-      116,  108,  114,  112,  116,  113,  120,  117,  112,  149,
-      117,  153,  120,  137,  137,  138,  156,  138,  138,  140,
-      140,  157,  120,  137,  132,  151,  158,  138,  120,  140,
-      141,  141,  383,  383,  141,  141,   50,  120,  145,  145,
-      146,  146,  153,  120,  146,  146,   49,  156,  145,  384,
-      384,   48,  157,  152,  137,   19,  159,  158,  138,  152,
-      140,  143,  143,  143,  143,  143,  143,  143,  143,  143,
-      143,  143,  143,  143,  143,  150,  159,  143,  148,  145,
-      143,  143,  148,  143,  152,  154,  150,  159,  162,  148,
-      152,  160,  160,  160,  163,  148,  165,  166,  167,  154,
-
-      165,  168,  170,  170,  169,  171,  150,  159,  173,  148,
-      143,  143,  143,  148,  143,   13,  154,  150,  169,  162,
-      148,  175,  160,  160,  160,  163,  148,  165,  166,  167,
-      154,  165,  168,  170,  170,  169,  171,  177,  178,  173,
-      179,  143,  143,  143,  143,  143,  143,  143,  143,  169,
-      172,  174,  175,  180,  172,  174,  176,  182,  176,  176,
-      183,  184,  176,  185,  181,  588,  588,  187,  177,  178,
-      188,  179,  181,  189,  190,  194,  196,  201,  181,  202,
-      189,  172,  174,    0,  180,  172,  174,  176,  182,  176,
-      176,  183,  184,  176,  185,  181,  186,  186,  187,  191,
-
-      199,  188,  186,  181,  189,  190,  194,  196,  201,  181,
-      202,  189,  205,  186,  193,  191,  199,  191,  203,  193,
-      193,  198,  191,  198,  198,  206,  203,  186,  186,  198,
-      191,  199,  207,  186,  200,  200,  200,  204,  208,  209,
-      210,  204,  200,  205,  186,  193,  191,  199,  191,  203,
-      193,  193,  198,  191,  198,  198,  206,  203,  211,  212,
-      198,  212,  213,  207,  214,  200,  200,  200,  204,  208,
-      209,  210,  204,  200,  215,  216,  217,  218,  216,  219,
-      589,  589,  217,  221,  219,  216,    0,  222,  223,  211,
-      212,    0,  212,  213,  224,  214,  225,  592,  592,  227,
-
-      228,  230,  229,  231,  232,  215,  216,  217,  218,  216,
-      219,  220,  220,  217,  221,  219,  216,  220,  222,  223,
-      235,  220,  220,  237,  220,  224,  229,  225,  226,  226,
-      227,  228,  230,  229,  231,  232,  233,  234,  236,  234,
-      240,  226,  220,  220,  242,  234,  236,  233,  220,  243,
-      244,  235,  220,  220,  237,  220,  245,  229,  236,  226,
-      226,  246,  247,  248,  249,  250,  251,  233,  234,  236,
-      234,  240,  226,  257,  258,  242,  234,  236,  233,  259,
-      243,  244,  260,  261,  262,  263,  264,  245,  265,  236,
-      266,  268,  246,  247,  248,  249,  250,  251,  267,  269,
-
-      270,  271,  272,  273,  257,  258,  278,  262,  279,  281,
-      259,  267,  282,  260,  261,  262,  263,  264,  280,  265,
-      280,  266,  268,  275,  275,  283,    0,  284,  277,  267,
-      269,  270,  271,  272,  273,  277,  286,  278,  262,  279,
-      281,  277,  267,  282,  285,  288,  289,  291,  285,  280,
-      287,  280,  287,  287,  290,  292,  283,  275,  284,  277,
-      290,  293,  294,  295,  296,  297,  277,  286,  299,  300,
-      301,  290,  277,  302,  304,  285,  288,  289,  291,  285,
-      303,  287,  305,  287,  287,  290,  292,  306,  307,  308,
-      303,  290,  293,  294,  295,  296,  297,  309,  310,  299,
-
-      300,  301,  290,  312,  302,  304,  311,  313,  314,  310,
-      329,  303,    0,  305,  311,  319,  319,    0,  306,  307,
-      308,  303,  321,  321,  320,  319,  320,  320,  309,  310,
-      330,  331,  321,  332,  312,  334,  320,  311,  313,  314,
-      310,  329,  322,  322,  335,  311,  322,  322,  323,  323,
-      324,  324,  333,  333,  324,  324,  319,  335,  323,  336,
-      337,  330,  331,  321,  332,  338,  334,  320,  339,  340,
-      341,  343,  344,  345,  346,  335,  348,  350,  351,  352,
-      353,  355,  343,  333,  333,  354,  356,  354,  335,  323,
-      336,  337,  357,  359,  360,    0,  338,  379,  361,  339,
-
-      340,  341,  343,  344,  345,  346,  385,  348,  350,  351,
-      352,  353,  355,  343,  386,  387,  354,  356,  354,  361,
-      388,  359,  360,  357,  359,  360,  374,  374,  379,  361,
-      375,  375,  381,  381,  375,  375,  374,  385,  389,  382,
-      382,  390,  381,  382,  382,  386,  387,  391,  392,  393,
-      394,  388,  395,  396,  397,  398,  399,  400,  401,  402,
-      403,  404,  405,  406,  408,  409,  411,  374,    0,  389,
-      412,  406,  390,  381,  413,  414,  415,  406,  391,  392,
-      393,  394,  410,  395,  396,  397,  398,  399,  400,  401,
-      402,  403,  404,  405,  406,  408,  409,  411,  416,  410,
-
-      418,  412,  406,  419,  420,  413,  414,  415,  406,  421,
-      422,  423,  424,  410,  425,  426,  427,  428,  429,  431,
-      424,  432,  433,  434,  435,  436,  437,  428,  438,  416,
-      410,  418,  439,  440,  419,  420,  441,  440,  442,  443,
-      421,  422,  423,  424,  444,  425,  426,  427,  428,  429,
-      431,  424,  432,  433,  434,  435,  436,  437,  428,  438,
-      445,  446,  447,  439,  440,  448,  449,  441,  440,  442,
-      443,  450,  447,  451,  452,  444,  453,  454,  455,  456,
-      459,  460,  593,  593,  462,    0,  464,  628,  628,  465,
-        0,  445,  446,  447,  463,  467,  448,  449,  463,  468,
-
-      630,  630,  450,  447,  451,  452,  469,  453,  454,  455,
-      456,  459,  460,  461,  461,  462,  461,  464,  461,  461,
-      465,  461,  470,  471,  461,  463,  467,  461,  472,  463,
-      468,  461,  461,  473,  474,  461,    0,  469,  477,    0,
-      478,  631,  631,  480,  461,  461,  481,  461,  482,  461,
-      461,  483,  461,  470,  471,  461,  479,  485,  461,  472,
-      479,  486,  461,  461,  473,  474,  461,  466,  466,  477,
-      466,  478,  466,  466,  480,  466,  484,  481,  466,  482,
-      489,  487,  483,  488,  484,  466,  466,  479,  485,  466,
-      490,  479,  486,  491,  488,  492,  493,  490,  466,  466,
-
-      494,  466,  495,  466,  466,  487,  466,  484,  496,  466,
-      497,  489,  487,  498,  488,  484,  466,  466,  499,  500,
-      466,  490,  501,  502,  491,  488,  492,  493,  490,  503,
-      504,  494,  505,  495,  506,  507,  487,  508,  509,  496,
-      510,  497,  504,  511,  498,  513,  514,  515,  516,  499,
-      500,  517,  518,  501,  502,  519,  520,  521,  522,  523,
-      503,  504,  524,  505,  527,  506,  507,  525,  508,  509,
-      526,  510,  525,  504,  511,  526,  513,  514,  515,  516,
-      528,  529,  517,  518,  532,  535,  519,  520,  521,  522,
-      523,  537,  528,  524,  538,  527,  539,  540,  525,  541,
-
-      542,  526,  543,  525,  544,  546,  526,  547,  548,  549,
-      550,  528,  529,  551,  552,  532,  535,  553,  554,  558,
-      559,  560,  537,  528,  561,  538,  562,  539,  540,  563,
-      541,  542,  564,  543,  565,  544,  546,  566,  547,  548,
-      549,  550,  567,  568,  551,  552,  569,  570,  553,  554,
-      558,  559,  560,  571,  572,  561,  569,  562,  573,  574,
-      563,  575,  576,  564,  577,  565,  578,  579,  566,  580,
-      581,  582,  583,  567,  568,  591,  591,  569,  570,  591,
-      591,  590,  590,  594,  571,  572,  595,  569,  596,  573,
-      574,  590,  575,  576,  597,  577,  598,  578,  579,  599,
-
-      580,  581,  582,  583,  600,  601,  602,  603,  604,  605,
-      606,  607,  608,  609,  594,  610,  611,  595,  612,  596,
-      614,  615,  590,  616,  617,  597,  618,  598,  619,  620,
-      599,  621,  622,  625,    0,  600,  601,  602,  603,  604,
-      605,  606,  607,  608,  609,  624,  610,  611,  632,  612,
-      633,  614,  615,  634,  616,  617,  623,  618,  624,  619,
-      620,  625,  621,  622,  625,  623,  635,  636,  638,  639,
-      640,  641,  642,  643,  644,  646,  624,  647,  648,  632,
-      649,  633,  650,  651,  634,  652,  653,  623,  654,  655,
-      656,  657,  656,  658,  652,  659,  647,  635,  636,  638,
-
-      639,  640,  641,  642,  643,  644,  646,  660,  647,  648,
-      662,  649,  663,  650,  651,  664,  652,  653,  665,  654,
-      655,  656,  657,  656,  658,  652,  659,  647,  666,  667,
-      668,  669,  670,  672,  673,  674,  675,  676,  660,  677,
-      678,  662,  680,  663,  681,  682,  664,  683,  684,  665,
-      685,  686,  687,  688,  689,  690,  691,  692,  693,  666,
-      667,  668,  669,  670,  672,  673,  674,  675,  676,  694,
-      677,  678,  696,  680,  697,  681,  682,  699,  683,  684,
-      700,  685,  686,  687,  688,  689,  690,  691,  692,  693,
-      698,  701,  702,  703,  704,  706,  708,  698,  710,  707,
-
-      694,  711,  712,  696,  713,  697,  707,  714,  699,  715,
-      716,  700,  717,  718,  719,  720,  721,  722,  723,  718,
-      724,  698,  701,  702,  703,  704,  706,  708,  698,  710,
-      707,  718,  711,  712,  725,  713,  726,  707,  714,  727,
-      715,  716,  728,  717,  718,  719,  720,  721,  722,  723,
-      718,  724,  729,  730,  731,  732,  734,  733,  735,  736,
-      737,  738,  718,  733,  740,  725,  742,  726,  743,  744,
-      727,  745,  743,  728,  746,  733,  747,  748,  749,  750,
-      751,  752,  753,  729,  730,  731,  732,  734,  733,  735,
-      736,  737,  738,  754,  733,  740,  755,  742,  756,  743,
-
-      744,  757,  745,  743,  758,  746,  733,  747,  748,  749,
-      750,  751,  752,  753,  759,  760,  761,  762,  763,  764,
-      760,  765,  766,  767,  754,  768,  769,  755,  770,  756,
-      771,  772,  757,  773,  774,  758,  775,  776,  777,  778,
-      779,  780,  781,  782,  783,  759,  760,  761,  762,  763,
-      764,  760,  765,  766,  767,  784,  768,  769,  785,  770,
-      786,  771,  772,  787,  773,  774,  792,  775,  776,  777,
-      778,  779,  780,  781,  782,  783,  788,  790,  793,  794,
-      788,  795,  796,  798,  799,  800,  784,  790,  801,  785,
-      802,  786,  803,  804,  787,  805,  806,  792,  808,  809,
-
-      810,  811,  812,  813,  814,  815,  816,  788,  790,  793,
-      794,  788,  795,  796,  798,  799,  800,  817,  790,  801,
-      818,  802,  819,  803,  804,  820,  805,  806,  822,  808,
-      809,  810,  811,  812,  813,  814,  815,  816,  823,  824,
-      825,  826,  828,  830,  831,  832,  833,  834,  817,  835,
-      836,  818,  838,  819,  839,  845,  820,  842,  842,  822,
-      843,  843,  846,  847,  848,  849,  850,  851,  852,  823,
-      824,  825,  826,  828,  830,  831,  832,  833,  834,  853,
-      835,  836,  854,  838,  855,  839,  845,  856,  857,  858,
-      859,  860,  861,  846,  847,  848,  849,  850,  851,  852,
-
-      862,  863,  864,  865,  866,  867,  868,  870,  871,    0,
-      853,  874,  872,  854,  877,  855,  873,  873,  856,  857,
-      858,  859,  860,  861,  874,  879,  880,  882,  883,  885,
-      886,  862,  863,  864,  865,  866,  867,  868,  870,  871,
-      872,  887,  874,  872,  888,  877,  889,  890,  892,  893,
-      894,  893,  895,  896,  898,  899,  879,  880,  882,  883,
-      885,  886,  897,  900,  901,  897,  902,  904,  905,  906,
-      907,  910,  887,  912,  915,  888,  916,  889,  890,  892,
-      893,  894,  893,  895,  896,  898,  899,  913,  913,  917,
-      918,  919,  920,  897,  900,  901,  897,  902,  904,  905,
-
-      906,  907,  910,  922,  912,  915,  923,  916,  925,  926,
-      929,  930,  932,  933,  931,  935,  936,  938,  913,  913,
-      917,  918,  919,  920,  931,  939,  936,  931,  931,  940,
-      941,  931,  931,  942,  922,  945,  947,  923,  948,  925,
-      926,  929,  930,  932,  933,  931,  935,  936,  938,    0,
-      949,  950,  951,  952,  953,  931,  939,  936,  931,  931,
-      940,  941,  931,  931,  942,  943,  945,  947,  943,  948,
-      954,  943,  955,  956,  957,  943,  958,  959,  960,  961,
-      943,  949,  950,  951,  952,  953,  962,  963,  964,  965,
-      966,  967,  969,  970,  971,  972,  943,  973,  974,  943,
-
-      975,  954,  943,  955,  956,  957,  943,  958,  959,  960,
-      961,  943,  976,  977,  978,  979,  980,  962,  963,  964,
-      965,  966,  967,  969,  970,  971,  972,  981,  973,  974,
-      983,  975,  985,  986,  987,  988,  989,  990,  991,  992,
-      993,  994,  995,  976,  977,  978,  979,  980,  996,  997,
-      998,  999, 1000, 1001, 1002, 1003, 1004,    0,  981, 1006,
-     1007,  983, 1008,  985,  986,  987,  988,  989,  990,  991,
-      992,  993,  994,  995, 1009, 1011, 1012, 1013, 1014,  996,
-      997,  998,  999, 1000, 1001, 1002, 1003, 1004, 1005, 1010,
-     1006, 1007, 1015, 1008, 1016, 1017, 1010, 1005, 1018, 1021,
-
-     1022, 1021, 1023, 1024, 1025, 1009, 1011, 1012, 1013, 1014,
-     1026, 1027, 1029, 1030, 1031, 1032, 1034, 1021, 1035, 1005,
-     1010, 1037, 1039, 1015, 1041, 1016, 1017, 1010, 1005, 1018,
-     1021, 1022, 1021, 1023, 1024, 1025, 1042, 1045, 1046, 1047,
-     1048, 1026, 1027, 1029, 1030, 1031, 1032, 1034, 1021, 1035,
-     1036, 1040, 1037, 1039, 1049, 1041, 1036, 1050, 1054, 1055,
-     1056, 1040, 1059, 1060, 1061, 1062, 1063, 1042, 1045, 1046,
-     1047, 1048, 1064, 1066, 1068, 1070, 1068, 1056, 1071, 1072,
-        0, 1036, 1040, 1074, 1075, 1049, 1076, 1036, 1050, 1054,
-     1055, 1056, 1040, 1059, 1060, 1061, 1062, 1063, 1077, 1078,
-
-     1079, 1080, 1073, 1064, 1066, 1068, 1070, 1068, 1056, 1071,
-     1072, 1073, 1081, 1082, 1074, 1075, 1083, 1076, 1084, 1085,
-     1086, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1096, 1077,
-     1078, 1079, 1080, 1073, 1098, 1099, 1100, 1101, 1103, 1104,
-     1104, 1107, 1073, 1081, 1082, 1105, 1106, 1083, 1108, 1084,
-     1085, 1086, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1096,
-     1109, 1110, 1111, 1112, 1114, 1098, 1099, 1100, 1101, 1103,
-     1106, 1105, 1107, 1117, 1119, 1120, 1105, 1106, 1121, 1108,
-     1122, 1123, 1125, 1127, 1128, 1129, 1130, 1131, 1132, 1134,
-     1135, 1109, 1110, 1111, 1112, 1114, 1136, 1137, 1139, 1141,
-
-     1143, 1145, 1146, 1147, 1117, 1119, 1120, 1148, 1151, 1121,
-     1152, 1122, 1123, 1125, 1127, 1128, 1129, 1130, 1131, 1132,
-     1134, 1135, 1153, 1154, 1155, 1156, 1158, 1136, 1137, 1139,
-     1141, 1143, 1145, 1146, 1147, 1159, 1160, 1161, 1148, 1151,
-     1162, 1152, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1171,
-     1170, 1174, 1175, 1153, 1154, 1155, 1156, 1158, 1170, 1176,
-     1177, 1178, 1179, 1180, 1181, 1182, 1159, 1160, 1161, 1183,
-     1184, 1162, 1185, 1163, 1164, 1165, 1166, 1167, 1168, 1169,
-     1171, 1170, 1174, 1175, 1186, 1187, 1188, 1189, 1190, 1170,
-     1176, 1177, 1178, 1179, 1180, 1181, 1182, 1192, 1194, 1195,
-
-     1183, 1184, 1196, 1185, 1197, 1198, 1199, 1200, 1201, 1202,
-     1203, 1204, 1205, 1206, 1207, 1186, 1187, 1188, 1189, 1190,
-     1208, 1211, 1213, 1214, 1215, 1216, 1217, 1218, 1192, 1194,
-     1195, 1219, 1220, 1196, 1225, 1197, 1198, 1199, 1200, 1201,
-     1202, 1203, 1204, 1205, 1206, 1207, 1226, 1227, 1228, 1229,
-     1230, 1208, 1211, 1213, 1214, 1215, 1216, 1217, 1218, 1231,
-     1232, 1233, 1219, 1220, 1234, 1225, 1235, 1236, 1238, 1240,
-     1241, 1242, 1243, 1244, 1245, 1246, 1247, 1226, 1227, 1228,
-     1229, 1230, 1249, 1252, 1255, 1256, 1257, 1258, 1259, 1260,
-     1231, 1232, 1233, 1248, 1261, 1234, 1262, 1235, 1236, 1238,
-
-     1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1263, 1248,
-     1264, 1265, 1266, 1249, 1252, 1255, 1256, 1257, 1258, 1259,
-     1260, 1267, 1268, 1269, 1248, 1261, 1270, 1262, 1273, 1275,
-     1276, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1286, 1263,
-     1248, 1264, 1265, 1266, 1289, 1290, 1291, 1292, 1293, 1294,
-     1296, 1297, 1267, 1268, 1269, 1298, 1299, 1270, 1300, 1273,
-     1275, 1276, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1286,
-     1301, 1303, 1304, 1305, 1306, 1289, 1290, 1291, 1292, 1293,
-     1294, 1296, 1297, 1307, 1309, 1310, 1298, 1299, 1312, 1300,
-     1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1323,
-
-     1324, 1301, 1303, 1304, 1305, 1306, 1325, 1326, 1328, 1310,
-     1309, 1329, 1331, 1333, 1307, 1309, 1310, 1334, 1335, 1312,
-     1337, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321,
-     1323, 1324, 1339, 1340, 1341, 1342, 1343, 1325, 1326, 1328,
-     1344, 1345, 1329, 1331, 1333, 1346, 1347, 1348, 1334, 1335,
-     1350, 1337, 1351, 1352, 1353, 1354, 1356, 1357, 1358, 1359,
-     1360, 1361, 1362, 1339, 1340, 1341, 1342, 1343, 1363, 1364,
-     1366, 1344, 1345, 1367, 1369, 1370, 1346, 1347, 1348, 1371,
-     1372, 1350, 1373, 1351, 1352, 1353, 1354, 1356, 1357, 1358,
-     1359, 1360, 1361, 1362, 1374, 1375, 1376, 1378, 1379, 1363,
-
-     1364, 1366, 1380, 1381, 1367, 1369, 1370, 1382, 1384, 1385,
-     1371, 1372, 1386, 1373, 1387, 1388, 1389, 1390, 1392, 1393,
-     1394, 1395, 1396, 1400, 1401, 1374, 1375, 1376, 1378, 1379,
-     1398, 1402, 1398, 1380, 1381, 1404,    0, 1406, 1382, 1384,
-     1385, 1407,    0, 1386, 1401, 1387, 1388, 1389, 1390, 1392,
-     1393, 1394, 1395, 1396, 1400, 1401, 1403, 1403, 1409, 1411,
-     1412, 1398, 1402, 1398, 1413, 1414, 1404, 1403, 1406, 1403,
-     1415, 1416, 1407, 1403, 1417, 1401, 1418, 1419, 1420, 1421,
-     1422, 1423, 1424, 1425, 1426, 1427, 1428, 1403, 1403, 1409,
-     1411, 1412, 1429, 1430, 1431, 1413, 1414, 1432, 1403, 1434,
-
-     1403, 1415, 1416, 1435, 1403, 1417, 1436, 1418, 1419, 1420,
-     1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1433, 1437,
-     1433, 1439, 1440, 1429, 1430, 1431, 1441, 1442, 1432, 1443,
-     1434, 1446, 1447, 1448, 1435, 1449, 1450, 1436, 1451, 1452,
-     1453, 1454, 1455, 1456,    0,    0, 1458, 1460, 1462, 1433,
-     1437, 1433, 1439, 1440, 1463, 1465, 1466, 1441, 1442, 1467,
-     1443,    0, 1446, 1447, 1448, 1469, 1449, 1450, 1470, 1451,
-     1452, 1453, 1454, 1455, 1456, 1457, 1457, 1458, 1460, 1462,
-     1471, 1472, 1473, 1474, 1476, 1463, 1465, 1466, 1457, 1479,
-     1467, 1480, 1457, 1477, 1481, 1482, 1469, 1483, 1485, 1470,
-
-     1486, 1487, 1488, 1489, 1490, 1491, 1457, 1457, 1476, 1492,
-     1477, 1471, 1472, 1473, 1474, 1476, 1493, 1494, 1495, 1457,
-     1479, 1497, 1480, 1457, 1477, 1481, 1482, 1498, 1483, 1485,
-     1499, 1486, 1487, 1488, 1489, 1490, 1491, 1500, 1501, 1502,
-     1492, 1504, 1505, 1506, 1507, 1508, 1510, 1493, 1494, 1495,
-     1511, 1512, 1497, 1513, 1515, 1516, 1517, 1518, 1498, 1519,
-     1520, 1499, 1521, 1522, 1523, 1524, 1525, 1526, 1500, 1501,
-     1502, 1527, 1504, 1505, 1506, 1507, 1508, 1510, 1528, 1529,
-     1530, 1511, 1512, 1531, 1513, 1515, 1516, 1517, 1518, 1532,
-     1519, 1520, 1533, 1521, 1522, 1523, 1524, 1525, 1526, 1534,
-
-     1535, 1539, 1527, 1540, 1541, 1542, 1543, 1544, 1545, 1528,
-     1529, 1530, 1546, 1547, 1531, 1550, 1551, 1552, 1553, 1554,
-     1532, 1555, 1556, 1533, 1557, 1558, 1560, 1563, 1564, 1561,
-     1534, 1535, 1539, 1559, 1540, 1541, 1542, 1543, 1544, 1545,
-     1566, 1559, 1567, 1546, 1547, 1561, 1550, 1551, 1552, 1553,
-     1554, 1569, 1555, 1556, 1570, 1557, 1558, 1560, 1563, 1564,
-     1561, 1571, 1573, 1574, 1559, 1575, 1576, 1578, 1580, 1581,
-     1583, 1566, 1559, 1567, 1584, 1585, 1561, 1586, 1587, 1588,
-     1589, 1590, 1569, 1592, 1594, 1570, 1595, 1596, 1600, 1601,
-     1602, 1603, 1571, 1573, 1574, 1604, 1575, 1576, 1578, 1580,
-
-     1581, 1583, 1606, 1607, 1609, 1584, 1585, 1612, 1586, 1587,
-     1588, 1589, 1590, 1616, 1592, 1594, 1617, 1595, 1596, 1600,
-     1601, 1602, 1603, 1618, 1620, 1621, 1604, 1625, 1623, 1624,
-     1626, 1628, 1630, 1606, 1607, 1609, 1632, 1634, 1612, 1635,
-     1637, 1638, 1640, 1641, 1616, 1623, 1624, 1617, 1643, 1644,
-     1645, 1647, 1650, 1652, 1618, 1620, 1621, 1655, 1625, 1623,
-     1624, 1626, 1628, 1630, 1656, 1657, 1658, 1632, 1634, 1659,
-     1635, 1637, 1638, 1640, 1641, 1661, 1662, 1663, 1664, 1643,
-     1644, 1645, 1647, 1650, 1652, 1665, 1666, 1667, 1655, 1668,
-     1669, 1670, 1671, 1673, 1674, 1656, 1657, 1658, 1675, 1676,
-
-     1659, 1677, 1678, 1679, 1680, 1681, 1661, 1662, 1663, 1664,
-     1683, 1684, 1685, 1686, 1687, 1688, 1665, 1666, 1667, 1689,
-     1668, 1669, 1670, 1671, 1673, 1674, 1690, 1691, 1692, 1675,
-     1676, 1693, 1677, 1678, 1679, 1680, 1681, 1694, 1695, 1696,
-     1697, 1683, 1684, 1685, 1686, 1687, 1688, 1698, 1699, 1700,
-     1689, 1701, 1702, 1703, 1704, 1705, 1706, 1690, 1691, 1692,
-     1709, 1710, 1693, 1711, 1712, 1713, 1714, 1715, 1694, 1695,
-     1696, 1697, 1719, 1721, 1723, 1725, 1726, 1727, 1698, 1699,
-     1700, 1728, 1701, 1702, 1703, 1704, 1705, 1706, 1730, 1732,
-     1733, 1709, 1710, 1734, 1711, 1712, 1713, 1714, 1715, 1735,
-
-     1736, 1737, 1738, 1719, 1721, 1723, 1725, 1726, 1727, 1740,
-     1742, 1744, 1728, 1741, 1745, 1749, 1750, 1751, 1754, 1730,
-     1732, 1733, 1755, 1741, 1734, 1757, 1740, 1759, 1763, 1764,
-     1735, 1736, 1737, 1738, 1765, 1766, 1767, 1768, 1771, 1772,
-     1740, 1742, 1744, 1773, 1741, 1745, 1749, 1750, 1751, 1754,
-     1774, 1775, 1776, 1755, 1777, 1778, 1757, 1780, 1759, 1763,
-     1764, 1781, 1782, 1783, 1784, 1765, 1766, 1767, 1768, 1771,
-     1772, 1785, 1786, 1787, 1773, 1788, 1790, 1791, 1792, 1793,
-     1794, 1774, 1775, 1776, 1795, 1777, 1778, 1796, 1780, 1797,
-     1798, 1799, 1781, 1782, 1783, 1784, 1800, 1801, 1802, 1804,
-
-     1807, 1809, 1785, 1786, 1787, 1813, 1788, 1790, 1791, 1792,
-     1793, 1794, 1815, 1816, 1817, 1795, 1818, 1820, 1796, 1824,
-     1797, 1798, 1799, 1833, 1830, 1834, 1831, 1800, 1801, 1802,
-     1804, 1807, 1809, 1818, 1830, 1835, 1813, 1837, 1838, 1839,
-     1840, 1841, 1843, 1815, 1816, 1817, 1831, 1818, 1820, 1844,
-     1824, 1845, 1846, 1847, 1833, 1830, 1834, 1831, 1852, 1853,
-     1854, 1857, 1860, 1861, 1818, 1863, 1835, 1865, 1837, 1838,
-     1839, 1840, 1841, 1843, 1866, 1867, 1868, 1869, 1870, 1871,
-     1844, 1872, 1845, 1846, 1847, 1873, 1875, 1878, 1880, 1852,
-     1853, 1854, 1857, 1860, 1861, 1882, 1863, 1883, 1865, 1884,
-
-     1885, 1887, 1889, 1891, 1893, 1866, 1867, 1868, 1869, 1870,
-     1871, 1890, 1872, 1894, 1890, 1896, 1873, 1875, 1878, 1880,
-     1898, 1899, 1889, 1900, 1901, 1903, 1882, 1904, 1883, 1905,
-     1884, 1885, 1887, 1889, 1891, 1893, 1907, 1908, 1910, 1911,
-     1915, 1917, 1890, 1918, 1894, 1919, 1896, 1920, 1921, 1922,
-     1923, 1898, 1899, 1924, 1900, 1901, 1903, 1925, 1904, 1927,
-     1905, 1928, 1929, 1930, 1928, 1931, 1935, 1907, 1908, 1910,
-     1911, 1915, 1917, 1936, 1918, 1938, 1919, 1939, 1920, 1921,
-     1922, 1923, 1941, 1945, 1924, 1946, 1929, 1947, 1925, 1948,
-     1927, 1950, 1928, 1929, 1930, 1951, 1931, 1935, 1952, 1953,
-
-     1954, 1956, 1958, 1960, 1936, 1961, 1938, 1962, 1939, 1963,
-     1965, 1968, 1971, 1941, 1945, 1972, 1946, 1977, 1947, 1978,
-     1948, 1981, 1950, 1982, 1983, 1956, 1951, 1986, 1987, 1952,
-     1953, 1954, 1956, 1958, 1960, 1988, 1961, 1989, 1962, 1991,
-     1963, 1965, 1968, 1971, 1992, 1993, 1972, 1994, 1977, 1997,
-     1978, 1998, 1981, 1999, 1982, 1983, 2001, 2002, 1986, 1987,
-        0,    0,    0,    0,    0,    0, 1988,    0, 1989,    0,
-     1991,    0,    0,    0,    0, 1992, 1993,    0, 1994,    0,
-     1997,    0, 1998,    0, 1999,    0,    0, 2001, 2002, 2005,
-     2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2006, 2006,
-
-     2006, 2006, 2006, 2006, 2006, 2006, 2006, 2007, 2007, 2007,
-     2007, 2007, 2007, 2007, 2007, 2007, 2008,    0, 2008, 2008,
-     2008, 2008, 2008, 2008, 2008, 2009,    0, 2009, 2009, 2009,
-     2009, 2009, 2009, 2009, 2010, 2010, 2011, 2011, 2011, 2011,
-     2011, 2011, 2011, 2011, 2011, 2012, 2012, 2012, 2012, 2012,
-     2012, 2012, 2012, 2012, 2013,    0, 2013, 2013, 2013, 2013,
-     2013, 2013, 2013, 2014,    0, 2014, 2015, 2015, 2015, 2015,
-     2015, 2015, 2015, 2015, 2015, 2016, 2016, 2016, 2016, 2016,
-     2016, 2016, 2016, 2016, 2017, 2017, 2017, 2017, 2017, 2017,
-     2017, 2017, 2017, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
-
-     2018, 2018, 2019, 2019, 2019,    0,    0, 2019, 2019,    0,
-     2019, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,
-     2021,    0,    0, 2021, 2021,    0, 2021, 2022, 2022, 2022,
-        0, 2022, 2022, 2022, 2022, 2022, 2023, 2023, 2023, 2023,
-        0, 2023, 2023, 2023, 2023, 2024, 2024, 2024, 2024, 2024,
-     2024, 2024, 2024, 2024, 2004, 2004, 2004, 2004, 2004, 2004,
+       43,   39,   42,   43,   42,  111,  115,   42,   42,   75,
+
+       43,   44,   42,   75,   74,   74,   42,   75,  118,   42,
+       44,   42,   44,   75,   42,   74,   44,  119,   44,  126,
+       44,  126,  126,   42,  133,   42,  133,  133,   42,   42,
+       75,  135,   44,   42,   75,   74,   74,   42,   75,  118,
+       42,   44,   42,   44,   75,   42,   74,   44,  119,   44,
+      128,   44,   46,   46,  127,   72,   46,   72,   46,  103,
+       46,   78,   78,  103,   72,   46,   83,   72,   78,  123,
+       72,   80,  378,  378,   83,   80,   83,  122,  130,   80,
+      131,   83,   83,   46,   46,   80,   72,   46,   72,   46,
+      103,   46,   78,   78,  103,   72,   46,   83,   72,   78,
+
+       84,   72,   80,   86,   86,   83,   80,   83,   84,  130,
+       80,  131,   83,   83,   84,   86,   80,   84,   88,   87,
+       86,  102,  104,   87,   88,  100,   88,   98,   98,   87,
+      105,   84,   87,  105,   86,   86,   96,   98,  104,   84,
+       99,  109,   99,   99,  106,   84,   86,  144,   84,   88,
+       87,   86,   99,  104,   87,   88,  109,   88,  106,  108,
+       87,  105,  114,   87,  105,   95,  114,  108,   98,  104,
+      112,  113,  109,  116,   94,  106,  108,  116,  144,  117,
+      112,  113,  117,   99,  585,  112,   93,  109,  132,  106,
+      108,  132,  147,  114,  120,  137,  137,  114,  108,   50,
+
+      149,  112,  113,  120,  116,  137,   49,  108,  116,  120,
+      117,  112,  113,  117,   48,  138,  112,  138,  138,  120,
+      140,  140,  151,  147,  153,  120,  156,  138,  157,  585,
+      140,  149,  132,   19,  120,   13,  137,  141,  141,    0,
+      120,  141,  141,    0,  145,  145,  146,  146,    0,  150,
+      146,  146,    0,  151,  145,  153,    0,  156,  138,  157,
+      150,  140,  143,  143,  143,  143,  143,  143,  143,  143,
+      143,  143,  143,  143,  143,  143,  158,  159,  143,  148,
+      150,  143,  143,  148,  143,  145,  152,  154,  162,  163,
+      148,  150,  152,  160,  160,  160,  148,  159,  165,  166,
+
+      167,  154,  165,  168,  171,  383,  383,  158,  159,  173,
+      148,  143,  143,  143,  148,  143,    0,  152,  154,  162,
+      163,  148,  169,  152,  160,  160,  160,  148,  159,  165,
+      166,  167,  154,  165,  168,  171,  169,  170,  170,  175,
+      173,  177,  143,  143,  143,  143,  143,  143,  143,  143,
+      172,  174,  178,  169,  172,  174,  176,  179,  176,  176,
+      180,  182,  176,  181,  183,  184,  185,  169,  170,  170,
+      175,  181,  177,    0,  187,  188,    0,  181,  190,  194,
+      196,  172,  174,  178,    0,  172,  174,  176,  179,  176,
+      176,  180,  182,  176,  181,  183,  184,  185,  186,  186,
+
+      189,  191,  181,    0,  186,  187,  188,  189,  181,  190,
+      194,  196,  200,  200,  200,  186,  193,  191,  199,  191,
+      200,  193,  193,  201,  191,  198,  202,  198,  198,  186,
+      186,  189,  191,  198,  199,  186,  204,    0,  189,  205,
+      204,  206,  207,  200,  200,  200,  186,  193,  191,  199,
+      191,  200,  193,  193,  201,  191,  198,  202,  198,  198,
+      203,  208,  209,  210,  198,  199,  211,  204,  203,  213,
+      205,  204,  206,  207,  212,  214,  212,  215,  216,  217,
+      218,  216,  219,  384,  384,  217,  221,  219,  216,    0,
+      222,  203,  208,  209,  210,  223,    0,  211,  224,  203,
+
+      213,  225,  227,  228,    0,  212,  214,  212,  215,  216,
+      217,  218,  216,  219,  220,  220,  217,  221,  219,  216,
+      220,  222,  226,  226,  220,  220,  223,  220,  229,  224,
+      230,  231,  225,  227,  228,  226,  232,  233,  235,  234,
+      237,  234,  240,  242,  243,  220,  220,  234,  233,  244,
+      245,  220,  229,  226,  226,  220,  220,  236,  220,  229,
+      246,  230,  231,  247,  248,  236,  226,  232,  233,  235,
+      234,  237,  234,  240,  242,  243,  249,  236,  234,  233,
+      244,  245,  250,  229,  251,  257,  258,  259,  236,  260,
+      261,  246,  263,  264,  247,  248,  236,  265,  266,  262,
+
+      268,  267,  269,  270,  271,  272,  273,  249,  236,  275,
+      275,  278,    0,  250,  267,  251,  257,  258,  259,  279,
+      260,  261,  262,  263,  264,  280,  281,  280,  265,  266,
+      262,  268,  267,  269,  270,  271,  272,  273,  282,  277,
+      283,  284,  278,  275,  285,  267,  277,  286,  285,  288,
+      279,  289,  277,  262,  291,  292,  280,  281,  280,  287,
+      293,  287,  287,  294,  295,  296,  297,  290,  299,  282,
+      277,  283,  284,  290,  300,  285,  301,  277,  286,  285,
+      288,  302,  289,  277,  290,  291,  292,  304,  305,  306,
+      287,  293,  287,  287,  294,  295,  296,  297,  290,  299,
+
+      303,  307,  308,  309,  290,  300,  310,  301,  311,  312,
+      303,  313,  302,  314,    0,  290,  311,  310,  304,  305,
+      306,  588,  588,  589,  589,  319,  319,    0,  321,  321,
+        0,  303,  307,  308,  309,  319,  329,  310,  321,  311,
+      312,  303,  313,  320,  314,  320,  320,  311,  310,  322,
+      322,  323,  323,  322,  322,  320,  330,  331,  324,  324,
+      332,  323,  324,  324,  333,  333,  319,  329,  334,  321,
+      335,  336,  337,  338,  339,  340,  341,  344,  343,  345,
+      346,  348,  350,  335,  351,  352,  320,  330,  331,  343,
+      353,  332,  323,  355,  356,  333,  333,  357,  354,  334,
+
+      354,  335,  336,  337,  338,  339,  340,  341,  344,  343,
+      345,  346,  348,  350,  335,  351,  352,  359,  360,  361,
+      343,  353,  374,  374,  355,  356,  379,    0,  357,  354,
+      385,  354,  374,  375,  375,  386,  387,  375,  375,  388,
+      361,  381,  381,  389,  390,  359,  360,  391,  359,  360,
+      361,  381,  392,  393,  382,  382,  394,  379,  382,  382,
+      395,  385,  396,  374,  397,  398,  386,  387,  399,  400,
+      388,  401,  402,  403,  389,  390,  404,  405,  391,  408,
+      406,  409,  381,  392,  393,  411,  412,  394,  406,  410,
+      413,  395,  414,  396,  406,  397,  398,  415,  416,  399,
+
+      400,  418,  401,  402,  403,  419,  410,  404,  405,  420,
+      408,  406,  409,  421,  422,  423,  411,  412,  424,  406,
+      410,  413,  425,  414,  426,  406,  424,  427,  415,  416,
+      429,  428,  418,  431,  432,  433,  419,  410,  434,  435,
+      420,  428,  436,  437,  421,  422,  423,  438,  439,  424,
+      440,  441,  442,  425,  440,  426,  443,  424,  427,  444,
+      445,  429,  428,  446,  431,  432,  433,  447,  448,  434,
+      435,  449,  428,  436,  437,  450,  451,  447,  438,  439,
+      452,  440,  441,  442,  453,  440,  454,  443,  455,  456,
+      444,  445,  459,  460,  446,    0,  462,    0,  447,  448,
+
+        0,  464,  449,  465,  467,    0,  450,  451,  447,  468,
+      463,  452,  592,  592,  463,  453,    0,  454,  469,  455,
+      456,  470,  471,  459,  460,  461,  461,  462,  461,  472,
+      461,  461,  464,  461,  465,  467,  461,  473,  474,  461,
+      468,  463,  477,  461,  461,  463,  478,  461,    0,  469,
+      480,    0,  470,  471,    0,  481,  461,  461,  482,  461,
+      472,  461,  461,  483,  461,  485,    0,  461,  473,  474,
+      461,  486,  479,  477,  461,  461,  479,  478,  461,  466,
+      466,  480,  466,  484,  466,  466,  481,  466,  487,  482,
+      466,  484,  489,  488,  483,  491,  485,  466,  466,  490,
+
+      492,  466,  486,  479,  488,  493,  490,  479,  494,  495,
+      466,  466,  487,  466,  484,  466,  466,  496,  466,  487,
+      497,  466,  484,  489,  488,  498,  491,  499,  466,  466,
+      490,  492,  466,  500,  501,  488,  493,  490,  502,  494,
+      495,  503,  504,  487,  505,  506,  507,  508,  496,  509,
+      510,  497,  511,  513,  504,  514,  498,  515,  499,  516,
+      517,  518,  519,  520,  500,  501,  521,  522,  523,  502,
+      524,  527,  503,  504,  525,  505,  506,  507,  508,  525,
+      509,  510,  526,  511,  513,  504,  514,  526,  515,  529,
+      516,  517,  518,  519,  520,  528,  532,  521,  522,  523,
+
+      535,  524,  527,  537,  538,  525,  539,  528,  540,  541,
+      525,  542,  543,  526,  544,  546,  547,  548,  526,  549,
+      529,  550,  551,  552,  553,  554,  528,  532,  558,  559,
+      560,  535,  561,  562,  537,  538,  563,  539,  528,  540,
+      541,  564,  542,  543,  565,  544,  546,  547,  548,  566,
+      549,  567,  550,  551,  552,  553,  554,  568,  569,  558,
+      559,  560,  570,  561,  562,  571,  572,  563,  569,  573,
+      574,  575,  564,  576,  577,  565,  578,  579,  580,  581,
+      566,  582,  567,  583,  590,  590,  591,  591,  568,  569,
+      591,  591,  594,  570,  590,  595,  571,  572,  596,  569,
+
+      573,  574,  575,  597,  576,  577,  598,  578,  579,  580,
+      581,  599,  582,  600,  583,  593,  593,  601,  602,  603,
+      604,  605,  606,  594,  607,  590,  595,  608,  609,  596,
+      610,  611,  612,  614,  597,  615,  616,  598,  617,  618,
+      619,  620,  599,  621,  600,  622,  632,  623,  601,  602,
+      603,  604,  605,  606,  625,  607,  623,  633,  608,  609,
+      624,  610,  611,  612,  614,  634,  615,  616,  635,  617,
+      618,  619,  620,  624,  621,  636,  622,  632,  623,  628,
+      628,  638,  625,  630,  630,  625,  631,  631,  633,  639,
+      640,  624,  641,  642,  643,  644,  634,  646,  647,  635,
+
+      648,  649,  650,  651,  652,  653,  636,  654,  655,  656,
+      657,  656,  638,  652,  658,  659,  660,  647,  662,  663,
+      639,  640,  664,  641,  642,  643,  644,  665,  646,  647,
+      666,  648,  649,  650,  651,  652,  653,  667,  654,  655,
+      656,  657,  656,  668,  652,  658,  659,  660,  647,  662,
+      663,  669,  670,  664,  672,  673,  674,  675,  665,  676,
+      677,  666,  678,  680,  681,  682,  683,  684,  667,  685,
+      686,  687,  688,  689,  668,  690,  691,  692,  693,  694,
+      696,  697,  669,  670,  699,  672,  673,  674,  675,  700,
+      676,  677,  698,  678,  680,  681,  682,  683,  684,  698,
+
+      685,  686,  687,  688,  689,  701,  690,  691,  692,  693,
+      694,  696,  697,  702,  703,  699,  704,  706,  707,  708,
+      700,  710,  711,  698,  712,  707,  713,  714,  715,  716,
+      698,  717,  719,  718,  720,  721,  701,  722,  723,  718,
+      724,  725,  726,  727,  702,  703,  728,  704,  706,  707,
+      708,  718,  710,  711,  729,  712,  707,  713,  714,  715,
+      716,  730,  717,  719,  718,  720,  721,  731,  722,  723,
+      718,  724,  725,  726,  727,  732,  734,  728,  733,  735,
+      736,  737,  718,  738,  733,  729,  740,  742,  744,  743,
+      745,  746,  730,  743,  747,  748,  733,  749,  731,  750,
+
+      751,  752,  753,  754,  755,  756,  732,  734,  757,  733,
+      735,  736,  737,  758,  738,  733,  759,  740,  742,  744,
+      743,  745,  746,  761,  743,  747,  748,  733,  749,  762,
+      750,  751,  752,  753,  754,  755,  756,  760,  763,  757,
+      764,  765,  760,  766,  758,  767,  768,  759,  769,  770,
+      771,  772,  773,  774,  761,  775,  776,  777,  778,  779,
+      762,  780,  781,  782,  783,  784,  785,  786,  760,  763,
+      787,  764,  765,  760,  766,  790,  767,  768,  792,  769,
+      770,  771,  772,  773,  774,  790,  775,  776,  777,  778,
+      779,  793,  780,  781,  782,  783,  784,  785,  786,  788,
+
+      794,  787,  795,  788,  796,  798,  790,  799,  800,  792,
+      801,  802,  803,  804,  805,  806,  790,  808,  809,  810,
+      811,  812,  793,  813,  814,  815,  816,  817,  818,  819,
+      788,  794,  820,  795,  788,  796,  798,  822,  799,  800,
+      823,  801,  802,  803,  804,  805,  806,  824,  808,  809,
+      810,  811,  812,  825,  813,  814,  815,  816,  817,  818,
+      819,  826,  828,  820,  830,  831,  832,  833,  822,  834,
+      835,  823,  836,  838,  839,  842,  842,  845,  824,  843,
+      843,  846,  847,  848,  825,  849,  850,  851,  852,  853,
+      854,  855,  826,  828,  856,  830,  831,  832,  833,  857,
+
+      834,  835,  858,  836,  838,  839,  859,  860,  845,  861,
+      862,  863,  846,  847,  848,  864,  849,  850,  851,  852,
+      853,  854,  855,  865,  866,  856,  867,  868,  870,  871,
+      857,  873,  873,  858,  872,  874,  877,  859,  860,  879,
+      861,  862,  863,  880,  882,  883,  864,  885,  874,  886,
+      887,  888,  889,  890,  865,  866,  892,  867,  868,  870,
+      871,  893,  872,  893,  894,  872,  874,  877,  895,  896,
+      879,  898,  899,  900,  880,  882,  883,  901,  885,  902,
+      886,  887,  888,  889,  890,  897,  904,  892,  897,  905,
+      906,  907,  893,  910,  893,  894,  912,  913,  913,  895,
+
+      896,  915,  898,  899,  900,  916,  917,  918,  901,  919,
+      902,  920,  922,  923,  925,  926,  897,  904,  929,  897,
+      905,  906,  907,  930,  910,  932,    0,  912,  913,  913,
+        0,  933,  915, 1104, 1104,  935,  916,  917,  918,  938,
+      919,  936,  920,  922,  923,  925,  926,  931,  939,  929,
+      940,  936,  941,  942,  930,  945,  932,  931,  947,    0,
+      931,  931,  933,  948,  931,  931,  935,  949,  950,  951,
+      938,    0,  936,  952,  953,  954,  955,  956,  931,  939,
+      957,  940,  936,  941,  942,  958,  945,  943,  931,  947,
+      943,  931,  931,  943,  948,  931,  931,  943,  949,  950,
+
+      951,  959,  943,  960,  952,  953,  954,  955,  956,  961,
+      962,  957,  963,  964,  965,  966,  958,  967,  943,  969,
+      970,  943,  971,  972,  943,  973,  974,  975,  943,  976,
+      977,  978,  959,  943,  960,  979,  980,  981,  983,  985,
+      961,  962,  986,  963,  964,  965,  966,  987,  967,  988,
+      969,  970,  989,  971,  972,  990,  973,  974,  975,  991,
+      976,  977,  978,  992,  993,  994,  979,  980,  981,  983,
+      985,  995,  996,  986,  997,  998,  999, 1000,  987, 1001,
+      988, 1002, 1003,  989, 1004, 1006,  990, 1007, 1005, 1008,
+      991, 1009, 1010, 1011,  992,  993,  994, 1005, 1012, 1010,
+
+     1013, 1014,  995,  996, 1015,  997,  998,  999, 1000, 1016,
+     1001, 1017, 1002, 1003, 1018, 1004, 1006, 1022, 1007, 1005,
+     1008, 1023, 1009, 1010, 1011, 1021, 1024, 1021, 1005, 1012,
+     1010, 1013, 1014, 1025, 1026, 1015, 1027, 1029, 1030, 1031,
+     1016, 1032, 1017, 1021, 1034, 1018, 1035, 1036, 1022, 1037,
+     1039, 1040, 1023, 1036, 1041, 1042, 1021, 1024, 1021, 1045,
+     1046, 1040, 1047, 1048, 1025, 1026, 1049, 1027, 1029, 1030,
+     1031, 1050, 1032, 1054, 1021, 1034, 1055, 1035, 1036, 1056,
+     1037, 1039, 1040, 1059, 1036, 1041, 1042, 1060, 1061, 1062,
+     1045, 1046, 1040, 1047, 1048, 1063, 1056, 1049, 1064, 1066,
+
+     1070, 1068, 1050, 1068, 1054, 1071, 1072, 1055, 1073, 1074,
+     1056, 1075, 1076, 1077, 1059, 1078, 1079, 1073, 1060, 1061,
+     1062, 1080, 1081, 1082, 1083, 1084, 1063, 1056, 1085, 1064,
+     1066, 1070, 1068, 1086, 1068, 1088, 1071, 1072, 1089, 1073,
+     1074, 1090, 1075, 1076, 1077, 1091, 1078, 1079, 1073, 1092,
+     1093, 1094, 1080, 1081, 1082, 1083, 1084, 1096, 1098, 1085,
+     1099, 1100, 1101, 1103, 1086,    0, 1088, 1107, 1108, 1089,
+     1105, 1106, 1090, 1109, 1110, 1111, 1091, 1112, 1114, 1117,
+     1092, 1093, 1094, 1119, 1120, 1121, 1122, 1123, 1096, 1098,
+     1125, 1099, 1100, 1101, 1103, 1106, 1105, 1127, 1107, 1108,
+
+     1128, 1105, 1106, 1129, 1109, 1110, 1111, 1130, 1112, 1114,
+     1117, 1131, 1132, 1134, 1119, 1120, 1121, 1122, 1123, 1135,
+     1136, 1125, 1137, 1139, 1141, 1143, 1145, 1146, 1127, 1147,
+     1148, 1128, 1151, 1152, 1129, 1153, 1154, 1155, 1130, 1156,
+     1158, 1159, 1131, 1132, 1134, 1160, 1161, 1162, 1163, 1164,
+     1135, 1136, 1165, 1137, 1139, 1141, 1143, 1145, 1146, 1166,
+     1147, 1148, 1167, 1151, 1152, 1168, 1153, 1154, 1155, 1169,
+     1156, 1158, 1159, 1170, 1171, 1174, 1160, 1161, 1162, 1163,
+     1164, 1170, 1175, 1165, 1176, 1177, 1178, 1179, 1180, 1181,
+     1166, 1182, 1183, 1167, 1184, 1185, 1168, 1186, 1187, 1188,
+
+     1169, 1189, 1190, 1192, 1170, 1171, 1174, 1194, 1195, 1196,
+     1197, 1198, 1170, 1175, 1199, 1176, 1177, 1178, 1179, 1180,
+     1181, 1200, 1182, 1183, 1201, 1184, 1185, 1202, 1186, 1187,
+     1188, 1203, 1189, 1190, 1192, 1204, 1205, 1206, 1194, 1195,
+     1196, 1197, 1198, 1207, 1208, 1199, 1211, 1213, 1214, 1215,
+     1216, 1217, 1200, 1218, 1219, 1201, 1220, 1225, 1202, 1226,
+     1227, 1228, 1203, 1229, 1230, 1231, 1204, 1205, 1206, 1232,
+     1233, 1234, 1235, 1236, 1207, 1208, 1238, 1211, 1213, 1214,
+     1215, 1216, 1217, 1240, 1218, 1219, 1241, 1220, 1225, 1242,
+     1226, 1227, 1228, 1243, 1229, 1230, 1231, 1244, 1245, 1246,
+
+     1232, 1233, 1234, 1235, 1236, 1247, 1248, 1238, 1249, 1252,
+     1255, 1256, 1257, 1258, 1240, 1259, 1260, 1241, 1261, 1262,
+     1242, 1263, 1248, 1264, 1243, 1265, 1266, 1267, 1244, 1245,
+     1246, 1268, 1269, 1270, 1273, 1275, 1247, 1248, 1276, 1249,
+     1252, 1255, 1256, 1257, 1258, 1278, 1259, 1260, 1279, 1261,
+     1262, 1280, 1263, 1248, 1264, 1281, 1265, 1266, 1267, 1282,
+     1283, 1284, 1268, 1269, 1270, 1273, 1275, 1286, 1289, 1276,
+     1290, 1291, 1292, 1293, 1294, 1296, 1278, 1297, 1298, 1279,
+     1299, 1300, 1280, 1301, 1303, 1304, 1281, 1305, 1306, 1307,
+     1282, 1283, 1284, 1310, 1312, 1309, 1313, 1314, 1286, 1289,
+
+     1315, 1290, 1291, 1292, 1293, 1294, 1296, 1316, 1297, 1298,
+     1317, 1299, 1300, 1318, 1301, 1303, 1304, 1310, 1305, 1306,
+     1307, 1309, 1319, 1320, 1310, 1312, 1309, 1313, 1314, 1321,
+     1323, 1315, 1324, 1325, 1326, 1328, 1329, 1331, 1316, 1333,
+     1334, 1317, 1335, 1337, 1318, 1339, 1340, 1341, 1342, 1343,
+     1344, 1345, 1346, 1319, 1320, 1347, 1348, 1350, 1351, 1352,
+     1321, 1323, 1353, 1324, 1325, 1326, 1328, 1329, 1331, 1354,
+     1333, 1334, 1356, 1335, 1337, 1357, 1339, 1340, 1341, 1342,
+     1343, 1344, 1345, 1346, 1358, 1359, 1347, 1348, 1350, 1351,
+     1352, 1360, 1361, 1353, 1362, 1363, 1364, 1366, 1367, 1369,
+
+     1354, 1370, 1371, 1356, 1372, 1373, 1357, 1374, 1375, 1376,
+     1378, 1379, 1380, 1381, 1382, 1358, 1359, 1384, 1385, 1386,
+     1387, 1388, 1360, 1361, 1389, 1362, 1363, 1364, 1366, 1367,
+     1369, 1390, 1370, 1371, 1392, 1372, 1373, 1393, 1374, 1375,
+     1376, 1378, 1379, 1380, 1381, 1382, 1394, 1395, 1384, 1385,
+     1386, 1387, 1388, 1396, 1398, 1389, 1398, 1400, 1402, 1401,
+     1404, 1406, 1390, 1403, 1403, 1392, 1407, 1409, 1393, 1411,
+     1412, 1413, 1414, 1415, 1403, 1416, 1403, 1394, 1395, 1401,
+     1403, 1417, 1418, 1419, 1396, 1398, 1420, 1398, 1400, 1402,
+     1401, 1404, 1406, 1421, 1403, 1403, 1422, 1407, 1409, 1423,
+
+     1411, 1412, 1413, 1414, 1415, 1403, 1416, 1403, 1424, 1425,
+     1401, 1403, 1417, 1418, 1419, 1426, 1427, 1420, 1428, 1429,
+     1430, 1431, 1432, 1433, 1421, 1433, 1434, 1422, 1435, 1436,
+     1423, 1437, 1439, 1440, 1441, 1442, 1443, 1446, 1447, 1424,
+     1425, 1448, 1449, 1450, 1451, 1452, 1426, 1427, 1453, 1428,
+     1429, 1430, 1431, 1432, 1433, 1454, 1433, 1434, 1455, 1435,
+     1436, 1456, 1437, 1439, 1440, 1441, 1442, 1443, 1446, 1447,
+     1457, 1457, 1448, 1449, 1450, 1451, 1452, 1458, 1460, 1453,
+     1462, 1463, 1465, 1457, 1466, 1467, 1454, 1457, 1469, 1455,
+     1470, 1471, 1456, 1472, 1473, 1474, 1476, 1479, 1480, 1481,
+
+     1477, 1457, 1457, 1482, 1483, 1485, 1486, 1487, 1458, 1460,
+     1488, 1462, 1463, 1465, 1457, 1466, 1467, 1477, 1457, 1469,
+     1476, 1470, 1471, 1489, 1472, 1473, 1474, 1476, 1479, 1480,
+     1481, 1477, 1490, 1491, 1482, 1483, 1485, 1486, 1487, 1492,
+     1493, 1488, 1494, 1495, 1497, 1498, 1499, 1500, 1501, 1502,
+     1504, 1505, 1506, 1507, 1489, 1508, 1510, 1511, 1512, 1513,
+     1515, 1516, 1517, 1490, 1491, 1518, 1519, 1520, 1521, 1522,
+     1492, 1493, 1523, 1494, 1495, 1497, 1498, 1499, 1500, 1501,
+     1502, 1504, 1505, 1506, 1507, 1524, 1508, 1510, 1511, 1512,
+     1513, 1515, 1516, 1517, 1525, 1526, 1518, 1519, 1520, 1521,
+
+     1522, 1527, 1528, 1523, 1529, 1530, 1531, 1532, 1533, 1534,
+     1535, 1539, 1540, 1541, 1542, 1543, 1524, 1544, 1545, 1546,
+     1547, 1550, 1551, 1552, 1553, 1525, 1526, 1554, 1555, 1556,
+     1557, 1558, 1527, 1528, 1560, 1529, 1530, 1531, 1532, 1533,
+     1534, 1535, 1539, 1540, 1541, 1542, 1543, 1561, 1544, 1545,
+     1546, 1547, 1550, 1551, 1552, 1553, 1559, 1563, 1554, 1555,
+     1556, 1557, 1558, 1561, 1559, 1560, 1564, 1566, 1567, 1569,
+     1570, 1571, 1573, 1574, 1575, 1576, 1578, 1580, 1561, 1581,
+     1583, 1584, 1585, 1586, 1587, 1588, 1589, 1559, 1563, 1590,
+     1592, 1594, 1595, 1596, 1561, 1559, 1600, 1564, 1566, 1567,
+
+     1569, 1570, 1571, 1573, 1574, 1575, 1576, 1578, 1580, 1601,
+     1581, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1602, 1603,
+     1590, 1592, 1594, 1595, 1596, 1604, 1606, 1600, 1607, 1609,
+     1612, 1616, 1617, 1618, 1620, 1621, 1623, 1624, 1625, 1626,
+     1601, 1628, 1630, 1632, 1634, 1635, 1637, 1638, 1640, 1602,
+     1603, 1641, 1643, 1623, 1624, 1644, 1604, 1606, 1645, 1607,
+     1609, 1612, 1616, 1617, 1618, 1620, 1621, 1623, 1624, 1625,
+     1626, 1647, 1628, 1630, 1632, 1634, 1635, 1637, 1638, 1640,
+     1650, 1652, 1641, 1643, 1655, 1656, 1644, 1657, 1658, 1645,
+     1659, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669,
+
+     1670, 1671, 1647, 1673, 1674, 1675, 1676, 1677, 1678, 1679,
+     1680, 1650, 1652, 1681, 1683, 1655, 1656, 1684, 1657, 1658,
+     1685, 1659, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668,
+     1669, 1670, 1671, 1686, 1673, 1674, 1675, 1676, 1677, 1678,
+     1679, 1680, 1687, 1688, 1681, 1683, 1689, 1690, 1684, 1691,
+     1692, 1685, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700,
+     1701, 1702, 1703, 1704, 1686, 1705, 1706, 1709, 1710, 1711,
+     1712, 1713, 1714, 1687, 1688, 1715, 1719, 1689, 1690, 1721,
+     1691, 1692, 1723, 1693, 1694, 1695, 1696, 1697, 1698, 1699,
+     1700, 1701, 1702, 1703, 1704, 1725, 1705, 1706, 1709, 1710,
+
+     1711, 1712, 1713, 1714, 1726, 1727, 1715, 1719, 1728, 1730,
+     1721, 1732, 1733, 1723, 1734, 1735, 1736, 1737, 1738, 1741,
+     1740, 1742, 1744, 1745, 1749, 1750, 1725, 1751, 1754, 1741,
+     1755, 1757, 1759, 1763, 1764, 1726, 1727, 1740, 1765, 1728,
+     1730, 1766, 1732, 1733, 1767, 1734, 1735, 1736, 1737, 1738,
+     1741, 1740, 1742, 1744, 1745, 1749, 1750, 1768, 1751, 1754,
+     1771, 1755, 1757, 1759, 1763, 1764, 1772, 1773, 1774, 1765,
+     1775, 1776, 1766, 1777, 1778, 1767, 1780, 1781, 1782, 1783,
+     1784, 1785, 1786, 1787, 1788, 1790, 1791, 1792, 1768, 1793,
+     1794, 1771, 1795, 1796, 1797, 1798, 1799, 1772, 1773, 1774,
+
+     1800, 1775, 1776, 1801, 1777, 1778, 1802, 1780, 1781, 1782,
+     1783, 1784, 1785, 1786, 1787, 1788, 1790, 1791, 1792, 1804,
+     1793, 1794, 1807, 1795, 1796, 1797, 1798, 1799, 1809, 1813,
+     1815, 1800, 1816, 1817, 1801, 1818, 1820, 1802, 1824, 1830,
+     1833, 1834, 1831, 1835, 1837, 1838, 1839, 1840, 1841, 1830,
+     1804, 1843, 1818, 1807, 1844, 1845, 1846, 1847, 1852, 1809,
+     1813, 1815, 1831, 1816, 1817, 1853, 1818, 1820, 1854, 1824,
+     1830, 1833, 1834, 1831, 1835, 1837, 1838, 1839, 1840, 1841,
+     1857, 1860, 1843, 1818, 1861, 1844, 1845, 1846, 1847, 1852,
+     1863, 1865, 1866, 1867, 1868, 1869, 1853, 1870, 1871, 1854,
+
+     1872, 1873, 1875, 1878, 1880, 1882, 1883, 1884, 1885, 1887,
+     1889, 1857, 1860, 1890, 1891, 1861, 1890, 1893, 1894, 1896,
+     1898, 1863, 1865, 1866, 1867, 1868, 1869, 1899, 1870, 1871,
+     1889, 1872, 1873, 1875, 1878, 1880, 1882, 1883, 1884, 1885,
+     1887, 1889, 1900, 1901, 1890, 1891, 1903, 1904, 1893, 1894,
+     1896, 1898, 1905, 1907, 1908, 1910, 1911, 1915, 1899, 1917,
+     1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1927, 1928,
+     1930, 1931, 1928, 1900, 1901, 1935, 1936, 1903, 1904, 1929,
+     1938, 1939, 1941, 1905, 1907, 1908, 1910, 1911, 1915, 1945,
+     1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1927,
+
+     1928, 1930, 1931, 1929, 1946, 1947, 1935, 1936, 1948, 1950,
+     1929, 1938, 1939, 1941, 1951, 1952, 1953, 1954, 1956, 1958,
+     1945, 1960, 1961, 1962, 1963, 1965, 1968, 1971, 1972, 1977,
+     1978, 1981, 1982, 1983, 1986, 1946, 1947, 1987, 1988, 1948,
+     1950, 1989, 1956, 1991, 1992, 1951, 1952, 1953, 1954, 1956,
+     1958, 1993, 1960, 1961, 1962, 1963, 1965, 1968, 1971, 1972,
+     1977, 1978, 1981, 1982, 1983, 1986, 1994, 1997, 1987, 1988,
+     1998, 1999, 1989, 2001, 1991, 1992, 2002,    0,    0,    0,
+        0,    0, 1993,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0, 1994, 1997,    0,
+
+        0, 1998, 1999,    0, 2001,    0,    0, 2002, 2005, 2005,
+     2005, 2005, 2005, 2005, 2005, 2005, 2005, 2006, 2006, 2006,
+     2006, 2006, 2006, 2006, 2006, 2006, 2007, 2007, 2007, 2007,
+     2007, 2007, 2007, 2007, 2007, 2008,    0, 2008, 2008, 2008,
+     2008, 2008, 2008, 2008, 2009,    0, 2009, 2009, 2009, 2009,
+     2009, 2009, 2009, 2010, 2010, 2011, 2011, 2011, 2011, 2011,
+     2011, 2011, 2011, 2011, 2012, 2012, 2012, 2012, 2012, 2012,
+     2012, 2012, 2012, 2013,    0, 2013, 2013, 2013, 2013, 2013,
+     2013, 2013, 2014,    0, 2014, 2015, 2015, 2015, 2015, 2015,
+     2015, 2015, 2015, 2015, 2016, 2016, 2016, 2016, 2016, 2016,
+
+     2016, 2016, 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
+     2017, 2017, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
+     2018, 2019, 2019, 2019,    0,    0, 2019, 2019,    0, 2019,
+     2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2021,
+        0,    0, 2021, 2021,    0, 2021, 2022, 2022, 2022,    0,
+     2022, 2022, 2022, 2022, 2022, 2023, 2023, 2023, 2023,    0,
+     2023, 2023, 2023, 2023, 2024, 2024, 2024, 2024, 2024, 2024,
+     2024, 2024, 2024, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
+
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
-
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
      2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004,
-     2004, 2004, 2004
+     2004, 2004
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -2241,7 +2260,7 @@ char path[MS_MAXPATHLEN];
 
 
 
-#line 2245 "/Users/tbonfort/dev/mapserver/maplexer.c"
+#line 2264 "/home/tbonfort/dev/mapserver/maplexer.c"
 
 #define INITIAL 0
 #define URL_VARIABLE 1
@@ -2271,11 +2290,11 @@ void msyyset_extra (YY_EXTRA_TYPE user_defined  );
 
 FILE *msyyget_in (void );
 
-void msyyset_in  (FILE * in_str  );
+void msyyset_in  (FILE * _in_str  );
 
 FILE *msyyget_out (void );
 
-void msyyset_out  (FILE * out_str  );
+void msyyset_out  (FILE * _out_str  );
 
 yy_size_t msyyget_leng (void );
 
@@ -2283,7 +2302,7 @@ char *msyyget_text (void );
 
 int msyyget_lineno (void );
 
-void msyyset_lineno (int line_number  );
+void msyyset_lineno (int _line_number  );
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -2297,8 +2316,12 @@ extern int msyywrap (void );
 #endif
 #endif
 
+#ifndef YY_NO_UNPUT
+    
     static void yyunput (int c,char *buf_ptr  );
     
+#endif
+
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char *,yyconst char *,int );
 #endif
@@ -2319,7 +2342,12 @@ static int input (void );
 
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
 #define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
 #endif
 
 /* Copy whatever the last rule matched to the standard output. */
@@ -2327,7 +2355,7 @@ static int input (void );
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( msyytext, msyyleng, 1, msyyout )
+#define ECHO do { if (fwrite( msyytext, msyyleng, 1, msyyout )) {} } while (0)
 #endif
 
 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
@@ -2338,7 +2366,7 @@ static int input (void );
 	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
 		{ \
 		int c = '*'; \
-		yy_size_t n; \
+		size_t n; \
 		for ( n = 0; n < max_size && \
 			     (c = getc( msyyin )) != EOF && c != '\n'; ++n ) \
 			buf[n] = (char) c; \
@@ -2406,7 +2434,7 @@ extern int msyylex (void);
 
 /* Code executed at the end of each rule. */
 #ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
 #endif
 
 #define YY_RULE_SETUP \
@@ -2416,10 +2444,37 @@ extern int msyylex (void);
  */
 YY_DECL
 {
-	register yy_state_type yy_current_state;
-	register char *yy_cp, *yy_bp;
-	register int yy_act;
+	yy_state_type yy_current_state;
+	char *yy_cp, *yy_bp;
+	int yy_act;
     
+	if ( !(yy_init) )
+		{
+		(yy_init) = 1;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! (yy_start) )
+			(yy_start) = 1;	/* first start state */
+
+		if ( ! msyyin )
+			msyyin = stdin;
+
+		if ( ! msyyout )
+			msyyout = stdout;
+
+		if ( ! YY_CURRENT_BUFFER ) {
+			msyyensure_buffer_stack ();
+			YY_CURRENT_BUFFER_LVALUE =
+				msyy_create_buffer(msyyin,YY_BUF_SIZE );
+		}
+
+		msyy_load_buffer_state( );
+		}
+
+	{
 #line 87 "maplexer.l"
 
        if (msyystring_buffer == NULL)
@@ -2494,35 +2549,9 @@ YY_DECL
          break;
        }
 
-#line 2498 "/Users/tbonfort/dev/mapserver/maplexer.c"
-
-	if ( !(yy_init) )
-		{
-		(yy_init) = 1;
-
-#ifdef YY_USER_INIT
-		YY_USER_INIT;
-#endif
-
-		if ( ! (yy_start) )
-			(yy_start) = 1;	/* first start state */
-
-		if ( ! msyyin )
-			msyyin = stdin;
-
-		if ( ! msyyout )
-			msyyout = stdout;
-
-		if ( ! YY_CURRENT_BUFFER ) {
-			msyyensure_buffer_stack ();
-			YY_CURRENT_BUFFER_LVALUE =
-				msyy_create_buffer(msyyin,YY_BUF_SIZE );
-		}
-
-		msyy_load_buffer_state( );
-		}
+#line 2553 "/home/tbonfort/dev/mapserver/maplexer.c"
 
-	while ( 1 )		/* loops until end-of-file is reached */
+	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
 		{
 		yy_cp = (yy_c_buf_p);
 
@@ -2538,7 +2567,7 @@ YY_DECL
 yy_match:
 		do
 			{
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
 			if ( yy_accept[yy_current_state] )
 				{
 				(yy_last_accepting_state) = yy_current_state;
@@ -2553,7 +2582,7 @@ yy_match:
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 4555 );
+		while ( yy_base[yy_current_state] != 4574 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -4526,7 +4555,7 @@ YY_RULE_SETUP
 #line 744 "maplexer.l"
 ECHO;
 	YY_BREAK
-#line 4530 "/Users/tbonfort/dev/mapserver/maplexer.c"
+#line 4559 "/home/tbonfort/dev/mapserver/maplexer.c"
 case YY_STATE_EOF(URL_VARIABLE):
 case YY_STATE_EOF(URL_STRING):
 case YY_STATE_EOF(EXPRESSION_STRING):
@@ -4661,6 +4690,7 @@ case YY_STATE_EOF(MSSTRING):
 			"fatal flex scanner internal error--no action found" );
 	} /* end of action switch */
 		} /* end of scanning one token */
+	} /* end of user's declarations */
 } /* end of msyylex */
 
 /* yy_get_next_buffer - try to read in a new buffer
@@ -4672,9 +4702,9 @@ case YY_STATE_EOF(MSSTRING):
  */
 static int yy_get_next_buffer (void)
 {
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
-	register char *source = (yytext_ptr);
-	register int number_to_move, i;
+    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+	char *source = (yytext_ptr);
+	yy_size_t number_to_move, i;
 	int ret_val;
 
 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -4703,7 +4733,7 @@ static int yy_get_next_buffer (void)
 	/* Try to read more data. */
 
 	/* First move last chars to start of buffer. */
-	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+	number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
 
 	for ( i = 0; i < number_to_move; ++i )
 		*(dest++) = *(source++);
@@ -4723,7 +4753,7 @@ static int yy_get_next_buffer (void)
 			{ /* Not enough room in the buffer - grow it. */
 
 			/* just a shorter name for the current buffer */
-			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
 
 			int yy_c_buf_p_offset =
 				(int) ((yy_c_buf_p) - b->yy_ch_buf);
@@ -4785,9 +4815,9 @@ static int yy_get_next_buffer (void)
 	else
 		ret_val = EOB_ACT_CONTINUE_SCAN;
 
-	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+	if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
 		/* Extend the array by 50%, plus the number we really need. */
-		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
 		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) msyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
 		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
 			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
@@ -4806,14 +4836,14 @@ static int yy_get_next_buffer (void)
 
     static yy_state_type yy_get_previous_state (void)
 {
-	register yy_state_type yy_current_state;
-	register char *yy_cp;
+	yy_state_type yy_current_state;
+	char *yy_cp;
     
 	yy_current_state = (yy_start);
 
 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
 		{
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 88);
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 88);
 		if ( yy_accept[yy_current_state] )
 			{
 			(yy_last_accepting_state) = yy_current_state;
@@ -4838,10 +4868,10 @@ static int yy_get_next_buffer (void)
  */
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 {
-	register int yy_is_jam;
-    	register char *yy_cp = (yy_c_buf_p);
+	int yy_is_jam;
+    	char *yy_cp = (yy_c_buf_p);
 
-	register YY_CHAR yy_c = 88;
+	YY_CHAR yy_c = 88;
 	if ( yy_accept[yy_current_state] )
 		{
 		(yy_last_accepting_state) = yy_current_state;
@@ -4856,12 +4886,14 @@ static int yy_get_next_buffer (void)
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 	yy_is_jam = (yy_current_state == 2004);
 
-	return yy_is_jam ? 0 : yy_current_state;
+		return yy_is_jam ? 0 : yy_current_state;
 }
 
-    static void yyunput (int c, register char * yy_bp )
+#ifndef YY_NO_UNPUT
+
+    static void yyunput (int c, char * yy_bp )
 {
-	register char *yy_cp;
+	char *yy_cp;
     
     yy_cp = (yy_c_buf_p);
 
@@ -4871,10 +4903,10 @@ static int yy_get_next_buffer (void)
 	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
 		{ /* need to shift things up to make room */
 		/* +2 for EOB chars. */
-		register yy_size_t number_to_move = (yy_n_chars) + 2;
-		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+		yy_size_t number_to_move = (yy_n_chars) + 2;
+		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
 					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
-		register char *source =
+		char *source =
 				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
 
 		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -4896,6 +4928,8 @@ static int yy_get_next_buffer (void)
 	(yy_c_buf_p) = yy_cp;
 }
 
+#endif
+
 #ifndef YY_NO_INPUT
 #ifdef __cplusplus
     static int yyinput (void)
@@ -4944,7 +4978,7 @@ static int yy_get_next_buffer (void)
 				case EOB_ACT_END_OF_FILE:
 					{
 					if ( msyywrap( ) )
-						return 0;
+						return EOF;
 
 					if ( ! (yy_did_buffer_switch_on_eof) )
 						YY_NEW_FILE;
@@ -5045,7 +5079,7 @@ static void msyy_load_buffer_state  (void)
 	if ( ! b )
 		YY_FATAL_ERROR( "out of dynamic memory in msyy_create_buffer()" );
 
-	b->yy_buf_size = size;
+	b->yy_buf_size = (yy_size_t)size;
 
 	/* yy_ch_buf has to be 2 characters longer than the size given because
 	 * we need to put in 2 end-of-buffer characters.
@@ -5080,10 +5114,6 @@ static void msyy_load_buffer_state  (void)
 	msyyfree((void *) b  );
 }
 
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-    
 /* Initializes or reinitializes a buffer.
  * This function is sometimes called more than once on the same buffer,
  * such as during a msyyrestart() or at EOF.
@@ -5204,7 +5234,7 @@ static void msyyensure_buffer_stack (void)
 		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
 		 * immediate realloc on the next call.
          */
-		num_to_alloc = 1;
+		num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
 		(yy_buffer_stack) = (struct yy_buffer_state**)msyyalloc
 								(num_to_alloc * sizeof(struct yy_buffer_state*)
 								);
@@ -5221,7 +5251,7 @@ static void msyyensure_buffer_stack (void)
 	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
 
 		/* Increase the buffer to prepare for a possible push. */
-		int grow_size = 8 /* arbitrary grow size */;
+		yy_size_t grow_size = 8 /* arbitrary grow size */;
 
 		num_to_alloc = (yy_buffer_stack_max) + grow_size;
 		(yy_buffer_stack) = (struct yy_buffer_state**)msyyrealloc
@@ -5288,8 +5318,8 @@ YY_BUFFER_STATE msyy_scan_string (yyconst char * yystr )
 
 /** Setup the input buffer state to scan the given bytes. The next call to msyylex() will
  * scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
  * 
  * @return the newly allocated buffer state object.
  */
@@ -5297,7 +5327,8 @@ YY_BUFFER_STATE msyy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_le
 {
 	YY_BUFFER_STATE b;
 	char *buf;
-	yy_size_t n, i;
+	yy_size_t n;
+	yy_size_t i;
     
 	/* Get memory for full buffer, including space for trailing EOB's. */
 	n = _yybytes_len + 2;
@@ -5328,7 +5359,7 @@ YY_BUFFER_STATE msyy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_le
 
 static void yy_fatal_error (yyconst char* msg )
 {
-    	(void) fprintf( stderr, "%s\n", msg );
+			(void) fprintf( stderr, "%s\n", msg );
 	exit( YY_EXIT_FAILURE );
 }
 
@@ -5394,29 +5425,29 @@ char *msyyget_text  (void)
 }
 
 /** Set the current line number.
- * @param line_number
+ * @param _line_number line number
  * 
  */
-void msyyset_lineno (int  line_number )
+void msyyset_lineno (int  _line_number )
 {
     
-    msyylineno = line_number;
+    msyylineno = _line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
  * 
  * @see msyy_switch_to_buffer
  */
-void msyyset_in (FILE *  in_str )
+void msyyset_in (FILE *  _in_str )
 {
-        msyyin = in_str ;
+        msyyin = _in_str ;
 }
 
-void msyyset_out (FILE *  out_str )
+void msyyset_out (FILE *  _out_str )
 {
-        msyyout = out_str ;
+        msyyout = _out_str ;
 }
 
 int msyyget_debug  (void)
@@ -5424,9 +5455,9 @@ int msyyget_debug  (void)
         return msyy_flex_debug;
 }
 
-void msyyset_debug (int  bdebug )
+void msyyset_debug (int  _bdebug )
 {
-        msyy_flex_debug = bdebug ;
+        msyy_flex_debug = _bdebug ;
 }
 
 static int yy_init_globals (void)
@@ -5486,7 +5517,8 @@ int msyylex_destroy  (void)
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 {
-	register int i;
+		
+	int i;
 	for ( i = 0; i < n; ++i )
 		s1[i] = s2[i];
 }
@@ -5495,7 +5527,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 #ifdef YY_NEED_STRLEN
 static int yy_flex_strlen (yyconst char * s )
 {
-	register int n;
+	int n;
 	for ( n = 0; s[n]; ++n )
 		;
 
@@ -5505,11 +5537,12 @@ static int yy_flex_strlen (yyconst char * s )
 
 void *msyyalloc (yy_size_t  size )
 {
-	return (void *) malloc( size );
+			return (void *) malloc( size );
 }
 
 void *msyyrealloc  (void * ptr, yy_size_t  size )
 {
+		
 	/* The cast to (char *) in the following accommodates both
 	 * implementations that use char* generic pointers, and those
 	 * that use void* generic pointers.  It works with the latter
@@ -5522,7 +5555,7 @@ void *msyyrealloc  (void * ptr, yy_size_t  size )
 
 void msyyfree (void * ptr )
 {
-	free( (char *) ptr );	/* see msyyrealloc() for (char *) cast */
+			free( (char *) ptr );	/* see msyyrealloc() for (char *) cast */
 }
 
 #define YYTABLES_NAME "yytables"
diff --git a/maplexer.l b/maplexer.l
index ba7d740..0a89173 100644
--- a/maplexer.l
+++ b/maplexer.l
@@ -354,7 +354,7 @@ char path[MS_MAXPATHLEN];
 <INITIAL>partials                              { MS_LEXER_RETURN_TOKEN(PARTIALS); }
 <INITIAL,URL_STRING>pattern                    { MS_LEXER_RETURN_TOKEN(PATTERN); }
 <INITIAL,URL_STRING>points                     { MS_LEXER_RETURN_TOKEN(POINTS); }
-<INITIAL>items                                 { MS_LEXER_RETURN_TOKEN(ITEMS); }
+<INITIAL,URL_STRING>items                      { MS_LEXER_RETURN_TOKEN(ITEMS); }
 <INITIAL,URL_STRING>position                   { MS_LEXER_RETURN_TOKEN(POSITION); }
 <INITIAL>postlabelcache                        { MS_LEXER_RETURN_TOKEN(POSTLABELCACHE); }
 <INITIAL>priority                              { MS_LEXER_RETURN_TOKEN(PRIORITY); }
diff --git a/mapmssql2008.c b/mapmssql2008.c
index c01019f..9be58ba 100644
--- a/mapmssql2008.c
+++ b/mapmssql2008.c
@@ -202,6 +202,7 @@ typedef struct ms_MSSQL2008_layer_info_t {
   char        *user_srid;     /* zero length = calculate, non-zero means using this value! */
   char    *index_name;  /* hopefully this isn't necessary - but if the optimizer ain't cuttin' it... */
   char    *sort_spec;  /* the sort by specification which should be applied to the generated select statement */
+  SQLSMALLINT *itemtypes; /* storing the sql field types for further reference */
 
   msODBCconn * conn;          /* Connection to db */
   msGeometryParserInfo gpi;   /* struct for the geometry parser */
@@ -603,7 +604,7 @@ static int executeSQL(msODBCconn *conn, const char * sql)
 }
 
 /* Get columns name from query results */
-static int columnName(msODBCconn *conn, int index, char *buffer, int bufferLength, layerObj *layer, char pass_field_def)
+static int columnName(msODBCconn *conn, int index, char *buffer, int bufferLength, layerObj *layer, char pass_field_def, SQLSMALLINT *itemType)
 {
   SQLRETURN rc;
 
@@ -613,6 +614,7 @@ static int columnName(msODBCconn *conn, int index, char *buffer, int bufferLengt
   SQLULEN columnSize;
   SQLSMALLINT decimalDigits;
   SQLSMALLINT nullable;
+  msMSSQL2008LayerInfo  *layerinfo = getMSSQL2008LayerInfo(layer);
 
   rc = SQLDescribeCol(
          conn->hstmt,
@@ -631,6 +633,8 @@ static int columnName(msODBCconn *conn, int index, char *buffer, int bufferLengt
     else
       strlcpy(buffer, (const char *)columnName, SQL_COLUMN_NAME_MAX_LENGTH + 1);
 
+    *itemType = dataType;
+
     if (pass_field_def) {
       char md_item_name[256];
       char gml_width[32], gml_precision[32];
@@ -748,6 +752,7 @@ int msMSSQL2008LayerOpen(layerObj *layer)
   layerinfo->index_name = NULL;
   layerinfo->sort_spec = NULL;
   layerinfo->conn = NULL;
+  layerinfo->itemtypes = NULL;
 
   layerinfo->conn = (msODBCconn *) msConnPoolRequest(layer);
 
@@ -976,11 +981,19 @@ static int prepare_database(layerObj *layer, rectObj rect, char **query_string)
     char buffer[10000] = "";
 
     for(t = 0; t < layer->numitems; t++) {
-#ifdef USE_ICONV      
+      if (layerinfo->itemtypes && (layerinfo->itemtypes[t] == SQL_BINARY || layerinfo->itemtypes[t] == SQL_VARBINARY)) {
+#ifdef USE_ICONV
+      snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "convert(nvarchar(max), convert(varbinary(max),[%s]),2),", layer->items[t]);
+#else
+      snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "convert(varchar(max), convert(varbinary(max),[%s]),2),", layer->items[t]);
+#endif
+      } else {
+#ifdef USE_ICONV
       snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "convert(nvarchar(max), [%s]),", layer->items[t]);
 #else
       snprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer), "convert(varchar(max), [%s]),", layer->items[t]);
 #endif
+      }
     }
 
     if (layerinfo->geometry_format == MSSQLGEOMETRY_NATIVE)
@@ -1202,6 +1215,11 @@ int msMSSQL2008LayerClose(layerObj *layer)
       layerinfo->geom_table = NULL;
     }
 
+    if(layerinfo->itemtypes) {
+      msFree(layerinfo->itemtypes);
+      layerinfo->itemtypes = NULL;
+    }
+
     setMSSQL2008LayerInfo(layer, NULL);
     msFree(layerinfo);
   }
@@ -2035,6 +2053,7 @@ int msMSSQL2008LayerGetItems(layerObj *layer)
   layer->numitems = cols - 1; /* dont include the geometry column */
 
   layer->items = msSmallMalloc(sizeof(char *) * (layer->numitems + 1)); /* +1 in case there is a problem finding goeometry column */
+  layerinfo->itemtypes = msSmallMalloc(sizeof(SQLSMALLINT) * (layer->numitems + 1));
   /* it will return an error if there is no geometry column found, */
   /* so this isnt a problem */
 
@@ -2048,13 +2067,15 @@ int msMSSQL2008LayerGetItems(layerObj *layer)
 
   for(t = 0; t < cols; t++) {
     char colBuff[256];
+    SQLSMALLINT itemType;
 
-    columnName(layerinfo->conn, t + 1, colBuff, sizeof(colBuff), layer, pass_field_def);
+    columnName(layerinfo->conn, t + 1, colBuff, sizeof(colBuff), layer, pass_field_def, &itemType);
 
     if(strcmp(colBuff, layerinfo->geom_column) != 0) {
       /* this isnt the geometry column */
       layer->items[item_num] = (char *) msSmallMalloc(strlen(colBuff) + 1);
       strcpy(layer->items[item_num], colBuff);
+      layerinfo->itemtypes[item_num] = itemType;
       item_num++;
     } else {
       found_geom = 1;
@@ -2360,7 +2381,10 @@ int process_node(layerObj* layer, expressionObj *filter)
        break;
     case ')':
        filter->native_string = msStringConcatenate(filter->native_string, ")");
-       break;   
+       break;
+    /* argument separator */
+    case ',':
+       break;
     /* literal tokens */
     case MS_TOKEN_LITERAL_BOOLEAN:
     case MS_TOKEN_LITERAL_NUMBER:
@@ -2497,67 +2521,131 @@ int process_node(layerObj* layer, expressionObj *filter)
 
     /* spatial comparison tokens */
     case MS_TOKEN_COMPARISON_INTERSECTS:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STIntersects(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_DISJOINT:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STDisjoint(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_TOUCHES:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STTouches(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_OVERLAPS:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STOverlaps(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_CROSSES:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STCrosses(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_WITHIN:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STWithin(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_CONTAINS:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STContains(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_EQUALS:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STEquals(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")=1");
       break;
 
     case MS_TOKEN_COMPARISON_BEYOND:
@@ -2570,24 +2658,44 @@ int process_node(layerObj* layer, expressionObj *filter)
 
     /* spatial functions */
     case MS_TOKEN_FUNCTION_AREA:
-      filter->native_string = msStringConcatenate(filter->native_string, ".STArea(");
-      layerinfo->current_node = layerinfo->current_node->next;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       if (!process_node(layer, filter))
         return 0;
-      filter->native_string = msStringConcatenate(filter->native_string, ")");
+      filter->native_string = msStringConcatenate(filter->native_string, ".STArea()");
       break;
 
     case MS_TOKEN_FUNCTION_BUFFER:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STBuffer(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ")");
       break;
 
     case MS_TOKEN_FUNCTION_DIFFERENCE:
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (!process_node(layer, filter))
+        return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
+      if (layerinfo->current_node->next) layerinfo->current_node = layerinfo->current_node->next;
+      else return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ".STDifference(");
-      layerinfo->current_node = layerinfo->current_node->next;
       if (!process_node(layer, filter))
         return 0;
       filter->native_string = msStringConcatenate(filter->native_string, ")");
diff --git a/mapogcfilter.c b/mapogcfilter.c
index 8b19a64..0c226e1 100644
--- a/mapogcfilter.c
+++ b/mapogcfilter.c
@@ -667,9 +667,19 @@ int FLTLayerApplyPlainFilterToLayer(FilterEncodingNode *psNode, mapObj *map,
 
   pszExpression = FLTGetCommonExpression(psNode,  lp);
   if (pszExpression) {
+    const char* pszUseDefaultExtent;
     FilterEncodingNode* psTopBBOX;
     rectObj rect = map->extent;
 
+    pszUseDefaultExtent = msOWSLookupMetadata(&(lp->metadata), "F",
+                                              "use_default_extent_for_getfeature");
+    if( pszUseDefaultExtent && CSLTestBoolean(pszUseDefaultExtent) &&
+        lp->connectiontype == MS_OGR )
+    {
+        const rectObj rectInvalid = MS_INIT_INVALID_RECT;
+        rect = rectInvalid;
+    }
+
     psTopBBOX = FLTGetTopBBOX(psNode);
     if( psTopBBOX )
     {
@@ -706,9 +716,9 @@ int FLTLayerApplyPlainFilterToLayer(FilterEncodingNode *psNode, mapObj *map,
     if(map->debug == MS_DEBUGLEVEL_VVV)
     {
       if( pszExpression )
-        msDebug("FLTLayerApplyPlainFilterToLayer(): %s, rect=%f,%f,%f,%f\n", pszExpression, rect.minx, rect.miny, rect.maxx, rect.maxy);
+        msDebug("FLTLayerApplyPlainFilterToLayer(): %s, rect=%.15g,%.15g,%.15g,%.15g\n", pszExpression, rect.minx, rect.miny, rect.maxx, rect.maxy);
       else
-        msDebug("FLTLayerApplyPlainFilterToLayer(): rect=%f,%f,%f,%f\n", rect.minx, rect.miny, rect.maxx, rect.maxy);
+        msDebug("FLTLayerApplyPlainFilterToLayer(): rect=%.15g,%.15g,%.15g,%.15g\n", rect.minx, rect.miny, rect.maxx, rect.maxy);
     }
 
     status = FLTApplyFilterToLayerCommonExpressionWithRect(map, iLayerIndex,
@@ -3668,6 +3678,57 @@ int FLTCheckInvalidOperand(FilterEncodingNode *psFilterNode)
 }
 
 /************************************************************************/
+/*                       FLTProcessPropertyIsNull                       */
+/*                                                                      */
+/*      HACK for PropertyIsNull processing. PostGIS & Spatialite only   */
+/*      for now.                                                        */
+/************************************************************************/
+int FLTProcessPropertyIsNull(FilterEncodingNode *psFilterNode,
+                            mapObj *map, int i)
+{
+    int status = MS_SUCCESS;
+
+    if (psFilterNode->eType == FILTER_NODE_TYPE_COMPARISON &&
+        psFilterNode->psLeftNode != NULL &&
+        psFilterNode->psLeftNode->eType == FILTER_NODE_TYPE_PROPERTYNAME &&
+        strcmp(psFilterNode->pszValue, "PropertyIsNull") == 0 &&
+        !FLTIsGMLDefaultProperty(psFilterNode->psLeftNode->pszValue) )
+    {
+        layerObj* lp;
+        int layerWasOpened;
+
+        lp = GET_LAYER(map, i);
+        layerWasOpened = msLayerIsOpen(lp);
+
+        /* Horrible HACK to compensate for the lack of null testing in MapServer */
+        if( (lp->connectiontype == MS_POSTGIS ||
+             (lp->connectiontype == MS_OGR && msOGRIsSpatialite(lp))) &&
+            strcmp(psFilterNode->pszValue, "PropertyIsNull") == 0 )
+        {
+            msFree(psFilterNode->pszValue);
+            psFilterNode->pszValue = msStrdup("PropertyIsEqualTo");
+            psFilterNode->psRightNode = FLTCreateBinaryCompFilterEncodingNode();
+            psFilterNode->psRightNode->eType = FILTER_NODE_TYPE_LITERAL;
+            psFilterNode->psRightNode->pszValue = msStrdup("_MAPSERVER_NULL_");
+        }
+
+        if (!layerWasOpened) /* do not close the layer if it has been opened somewhere else (paging?) */
+          msLayerClose(lp);
+    }
+
+    if (psFilterNode->psLeftNode)
+    {
+      status = FLTProcessPropertyIsNull(psFilterNode->psLeftNode, map, i);
+      if( status == MS_SUCCESS )
+      {
+        if (psFilterNode->psRightNode)
+            status = FLTProcessPropertyIsNull(psFilterNode->psRightNode, map, i);
+      }
+    }
+    return status;
+}
+
+/************************************************************************/
 /*                        FLTCheckInvalidProperty                       */
 /*                                                                      */
 /*      Check that property names are known                             */
diff --git a/mapogcfilter.h b/mapogcfilter.h
index 970d02e..feff2c2 100644
--- a/mapogcfilter.h
+++ b/mapogcfilter.h
@@ -149,6 +149,8 @@ int FLTCheckInvalidProperty(FilterEncodingNode *psFilterNode,
 FilterEncodingNode* FLTSimplify(FilterEncodingNode *psFilterNode,
                                 int* pnEvaluation);
 int FLTApplyFilterToLayerCommonExpressionWithRect(mapObj *map, int iLayerIndex, const char *pszExpression, rectObj rect);
+int FLTProcessPropertyIsNull(FilterEncodingNode *psFilterNode,
+                            mapObj *map, int i);
 
 #endif
 
diff --git a/mapogcfiltercommon.c b/mapogcfiltercommon.c
index e21395a..74bcb5f 100644
--- a/mapogcfiltercommon.c
+++ b/mapogcfiltercommon.c
@@ -68,7 +68,7 @@ char *FLTGetIsLikeComparisonCommonExpression(FilterEncodingNode *psFilterNode)
   /*      Use operand with regular expressions.                           */
   /* -------------------------------------------------------------------- */
   szBuffer[0] = '\0';
-  sprintf(szTmp, "%s", " (\"[");
+  sprintf(szTmp, "%s", "(\"[");
   szTmp[4] = '\0';
 
   strlcat(szBuffer, szTmp, bufferSize);
@@ -174,9 +174,9 @@ char *FLTGetIsBetweenComparisonCommonExpresssion(FilterEncodingNode *psFilterNod
   /* -------------------------------------------------------------------- */
   /* attribute */
   if (bString)
-    sprintf(szBuffer, "%s", " (\"[");
+    sprintf(szBuffer, "%s", "(\"[");
   else
-    sprintf(szBuffer, "%s", " ([");
+    sprintf(szBuffer, "%s", "([");
   pszExpression = msStringConcatenate(pszExpression, szBuffer);
   
   pszExpression = msStringConcatenate(pszExpression, psFilterNode->psLeftNode->pszValue);
@@ -288,9 +288,9 @@ char *FLTGetBinaryComparisonCommonExpression(FilterEncodingNode *psFilterNode, l
 
   /* attribute */
   if (bString)
-    sprintf(szTmp, "%s", " (\"[");
+    sprintf(szTmp, "%s", "(\"[");
   else
-    sprintf(szTmp,  "%s"," ([");
+    sprintf(szTmp,  "%s","([");
   pszExpression = msStringConcatenate(pszExpression, szTmp);
   pszExpression = msStringConcatenate(pszExpression, psFilterNode->psLeftNode->pszValue);
   
@@ -307,19 +307,20 @@ char *FLTGetBinaryComparisonCommonExpression(FilterEncodingNode *psFilterNode, l
     else
       sprintf(szTmp,  "%s", "=");
   } else if (strcasecmp(psFilterNode->pszValue, "PropertyIsNotEqualTo") == 0)
-    sprintf(szTmp,  "%s", " != ");
+    sprintf(szTmp,  "%s", "!=");
   else if (strcasecmp(psFilterNode->pszValue, "PropertyIsLessThan") == 0)
-    sprintf(szTmp,  "%s", " < ");
+    sprintf(szTmp,  "%s", "<");
   else if (strcasecmp(psFilterNode->pszValue, "PropertyIsGreaterThan") == 0)
-    sprintf(szTmp,  "%s", " > ");
+    sprintf(szTmp,  "%s", ">");
   else if (strcasecmp(psFilterNode->pszValue, "PropertyIsLessThanOrEqualTo") == 0)
-    sprintf(szTmp,  "%s", " <= ");
+    sprintf(szTmp,  "%s", "<=");
   else if (strcasecmp(psFilterNode->pszValue, "PropertyIsGreaterThanOrEqualTo") == 0)
-    sprintf(szTmp,  "%s", " >= ");
+    sprintf(szTmp,  "%s", ">=");
   else if (strcasecmp(psFilterNode->pszValue, "PropertyIsLike") == 0)
-    sprintf(szTmp,  "%s", " ~ ");
+    sprintf(szTmp,  "%s", "~");
 
   pszExpression = msStringConcatenate(pszExpression, szTmp);
+  pszExpression = msStringConcatenate(pszExpression, " ");
 
   /* value */
   if (bString) {
@@ -356,7 +357,6 @@ char *FLTGetLogicalComparisonCommonExpression(FilterEncodingNode *psFilterNode,
 {
   char *pszExpression = NULL;
   char *pszTmp = NULL;
-  char szBuffer[256];
 
   if (!psFilterNode || !FLTIsLogicalFilterType(psFilterNode->pszValue))
     return NULL;
@@ -369,17 +369,16 @@ char *FLTGetLogicalComparisonCommonExpression(FilterEncodingNode *psFilterNode,
     if (!pszTmp)
       return NULL;
 
-    sprintf(szBuffer, "%s", " (");
-    pszExpression = msStringConcatenate(pszExpression, szBuffer);
+    pszExpression = msStringConcatenate(pszExpression, "(");
 
     pszExpression = msStringConcatenate(pszExpression, pszTmp);
     msFree(pszTmp);
 
-    sprintf(szBuffer, "%s", " ");
-    pszExpression = msStringConcatenate(pszExpression, szBuffer);
+    pszExpression = msStringConcatenate(pszExpression, " ");
 
     pszExpression = msStringConcatenate(pszExpression, psFilterNode->pszValue);
-    sprintf(szBuffer, "%s", " ");
+
+    pszExpression = msStringConcatenate(pszExpression, " ");
 
     pszTmp = FLTGetCommonExpression(psFilterNode->psRightNode, lp);
     if (!pszTmp) {
@@ -390,8 +389,7 @@ char *FLTGetLogicalComparisonCommonExpression(FilterEncodingNode *psFilterNode,
     pszExpression = msStringConcatenate(pszExpression, pszTmp);
     msFree(pszTmp);
 
-    sprintf(szBuffer, "%s", ") ");
-    pszExpression = msStringConcatenate(pszExpression, szBuffer);
+    pszExpression = msStringConcatenate(pszExpression, ")");
   }
   /* -------------------------------------------------------------------- */
   /*      NOT                                                             */
@@ -401,14 +399,12 @@ char *FLTGetLogicalComparisonCommonExpression(FilterEncodingNode *psFilterNode,
     if (!pszTmp)
       return NULL;
 
-    sprintf(szBuffer, "%s", " (NOT ");
-    pszExpression = msStringConcatenate(pszExpression, szBuffer);
+    pszExpression = msStringConcatenate(pszExpression, "(NOT ");
 
     pszExpression = msStringConcatenate(pszExpression, pszTmp);
     msFree(pszTmp);
 
-    sprintf(szBuffer, "%s", ") ");
-    pszExpression = msStringConcatenate(pszExpression, szBuffer);
+    pszExpression = msStringConcatenate(pszExpression, ")");
   }
 
   return pszExpression;
diff --git a/mapogr.cpp b/mapogr.cpp
index 333810c..07ef04b 100644
--- a/mapogr.cpp
+++ b/mapogr.cpp
@@ -67,10 +67,13 @@ typedef struct ms_ogr_file_info_t {
 
   const char* dialect; /* NULL, Spatialite or PostgreSQL */
   char *pszSelect;
-  char *pszSpatialFilterTableName ;
+  char *pszSpatialFilterTableName;
+  char *pszSpatialFilterGeometryColumn;
   char *pszMainTableName;
   char *pszRowId;
   int   bIsOKForSQLCompose;
+  bool  bHasSpatialIndex; // used only for spatialite for now
+  char* pszTablePrefix; // prefix to qualify field names. used only for spatialite for now when a join is done for spatial filtering.
 
   int   bPaging;
 
@@ -1080,6 +1083,10 @@ void msOGRInitialize(void)
 
 #ifdef USE_OGR
 
+static void msOGRFileOpenSpatialite( layerObj *layer, 
+                                     const char *pszLayerDef,
+                                     msOGRFileInfo *psInfo );
+
 /**********************************************************************
  *                     msOGRFileOpen()
  *
@@ -1177,16 +1184,13 @@ msOGRFileOpen(layerObj *layer, const char *connection )
     RELEASE_OGR_LOCK;
 
     if( hDS == NULL ) {
-      if( strlen(CPLGetLastErrorMsg()) == 0 )
-        msSetError(MS_OGRERR,
+      msSetError(MS_OGRERR,
                    "Open failed for OGR connection in layer `%s'.  "
-                   "File not found or unsupported format.",
+                   "File not found or unsupported format. Check server logs.",
                    "msOGRFileOpen()",
                    layer->name?layer->name:"(null)" );
-      else
-        msSetError(MS_OGRERR,
-                   "Open failed for OGR connection in layer `%s'.\n%s\n",
-                   "msOGRFileOpen()",
+      if( strlen(CPLGetLastErrorMsg()) == 0 )
+        msDebug("Open failed for OGR connection in layer `%s'.\n%s\n",
                    layer->name?layer->name:"(null)",
                    CPLGetLastErrorMsg() );
       CPLFree( pszDSName );
@@ -1214,9 +1218,11 @@ msOGRFileOpen(layerObj *layer, const char *connection )
     hLayer = OGR_DS_ExecuteSQL( hDS, pszLayerDef, NULL, NULL );
     if( hLayer == NULL ) {
       msSetError(MS_OGRERR,
-                 "ExecuteSQL(%s) failed.\n%s",
-                 "msOGRFileOpen()",
-                 pszLayerDef, CPLGetLastErrorMsg() );
+                 "ExecuteSQL() failed. Check server logs.",
+                 "msOGRFileOpen()");
+      if( strlen(CPLGetLastErrorMsg()) == 0 )
+        msDebug("ExecuteSQL(%s) failed.\n%s\n",
+                pszLayerDef, CPLGetLastErrorMsg() );
       RELEASE_OGR_LOCK;
       msConnPoolRelease( layer, hDS );
       CPLFree( pszLayerDef );
@@ -1248,9 +1254,11 @@ msOGRFileOpen(layerObj *layer, const char *connection )
   }
 
   if (hLayer == NULL) {
-    msSetError(MS_OGRERR, "GetLayer(%s) failed for OGR connection `%s'.",
+    msSetError(MS_OGRERR, "GetLayer(%s) failed for OGR connection. Check logs.",
                "msOGRFileOpen()",
-               pszLayerDef, connection );
+               pszLayerDef);
+    msDebug("GetLayer(%s) failed for OGR connection `%s'.\n",
+            pszLayerDef, connection );
     CPLFree( pszLayerDef );
     msConnPoolRelease( layer, hDS );
     return NULL;
@@ -1308,7 +1316,7 @@ msOGRFileOpen(layerObj *layer, const char *connection )
     if (have_spatialite)
         psInfo->dialect = "Spatialite";
     else
-        msDebug("msOGRTranslateMsExpressionToOGRSQL: Native SQL not available, no Spatialite support and/or not a Spatialite enabled db\n");
+        msDebug("msOGRFileOpen: Native SQL not available, no Spatialite support and/or not a Spatialite enabled db\n");
   } else if (strcmp(name, "PostgreSQL") == 0) {
     psInfo->dialect = "PostgreSQL";
     // todo: PostgreSQL not yet tested
@@ -1318,14 +1326,31 @@ msOGRFileOpen(layerObj *layer, const char *connection )
 
   psInfo->pszSelect = NULL;
   psInfo->pszSpatialFilterTableName = NULL;
+  psInfo->pszSpatialFilterGeometryColumn = NULL;
   psInfo->pszMainTableName = NULL;
   psInfo->pszRowId = NULL;
   psInfo->bIsOKForSQLCompose = true;
+  psInfo->bPaging = false;
+  psInfo->bHasSpatialIndex = false;
+  psInfo->pszTablePrefix = NULL;
+
+  if( psInfo->dialect != NULL && EQUAL(psInfo->dialect, "Spatialite") )
+    msOGRFileOpenSpatialite(layer, pszLayerDef, psInfo);
+
+  return psInfo;
+}
+
+/************************************************************************/
+/*                      msOGRFileOpenSpatialite()                       */
+/************************************************************************/
 
+static void msOGRFileOpenSpatialite( layerObj *layer, 
+                                     const char* pszLayerDef,
+                                     msOGRFileInfo *psInfo )
+{
   // In the case of a SQLite DB, check that we can identify the
   // underlying table
-  if( psInfo->nLayerIndex == -1 &&
-      psInfo->dialect != NULL && EQUAL(psInfo->dialect, "Spatialite") )
+  if( psInfo->nLayerIndex == -1 )
   {
       psInfo->bIsOKForSQLCompose = false;
 
@@ -1347,10 +1372,11 @@ msOGRFileOpen(layerObj *layer, const char *connection )
           psInfo->pszMainTableName = msStrdup(pszBeginningOfTable);
           psInfo->pszMainTableName[pszIter - pszBeginningOfTable] = '\0';
           psInfo->pszSpatialFilterTableName = msStrdup(psInfo->pszMainTableName);
+          psInfo->pszSpatialFilterGeometryColumn = msStrdup( OGR_L_GetGeometryColumn(psInfo->hLayer) );
 
           char* pszRequest = NULL;
           pszRequest = msStringConcatenate(pszRequest,
-              "SELECT * FROM sqlite_master WHERE type = 'table' AND name = lower('");
+              "SELECT name FROM sqlite_master WHERE type = 'table' AND name = lower('");
           pszRequest = msStringConcatenate(pszRequest, psInfo->pszMainTableName);
           pszRequest = msStringConcatenate(pszRequest, "')");
           OGRLayerH hLayer = OGR_DS_ExecuteSQL( psInfo->hDS, pszRequest, NULL, NULL );
@@ -1361,7 +1387,13 @@ msOGRFileOpen(layerObj *layer, const char *connection )
               OGRFeatureH hFeature = OGR_L_GetNextFeature(hLayer);
               psInfo->bIsOKForSQLCompose = (hFeature != NULL);
               if( hFeature )
+              {
+                msFree(psInfo->pszMainTableName);
+                msFree(psInfo->pszSpatialFilterTableName);
+                psInfo->pszMainTableName = msStrdup( OGR_F_GetFieldAsString( hFeature, 0) );
+                psInfo->pszSpatialFilterTableName = msStrdup( psInfo->pszMainTableName );
                 OGR_F_Destroy(hFeature);
+              }
               OGR_DS_ReleaseResultSet( psInfo->hDS, hLayer );
           }
           if( psInfo->bIsOKForSQLCompose )
@@ -1372,7 +1404,7 @@ msOGRFileOpen(layerObj *layer, const char *connection )
           {
             // Test if it is a spatial view
             pszRequest = msStringConcatenate(NULL,
-              "SELECT f_table_name, view_rowid FROM views_geometry_columns WHERE view_name = lower('");
+              "SELECT f_table_name, f_geometry_column, view_rowid FROM views_geometry_columns WHERE view_name = lower('");
             pszRequest = msStringConcatenate(pszRequest, psInfo->pszMainTableName);
             pszRequest = msStringConcatenate(pszRequest, "')");
             CPLPushErrorHandler(CPLQuietErrorHandler);
@@ -1389,7 +1421,9 @@ msOGRFileOpen(layerObj *layer, const char *connection )
                   psInfo->pszSelect = msStrdup(psInfo->pszLayerDef);
                   msFree(psInfo->pszSpatialFilterTableName);
                   psInfo->pszSpatialFilterTableName = msStrdup( OGR_F_GetFieldAsString( hFeature, 0 ) );
-                  psInfo->pszRowId = msStrdup( OGR_F_GetFieldAsString( hFeature, 1 ) );
+                  CPLFree( psInfo->pszSpatialFilterGeometryColumn );
+                  psInfo->pszSpatialFilterGeometryColumn = msStrdup( OGR_F_GetFieldAsString( hFeature, 1 ) );
+                  psInfo->pszRowId = msStrdup( OGR_F_GetFieldAsString( hFeature, 2 ) );
                   OGR_F_Destroy(hFeature);
                 }
                 OGR_DS_ReleaseResultSet( psInfo->hDS, hLayer );
@@ -1398,7 +1432,7 @@ msOGRFileOpen(layerObj *layer, const char *connection )
         }
       }
   }
-  else if( psInfo->dialect != NULL && EQUAL(psInfo->dialect, "Spatialite") )
+  else
   {
       psInfo->bIsOKForSQLCompose = false;
 
@@ -1422,12 +1456,13 @@ msOGRFileOpen(layerObj *layer, const char *connection )
       {
         psInfo->pszMainTableName = msStrdup(OGR_FD_GetName(OGR_L_GetLayerDefn(psInfo->hLayer)));
         psInfo->pszSpatialFilterTableName = msStrdup(psInfo->pszMainTableName);
+        psInfo->pszSpatialFilterGeometryColumn = msStrdup( OGR_L_GetGeometryColumn(psInfo->hLayer) );
       }
       else
       {
         // Test if it is a spatial view
         pszRequest = msStringConcatenate(NULL,
-          "SELECT f_table_name, view_rowid FROM views_geometry_columns WHERE view_name = lower('");
+          "SELECT f_table_name, f_geometry_column, view_rowid FROM views_geometry_columns WHERE view_name = lower('");
         pszRequest = msStringConcatenate(pszRequest, OGR_FD_GetName(OGR_L_GetLayerDefn(psInfo->hLayer)));
         pszRequest = msStringConcatenate(pszRequest, "')");
         CPLPushErrorHandler(CPLQuietErrorHandler);
@@ -1443,7 +1478,8 @@ msOGRFileOpen(layerObj *layer, const char *connection )
             {
               psInfo->pszMainTableName = msStrdup(OGR_FD_GetName(OGR_L_GetLayerDefn(psInfo->hLayer)));
               psInfo->pszSpatialFilterTableName = msStrdup( OGR_F_GetFieldAsString( hFeature, 0 ) );
-              psInfo->pszRowId = msStrdup( OGR_F_GetFieldAsString( hFeature, 1 ) );
+              psInfo->pszSpatialFilterGeometryColumn = msStrdup( OGR_F_GetFieldAsString( hFeature, 1 ) );
+              psInfo->pszRowId = msStrdup( OGR_F_GetFieldAsString( hFeature, 2 ) );
               OGR_F_Destroy(hFeature);
             }
             OGR_DS_ReleaseResultSet( psInfo->hDS, hLayer );
@@ -1459,9 +1495,91 @@ msOGRFileOpen(layerObj *layer, const char *connection )
       psInfo->dialect = NULL;
   }
 
-  psInfo->bPaging = (psInfo->dialect != NULL);
+  // Check if spatial index has been disabled (testing purposes)
+  if (msLayerGetProcessingKey(layer, "USE_SPATIAL_INDEX") != NULL &&
+      !CSLTestBoolean(msLayerGetProcessingKey(layer, "USE_SPATIAL_INDEX")) )
+  {
+      msDebug("msOGRFileOpen(): Layer %s has spatial index disabled by processing option\n",
+              pszLayerDef);
+  }
+  // Test if spatial index is available
+  else if( psInfo->dialect != NULL )
+  {
+      char* pszRequest = NULL;
+      pszRequest = msStringConcatenate(pszRequest,
+          "SELECT * FROM sqlite_master WHERE type = 'table' AND name = 'idx_");
+      pszRequest = msStringConcatenate(pszRequest,
+                                       psInfo->pszSpatialFilterTableName);
+      pszRequest = msStringConcatenate(pszRequest, "_");
+      pszRequest = msStringConcatenate(pszRequest,
+                                    OGR_L_GetGeometryColumn(psInfo->hLayer));
+      pszRequest = msStringConcatenate(pszRequest, "'");
 
-  return psInfo;
+      psInfo->bHasSpatialIndex = false;
+      //msDebug("msOGRFileOpen(): %s", pszRequest);
+
+      OGRLayerH hLayer = OGR_DS_ExecuteSQL( psInfo->hDS, pszRequest, NULL, NULL );
+      if( hLayer )
+      {
+        OGRFeatureH hFeature = OGR_L_GetNextFeature(hLayer);
+        if( hFeature )
+        {
+            psInfo->bHasSpatialIndex = true;
+            OGR_F_Destroy(hFeature);
+        }
+        OGR_DS_ReleaseResultSet( psInfo->hDS, hLayer );
+      }
+      msFree(pszRequest);
+      pszRequest = NULL;
+
+      if( !psInfo->bHasSpatialIndex )
+      {
+          msDebug("msOGRFileOpen(): Layer %s has no spatial index table\n",
+                  pszLayerDef);
+      }
+      else
+      {
+          pszRequest = msStringConcatenate(pszRequest,
+            "SELECT * FROM geometry_columns WHERE f_table_name = lower('");
+          pszRequest = msStringConcatenate(pszRequest,
+                                       psInfo->pszSpatialFilterTableName);
+          pszRequest = msStringConcatenate(pszRequest, "') AND f_geometry_column = lower('");
+          pszRequest = msStringConcatenate(pszRequest,
+                                       psInfo->pszSpatialFilterGeometryColumn);
+          pszRequest = msStringConcatenate(pszRequest, "') AND spatial_index_enabled = 1");
+
+          psInfo->bHasSpatialIndex = false;
+
+          OGRLayerH hLayer = OGR_DS_ExecuteSQL( psInfo->hDS, pszRequest, NULL, NULL );
+          if( hLayer )
+          {
+            OGRFeatureH hFeature = OGR_L_GetNextFeature(hLayer);
+            if( hFeature )
+            {
+                psInfo->bHasSpatialIndex = true;
+                OGR_F_Destroy(hFeature);
+            }
+            OGR_DS_ReleaseResultSet( psInfo->hDS, hLayer );
+          }
+          msFree(pszRequest);
+          pszRequest = NULL;
+
+          if( !psInfo->bHasSpatialIndex )
+          {
+            msDebug("msOGRFileOpen(): Layer %s has spatial index disabled\n",
+                    pszLayerDef);
+          }
+          else
+          {
+            msDebug("msOGRFileOpen(): Layer %s has spatial index enabled\n",
+                    pszLayerDef);
+
+            psInfo->pszTablePrefix = msStrdup( psInfo->pszMainTableName );
+          }
+      }
+  }
+
+  psInfo->bPaging = (psInfo->dialect != NULL);
 }
 
 /************************************************************************/
@@ -1515,8 +1633,10 @@ static int msOGRFileClose(layerObj *layer, msOGRFileInfo *psInfo )
   
   msFree(psInfo->pszSelect);
   msFree(psInfo->pszSpatialFilterTableName);
+  msFree(psInfo->pszSpatialFilterGeometryColumn);
   msFree(psInfo->pszMainTableName);
   msFree(psInfo->pszRowId);
+  msFree(psInfo->pszTablePrefix);
 
   CPLFree(psInfo);
 
@@ -1531,7 +1651,7 @@ static char *msOGREscapeSQLParam(layerObj *layer, const char *pszString)
 {
 #ifdef USE_OGR
   char* pszEscapedStr =NULL;
-  if(layer && pszString && strlen(pszString) > 0) {
+  if(layer && pszString) {
     char* pszEscapedOGRStr =  CPLEscapeString(pszString, strlen(pszString),
                               CPLES_SQL );
     pszEscapedStr = msStrdup(pszEscapedOGRStr);
@@ -1555,6 +1675,31 @@ static char *msOGREscapeSQLParam(layerObj *layer, const char *pszString)
 // http://www.sqlite.org/lang_expr.html
 // http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.3.0.html
 
+static char* msOGRGetQuotedItem(layerObj* layer, const char* pszItem )
+{
+    msOGRFileInfo *psInfo = (msOGRFileInfo *)layer->layerinfo;
+    char* ret = NULL;
+    char* escapedItem = msLayerEscapePropertyName(layer, pszItem);
+    if( psInfo->pszTablePrefix)
+    {
+        char* escapedTable = msLayerEscapePropertyName(layer, psInfo->pszTablePrefix);
+        ret = msStringConcatenate(ret, "\"");
+        ret = msStringConcatenate(ret, escapedTable);
+        ret = msStringConcatenate(ret, "\".\"");
+        ret = msStringConcatenate(ret, escapedItem);
+        ret = msStringConcatenate(ret, "\"");
+        msFree(escapedTable);
+    }
+    else
+    {
+        ret = msStringConcatenate(ret, "\"");
+        ret = msStringConcatenate(ret, escapedItem);
+        ret = msStringConcatenate(ret, "\"");
+    }
+    msFree(escapedItem);
+    return ret;
+}
+
 static
 char *msOGRGetToken(layerObj* layer, tokenListNodeObjPtr *node) {
     msOGRFileInfo *info = (msOGRFileInfo *)layer->layerinfo;
@@ -1606,17 +1751,26 @@ char *msOGRGetToken(layerObj* layer, tokenListNodeObjPtr *node) {
     case MS_TOKEN_LITERAL_SHAPE: {
         // assumed to be in right srs after FLTGetSpatialComparisonCommonExpression
         char *wkt = msShapeToWKT(n->tokenval.shpval);
-        const char *col = OGR_L_GetGeometryColumn(info->hLayer); // which geom field??
-        nOutSize = strlen(wkt)+strlen(col)+35;
+        char *stresc = msOGRGetQuotedItem(layer, OGR_L_GetGeometryColumn(info->hLayer)); // which geom field??
+        nOutSize = strlen(wkt)+strlen(stresc)+35;
         out = (char *)msSmallMalloc(nOutSize);
-        snprintf(out, nOutSize, "ST_GeomFromText('%s',ST_SRID(\"%s\"))", wkt, col);
+        snprintf(out, nOutSize, "ST_GeomFromText('%s',ST_SRID(%s))", wkt, stresc);
         msFree(wkt);
+        msFree(stresc);
         break;
     }
     case MS_TOKEN_LITERAL_BOOLEAN:
         out = msStrdup(n->tokenval.dblval == 0 ? "FALSE" : "TRUE");
         break;
     case MS_TOKEN_COMPARISON_EQ:
+        if(n->next != NULL && n->next->token == MS_TOKEN_LITERAL_STRING &&
+           strcmp(n->next->tokenval.strval, "_MAPSERVER_NULL_") == 0 )
+        {
+            out = msStrdup(" IS NULL");
+            n = n->next;
+            break;
+        }
+
         out = msStrdup(" = ");
         break;
     case MS_TOKEN_COMPARISON_NE:
@@ -1753,48 +1907,95 @@ char *msOGRGetToken(layerObj* layer, tokenListNodeObjPtr *node) {
         out = msStrdup("ST_Area");
         break;
     case MS_TOKEN_BINDING_DOUBLE: {
-        char *stresc = msLayerEscapePropertyName(layer, n->tokenval.bindval.item);
-        nOutSize = strlen(stresc)+30;
+        char *stresc = msOGRGetQuotedItem(layer, n->tokenval.bindval.item);
+        nOutSize = strlen(stresc)+ + 30;
         out = (char *)msSmallMalloc(nOutSize);
-        const char *type = "float(16)";
-        if (EQUAL(info->dialect, "Spatialite"))
-            type = "REAL";
-        else if (EQUAL(info->dialect, "PostgreSQL"))
-            type = "double precision";
-        snprintf(out, nOutSize, "CAST(\"%s\" AS %s)", stresc, type);
+
+        char md_item_name[256];
+        snprintf( md_item_name, sizeof(md_item_name), "gml_%s_type",
+                  n->tokenval.bindval.item );
+        const char* type = msLookupHashTable(&(layer->metadata), md_item_name);
+        // Do not cast if the variable is of the appropriate type as it can
+        // prevent using database indexes, such as for SQlite
+        if( type != NULL && (EQUAL(type, "Integer") ||
+                             EQUAL(type, "Long") ||
+                             EQUAL(type, "Real")) )
+        {
+             snprintf(out, nOutSize, "%s", stresc);
+        }
+        else
+        {
+            const char *SQLtype = "float(16)";
+            if (EQUAL(info->dialect, "Spatialite"))
+                SQLtype = "REAL";
+            else if (EQUAL(info->dialect, "PostgreSQL"))
+                SQLtype = "double precision";
+            snprintf(out, nOutSize, "CAST(%s AS %s)", stresc, SQLtype);
+        }
         msFree(stresc);
         break;
     }
     case MS_TOKEN_BINDING_INTEGER: {
-        char *stresc = msLayerEscapePropertyName(layer, n->tokenval.bindval.item);
-        nOutSize = strlen(stresc)+20;
+        char *stresc = msOGRGetQuotedItem(layer, n->tokenval.bindval.item);
+        nOutSize = strlen(stresc)+ 20;
         out = (char *)msSmallMalloc(nOutSize);
-        snprintf(out, nOutSize, "CAST(\"%s\" AS integer)", stresc);
+
+        char md_item_name[256];
+        snprintf( md_item_name, sizeof(md_item_name), "gml_%s_type",
+                  n->tokenval.bindval.item );
+        const char* type = msLookupHashTable(&(layer->metadata), md_item_name);
+        // Do not cast if the variable is of the appropriate type as it can
+        // prevent using database indexes, such as for SQlite
+        if( type != NULL && (EQUAL(type, "Integer") ||
+                             EQUAL(type, "Long") ||
+                             EQUAL(type, "Real")) )
+        {
+            snprintf(out, nOutSize, "%s", stresc);
+        }
+        else
+        {
+            snprintf(out, nOutSize, "CAST(%s AS integer)", stresc);
+        }
         msFree(stresc);
         break;
     }
     case MS_TOKEN_BINDING_STRING: {
-        char *stresc = msLayerEscapePropertyName(layer, n->tokenval.bindval.item);
-        nOutSize = strlen(stresc)+30;
+        char *stresc = msOGRGetQuotedItem(layer, n->tokenval.bindval.item);
+        nOutSize = strlen(stresc) + 30;
         out = (char *)msSmallMalloc(nOutSize);
-        snprintf(out, nOutSize, "CAST(\"%s\" AS text)", stresc);
+
+        char md_item_name[256];
+        snprintf( md_item_name, sizeof(md_item_name), "gml_%s_type",
+                  n->tokenval.bindval.item );
+        const char* type = msLookupHashTable(&(layer->metadata), md_item_name);
+        // Do not cast if the variable is of the appropriate type as it can
+        // prevent using database indexes, such as for SQlite
+        if( type != NULL && EQUAL(type, "Character") )
+        {
+            snprintf(out, nOutSize, "%s", stresc);
+        }
+        else
+        {
+            snprintf(out, nOutSize, "CAST(%s AS text)", stresc);
+        }
         msFree(stresc);
         break;
     }
     case MS_TOKEN_BINDING_TIME: {
         // won't get here unless col is parsed as time and they are not
-        char *stresc = msLayerEscapePropertyName(layer, n->tokenval.bindval.item);
-        nOutSize = strlen(stresc)+10;
+        char *stresc = msOGRGetQuotedItem(layer, n->tokenval.bindval.item);
+        nOutSize = strlen(stresc)+ 10;
         out = (char *)msSmallMalloc(nOutSize);
-        snprintf(out, nOutSize, "\"%s\"", stresc);
+        snprintf(out, nOutSize, "%s", stresc);
         msFree(stresc);
         break;
     }
     case MS_TOKEN_BINDING_SHAPE: {
-        const char *col = OGR_L_GetGeometryColumn(info->hLayer); // which geom field??
-        nOutSize = strlen(col)+10;
+        char *stresc = msOGRGetQuotedItem(layer, OGR_L_GetGeometryColumn(info->hLayer)); // which geom field??
+        nOutSize = strlen(stresc)+ 10;
         out = (char *)msSmallMalloc(nOutSize);
-        snprintf(out, nOutSize, "\"%s\"", col);
+        snprintf(out, nOutSize, "%s", stresc);
+        msFree(stresc);
         break;
     }
 
@@ -1836,6 +2037,50 @@ char *msOGRGetToken(layerObj* layer, tokenListNodeObjPtr *node) {
     return out;
 }
 
+/*
+ * msOGRLayerBuildSQLOrderBy()
+ *
+ * Returns the content of a SQL ORDER BY clause from the sortBy member of
+ * the layer. The string does not contain the "ORDER BY" keywords itself.
+ */
+static char* msOGRLayerBuildSQLOrderBy(layerObj *layer, msOGRFileInfo *psInfo)
+{
+  char* strOrderBy = NULL;
+  if( layer->sortBy.nProperties > 0 ) {
+    int i;
+    for(i=0;i<layer->sortBy.nProperties;i++) {
+      if( i > 0 )
+        strOrderBy = msStringConcatenate(strOrderBy, ", ");
+      char* escapedItem = msLayerEscapePropertyName(layer, layer->sortBy.properties[i].item);
+      if( psInfo->pszTablePrefix)
+      {
+          char* escapedTable = msLayerEscapePropertyName(layer, psInfo->pszTablePrefix);
+          strOrderBy = msStringConcatenate(strOrderBy, "\"");
+          strOrderBy = msStringConcatenate(strOrderBy, escapedTable);
+          strOrderBy = msStringConcatenate(strOrderBy, "\".\"");
+          strOrderBy = msStringConcatenate(strOrderBy, escapedItem);
+          strOrderBy = msStringConcatenate(strOrderBy, "\"");
+          msFree(escapedTable);
+      }
+      else
+      {
+#if GDAL_VERSION_MAJOR < 2
+          // Old GDAL don't like quoted identifiers in ORDER BY
+          strOrderBy = msStringConcatenate(strOrderBy,
+                                           layer->sortBy.properties[i].item);
+#else
+          strOrderBy = msStringConcatenate(strOrderBy, "\"");
+          strOrderBy = msStringConcatenate(strOrderBy, escapedItem);
+          strOrderBy = msStringConcatenate(strOrderBy, "\"");
+#endif
+      }
+      msFree(escapedItem);
+      if( layer->sortBy.properties[i].sortOrder == SORT_DESC )
+        strOrderBy = msStringConcatenate(strOrderBy, " DESC");
+    }
+  }
+  return strOrderBy;
+}
 
 /**********************************************************************
  *                     msOGRFileWhichShapes()
@@ -1854,6 +2099,8 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
     }
 
     char *select = (psInfo->pszSelect) ? msStrdup(psInfo->pszSelect) : NULL;
+    const rectObj rectInvalid = MS_INIT_INVALID_RECT;
+    bool bIsValidRect = memcmp(&rect, &rectInvalid, sizeof(rect)) != 0;
 
     // we'll go strictly two possible ways: 
     // 1) GetLayer + SetFilter
@@ -1878,19 +2125,43 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
             for(i = 0; i < layer->numitems; i++) {
                 if( i > 0 )
                     select = msStringConcatenate(select, ", ");
-                select = msStringConcatenate(select, "\"");
-                select = msStringConcatenate(select, layer->items[i]);
-                select = msStringConcatenate(select, "\"");
+                char* escaped = msOGRGetQuotedItem(layer, layer->items[i]);
+                select = msStringConcatenate(select, escaped);
+                msFree(escaped);
+                if( psInfo->pszTablePrefix )
+                {
+                    select = msStringConcatenate(select, " AS \"");
+                    escaped = msLayerEscapePropertyName(layer, layer->items[i]);
+                    select = msStringConcatenate(select, escaped);
+                    msFree(escaped);
+                    select = msStringConcatenate(select, "\"");
+                }
             }
             if( layer->numitems > 0 )
                 select = msStringConcatenate(select, ", ");
             pszGeometryColumn = OGR_L_GetGeometryColumn(psInfo->hLayer);
             if( pszGeometryColumn != NULL && pszGeometryColumn[0] != '\0' ) {
-                select = msStringConcatenate(select, "\"");
-                select = msStringConcatenate(select, pszGeometryColumn);
-                select = msStringConcatenate(select, "\"");
+                char* escaped = msOGRGetQuotedItem(layer, pszGeometryColumn);
+                select = msStringConcatenate(select, escaped);
+                msFree(escaped);
+                if( psInfo->pszTablePrefix )
+                {
+                    select = msStringConcatenate(select, " AS \"");
+                    escaped = msLayerEscapePropertyName(layer, pszGeometryColumn);
+                    select = msStringConcatenate(select, escaped);
+                    msFree(escaped);
+                    select = msStringConcatenate(select, "\"");
+                }
             } else {
                 /* Add ", *" so that we still have an hope to get the geometry */
+                if( psInfo->pszTablePrefix )
+                {
+                    select = msStringConcatenate(select, "\"");
+                    char* escaped = msLayerEscapePropertyName(layer, psInfo->pszTablePrefix);
+                    select = msStringConcatenate(select, escaped);
+                    msFree(escaped);
+                    select = msStringConcatenate(select, "\".");
+                }
                 select = msStringConcatenate(select, "*");
             }
             select = msStringConcatenate(select, " FROM ");
@@ -1903,31 +2174,20 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
             else
             {
               select = msStringConcatenate(select, "\"");
-              select = msStringConcatenate(select, OGR_FD_GetName(OGR_L_GetLayerDefn(psInfo->hLayer)));
+              char* escaped = msLayerEscapePropertyName(layer, OGR_FD_GetName(OGR_L_GetLayerDefn(psInfo->hLayer)));
+              select = msStringConcatenate(select, escaped);
+              msFree(escaped);
               select = msStringConcatenate(select, "\"");
             }
         }
 
         char *filter = NULL;
-
         if (msLayerGetProcessingKey(layer, "NATIVE_FILTER") != NULL) {
             filter = msStringConcatenate(filter, "(");
             filter = msStringConcatenate(filter, msLayerGetProcessingKey(layer, "NATIVE_FILTER"));
             filter = msStringConcatenate(filter, ")");
         }
 
-        if (psInfo->dialect) {
-            if (EQUAL(psInfo->dialect, "Spatialite") || EQUAL(psInfo->dialect, "PostgreSQL")) {
-                const char *sql = layer->filter.native_string;
-                if (sql && *sql != '\0') {
-                    if (filter) filter = msStringConcatenate(filter, "AND ");
-                    filter = msStringConcatenate(filter, "(");
-                    filter = msStringConcatenate(filter, sql);
-                    filter = msStringConcatenate(filter, ")");
-                }
-            }
-        }
-
         /* ------------------------------------------------------------------
          * Set Spatial filter... this may result in no features being returned
          * if layer does not overlap current view.
@@ -1941,72 +2201,101 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
             rect.miny = MAX(psInfo->rect.miny, rect.miny);
             rect.maxx = MIN(psInfo->rect.maxx, rect.maxx);
             rect.maxy = MIN(psInfo->rect.maxy, rect.maxy);
+            bIsValidRect = true;
         }
         psInfo->rect = rect;
 
+        bool bSpatialiteAddOrderByFID = false;
+
+        if( psInfo->dialect && EQUAL(psInfo->dialect, "Spatialite") &&
+            psInfo->pszMainTableName != NULL && psInfo->bHasSpatialIndex &&
+            bIsValidRect )
+        {
+            select = msStringConcatenate(select, " JOIN ");
+
+            char szSpatialIndexName[256];
+            snprintf( szSpatialIndexName, sizeof(szSpatialIndexName),
+                        "idx_%s_%s",
+                        psInfo->pszSpatialFilterTableName,
+                        psInfo->pszSpatialFilterGeometryColumn );
+            char* pszEscapedSpatialIndexName = msLayerEscapePropertyName(
+                                            layer, szSpatialIndexName);
+            select = msStringConcatenate(select, "\"");
+            select = msStringConcatenate(select, pszEscapedSpatialIndexName);
+            msFree(pszEscapedSpatialIndexName);
+            select = msStringConcatenate(select, "\" ms_spat_idx ON \"");
+            char* pszEscapedMainTableName = msLayerEscapePropertyName(
+                                            layer, psInfo->pszMainTableName);
+            select = msStringConcatenate(select, pszEscapedMainTableName);
+            msFree(pszEscapedMainTableName);
+            select = msStringConcatenate(select, "\".");
+            if( psInfo->pszRowId )
+            {
+                char* pszEscapedRowId = msLayerEscapePropertyName(
+                                                    layer, psInfo->pszRowId);
+                select = msStringConcatenate(select, "\"");
+                select = msStringConcatenate(select, pszEscapedRowId);
+                select = msStringConcatenate(select, "\"");
+                msFree(pszEscapedRowId);
+            }
+            else
+                select = msStringConcatenate(select, "ROWID");
+            select = msStringConcatenate(select, " = ms_spat_idx.pkid AND ");
+
+            char szCond[256];
+            snprintf(szCond, sizeof(szCond),
+                        "ms_spat_idx.xmin <= %.15g AND ms_spat_idx.xmax >= %.15g AND "
+                        "ms_spat_idx.ymin <= %.15g AND ms_spat_idx.ymax >= %.15g",
+                        rect.maxx, rect.minx, rect.maxy, rect.miny);
+            select = msStringConcatenate(select, szCond);
+
+            bSpatialiteAddOrderByFID = true;
+        }
+
+        if (psInfo->dialect) {
+            if (EQUAL(psInfo->dialect, "Spatialite") || EQUAL(psInfo->dialect, "PostgreSQL")) {
+                const char *sql = layer->filter.native_string;
+                if (sql && *sql != '\0') {
+                    if (filter) filter = msStringConcatenate(filter, "AND ");
+                    filter = msStringConcatenate(filter, "(");
+                    filter = msStringConcatenate(filter, sql);
+                    filter = msStringConcatenate(filter, ")");
+                }
+            }
+        }
+
         bool bOffsetAlreadyAdded = false;
         // use spatial index
-        if (psInfo->dialect) {
+        if (psInfo->dialect && bIsValidRect ) {
             if (EQUAL(psInfo->dialect, "PostgreSQL")) {
                 if (filter) filter = msStringConcatenate(filter, " AND");
                 const char *col = OGR_L_GetGeometryColumn(psInfo->hLayer); // which geom field??
-                filter = msStringConcatenate(filter, " (");
-                filter = msStringConcatenate(filter, col);
-                filter = msStringConcatenate(filter, " && ST_MakeEnvelope(");
+                filter = msStringConcatenate(filter, " (\"");
+                char* escaped = msLayerEscapePropertyName(layer, col);
+                filter = msStringConcatenate(filter, escaped);
+                msFree(escaped);
+                filter = msStringConcatenate(filter, "\" && ST_MakeEnvelope(");
                 char *points = (char *)msSmallMalloc(30*2*5);
                 snprintf(points, 30*4, "%lf,%lf,%lf,%lf", rect.minx, rect.miny, rect.maxx, rect.maxy);
                 filter = msStringConcatenate(filter, points);
                 msFree(points);
                 filter = msStringConcatenate(filter, "))");
-            } else if (EQUAL(psInfo->dialect, "Spatialite")) {
+            }
+            else if( psInfo->dialect && EQUAL(psInfo->dialect, "Spatialite") &&
+                     psInfo->pszMainTableName != NULL && !psInfo->bHasSpatialIndex )
+            {
                 if (filter) filter = msStringConcatenate(filter, " AND");
-                filter = msStringConcatenate(filter, " ");
-                filter = msStringConcatenate(filter, psInfo->pszMainTableName);
-                filter = msStringConcatenate(filter, ".");
-                const char* pszFIDColumn = OGR_L_GetFIDColumn(psInfo->hLayer);
-                if( psInfo->pszRowId )
-                  filter = msStringConcatenate(filter, psInfo->pszRowId);
-                else if( pszFIDColumn != NULL && pszFIDColumn[0] != '\0' )
-                  filter = msStringConcatenate(filter, pszFIDColumn);
-                else
-                  filter = msStringConcatenate(filter, "ROWID");
-                filter = msStringConcatenate(filter, " IN (SELECT ROWID FROM SpatialIndex WHERE f_table_name = '");
-                filter = msStringConcatenate(filter, psInfo->pszSpatialFilterTableName);
-                filter = msStringConcatenate(filter, "' ");
-                const char* pszGeometryColumn = OGR_L_GetGeometryColumn(psInfo->hLayer);
-                if( pszGeometryColumn != NULL && pszGeometryColumn[0] != '\0' ) {
-                  filter = msStringConcatenate(filter, "AND f_geometry_column = '");
-                  filter = msStringConcatenate(filter, pszGeometryColumn);
-                  filter = msStringConcatenate(filter, "' ");
-                }
-                filter = msStringConcatenate(filter, "AND search_frame = GeomFromText('POLYGON((");
+                const char *col = OGR_L_GetGeometryColumn(psInfo->hLayer); // which geom field??
+                filter = msStringConcatenate(filter, " MbrIntersects(\"");
+                char* escaped = msLayerEscapePropertyName(layer, col);
+                filter = msStringConcatenate(filter, escaped);
+                msFree(escaped);
+                filter = msStringConcatenate(filter, "\", BuildMbr(");
                 char *points = (char *)msSmallMalloc(30*2*5);
-                snprintf(points, 30*2*5, "%lf %lf,%lf %lf,%lf %lf,%lf %lf,%lf %lf", rect.minx, rect.miny, rect.maxx, rect.miny, rect.maxx, rect.maxy, rect.minx, rect.maxy, rect.minx, rect.miny);
+                snprintf(points, 30*4, "%lf,%lf,%lf,%lf", rect.minx, rect.miny, rect.maxx, rect.maxy);
                 filter = msStringConcatenate(filter, points);
                 msFree(points);
-                filter = msStringConcatenate(filter, "))')");
-
-                // We put the limit in the sub-query, only if we don't have a
-                // order by later. We accept a startindex, provided there's no
-                // other attribute filter combined
-                if ( psInfo->bPaging && layer->maxfeatures >= 0 &&
-                    (layer->startindex <= 0 || layer->filter.native_string == NULL) &&
-                    layer->sortBy.nProperties == 0 )
-                {
-                    char szLimit[50];
-                    snprintf(szLimit, sizeof(szLimit), " LIMIT %d", layer->maxfeatures);
-                    filter = msStringConcatenate(filter, szLimit);
-
-                    if( layer->startindex > 0 && layer->filter.native_string == NULL )
-                    {
-                        bOffsetAlreadyAdded = true;
-                        char szOffset[50];
-                        snprintf(szOffset, sizeof(szOffset), " OFFSET %d", layer->startindex);
-                        filter = msStringConcatenate(filter, szOffset);
-                    }
-                }
-
-                filter = msStringConcatenate(filter, ")");
+                filter = msStringConcatenate(filter, "))");
             }
         }
 
@@ -2014,7 +2303,7 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
         char *sort = NULL;
         if( layer->sortBy.nProperties > 0) {
 
-            char *strOrderBy = msLayerBuildSQLOrderBy(layer);
+            char *strOrderBy = msOGRLayerBuildSQLOrderBy(layer, psInfo);
             if (strOrderBy) {
                 if( psInfo->nLayerIndex == -1 ) {
                     if( strcasestr(psInfo->pszLayerDef, " ORDER BY ") == NULL )
@@ -2029,6 +2318,31 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
             }
         }
 
+        if( bSpatialiteAddOrderByFID )
+        {
+            if( sort == NULL )
+                sort = msStringConcatenate(NULL, " ORDER BY ");
+            else
+                sort = msStringConcatenate(sort, ", ");
+            char* pszEscapedMainTableName = msLayerEscapePropertyName(
+                                            layer, psInfo->pszMainTableName);
+            sort = msStringConcatenate(sort, "\"");
+            sort = msStringConcatenate(sort, pszEscapedMainTableName);
+            sort = msStringConcatenate(sort, "\".");
+            msFree(pszEscapedMainTableName);
+            if( psInfo->pszRowId )
+            {
+                char* pszEscapedRowId = msLayerEscapePropertyName(
+                                                    layer, psInfo->pszRowId);
+                sort = msStringConcatenate(sort, "\"");
+                sort = msStringConcatenate(sort, pszEscapedRowId);
+                sort = msStringConcatenate(sort, "\"");
+                msFree(pszEscapedRowId);
+            }
+            else
+                sort = msStringConcatenate(sort, "ROWID");
+        }
+
         // compose SQL
         if (filter) {
             select = msStringConcatenate(select, " WHERE ");
@@ -2066,7 +2380,8 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
 
         if( psInfo->hLayer == NULL ) {
             RELEASE_OGR_LOCK;
-            msSetError(MS_OGRERR, "ExecuteSQL(%s) failed.\n%s", "msOGRFileWhichShapes()", select, CPLGetLastErrorMsg());
+            msSetError(MS_OGRERR, "ExecuteSQL() failed. Check logs.", "msOGRFileWhichShapes()");
+            msDebug("ExecuteSQL(%s) failed.\n%s\n", select, CPLGetLastErrorMsg());
             msFree(select);
             return MS_FAILURE;
         }
@@ -2087,7 +2402,7 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
 
         ACQUIRE_OGR_LOCK;
 
-        if( OGR_L_GetGeomType( psInfo->hLayer ) != wkbNone ) {
+        if( OGR_L_GetGeomType( psInfo->hLayer ) != wkbNone && bIsValidRect ) {
             if (rect.minx == rect.maxx && rect.miny == rect.maxy) {
                 OGRGeometryH hSpatialFilterPoint = OGR_G_CreateGeometry( wkbPoint );
 
@@ -2119,7 +2434,7 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
         psInfo->rect = rect;
 
         if (layer->debug >= MS_DEBUGLEVEL_VVV)
-            msDebug("msOGRFileWhichShapes: Setting spatial filter to %f %f %f %f\n", rect.minx, rect.miny, rect.maxx, rect.maxy );
+            msDebug("msOGRFileWhichShapes: Setting spatial filter to %.15g %.15g %.15g %.15g\n", rect.minx, rect.miny, rect.maxx, rect.maxy );
 
         /* ------------------------------------------------------------------
          * Apply an attribute filter if we have one prefixed with a WHERE
@@ -2133,7 +2448,8 @@ static int msOGRFileWhichShapes(layerObj *layer, rectObj rect, msOGRFileInfo *ps
 
             CPLErrorReset();
             if( OGR_L_SetAttributeFilter( psInfo->hLayer, pszOGRFilter ) != OGRERR_NONE ) {
-                msSetError(MS_OGRERR, "SetAttributeFilter(%s) failed on layer %s.\n%s", "msOGRFileWhichShapes()", layer->filter.string+6, layer->name?layer->name:"(null)", CPLGetLastErrorMsg() );
+                msSetError(MS_OGRERR, "SetAttributeFilter() failed on layer %s. Check logs.", "msOGRFileWhichShapes()", layer->name?layer->name:"(null)");
+                msDebug("SetAttributeFilter(%s) failed on layer %s.\n%s\n", layer->filter.string+6, layer->name?layer->name:"(null)", CPLGetLastErrorMsg() );
                 RELEASE_OGR_LOCK;
                 msFree(pszOGRFilter);
                 msFree(select);
@@ -2351,8 +2667,10 @@ msOGRFileNextShape(layerObj *layer, shapeObj *shape,
     if( (hFeature = OGR_L_GetNextFeature( psInfo->hLayer )) == NULL ) {
       psInfo->last_record_index_read = -1;
       if( CPLGetLastErrorType() == CE_Failure ) {
-        msSetError(MS_OGRERR, "%s", "msOGRFileNextShape()",
-                   CPLGetLastErrorMsg() );
+        msSetError(MS_OGRERR, "OGR GetNextFeature() error'd. Check logs.",
+                   "msOGRFileNextShape()");
+        msDebug("msOGRFileNextShape(): %s\n",
+                CPLGetLastErrorMsg() );
         RELEASE_OGR_LOCK;
         return MS_FAILURE;
       } else {
@@ -3035,6 +3353,35 @@ static int msOGRLayerIsOpen(layerObj *layer)
 #endif /* USE_OGR */
 }
 
+int msOGRIsSpatialite(layerObj* layer)
+{
+#ifdef USE_OGR
+  msOGRFileInfo *psInfo =(msOGRFileInfo*)layer->layerinfo;
+  if (psInfo && psInfo->dialect &&
+      EQUAL(psInfo->dialect, "Spatialite") )
+  {
+    // reasons to not produce native string: not simple layer, or an explicit deny
+    char *do_this = msLayerGetProcessingKey(layer, "NATIVE_SQL"); // default is YES
+    if (do_this && strcmp(do_this, "NO") == 0) {
+        return MS_FALSE;
+    }
+    return MS_TRUE;
+  }
+
+  return MS_FALSE;
+
+#else
+  /* ------------------------------------------------------------------
+   * OGR Support not included...
+   * ------------------------------------------------------------------ */
+
+  msSetError(MS_MISCERR, "OGR support is not available.", "msOGRIsSpatialite()");
+  return(MS_FALSE);
+
+#endif /* USE_OGR */
+}
+
+
 /**********************************************************************
  *                     msOGRLayerWhichShapes()
  *
@@ -4287,15 +4634,20 @@ char *msOGREscapePropertyName(layerObj *layer, const char *pszString)
 {
 #ifdef USE_OGR
   char* pszEscapedStr =NULL;
-  int i =0;
   if(layer && pszString && strlen(pszString) > 0) {
-    unsigned char ch;
-    for(i=0; (ch = ((unsigned char*)pszString)[i]) != '\0'; i++) {
-      if ( !(isalnum(ch) || ch == '_' || ch > 127) ) {
-        return msStrdup("invalid_property_name");
-      }
+    pszEscapedStr = (char*) msSmallMalloc( strlen(pszString) * 2 + 1 );
+    int j = 0;
+    for( int i = 0; pszString[i] != '\0'; ++i )
+    {
+        if( pszString[i] == '"' )
+        {
+            pszEscapedStr[j++] = '"';
+            pszEscapedStr[j++] = '"';
+        }
+        else
+            pszEscapedStr[j++] = pszString[i];
     }
-    pszEscapedStr = msStrdup(pszString);
+    pszEscapedStr[j] = 0;
   }
   return pszEscapedStr;
 #else
diff --git a/mappostgis.c b/mappostgis.c
index 2bddf9a..4bec985 100644
--- a/mappostgis.c
+++ b/mappostgis.c
@@ -2452,7 +2452,6 @@ int msPostGISLayerOpen(layerObj *layer)
          * times there will be a leak... */
         return MS_FAILURE;
       }
-
     }
   }
 
@@ -3454,7 +3453,7 @@ char *msPostGISEscapeSQLParam(layerObj *layer, const char *pszString)
   size_t nSrcLen;
   char* pszEscapedStr =NULL;
 
-  if (layer && pszString && strlen(pszString) > 0) {
+  if (layer && pszString) {
     if(!msPostGISLayerIsOpen(layer))
       msPostGISLayerOpen(layer);
 
@@ -3752,6 +3751,13 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
 
           if(node->token == MS_TOKEN_COMPARISON_EQ && node->next != NULL && node->next->token == MS_TOKEN_LITERAL_TIME) break; /* skip, handled with the next token */
           if(bindingToken == MS_TOKEN_BINDING_TIME && (node->token == MS_TOKEN_COMPARISON_EQ || node->token == MS_TOKEN_COMPARISON_NE)) break; /* skip, handled elsewhere */
+          if(node->token == MS_TOKEN_COMPARISON_EQ && node->next != NULL && node->next->token == MS_TOKEN_LITERAL_STRING &&
+             strcmp(node->next->tokenval.strval, "_MAPSERVER_NULL_") == 0 )
+          {
+              native_string = msStringConcatenate(native_string, " IS NULL");
+              node = node->next;
+              break;
+          }
 
           native_string = msStringConcatenate(native_string, msExpressionTokenToString(node->token));
           break;
diff --git a/mapquery.c b/mapquery.c
index a94ccb1..968354a 100644
--- a/mapquery.c
+++ b/mapquery.c
@@ -670,6 +670,7 @@ int msQueryByFilter(mapObj *map)
   expressionObj old_filter;
 
   rectObj search_rect;
+  const rectObj invalid_rect = MS_INIT_INVALID_RECT;
 
   shapeObj shape;
 
@@ -761,9 +762,10 @@ int msQueryByFilter(mapObj *map)
     if(status != MS_SUCCESS) goto query_error;
 
     search_rect = map->query.rect;
+
 #ifdef USE_PROJ
     lp->project = msProjectionsDiffer(&(lp->projection), &(map->projection));
-    if(lp->project)
+    if(lp->project && memcmp( &search_rect, &invalid_rect, sizeof(search_rect) ) != 0 )
       msProjectRect(&(map->projection), &(lp->projection), &search_rect); /* project the searchrect to source coords */
 #endif
 
diff --git a/mapscript/csharp/csmodule.i b/mapscript/csharp/csmodule.i
index f680d2e..6a9836a 100644
--- a/mapscript/csharp/csmodule.i
+++ b/mapscript/csharp/csmodule.i
@@ -430,6 +430,12 @@ DllExport void SWIGSTDCALL SWIGRegisterByteArrayCallback_$module(SWIG_CSharpByte
     %}
 %typemap(csvarin, excode="") (double pattern[ANY]) %{$excode%}
 
+/* Typemaps for int array */
+%typemap(imtype, out="IntPtr") int *panIndexes "int[]"
+%typemap(cstype) int *panIndexes %{int[]%}
+%typemap(in) int *panIndexes %{ $1 = ($1_ltype)$input; %}
+%typemap(csin) (int *panIndexes)  "$csinput"
+
 /* Typemaps for device handle */
 %typemap(imtype) (void* device)  %{IntPtr%}
 %typemap(cstype) (void* device) %{IntPtr%}
diff --git a/mapscript/php/CMakeLists.txt b/mapscript/php/CMakeLists.txt
index 89092cc..c4c952b 100644
--- a/mapscript/php/CMakeLists.txt
+++ b/mapscript/php/CMakeLists.txt
@@ -1,5 +1,9 @@
 FIND_PACKAGE(PHP5 REQUIRED)
-INCLUDE_DIRECTORIES(${PHP5_INCLUDES})
+INCLUDE_DIRECTORIES(${PHP5_INCLUDE_PATH})
+
+if(WIN32)
+add_definitions(/DZEND_WIN32 /DPHP_WIN32 /DPHP5 /DZTS /DZEND_DEBUG=0 -DWIN32 -D_WIN32 -D_USE_32BIT_TIME_T -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
+ENDIF(WIN32)
 
 IF(APPLE)
   if(XCODE)
@@ -25,7 +29,11 @@ add_library(php_mapscript MODULE
 )
 
 
+if(WIN32)
+target_link_libraries(php_mapscript ${MAPSERVER_LIBMAPSERVER} ${PHP5_LIBRARY})
+ELSE(WIN32)
 target_link_libraries(php_mapscript ${MAPSERVER_LIBMAPSERVER})
+ENDIF(WIN32)
 
 set_target_properties(php_mapscript PROPERTIES PREFIX "")
 install(TARGETS php_mapscript DESTINATION ${PHP5_EXTENSION_DIR})
diff --git a/mapscript/php/error.c b/mapscript/php/error.c
index a13de64..2e96eea 100644
--- a/mapscript/php/error.c
+++ b/mapscript/php/error.c
@@ -31,6 +31,17 @@
 
 #include "php_mapscript.h"
 
+#if PHP_VERSION_ID >= 50625
+#undef ZVAL_STRING
+#define ZVAL_STRING(z, s, duplicate) do {       \
+    const char *__s=(s);                            \
+    zval *__z = (z);                                        \
+    Z_STRLEN_P(__z) = strlen(__s);          \
+    Z_STRVAL_P(__z) = (duplicate?estrndup(__s, Z_STRLEN_P(__z)):(char*)__s);\
+    Z_TYPE_P(__z) = IS_STRING;                      \
+} while (0)
+#endif
+
 zend_class_entry *mapscript_ce_error;
 
 ZEND_BEGIN_ARG_INFO_EX(error___get_args, 0, 0, 1)
diff --git a/mapscript/php/owsrequest.c b/mapscript/php/owsrequest.c
index c28c953..11d9996 100644
--- a/mapscript/php/owsrequest.c
+++ b/mapscript/php/owsrequest.c
@@ -195,6 +195,8 @@ PHP_METHOD(OWSRequestObj, loadParams)
 #if PHP_VERSION_ID >= 50600
       php_stream *s = php_stream_temp_new();
       php_stream *input = php_stream_open_wrapper("php://input", "r", 0, NULL);
+      char *raw_post_data = NULL;
+      long raw_post_data_length = 0;
 
       /* php://input does not support stat */
       php_stream_copy_to_stream_ex(input, s, -1, NULL);
@@ -202,9 +204,6 @@ PHP_METHOD(OWSRequestObj, loadParams)
 
       php_stream_rewind(s);
       
-      char *raw_post_data = NULL;
-      long raw_post_data_length = 0;
-
       raw_post_data_length = php_stream_copy_to_mem(s, raw_post_data, -1, 0);
 
       cgirequestObj_loadParams(php_owsrequest->cgirequest, owsrequest_getenv,
diff --git a/mapserv.c b/mapserv.c
index 4ba2539..5924571 100644
--- a/mapserv.c
+++ b/mapserv.c
@@ -52,7 +52,9 @@ void msCleanupOnSignal( int nInData )
   /* from within the signal handler on Unix.  So we force output through */
   /* normal stdio functions. */
   msIO_installHandlers( NULL, NULL, NULL );
+#ifndef NDEBUG
   msIO_fprintf( stderr, "In msCleanupOnSignal.\n" );
+#endif
   msCleanup();
   exit(0);
 }
diff --git a/mapserver.h b/mapserver.h
index cf3cd21..905dec9 100644
--- a/mapserver.h
+++ b/mapserver.h
@@ -259,7 +259,7 @@ extern "C" {
 #define MS_URL_LENGTH 1024
 #define MS_MAXPATHLEN 1024
 
-#define MS_MAXIMAGESIZE_DEFAULT 2048
+#define MS_MAXIMAGESIZE_DEFAULT 4096
 
 #define MS_MAXPROJARGS 20
 #define MS_MAXJOINS 20
@@ -474,7 +474,9 @@ extern "C" {
 #define MS_IS_VALID_ARRAY_INDEX(index, size) ((index<0 || index>=size)?MS_FALSE:MS_TRUE)
 
 #define MS_CONVERT_UNIT(src_unit, dst_unit, value) (value * msInchesPerUnit(src_unit,0) / msInchesPerUnit(dst_unit,0))
-  
+
+#define MS_INIT_INVALID_RECT { -1e300, -1e300, 1e300, 1e300 }
+
 #endif
 
   /* General enumerated types - needed by scripts */
@@ -2410,6 +2412,7 @@ void msPopulateTextSymbolForLabelAndString(textSymbolObj *ts, labelObj *l, char
   MS_DLL_EXPORT int msClusterLayerOpen(layerObj *layer); /* in mapcluster.c */
   MS_DLL_EXPORT int msLayerIsOpen(layerObj *layer);
   MS_DLL_EXPORT void msLayerClose(layerObj *layer);
+  MS_DLL_EXPORT void msLayerFreeExpressions(layerObj *layer);
   MS_DLL_EXPORT int msLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery);
   MS_DLL_EXPORT int msLayerGetItemIndex(layerObj *layer, char *item);
   MS_DLL_EXPORT int msLayerWhichItems(layerObj *layer, int get_all, const char *metadata);
@@ -3130,6 +3133,8 @@ shapeObj *msOffsetCurve(shapeObj *p, double offset);
 shapeObj *msGEOSOffsetCurve(shapeObj *p, double offset);
 #endif
 
+int msOGRIsSpatialite(layerObj* layer);
+
 #endif /* SWIG */
 
 #ifdef __cplusplus
diff --git a/maputfgrid.cpp b/maputfgrid.cpp
index 60bf600..5ccb657 100644
--- a/maputfgrid.cpp
+++ b/maputfgrid.cpp
@@ -504,7 +504,13 @@ int utfgridSaveImage(imageObj *img, mapObj *map, FILE *fp, outputFormatObj *form
     /* Conversion to UTF-8 encoding */
     *stringptr = '\0';
     char * utf8;
-    utf8 = msConvertWideStringToUTF8 (string, "UCS-4LE");
+#if defined(_WIN32) && !defined(__CYGWIN__)
+	const char* encoding = "UCS-2LE";
+#else
+	const char* encoding = "UCS-4LE";
+#endif
+
+	  utf8 = msConvertWideStringToUTF8(string, encoding);
     msIO_fprintf(fp,"%s", utf8);
     msFree(utf8);
     msFree(string);
diff --git a/mapwfs.c b/mapwfs.c
index 7f41849..bac3f21 100644
--- a/mapwfs.c
+++ b/mapwfs.c
@@ -37,6 +37,7 @@
 /* There is a dependency to GDAL/OGR for the GML driver and MiniXML parser */
 #include "cpl_minixml.h"
 #include "cpl_conv.h"
+#include "cpl_string.h"
 
 #include "mapogcfilter.h"
 #include "mapowscommon.h"
@@ -2065,6 +2066,8 @@ static int msWFSRunFilter(mapObj* map,
         return msWFSException(map, "mapserv", MS_OWS_ERROR_NO_APPLICABLE_CODE, paramsObj->pszVersion);
     }
 
+    FLTProcessPropertyIsNull(psNode, map, lp->index);
+
     /*preparse the filter for gml aliases*/
     FLTPreParseFilterForAliasAndGroup(psNode, map, lp->index, "G");
 
@@ -2136,6 +2139,7 @@ static int msWFSRunBasicGetFeature(mapObj* map,
     const char *pszMapSRS=NULL, *pszLayerSRS=NULL;
     rectObj ext;
     int status;
+    const char* pszUseDefaultExtent;
     
     map->query.type = MS_QUERY_BY_RECT; /* setup the query */
     map->query.mode = MS_QUERY_MULTIPLE;
@@ -2147,7 +2151,15 @@ static int msWFSRunBasicGetFeature(mapObj* map,
     if(!paramsObj->pszSrs)
         pszMapSRS = msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), "FO", MS_TRUE);
 
-    if (msOWSGetLayerExtent(map, lp, "FO", &ext) == MS_SUCCESS) {
+    pszUseDefaultExtent = msOWSLookupMetadata(&(lp->metadata), "F",
+                                              "use_default_extent_for_getfeature");
+    if( pszUseDefaultExtent && CSLTestBoolean(pszUseDefaultExtent) &&
+        lp->connectiontype == MS_OGR )
+    {
+        const rectObj rectInvalid = MS_INIT_INVALID_RECT;
+        map->query.rect = rectInvalid;
+    }
+    else if (msOWSGetLayerExtent(map, lp, "FO", &ext) == MS_SUCCESS) {
 
         /* For a single point layer, to avoid numerical precision issues */
         /* when reprojection is involved */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapserver.git



More information about the Pkg-grass-devel mailing list