diff --git a/src/blua/luaconf.h b/src/blua/luaconf.h
index 4fb9407996c3cd884f23fa87c9f5a415436d1177..9e2948f414bf771202b2d1b25e4d7378b086bda3 100644
--- a/src/blua/luaconf.h
+++ b/src/blua/luaconf.h
@@ -11,6 +11,13 @@
 #include <limits.h>
 #include <stddef.h>
 
+#ifdef _MSC_VER
+#define INT32 __int32
+#else
+#include <stdint.h>
+#define INT32 int32_t
+#endif
+
 
 /*
 ** ==================================================================
@@ -140,7 +147,7 @@
 ** CHANGE that if ptrdiff_t is not adequate on your machine. (On most
 ** machines, ptrdiff_t gives a good choice between int or long.)
 */
-#define LUA_INTEGER	ptrdiff_t
+#define LUA_INTEGER	INT32
 
 
 /*
@@ -502,13 +509,13 @@
 */
 
 //#define LUA_NUMBER_DOUBLE
-#define LUA_NUMBER	ptrdiff_t
+#define LUA_NUMBER	INT32
 
 /*
 @@ LUAI_UACNUMBER is the result of an 'usual argument conversion'
 @* over a number.
 */
-#define LUAI_UACNUMBER	ptrdiff_t
+#define LUAI_UACNUMBER	INT32
 
 
 /*
@@ -519,14 +526,14 @@
 @@ lua_str2number converts a string to a number.
 */
 #ifdef LUA_WIN
-	#define LUA_NUMBER_SCAN		"%Ii"
-	#define LUA_NUMBER_FMT		"%Ii"
+	#define LUA_NUMBER_SCAN		"%d"
+	#define LUA_NUMBER_FMT		"%d"
 #else
-	#define LUA_NUMBER_SCAN		"%ti"
-	#define LUA_NUMBER_FMT		"%ti"
+	#define LUA_NUMBER_SCAN		"%d"
+	#define LUA_NUMBER_FMT		"%d"
 #endif
 #define lua_number2str(s,n)	sprintf((s), LUA_NUMBER_FMT, (n))
-#define LUAI_MAXNUMBER2STR	32 /* 16 digits, sign, point, and \0 */
+#define LUAI_MAXNUMBER2STR	12 /* 10 digits, sign, and \0 */
 #define lua_str2number(s,p)	strtol((s), (p), 10)
 
 
diff --git a/src/d_main.c b/src/d_main.c
index 61255e2722574bc6e28a6acd2fa461913c4fd67b..3918d8118c0c1cfd242c70b7f04148b26612f8c8 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -96,6 +96,10 @@ int	snprintf(char *str, size_t n, const char *fmt, ...);
 #include "hardware/hw3sound.h"
 #endif
 
+#ifdef HAVE_BLUA
+#include "lua_script.h"
+#endif
+
 // platform independant focus loss
 UINT8 window_notinfocus = false;
 
@@ -634,6 +638,10 @@ void D_SRB2Loop(void)
 #ifdef HW3SOUND
 		HW3S_EndFrameUpdate();
 #endif
+
+#ifdef HAVE_BLUA
+		LUA_Step();
+#endif
 	}
 }
 
diff --git a/src/d_player.h b/src/d_player.h
index b9fcdef75f34af7e533f263d8d5126cfd501683f..e2a1081b00b1dfb954076368d3cb8d5d80b44f49 100644
--- a/src/d_player.h
+++ b/src/d_player.h
@@ -161,11 +161,15 @@ typedef enum
 	// Are animation frames playing?
 	PA_ETC=0,
 	PA_IDLE,
+	PA_EDGE,
 	PA_WALK,
 	PA_RUN,
+	PA_PAIN,
 	PA_ROLL,
+	PA_JUMP,
 	PA_FALL,
-	PA_ABILITY
+	PA_ABILITY,
+	PA_RIDE
 } panim_t;
 
 typedef enum
diff --git a/src/dehacked.c b/src/dehacked.c
index 227c48b69852326034c2dc9fbf58cc441fba7617..0ba054f07c8be58349ce7373524170633165abfa 100644
--- a/src/dehacked.c
+++ b/src/dehacked.c
@@ -998,7 +998,7 @@ static const struct {
 static void readlevelheader(MYFILE *f, INT32 num)
 {
 	char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
-	char *word = s;
+	char *word;
 	char *word2;
 	//char *word3; // Non-uppercase version of word2
 	char *tmp;
@@ -1027,6 +1027,9 @@ static void readlevelheader(MYFILE *f, INT32 num)
 			if (s == tmp)
 				continue; // Skip comment lines, but don't break.
 
+			// Set / reset word, because some things (Lua.) move it
+			word = s;
+
 			// Get the part before the " = "
 			tmp = strchr(s, '=');
 			*(tmp-1) = '\0';
@@ -3747,7 +3750,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
 	"S_PLAY_RUN",
 	"S_PLAY_PAIN",
 	"S_PLAY_DEAD",
+	"S_PLAY_DRWN",
 	"S_PLAY_SPIN",
+	"S_PLAY_DASH",
 	"S_PLAY_GASP",
 	"S_PLAY_JUMP",
 	"S_PLAY_FALL",
@@ -3767,8 +3772,17 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
 	"S_PLAY_SUPER_STND",
 	"S_PLAY_SUPER_WALK",
 	"S_PLAY_SUPER_RUN",
-	"S_PLAY_SUPER_EDGE",
 	"S_PLAY_SUPER_PAIN",
+	"S_PLAY_SUPER_STUN",
+	"S_PLAY_SUPER_DEAD",
+	"S_PLAY_SUPER_DRWN",
+	"S_PLAY_SUPER_SPIN",
+	"S_PLAY_SUPER_GASP",
+	"S_PLAY_SUPER_JUMP",
+	"S_PLAY_SUPER_FALL",
+	"S_PLAY_SUPER_EDGE",
+	"S_PLAY_SUPER_RIDE",
+	"S_PLAY_SUPER_FLOAT",
 
 	// SF_SUPER
 	"S_PLAY_SUPERTRANS1",
@@ -7189,6 +7203,7 @@ static const char *const MOBJEFLAG_LIST[] = {
 	"GOOWATER", // Goo water
 	"PUSHED", // Mobj was already pushed this tic
 	"SPRUNG", // Mobj was already sprung this tic
+	"APPLYPMOMZ", // Platform movement
 	NULL
 };
 
@@ -7655,11 +7670,15 @@ struct {
 	// Player animation (panim_t)
 	{"PA_ETC",PA_ETC},
 	{"PA_IDLE",PA_IDLE},
+	{"PA_EDGE",PA_EDGE},
 	{"PA_WALK",PA_WALK},
 	{"PA_RUN",PA_RUN},
+	{"PA_PAIN",PA_PAIN},
 	{"PA_ROLL",PA_ROLL},
+	{"PA_JUMP",PA_JUMP},
 	{"PA_FALL",PA_FALL},
 	{"PA_ABILITY",PA_ABILITY},
+	{"PA_RIDE",PA_RIDE},
 
 	// Current weapon
 	{"WEP_AUTO",WEP_AUTO},
@@ -7738,36 +7757,36 @@ struct {
 	{"FF_GOOWATER",FF_GOOWATER},               ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop.
 
 	// Angles
-	{"ANG1",ANG1},
-	{"ANG2",ANG2},
-	{"ANG10",ANG10},
-	{"ANG15",ANG15},
-	{"ANG20",ANG20},
-	{"ANG30",ANG30},
-	{"ANG60",ANG60},
-	{"ANG64h",ANG64h},
-	{"ANG105",ANG105},
-	{"ANG210",ANG210},
-	{"ANG255",ANG255},
-	{"ANG340",ANG340},
-	{"ANG350",ANG350},
-	{"ANGLE_11hh",ANGLE_11hh},
-	{"ANGLE_22h",ANGLE_22h},
-	{"ANGLE_45",ANGLE_45},
-	{"ANGLE_67h",ANGLE_67h},
-	{"ANGLE_90",ANGLE_90},
-	{"ANGLE_112h",ANGLE_112h},
-	{"ANGLE_135",ANGLE_135},
-	{"ANGLE_157h",ANGLE_157h},
-	{"ANGLE_180",ANGLE_180},
-	{"ANGLE_202h",ANGLE_202h},
-	{"ANGLE_225",ANGLE_225},
-	{"ANGLE_247h",ANGLE_247h},
-	{"ANGLE_270",ANGLE_270},
-	{"ANGLE_292h",ANGLE_292h},
-	{"ANGLE_315",ANGLE_315},
-	{"ANGLE_337h",ANGLE_337h},
-	{"ANGLE_MAX",ANGLE_MAX},
+	{"ANG1",ANG1>>16},
+	{"ANG2",ANG2>>16},
+	{"ANG10",ANG10>>16},
+	{"ANG15",ANG15>>16},
+	{"ANG20",ANG20>>16},
+	{"ANG30",ANG30>>16},
+	{"ANG60",ANG60>>16},
+	{"ANG64h",ANG64h>>16},
+	{"ANG105",ANG105>>16},
+	{"ANG210",ANG210>>16},
+	{"ANG255",ANG255>>16},
+	{"ANG340",ANG340>>16},
+	{"ANG350",ANG350>>16},
+	{"ANGLE_11hh",ANGLE_11hh>>16},
+	{"ANGLE_22h",ANGLE_22h>>16},
+	{"ANGLE_45",ANGLE_45>>16},
+	{"ANGLE_67h",ANGLE_67h>>16},
+	{"ANGLE_90",ANGLE_90>>16},
+	{"ANGLE_112h",ANGLE_112h>>16},
+	{"ANGLE_135",ANGLE_135>>16},
+	{"ANGLE_157h",ANGLE_157h>>16},
+	{"ANGLE_180",ANGLE_180>>16},
+	{"ANGLE_202h",ANGLE_202h>>16},
+	{"ANGLE_225",ANGLE_225>>16},
+	{"ANGLE_247h",ANGLE_247h>>16},
+	{"ANGLE_270",ANGLE_270>>16},
+	{"ANGLE_292h",ANGLE_292h>>16},
+	{"ANGLE_315",ANGLE_315>>16},
+	{"ANGLE_337h",ANGLE_337h>>16},
+	{"ANGLE_MAX",ANGLE_MAX>>16},
 
 	// P_Chase directions (dirtype_t)
 	{"DI_NODIR",DI_NODIR},
diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c
index a1763c8c809901e6caa6af45f22895febc71e772..8d578a1ec19ab27a760ee2880f7445630375ef32 100644
--- a/src/hardware/hw_md2.c
+++ b/src/hardware/hw_md2.c
@@ -926,7 +926,7 @@ void HWR_InitMD2(void)
 			CONS_Printf("MD2 for sprite PLAY detected in md2.dat, use a player skin instead!\n");
 			continue;
 		}
-	
+
 		for (i = 0; i < NUMSPRITES; i++)
 		{
 			if (stricmp(name, sprnames[i]) == 0)
diff --git a/src/info.c b/src/info.c
index 7759960920c0534077b1aa1386715760ae347c52..8d7c249adf02e473e336f349d057685d3fe5379a 100644
--- a/src/info.c
+++ b/src/info.c
@@ -64,7 +64,9 @@ char spr2names[NUMPLAYERSPRITES][5] =
 	"RUN_",
 	"PAIN",
 	"DEAD",
+	"DRWN",
 	"SPIN",
+	"DASH",
 	"GASP",
 	"JUMP",
 	"FALL",
@@ -85,8 +87,17 @@ char spr2names[NUMPLAYERSPRITES][5] =
 	"SSTD",
 	"SWLK",
 	"SRUN",
+	"SPAN",
+	"SMSL",
+	"SDTH",
+	"SDRN",
+	"SSPN",
+	"SGSP",
+	"SJMP",
+	"SFAL",
 	"SEDG",
-	"SHIT"
+	"SRID",
+	"SFLT"
 };
 
 // Doesn't work with g++, needs actionf_p1 (don't modify this comment)
@@ -114,32 +125,47 @@ state_t states[NUMSTATES] =
 	{SPR_THOK, FF_TRANS50, 8, {NULL}, 0, 0, S_NULL}, // S_THOK
 
 	// Player
-	{SPR_PLAY, SPR2_STND, 105, {NULL},   0, 0, S_PLAY_WAIT}, // S_PLAY_STND
-	{SPR_PLAY, SPR2_WAIT,  16, {NULL},   0, 0, S_PLAY_WAIT}, // S_PLAY_WAIT
-	{SPR_PLAY, SPR2_WALK,   4, {NULL},   0, 0, S_PLAY_WALK}, // S_PLAY_WALK
-	{SPR_PLAY, SPR2_RUN ,   2, {NULL},   0, 0, S_PLAY_RUN},  // S_PLAY_RUN
-	{SPR_PLAY, SPR2_PAIN, 350, {NULL},   0, 0, S_PLAY_FALL}, // S_PLAY_PAIN
-	{SPR_PLAY, SPR2_DEAD,   4, {A_Fall}, 0, 0, S_PLAY_DEAD}, // S_PLAY_DEAD
-	{SPR_PLAY, SPR2_SPIN,   1, {NULL},   0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN
-	{SPR_PLAY, SPR2_GASP,  14, {NULL},   0, 0, S_PLAY_WALK}, // S_PLAY_GASP
-	{SPR_PLAY, SPR2_JUMP,  -1, {NULL},   0, 0, S_PLAY_FALL}, // S_PLAY_JUMP
-	{SPR_PLAY, SPR2_FALL,   2, {NULL},   0, 0, S_PLAY_FALL}, // S_PLAY_FALL
-	{SPR_PLAY, SPR2_EDGE,  12, {NULL},   0, 0, S_PLAY_EDGE}, // S_PLAY_EDGE
-	{SPR_PLAY, SPR2_RIDE,   4, {NULL},   0, 0, S_PLAY_RIDE}, // S_PLAY_RIDE
-
-	{SPR_PLAY, SPR2_FLY ,   2, {NULL},   0, 0, S_PLAY_FLY},  // S_PLAY_FLY
-	{SPR_PLAY, SPR2_TIRE,  12, {NULL},   0, 0, S_PLAY_FLY_TIRED}, // S_PLAY_FLY_TIRED
-
-	{SPR_PLAY, SPR2_GLID,   2, {NULL},   0, 0, S_PLAY_GLIDE}, // S_PLAY_GLIDE
-	{SPR_PLAY, SPR2_CLNG,   6, {NULL},   0, 0, S_PLAY_CLING}, // S_PLAY_CLING
-	{SPR_PLAY, SPR2_CLMB,   5, {NULL},   0, 0, S_PLAY_CLIMB}, // S_PLAY_CLIMB
-
-	{SPR_PLAY, SPR2_SSTD,   7, {NULL},   0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_STND
-	{SPR_PLAY, SPR2_SWLK,   7, {NULL},   0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_WALK
-	{SPR_PLAY, SPR2_SRUN,   7, {NULL},   0, 0, S_PLAY_SUPER_RUN},  // S_PLAY_SUPER_RUN
-	{SPR_PLAY, SPR2_SEDG,  12, {NULL},   0, 0, S_PLAY_SUPER_EDGE}, // S_PLAY_SUPER_EDGE
-	{SPR_PLAY, SPR2_SHIT,  -1, {NULL},   0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_PAIN
-
+	{SPR_PLAY, SPR2_STND, 105, {NULL}, 0, 0, S_PLAY_WAIT}, // S_PLAY_STND
+	{SPR_PLAY, SPR2_WAIT,  16, {NULL}, 0, 0, S_PLAY_WAIT}, // S_PLAY_WAIT
+	{SPR_PLAY, SPR2_WALK,   4, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_WALK
+	{SPR_PLAY, SPR2_RUN ,   2, {NULL}, 0, 0, S_PLAY_RUN},  // S_PLAY_RUN
+	{SPR_PLAY, SPR2_PAIN, 350, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_PAIN
+	{SPR_PLAY, SPR2_DEAD,   4, {NULL}, 0, 0, S_PLAY_DEAD}, // S_PLAY_DEAD
+	{SPR_PLAY, SPR2_DRWN,   4, {NULL}, 0, 0, S_PLAY_DRWN}, // S_PLAY_DRWN
+	{SPR_PLAY, SPR2_SPIN,   1, {NULL}, 0, 0, S_PLAY_SPIN}, // S_PLAY_SPIN
+	{SPR_PLAY, SPR2_DASH,   2, {NULL}, 0, 0, S_PLAY_DASH}, // S_PLAY_DASH
+	{SPR_PLAY, SPR2_GASP,  14, {NULL}, 0, 0, S_PLAY_WALK}, // S_PLAY_GASP
+	{SPR_PLAY, SPR2_JUMP,   2, {NULL}, 0, 0, S_PLAY_JUMP}, // S_PLAY_JUMP
+	{SPR_PLAY, SPR2_FALL,   2, {NULL}, 0, 0, S_PLAY_FALL}, // S_PLAY_FALL
+	{SPR_PLAY, SPR2_EDGE,  12, {NULL}, 0, 0, S_PLAY_EDGE}, // S_PLAY_EDGE
+	{SPR_PLAY, SPR2_RIDE,   4, {NULL}, 0, 0, S_PLAY_RIDE}, // S_PLAY_RIDE
+
+	// Tails abilities
+	{SPR_PLAY, SPR2_FLY ,   2, {NULL}, 0, 0, S_PLAY_FLY},  // S_PLAY_FLY
+	{SPR_PLAY, SPR2_TIRE,  12, {NULL}, 0, 0, S_PLAY_FLY_TIRED}, // S_PLAY_FLY_TIRED
+
+	// Knuckles abilities
+	{SPR_PLAY, SPR2_GLID,   2, {NULL}, 0, 0, S_PLAY_GLIDE}, // S_PLAY_GLIDE
+	{SPR_PLAY, SPR2_CLNG,   6, {NULL}, 0, 0, S_PLAY_CLING}, // S_PLAY_CLING
+	{SPR_PLAY, SPR2_CLMB,   5, {NULL}, 0, 0, S_PLAY_CLIMB}, // S_PLAY_CLIMB
+
+	// Super Sonic
+	{SPR_PLAY, SPR2_SSTD,   7, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_STND
+	{SPR_PLAY, SPR2_SWLK,   7, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_WALK
+	{SPR_PLAY, SPR2_SRUN,   7, {NULL}, 0, 0, S_PLAY_SUPER_RUN},  // S_PLAY_SUPER_RUN
+	{SPR_PLAY, SPR2_SPAN,  -1, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_PAIN
+	{SPR_PLAY, SPR2_SMSL,  -1, {NULL}, 0, 0, S_PLAY_SUPER_STND}, // S_PLAY_SUPER_STUN
+	{SPR_PLAY, SPR2_SDTH,   4, {NULL}, 0, 0, S_PLAY_SUPER_DEAD}, // S_PLAY_SUPER_DEAD
+	{SPR_PLAY, SPR2_SDRN,   4, {NULL}, 0, 0, S_PLAY_SUPER_DRWN}, // S_PLAY_SUPER_DRWN
+	{SPR_PLAY, SPR2_SSPN,   1, {NULL}, 0, 0, S_PLAY_SUPER_SPIN}, // S_PLAY_SUPER_SPIN
+	{SPR_PLAY, SPR2_SGSP,  14, {NULL}, 0, 0, S_PLAY_SUPER_WALK}, // S_PLAY_SUPER_GASP
+	{SPR_PLAY, SPR2_SJMP,   2, {NULL}, 0, 0, S_PLAY_SUPER_JUMP}, // S_PLAY_SUPER_JUMP
+	{SPR_PLAY, SPR2_SFAL,   2, {NULL}, 0, 0, S_PLAY_SUPER_FALL}, // S_PLAY_SUPER_FALL
+	{SPR_PLAY, SPR2_SEDG,  12, {NULL}, 0, 0, S_PLAY_SUPER_EDGE}, // S_PLAY_SUPER_EDGE
+	{SPR_PLAY, SPR2_SRID,   4, {NULL}, 0, 0, S_PLAY_SUPER_RIDE}, // S_PLAY_SUPER_RIDE
+	{SPR_PLAY, SPR2_SFLT,   7, {NULL}, 0, 0, S_PLAY_SUPER_FLOAT}, // S_PLAY_SUPER_FLOAT
+
+	// Transforming into Super
 	{SPR_PLAY, SPR2_TRNS,                4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS2}, // S_PLAY_SUPER_TRANS
 	{SPR_PLAY, SPR2_TRNS,                4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS3}, // S_PLAY_SUPER_TRANS2
 	{SPR_PLAY, SPR2_TRNS|FF_FULLBRIGHT,  4, {NULL}, 0, 0, S_PLAY_SUPER_TRANS4}, // S_PLAY_SUPER_TRANS3
@@ -3130,8 +3156,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
 		sfx_None,       // painsound
 		S_NULL,         // meleestate
 		S_PLAY_SPIN,    // missilestate
-		S_PLAY_DEAD,     // deathstate
-		S_NULL,         // xdeathstate
+		S_PLAY_DEAD,    // deathstate
+		S_PLAY_DRWN,    // xdeathstate
 		sfx_None,       // deathsound
 		1,              // speed
 		16*FRACUNIT,    // radius
diff --git a/src/info.h b/src/info.h
index 44a3dd012bb83fcab932329d3a2eebb935f482ae..e313526b92b18950114c1996c170cb56d7822d31 100644
--- a/src/info.h
+++ b/src/info.h
@@ -583,7 +583,9 @@ enum playersprite
 	SPR2_RUN ,
 	SPR2_PAIN,
 	SPR2_DEAD,
+	SPR2_DRWN,
 	SPR2_SPIN,
+	SPR2_DASH,
 	SPR2_GASP,
 	SPR2_JUMP,
 	SPR2_FALL,
@@ -604,8 +606,17 @@ enum playersprite
 	SPR2_SSTD,
 	SPR2_SWLK,
 	SPR2_SRUN,
+	SPR2_SPAN,
+	SPR2_SMSL,
+	SPR2_SDTH,
+	SPR2_SDRN,
+	SPR2_SSPN,
+	SPR2_SGSP,
+	SPR2_SJMP,
+	SPR2_SFAL,
 	SPR2_SEDG,
-	SPR2_SHIT,
+	SPR2_SRID,
+	SPR2_SFLT,
 
 	NUMPLAYERSPRITES
 };
@@ -634,7 +645,9 @@ typedef enum state
 	S_PLAY_RUN,
 	S_PLAY_PAIN,
 	S_PLAY_DEAD,
+	S_PLAY_DRWN,
 	S_PLAY_SPIN,
+	S_PLAY_DASH,
 	S_PLAY_GASP,
 	S_PLAY_JUMP,
 	S_PLAY_FALL,
@@ -654,8 +667,17 @@ typedef enum state
 	S_PLAY_SUPER_STND,
 	S_PLAY_SUPER_WALK,
 	S_PLAY_SUPER_RUN,
-	S_PLAY_SUPER_EDGE,
 	S_PLAY_SUPER_PAIN,
+	S_PLAY_SUPER_STUN,
+	S_PLAY_SUPER_DEAD,
+	S_PLAY_SUPER_DRWN,
+	S_PLAY_SUPER_SPIN,
+	S_PLAY_SUPER_GASP,
+	S_PLAY_SUPER_JUMP,
+	S_PLAY_SUPER_FALL,
+	S_PLAY_SUPER_EDGE,
+	S_PLAY_SUPER_RIDE,
+	S_PLAY_SUPER_FLOAT,
 
 	// SF_SUPER
 	S_PLAY_SUPER_TRANS,
diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index 9b0a34f17bb2c35a3a3e64245e2c4b3075a51379..2a5ff8d65d8d96deb907addc791b53654cf68ad2 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -85,13 +85,6 @@ static int lib_print(lua_State *L)
 	return 0;
 }
 
-static int lib_evalMath(lua_State *L)
-{
-	const char *word = luaL_checkstring(L, 1);
-	lua_pushinteger(L, LUA_EvalMath(word));
-	return 1;
-}
-
 // M_RANDOM
 //////////////
 
@@ -138,25 +131,25 @@ static int lib_pRandomRange(lua_State *L)
 
 static int lib_pAproxDistance(lua_State *L)
 {
-	fixed_t dx = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t dy = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t dx = luaL_checkfixed(L, 1);
+	fixed_t dy = luaL_checkfixed(L, 2);
 	//HUDSAFE
-	lua_pushinteger(L, P_AproxDistance(dx, dy));
+	lua_pushfixed(L, P_AproxDistance(dx, dy));
 	return 1;
 }
 
 static int lib_pClosestPointOnLine(lua_State *L)
 {
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t x = luaL_checkfixed(L, 1);
+	fixed_t y = luaL_checkfixed(L, 2);
 	line_t *line = *((line_t **)luaL_checkudata(L, 3, META_LINE));
 	vertex_t result;
 	//HUDSAFE
 	if (!line)
 		return LUA_ErrInvalid(L, "line_t");
 	P_ClosestPointOnLine(x, y, line, &result);
-	lua_pushinteger(L, result.x);
-	lua_pushinteger(L, result.y);
+	lua_pushfixed(L, result.x);
+	lua_pushfixed(L, result.y);
 	return 2;
 }
 
@@ -241,9 +234,9 @@ static int lib_pLookForPlayers(lua_State *L)
 
 static int lib_pSpawnMobj(lua_State *L)
 {
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 3);
+	fixed_t x = luaL_checkfixed(L, 1);
+	fixed_t y = luaL_checkfixed(L, 2);
+	fixed_t z = luaL_checkfixed(L, 3);
 	mobjtype_t type = luaL_checkinteger(L, 4);
 	NOHUD
 	if (type > MT_LASTFREESLOT)
@@ -283,9 +276,9 @@ static int lib_pSpawnXYZMissile(lua_State *L)
 	mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
 	mobj_t *dest = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
 	mobjtype_t type = luaL_checkinteger(L, 3);
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 4);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 5);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 6);
+	fixed_t x = luaL_checkfixed(L, 4);
+	fixed_t y = luaL_checkfixed(L, 5);
+	fixed_t z = luaL_checkfixed(L, 6);
 	NOHUD
 	if (!source || !dest)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -298,13 +291,13 @@ static int lib_pSpawnXYZMissile(lua_State *L)
 static int lib_pSpawnPointMissile(lua_State *L)
 {
 	mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t xa = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t ya = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t za = (fixed_t)luaL_checkinteger(L, 4);
+	fixed_t xa = luaL_checkfixed(L, 2);
+	fixed_t ya = luaL_checkfixed(L, 3);
+	fixed_t za = luaL_checkfixed(L, 4);
 	mobjtype_t type = luaL_checkinteger(L, 5);
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 6);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 7);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 8);
+	fixed_t x = luaL_checkfixed(L, 6);
+	fixed_t y = luaL_checkfixed(L, 7);
+	fixed_t z = luaL_checkfixed(L, 8);
 	NOHUD
 	if (!source)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -318,9 +311,9 @@ static int lib_pSpawnAlteredDirectionMissile(lua_State *L)
 {
 	mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
 	mobjtype_t type = luaL_checkinteger(L, 2);
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 4);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 5);
+	fixed_t x = luaL_checkfixed(L, 3);
+	fixed_t y = luaL_checkfixed(L, 4);
+	fixed_t z = luaL_checkfixed(L, 5);
 	INT32 shiftingAngle = (INT32)luaL_checkinteger(L, 5);
 	NOHUD
 	if (!source)
@@ -348,7 +341,7 @@ static int lib_pSPMAngle(lua_State *L)
 {
 	mobj_t *source = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
 	mobjtype_t type = luaL_checkinteger(L, 2);
-	angle_t angle = (angle_t)luaL_checkinteger(L, 3);
+	angle_t angle = luaL_checkangle(L, 3);
 	UINT8 allowaim = (UINT8)luaL_optinteger(L, 4, 0);
 	UINT32 flags2 = (UINT32)luaL_optinteger(L, 5, 0);
 	NOHUD
@@ -418,13 +411,13 @@ static int lib_pGetClosestAxis(lua_State *L)
 
 static int lib_pSpawnParaloop(lua_State *L)
 {
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t radius = (fixed_t)luaL_checkinteger(L, 4);
+	fixed_t x = luaL_checkfixed(L, 1);
+	fixed_t y = luaL_checkfixed(L, 2);
+	fixed_t z = luaL_checkfixed(L, 3);
+	fixed_t radius = luaL_checkfixed(L, 4);
 	INT32 number = (INT32)luaL_checkinteger(L, 5);
 	mobjtype_t type = luaL_checkinteger(L, 6);
-	angle_t rotangle = (angle_t)luaL_checkinteger(L, 7);
+	angle_t rotangle = luaL_checkangle(L, 7);
 	statenum_t nstate = luaL_optinteger(L, 8, S_NULL);
 	boolean spawncenter = lua_optboolean(L, 9);
 	NOHUD
@@ -458,7 +451,7 @@ static int lib_pSupermanLook4Players(lua_State *L)
 static int lib_pSetScale(lua_State *L)
 {
 	mobj_t *mobj = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t newscale = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t newscale = luaL_checkfixed(L, 2);
 	NOHUD
 	if (!mobj)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -526,7 +519,7 @@ static int lib_pGetPlayerHeight(lua_State *L)
 	//HUDSAFE
 	if (!player)
 		return LUA_ErrInvalid(L, "player_t");
-	lua_pushinteger(L, P_GetPlayerHeight(player));
+	lua_pushfixed(L, P_GetPlayerHeight(player));
 	return 1;
 }
 
@@ -536,7 +529,7 @@ static int lib_pGetPlayerSpinHeight(lua_State *L)
 	//HUDSAFE
 	if (!player)
 		return LUA_ErrInvalid(L, "player_t");
-	lua_pushinteger(L, P_GetPlayerSpinHeight(player));
+	lua_pushfixed(L, P_GetPlayerSpinHeight(player));
 	return 1;
 }
 
@@ -639,7 +632,7 @@ static int lib_pInQuicksand(lua_State *L)
 static int lib_pSetObjectMomZ(lua_State *L)
 {
 	mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t value = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t value = luaL_checkfixed(L, 2);
 	boolean relative = lua_optboolean(L, 3);
 	NOHUD
 	if (!mo)
@@ -753,8 +746,8 @@ static int lib_pDoPlayerExit(lua_State *L)
 static int lib_pInstaThrust(lua_State *L)
 {
 	mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	angle_t angle = (angle_t)luaL_checkinteger(L, 2);
-	fixed_t move = (fixed_t)luaL_checkinteger(L, 3);
+	angle_t angle = luaL_checkangle(L, 2);
+	fixed_t move = luaL_checkfixed(L, 3);
 	NOHUD
 	if (!mo)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -768,10 +761,10 @@ static int lib_pReturnThrustX(lua_State *L)
 	fixed_t move;
 	if (lua_isnil(L, 1) || lua_isuserdata(L, 1))
 		lua_remove(L, 1); // ignore mobj as arg1
-	angle = (angle_t)luaL_checkinteger(L, 1);
-	move = (fixed_t)luaL_checkinteger(L, 2);
+	angle = luaL_checkangle(L, 1);
+	move = luaL_checkfixed(L, 2);
 	//HUDSAFE
-	lua_pushinteger(L, P_ReturnThrustX(NULL, angle, move));
+	lua_pushfixed(L, P_ReturnThrustX(NULL, angle, move));
 	return 1;
 }
 
@@ -781,10 +774,10 @@ static int lib_pReturnThrustY(lua_State *L)
 	fixed_t move;
 	if (lua_isnil(L, 1) || lua_isuserdata(L, 1))
 		lua_remove(L, 1); // ignore mobj as arg1
-	angle = (angle_t)luaL_checkinteger(L, 1);
-	move = (fixed_t)luaL_checkinteger(L, 2);
+	angle = luaL_checkangle(L, 1);
+	move = luaL_checkfixed(L, 2);
 	//HUDSAFE
-	lua_pushinteger(L, P_ReturnThrustY(NULL, angle, move));
+	lua_pushfixed(L, P_ReturnThrustY(NULL, angle, move));
 	return 1;
 }
 
@@ -802,7 +795,7 @@ static int lib_pNukeEnemies(lua_State *L)
 {
 	mobj_t *inflictor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
 	mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
-	fixed_t radius = (fixed_t)luaL_checkinteger(L, 3);
+	fixed_t radius = luaL_checkfixed(L, 3);
 	NOHUD
 	if (!inflictor || !source)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -868,8 +861,8 @@ static int lib_pSpawnSpinMobj(lua_State *L)
 static int lib_pTelekinesis(lua_State *L)
 {
 	player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
-	fixed_t thrust = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t range = (fixed_t)luaL_checkinteger(L, 3);
+	fixed_t thrust = luaL_checkfixed(L, 2);
+	fixed_t range = luaL_checkfixed(L, 3);
 	NOHUD
 	if (!player)
 		return LUA_ErrInvalid(L, "player_t");
@@ -884,8 +877,8 @@ static int lib_pCheckPosition(lua_State *L)
 {
 	mobj_t *ptmthing = tmthing;
 	mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
+	fixed_t x = luaL_checkfixed(L, 2);
+	fixed_t y = luaL_checkfixed(L, 3);
 	NOHUD
 	if (!thing)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -899,8 +892,8 @@ static int lib_pTryMove(lua_State *L)
 {
 	mobj_t *ptmthing = tmthing;
 	mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
+	fixed_t x = luaL_checkfixed(L, 2);
+	fixed_t y = luaL_checkfixed(L, 3);
 	boolean allowdropoff = lua_optboolean(L, 4);
 	NOHUD
 	if (!thing)
@@ -915,7 +908,7 @@ static int lib_pMove(lua_State *L)
 {
 	mobj_t *ptmthing = tmthing;
 	mobj_t *actor = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t speed = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t speed = luaL_checkfixed(L, 2);
 	NOHUD
 	if (!actor)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -929,9 +922,9 @@ static int lib_pTeleportMove(lua_State *L)
 {
 	mobj_t *ptmthing = tmthing;
 	mobj_t *thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 4);
+	fixed_t x = luaL_checkfixed(L, 2);
+	fixed_t y = luaL_checkfixed(L, 3);
+	fixed_t z = luaL_checkfixed(L, 4);
 	NOHUD
 	if (!thing)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -975,10 +968,10 @@ static int lib_pCheckSight(lua_State *L)
 static int lib_pCheckHoopPosition(lua_State *L)
 {
 	mobj_t *hoopthing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 4);
-	fixed_t radius = (fixed_t)luaL_checkinteger(L, 5);
+	fixed_t x = luaL_checkfixed(L, 2);
+	fixed_t y = luaL_checkfixed(L, 3);
+	fixed_t z = luaL_checkfixed(L, 4);
+	fixed_t radius = luaL_checkfixed(L, 5);
 	NOHUD
 	if (!hoopthing)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -990,7 +983,7 @@ static int lib_pRadiusAttack(lua_State *L)
 {
 	mobj_t *spot = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
 	mobj_t *source = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ));
-	fixed_t damagedist = (fixed_t)luaL_checkinteger(L, 3);
+	fixed_t damagedist = luaL_checkfixed(L, 3);
 	NOHUD
 	if (!spot || !source)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -1000,12 +993,12 @@ static int lib_pRadiusAttack(lua_State *L)
 
 static int lib_pFloorzAtPos(lua_State *L)
 {
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t z = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t height = (fixed_t)luaL_checkinteger(L, 4);
+	fixed_t x = luaL_checkfixed(L, 1);
+	fixed_t y = luaL_checkfixed(L, 2);
+	fixed_t z = luaL_checkfixed(L, 3);
+	fixed_t height = luaL_checkfixed(L, 4);
 	//HUDSAFE
-	lua_pushinteger(L, P_FloorzAtPos(x, y, z, height));
+	lua_pushfixed(L, P_FloorzAtPos(x, y, z, height));
 	return 1;
 }
 
@@ -1213,8 +1206,8 @@ static int lib_pDoNightsScore(lua_State *L)
 static int lib_pThrust(lua_State *L)
 {
 	mobj_t *mo = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
-	angle_t angle = (angle_t)luaL_checkinteger(L, 2);
-	fixed_t move = (fixed_t)luaL_checkinteger(L, 3);
+	angle_t angle = luaL_checkangle(L, 2);
+	fixed_t move = luaL_checkfixed(L, 3);
 	NOHUD
 	if (!mo)
 		return LUA_ErrInvalid(L, "mobj_t");
@@ -1489,48 +1482,48 @@ static int lib_evCrumbleChain(lua_State *L)
 
 static int lib_rPointToAngle(lua_State *L)
 {
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t x = luaL_checkfixed(L, 1);
+	fixed_t y = luaL_checkfixed(L, 2);
 	//HUDSAFE
-	lua_pushinteger(L, R_PointToAngle(x, y));
+	lua_pushangle(L, R_PointToAngle(x, y));
 	return 1;
 }
 
 static int lib_rPointToAngle2(lua_State *L)
 {
-	fixed_t px2 = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t py2 = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t px1 = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t py1 = (fixed_t)luaL_checkinteger(L, 4);
+	fixed_t px2 = luaL_checkfixed(L, 1);
+	fixed_t py2 = luaL_checkfixed(L, 2);
+	fixed_t px1 = luaL_checkfixed(L, 3);
+	fixed_t py1 = luaL_checkfixed(L, 4);
 	//HUDSAFE
-	lua_pushinteger(L, R_PointToAngle2(px2, py2, px1, py1));
+	lua_pushangle(L, R_PointToAngle2(px2, py2, px1, py1));
 	return 1;
 }
 
 static int lib_rPointToDist(lua_State *L)
 {
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t x = luaL_checkfixed(L, 1);
+	fixed_t y = luaL_checkfixed(L, 2);
 	//HUDSAFE
-	lua_pushinteger(L, R_PointToDist(x, y));
+	lua_pushfixed(L, R_PointToDist(x, y));
 	return 1;
 }
 
 static int lib_rPointToDist2(lua_State *L)
 {
-	fixed_t px2 = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t py2 = (fixed_t)luaL_checkinteger(L, 2);
-	fixed_t px1 = (fixed_t)luaL_checkinteger(L, 3);
-	fixed_t py1 = (fixed_t)luaL_checkinteger(L, 4);
+	fixed_t px2 = luaL_checkfixed(L, 1);
+	fixed_t py2 = luaL_checkfixed(L, 2);
+	fixed_t px1 = luaL_checkfixed(L, 3);
+	fixed_t py1 = luaL_checkfixed(L, 4);
 	//HUDSAFE
-	lua_pushinteger(L, R_PointToDist2(px2, py2, px1, py1));
+	lua_pushfixed(L, R_PointToDist2(px2, py2, px1, py1));
 	return 1;
 }
 
 static int lib_rPointInSubsector(lua_State *L)
 {
-	fixed_t x = (fixed_t)luaL_checkinteger(L, 1);
-	fixed_t y = (fixed_t)luaL_checkinteger(L, 2);
+	fixed_t x = luaL_checkfixed(L, 1);
+	fixed_t y = luaL_checkfixed(L, 2);
 	//HUDSAFE
 	LUA_PushUserdata(L, R_PointInSubsector(x, y), META_SUBSECTOR);
 	return 1;
@@ -1664,7 +1657,7 @@ static int lib_sChangeMusic(lua_State *L)
 
 static int lib_sSpeedMusic(lua_State *L)
 {
-	fixed_t fixedspeed = (fixed_t)luaL_checkinteger(L, 1);
+	fixed_t fixedspeed = luaL_checkfixed(L, 1);
 	float speed = FIXED_TO_FLOAT(fixedspeed);
 	player_t *player = NULL;
 	NOHUD
@@ -1865,7 +1858,6 @@ static int lib_gTicsToMilliseconds(lua_State *L)
 
 static luaL_Reg lib[] = {
 	{"print", lib_print},
-	{"EvalMath", lib_evalMath},
 
 	// m_random
 	{"P_Random",lib_pRandom},
diff --git a/src/lua_hook.h b/src/lua_hook.h
index fae3bb7e6d1672a50f72d7d5e58c524bb65317c1..da2dcdc380461cefd958b9f42bfbe738a98d724b 100644
--- a/src/lua_hook.h
+++ b/src/lua_hook.h
@@ -41,7 +41,7 @@ enum hook {
 	hook_BotAI,
 	hook_LinedefExecute,
 	hook_PlayerMsg,
-	hook_DeathMsg,
+	hook_HurtMsg,
 
 	hook_MAX // last hook
 };
@@ -54,8 +54,9 @@ void LUAh_ThinkFrame(void); // Hook for frame (after mobj and player thinkers)
 boolean LUAh_MobjHook(mobj_t *mo, enum hook which);
 boolean LUAh_PlayerHook(player_t *plr, enum hook which);
 #define LUAh_MobjSpawn(mo) LUAh_MobjHook(mo, hook_MobjSpawn) // Hook for P_SpawnMobj by mobj type
-UINT8 LUAh_MobjCollide(mobj_t *thing1, mobj_t *thing2); // Hook for PIT_CheckThing by (thing) mobj type
-UINT8 LUAh_MobjMoveCollide(mobj_t *thing1, mobj_t *thing2); // Hook for PIT_CheckThing by (tmthing) mobj type
+UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which);
+#define LUAh_MobjCollide(thing1, thing2) LUAh_MobjCollideHook(thing1, thing2, hook_MobjCollide) // Hook for PIT_CheckThing by (thing) mobj type
+#define LUAh_MobjMoveCollide(thing1, thing2) LUAh_MobjCollideHook(thing1, thing2, hook_MobjMoveCollide) // Hook for PIT_CheckThing by (tmthing) mobj type
 boolean LUAh_TouchSpecial(mobj_t *special, mobj_t *toucher); // Hook for P_TouchSpecialThing by mobj type
 #define LUAh_MobjFuse(mo) LUAh_MobjHook(mo, hook_MobjFuse) // Hook for mobj->fuse == 0 by mobj type
 #define LUAh_MobjThinker(mo) LUAh_MobjHook(mo, hook_MobjThinker) // Hook for P_MobjThinker or P_SceneryThinker by mobj type
@@ -73,6 +74,6 @@ boolean LUAh_BotTiccmd(player_t *bot, ticcmd_t *cmd); // Hook for B_BuildTiccmd
 boolean LUAh_BotAI(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd); // Hook for B_BuildTailsTiccmd by skin name
 boolean LUAh_LinedefExecute(line_t *line, mobj_t *mo, sector_t *sector); // Hook for linedef executors
 boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg); // Hook for chat messages
-boolean LUAh_DeathMsg(player_t *player, mobj_t *inflictor, mobj_t *source); // Hook for hurt messages
+boolean LUAh_HurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source); // Hook for hurt messages
 
 #endif
diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c
index 532726ac223afa4d686029cc0917731e405c0cfc..0415d23e61acfe98705ec8855846b06297fcdf02 100644
--- a/src/lua_hooklib.c
+++ b/src/lua_hooklib.c
@@ -56,23 +56,40 @@ const char *const hookNames[hook_MAX+1] = {
 	NULL
 };
 
+// Hook metadata
+struct hook_s
+{
+	struct hook_s *next;
+	enum hook type;
+	UINT16 id;
+	union {
+		mobjtype_t mt;
+		char *skinname;
+		char *funcname;
+	} s;
+	boolean error;
+};
+typedef struct hook_s* hook_p;
+
+#define FMT_HOOKID "hook_%d"
+
+hook_p roothook;
+
 // Takes hook, function, and additional arguments (mobj type to act on, etc.)
 static int lib_addHook(lua_State *L)
 {
-	UINT16 hook;
-	boolean notable = false;
-	boolean subtable = false;
-	UINT32 subindex = 0;
-	char *subfield = NULL;
-	const char *lsubfield = NULL;
+	static struct hook_s hook = {NULL, 0, 0, {0}, false};
+	hook_p hookp, *lastp;
+
+	hook.type = luaL_checkoption(L, 1, NULL, hookNames);
+	lua_remove(L, 1);
 
-	hook = (UINT16)luaL_checkoption(L, 1, NULL, hookNames);
-	luaL_checktype(L, 2, LUA_TFUNCTION);
+	luaL_checktype(L, 1, LUA_TFUNCTION);
 
 	if (hud_running)
 		return luaL_error(L, "HUD rendering code should not call this function!");
 
-	switch(hook)
+	switch(hook.type)
 	{
 	// Take a mobjtype enum which this hook is specifically for.
 	case hook_MobjSpawn:
@@ -87,918 +104,668 @@ static int lib_addHook(lua_State *L)
 	case hook_MobjDeath:
 	case hook_BossDeath:
 	case hook_MobjRemoved:
-		subtable = true;
-		if (lua_isnumber(L, 3))
-			subindex = (UINT32)luaL_checkinteger(L, 3);
-		else
-			lsubfield = "a";
-		lua_settop(L, 2);
+	case hook_HurtMsg:
+		hook.s.mt = MT_NULL;
+		if (lua_isnumber(L, 2))
+			hook.s.mt = lua_tonumber(L, 2);
 		break;
-	case hook_BotAI: // Only one AI function per skin, please!
-		notable = true;
-		subtable = true;
-		subfield = ZZ_Alloc(strlen(luaL_checkstring(L, 3))+1);
+	case hook_BotAI:
+		hook.s.skinname = NULL;
+		if (lua_isstring(L, 2))
 		{ // lowercase copy
-			char *p = subfield;
-			const char *s = luaL_checkstring(L, 3);
+			const char *s = lua_tostring(L, 2);
+			char *p = hook.s.skinname = ZZ_Alloc(strlen(s)+1);
 			do {
 				*p = tolower(*s);
 				++p;
 			} while(*(++s));
 			*p = 0;
 		}
-		lua_settop(L, 3);
 		break;
-	case hook_LinedefExecute: // Get one linedef executor function by name
-		notable = true;
-		subtable = true;
-		subfield = ZZ_Alloc(strlen(luaL_checkstring(L, 3))+1);
+	case hook_LinedefExecute: // Linedef executor functions
 		{ // uppercase copy
-			char *p = subfield;
-			const char *s = luaL_checkstring(L, 3);
+			const char *s = luaL_checkstring(L, 2);
+			char *p = hook.s.funcname = ZZ_Alloc(strlen(s)+1);
 			do {
 				*p = toupper(*s);
 				++p;
 			} while(*(++s));
 			*p = 0;
 		}
-		lua_settop(L, 3);
 		break;
 	default:
-		lua_settop(L, 2);
 		break;
 	}
+	lua_settop(L, 1); // lua stack contains only the function now.
 
-	lua_getfield(L, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(L, -1));
+	hooksAvailable[hook.type/8] |= 1<<(hook.type%8);
 
-	// This hook type only allows one entry, not an array of hooks.
-	// New hooks will overwrite the previous ones, and the stack is one table shorter.
-	if (notable)
+	// iterate the hook metadata structs
+	// set hook.id to the highest id + 1
+	// set lastp to the last hook struct's "next" pointer.
+	lastp = &roothook;
+	hook.id = 0;
+	for (hookp = roothook; hookp; hookp = hookp->next)
 	{
-		if (subtable)
-		{
-			lua_rawgeti(L, -1, hook);
-			lua_remove(L, -2); // pop "hook"
-			I_Assert(lua_istable(L, -1));
-			lua_pushvalue(L, 2);
-			if (subfield)
-				lua_setfield(L, -2, subfield);
-			else if (lsubfield)
-				lua_setfield(L, -2, lsubfield);
-			else
-				lua_rawseti(L, -2, subindex);
-		} else {
-			lua_pushvalue(L, 2);
-			lua_rawseti(L, -2, hook);
-		}
-		hooksAvailable[hook/8] |= 1<<(hook%8);
-		return 0;
+		if (hookp->id >= hook.id)
+			hook.id = hookp->id+1;
+		lastp = &hookp->next;
 	}
 
-	// Fetch the hook's table from the registry.
-	// It should always exist, since LUA_HookLib creates a table for every hook.
-	lua_rawgeti(L, -1, hook);
-	lua_remove(L, -2); // pop "hook"
-	I_Assert(lua_istable(L, -1));
-	if (subtable)
-	{
-		// Fetch a subtable based on index
-		if (subfield)
-			lua_getfield(L, -1, subfield);
-		else if (lsubfield)
-			lua_getfield(L, -1, lsubfield);
-		else
-			lua_rawgeti(L, -1, subindex);
-
-		// Subtable doesn't exist, make one now.
-		if (lua_isnil(L, -1))
-		{
-			lua_pop(L, 1);
-			lua_newtable(L);
-
-			// Store a link to the subtable for later.
-			lua_pushvalue(L, -1);
-			if (subfield)
-				lua_setfield(L, -3, subfield);
-			else if (lsubfield)
-				lua_setfield(L, -3, lsubfield);
-			else
-				lua_rawseti(L, -3, subindex);
-	}	}
-
-	// Add function to the table.
-	lua_pushvalue(L, 2);
-	lua_rawseti(L, -2, (int)(lua_objlen(L, -2) + 1));
-
-	if (subfield)
-		Z_Free(subfield);
-
-	hooksAvailable[hook/8] |= 1<<(hook%8);
+	// allocate a permanent memory struct to stuff hook.
+	hookp = ZZ_Alloc(sizeof(struct hook_s));
+	memcpy(hookp, &hook, sizeof(struct hook_s));
+	// tack it onto the end of the linked list.
+	*lastp = hookp;
+
+	// set the hook function in the registry.
+	lua_pushfstring(L, FMT_HOOKID, hook.id);
+	lua_pushvalue(L, 1);
+	lua_settable(L, LUA_REGISTRYINDEX);
 	return 0;
 }
 
 int LUA_HookLib(lua_State *L)
 {
-	// Create all registry tables
-	enum hook i;
 	memset(hooksAvailable,0,sizeof(UINT8[(hook_MAX/8)+1]));
-
-	lua_newtable(L);
-	for (i = 0; i < hook_MAX; i++)
-	{
-		lua_newtable(L);
-		switch(i)
-		{
-		default:
-			break;
-		case hook_MobjSpawn:
-		case hook_MobjCollide:
-		case hook_MobjMoveCollide:
-		case hook_TouchSpecial:
-		case hook_MobjFuse:
-		case hook_MobjThinker:
-		case hook_BossThinker:
-		case hook_ShouldDamage:
-		case hook_MobjDamage:
-		case hook_MobjDeath:
-		case hook_BossDeath:
-		case hook_MobjRemoved:
-			lua_pushstring(L, "a");
-			lua_newtable(L);
-			lua_rawset(L, -3);
-			break;
-		}
-		lua_rawseti(L, -2, i);
-	}
-	lua_setfield(L, LUA_REGISTRYINDEX, "hook");
+	roothook = NULL;
 	lua_register(L, "addHook", lib_addHook);
 	return 0;
 }
 
 boolean LUAh_MobjHook(mobj_t *mo, enum hook which)
 {
+	hook_p hookp;
 	boolean hooked = false;
 	if (!gL || !(hooksAvailable[which/8] & (1<<(which%8))))
 		return false;
 
-	// clear the stack (just in case)
-	lua_pop(gL, -1);
-
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, which);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	// generic subtable
-	lua_pushstring(gL, "a");
-	lua_rawget(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	LUA_PushUserdata(gL, mo, META_MOBJ);
-	lua_pushnil(gL);
-	while (lua_next(gL, -3)) {
-		CONS_Debug(DBG_LUA, "MobjHook: Calling hook_%s for generic mobj types\n", hookNames[which]);
-		lua_pushvalue(gL, -3); // mo
-		// stack is: hook_Mobj table, subtable "a", mobj, i, function, mobj
-		if (lua_pcall(gL, 1, 1, 0)) {
-			// A run-time error occurred.
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
-			lua_pop(gL, 1);
-			// Remove this function from the hook table to prevent further errors.
-			lua_pushvalue(gL, -1); // key
-			lua_pushnil(gL); // value
-			lua_rawset(gL, -5); // table
-			CONS_Printf("Hook removed.\n");
-		}
-		else
-		{
-			if (lua_toboolean(gL, -1))
-				hooked = true;
-			lua_pop(gL, 1);
-		}
-	}
-	// stack is: hook_Mobj table, subtable "a", mobj
-	lua_remove(gL, -2); // pop subtable, leave mobj
-
-	// mobjtype subtable
-	// stack is: hook_Mobj table, mobj
-	lua_rawgeti(gL, -2, mo->type);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 3); // pop hook_Mobj table, mobj, and nil
-		// the stack should now be empty.
-		return false;
-	}
-	lua_remove(gL, -3); // remove hook table
-	// stack is: mobj, mobjtype subtable
-	lua_insert(gL, lua_gettop(gL)-1); // swap subtable with mobj
-	// stack is: mobjtype subtable, mobj
-
-	lua_pushnil(gL);
-	while (lua_next(gL, -3)) {
-		CONS_Debug(DBG_LUA, "MobjHook: Calling hook_%s for mobj type %d\n", hookNames[which], mo->type);
-		lua_pushvalue(gL, -3); // mo
-		// stack is: mobjtype subtable, mobj, i, function, mobj
-		if (lua_pcall(gL, 1, 1, 0)) {
-			// A run-time error occurred.
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
-			lua_pop(gL, 1);
-			// Remove this function from the hook table to prevent further errors.
-			lua_pushvalue(gL, -1); // key
-			lua_pushnil(gL); // value
-			lua_rawset(gL, -5); // table
-			CONS_Printf("Hook removed.\n");
-		}
-		else
+	lua_settop(gL, 0);
+
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == which
+		&& (hookp->s.mt == MT_NULL || hookp->s.mt == mo->type))
 		{
+			if (lua_gettop(gL) == 0)
+				LUA_PushUserdata(gL, mo, META_MOBJ);
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -2);
+			if (lua_pcall(gL, 1, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
 			if (lua_toboolean(gL, -1))
 				hooked = true;
 			lua_pop(gL, 1);
 		}
-	}
 
-	lua_pop(gL, 2); // pop mobj and subtable
-	// the stack should now be empty.
-
-	lua_gc(gL, LUA_GCSTEP, 3);
+	lua_settop(gL, 0);
 	return hooked;
 }
 
 boolean LUAh_PlayerHook(player_t *plr, enum hook which)
 {
+	hook_p hookp;
 	boolean hooked = false;
 	if (!gL || !(hooksAvailable[which/8] & (1<<(which%8))))
 		return false;
 
-	// clear the stack (just in case)
-	lua_pop(gL, -1);
-
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, which);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+	lua_settop(gL, 0);
 
-	LUA_PushUserdata(gL, plr, META_PLAYER);
-
-	lua_pushnil(gL);
-	while (lua_next(gL, -3) != 0) {
-		lua_pushvalue(gL, -3); // player
-		if (lua_pcall(gL, 1, 1, 0)) { // pops hook function, player, pushes 1 return result
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == which)
+		{
+			if (lua_gettop(gL) == 0)
+				LUA_PushUserdata(gL, plr, META_PLAYER);
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -2);
+			if (lua_pcall(gL, 1, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (lua_toboolean(gL, -1))
+				hooked = true;
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (lua_toboolean(gL, -1)) // if return true,
-			hooked = true; // override vanilla behavior
-		lua_pop(gL, 1); // pop return value
-	}
 
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCSTEP, 1);
+	lua_settop(gL, 0);
 	return hooked;
 }
 
 // Hook for map change (before load)
 void LUAh_MapChange(void)
 {
+	hook_p hookp;
 	if (!gL || !(hooksAvailable[hook_MapChange/8] & (1<<(hook_MapChange%8))))
 		return;
 
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_MapChange);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
+	lua_settop(gL, 0);
 	lua_pushinteger(gL, gamemap);
-	lua_pushnil(gL);
-	while (lua_next(gL, -3) != 0) {
-		lua_pushvalue(gL, -3); // gamemap
-		LUA_Call(gL, 1);
-	}
-	lua_pop(gL, 1);
-	lua_gc(gL, LUA_GCSTEP, 1);
+
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_MapChange)
+		{
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -2);
+			LUA_Call(gL, 1);
+		}
+
+	lua_settop(gL, 0);
 }
 
 // Hook for map load
 void LUAh_MapLoad(void)
 {
+	hook_p hookp;
 	if (!gL || !(hooksAvailable[hook_MapLoad/8] & (1<<(hook_MapLoad%8))))
 		return;
 
-	lua_pop(gL, -1);
+	lua_settop(gL, 0);
+	lua_pushinteger(gL, gamemap);
 
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_MapLoad);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_MapLoad)
+		{
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -2);
+			LUA_Call(gL, 1);
+		}
 
-	lua_pushinteger(gL, gamemap);
-	lua_pushnil(gL);
-	while (lua_next(gL, -3) != 0) {
-		lua_pushvalue(gL, -3); // gamemap
-		LUA_Call(gL, 1);
-	}
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCCOLLECT, 0);
+	lua_settop(gL, 0);
 }
 
 // Hook for Got_AddPlayer
 void LUAh_PlayerJoin(int playernum)
 {
+	hook_p hookp;
 	if (!gL || !(hooksAvailable[hook_PlayerJoin/8] & (1<<(hook_PlayerJoin%8))))
 		return;
 
-	lua_pop(gL, -1);
+	lua_settop(gL, 0);
+	lua_pushinteger(gL, playernum);
 
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_PlayerJoin);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_PlayerJoin)
+		{
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -2);
+			LUA_Call(gL, 1);
+		}
 
-	lua_pushinteger(gL, playernum);
-	lua_pushnil(gL);
-	while (lua_next(gL, -3) != 0) {
-		lua_pushvalue(gL, -3); // playernum
-		LUA_Call(gL, 1);
-	}
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCCOLLECT, 0);
+	lua_settop(gL, 0);
 }
 
 // Hook for frame (after mobj and player thinkers)
 void LUAh_ThinkFrame(void)
 {
+	hook_p hookp;
 	if (!gL || !(hooksAvailable[hook_ThinkFrame/8] & (1<<(hook_ThinkFrame%8))))
 		return;
 
-	lua_pop(gL, -1);
-
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_ThinkFrame);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	lua_pushnil(gL);
-	while (lua_next(gL, -2) != 0)
-	{
-		//LUA_Call(gL, 0);
-		if (lua_pcall(gL, 0, 0, 0))
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_ThinkFrame)
 		{
-			// A run-time error occurred.
-			CONS_Alert(CONS_WARNING,"%s\n", lua_tostring(gL, -1));
-			lua_pop(gL, 1);
-			// Remove this function from the hook table to prevent further errors.
-			lua_pushvalue(gL, -1); // key
-			lua_pushnil(gL); // value
-			lua_rawset(gL, -4); // table
-			CONS_Printf("Hook removed.\n");
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			if (lua_pcall(gL, 0, 0, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+			}
 		}
-	}
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCCOLLECT, 0);
 }
 
-// Hook for PIT_CheckThing by (thing) mobj type (thing1 = thing, thing2 = tmthing)
-UINT8 LUAh_MobjCollide(mobj_t *thing1, mobj_t *thing2)
+// Hook for mobj collisions
+UINT8 LUAh_MobjCollideHook(mobj_t *thing1, mobj_t *thing2, enum hook which)
 {
+	hook_p hookp;
 	UINT8 shouldCollide = 0; // 0 = default, 1 = force yes, 2 = force no.
-	if (!gL || !(hooksAvailable[hook_MobjCollide/8] & (1<<(hook_MobjCollide%8))))
-		return 0;
-
-	// clear the stack
-	lua_pop(gL, -1);
-
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_MobjCollide);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	// mobjtype subtable
-	lua_rawgeti(gL, -1, thing1->type);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return 0;
-	}
-	lua_remove(gL, -2); // remove hook table
-
-	LUA_PushUserdata(gL, thing1, META_MOBJ);
-	LUA_PushUserdata(gL, thing2, META_MOBJ);
-	lua_pushnil(gL);
-	while (lua_next(gL, -4)) {
-		lua_pushvalue(gL, -4); // thing1
-		lua_pushvalue(gL, -4); // thing2
-		if (lua_pcall(gL, 2, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
-			lua_pop(gL, 1);
-			continue;
-		}
-		if (!lua_isnil(gL, -1))
-		{ // if nil, leave shouldCollide = 0.
-			if (lua_toboolean(gL, -1))
-				shouldCollide = 1; // Force yes
-			else
-				shouldCollide = 2; // Force no
-		}
-		lua_pop(gL, 1); // pop return value
-	}
-	lua_pop(gL, 3); // pop arguments and mobjtype table
-
-	lua_gc(gL, LUA_GCSTEP, 1);
-	return shouldCollide;
-}
-
-// Hook for PIT_CheckThing by (tmthing) mobj type (thing1 = tmthing, thing2 = thing)
-UINT8 LUAh_MobjMoveCollide(mobj_t *thing1, mobj_t *thing2)
-{
-	UINT8 shouldCollide = 0; // 0 = default, 1 = force yes, 2 = force no.
-	if (!gL || !(hooksAvailable[hook_MobjMoveCollide/8] & (1<<(hook_MobjMoveCollide%8))))
+	if (!gL || !(hooksAvailable[which/8] & (1<<(which%8))))
 		return 0;
 
-	// clear the stack
-	lua_pop(gL, -1);
-
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_MobjMoveCollide);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+	lua_settop(gL, 0);
 
-	// mobjtype subtable
-	lua_rawgeti(gL, -1, thing1->type);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return 0;
-	}
-	lua_remove(gL, -2); // remove hook table
-
-	LUA_PushUserdata(gL, thing1, META_MOBJ);
-	LUA_PushUserdata(gL, thing2, META_MOBJ);
-	lua_pushnil(gL);
-	while (lua_next(gL, -4)) {
-		lua_pushvalue(gL, -4); // thing1
-		lua_pushvalue(gL, -4); // thing2
-		if (lua_pcall(gL, 2, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == which
+		&& (hookp->s.mt == MT_NULL || hookp->s.mt == thing1->type))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, thing1, META_MOBJ);
+				LUA_PushUserdata(gL, thing2, META_MOBJ);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -3);
+			lua_pushvalue(gL, -3);
+			if (lua_pcall(gL, 2, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (!lua_isnil(gL, -1))
+			{ // if nil, leave shouldCollide = 0.
+				if (lua_toboolean(gL, -1))
+					shouldCollide = 1; // Force yes
+				else
+					shouldCollide = 2; // Force no
+			}
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (!lua_isnil(gL, -1))
-		{ // if nil, leave shouldCollide = 0.
-			if (lua_toboolean(gL, -1))
-				shouldCollide = 1; // Force yes
-			else
-				shouldCollide = 2; // Force no
-		}
-		lua_pop(gL, 1); // pop return value
-	}
-	lua_pop(gL, 3); // pop arguments and mobjtype table
 
-	lua_gc(gL, LUA_GCSTEP, 1);
+	lua_settop(gL, 0);
 	return shouldCollide;
 }
 
 // Hook for P_TouchSpecialThing by mobj type
 boolean LUAh_TouchSpecial(mobj_t *special, mobj_t *toucher)
 {
+	hook_p hookp;
 	boolean hooked = false;
 	if (!gL || !(hooksAvailable[hook_TouchSpecial/8] & (1<<(hook_TouchSpecial%8))))
-		return false;
-
-	// clear the stack
-	lua_pop(gL, -1);
-
-	// get hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_TouchSpecial);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	// get mobjtype subtable
-	lua_pushinteger(gL, special->type);
-	lua_rawget(gL, 1);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return false;
-	}
-	lua_remove(gL, 1); // pop hook table off the stack
+		return 0;
 
-	LUA_PushUserdata(gL, special, META_MOBJ);
-	LUA_PushUserdata(gL, toucher, META_MOBJ);
+	lua_settop(gL, 0);
 
-	lua_pushnil(gL);
-	while (lua_next(gL, 1) != 0) {
-		lua_pushvalue(gL, 2); // special
-		lua_pushvalue(gL, 3); // toucher
-		if (lua_pcall(gL, 2, 1, 0)) { // pops hook function, special, toucher, pushes 1 return result
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_TouchSpecial
+		&& (hookp->s.mt == MT_NULL || hookp->s.mt == special->type))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, special, META_MOBJ);
+				LUA_PushUserdata(gL, toucher, META_MOBJ);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -3);
+			lua_pushvalue(gL, -3);
+			if (lua_pcall(gL, 2, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (lua_toboolean(gL, -1))
+				hooked = true;
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (lua_toboolean(gL, -1)) // if return true,
-			hooked = true; // override vanilla behavior
-		lua_pop(gL, 1); // pop return value
-	}
 
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCSTEP, 1);
+	lua_settop(gL, 0);
 	return hooked;
 }
 
 // Hook for P_DamageMobj by mobj type (Should mobj take damage?)
 UINT8 LUAh_ShouldDamage(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 damage)
 {
+	hook_p hookp;
 	UINT8 shouldDamage = 0; // 0 = default, 1 = force yes, 2 = force no.
 	if (!gL || !(hooksAvailable[hook_ShouldDamage/8] & (1<<(hook_ShouldDamage%8))))
 		return 0;
 
-	// clear the stack
-	lua_pop(gL, -1);
-
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_ShouldDamage);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+	lua_settop(gL, 0);
 
-	// mobjtype subtable
-	lua_rawgeti(gL, -1, target->type);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return 0;
-	}
-	lua_remove(gL, -2); // remove hook table
-
-	LUA_PushUserdata(gL, target, META_MOBJ);
-	LUA_PushUserdata(gL, inflictor, META_MOBJ);
-	LUA_PushUserdata(gL, source, META_MOBJ);
-	lua_pushinteger(gL, damage);
-	lua_pushnil(gL);
-	while (lua_next(gL, -6)) {
-		lua_pushvalue(gL, -6); // target
-		lua_pushvalue(gL, -6); // inflictor
-		lua_pushvalue(gL, -6); // source
-		lua_pushvalue(gL, -6); // damage
-		if (lua_pcall(gL, 4, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_ShouldDamage
+		&& (hookp->s.mt == MT_NULL || hookp->s.mt == target->type))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, target, META_MOBJ);
+				LUA_PushUserdata(gL, inflictor, META_MOBJ);
+				LUA_PushUserdata(gL, source, META_MOBJ);
+				lua_pushinteger(gL, damage);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			if (lua_pcall(gL, 4, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (!lua_isnil(gL, -1))
+			{
+				if (lua_toboolean(gL, -1))
+					shouldDamage = 1; // Force yes
+				else
+					shouldDamage = 2; // Force no
+			}
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (!lua_isnil(gL, -1))
-		{ // if nil, leave shouldDamage = 0.
-			if (lua_toboolean(gL, -1))
-				shouldDamage = 1; // Force yes
-			else
-				shouldDamage = 2; // Force no
-		}
-		lua_pop(gL, 1); // pop return value
-	}
-	lua_pop(gL, 5); // pop arguments and mobjtype table
 
-	lua_gc(gL, LUA_GCSTEP, 1);
+	lua_settop(gL, 0);
 	return shouldDamage;
 }
 
 // Hook for P_DamageMobj by mobj type (Mobj actually takes damage!)
 boolean LUAh_MobjDamage(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 damage)
 {
-	boolean handled = false;
+	hook_p hookp;
+	boolean hooked = false;
 	if (!gL || !(hooksAvailable[hook_MobjDamage/8] & (1<<(hook_MobjDamage%8))))
-		return false;
-
-	// clear the stack
-	lua_pop(gL, -1);
+		return 0;
 
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_MobjDamage);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+	lua_settop(gL, 0);
 
-	// mobjtype subtable
-	lua_rawgeti(gL, -1, target->type);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return false;
-	}
-	lua_remove(gL, -2); // remove hook table
-
-	LUA_PushUserdata(gL, target, META_MOBJ);
-	LUA_PushUserdata(gL, inflictor, META_MOBJ);
-	LUA_PushUserdata(gL, source, META_MOBJ);
-	lua_pushinteger(gL, damage);
-	lua_pushnil(gL);
-	while (lua_next(gL, -6)) {
-		lua_pushvalue(gL, -6); // target
-		lua_pushvalue(gL, -6); // inflictor
-		lua_pushvalue(gL, -6); // source
-		lua_pushvalue(gL, -6); // damage
-		if (lua_pcall(gL, 4, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_MobjDamage
+		&& (hookp->s.mt == MT_NULL || hookp->s.mt == target->type))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, target, META_MOBJ);
+				LUA_PushUserdata(gL, inflictor, META_MOBJ);
+				LUA_PushUserdata(gL, source, META_MOBJ);
+				lua_pushinteger(gL, damage);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			if (lua_pcall(gL, 4, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (lua_toboolean(gL, -1))
+				hooked = true;
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (lua_toboolean(gL, -1))
-			handled = true;
-		lua_pop(gL, 1); // pop return value
-	}
-	lua_pop(gL, 5); // pop arguments and mobjtype table
 
-	lua_gc(gL, LUA_GCSTEP, 1);
-	return handled;
+	lua_settop(gL, 0);
+	return hooked;
 }
 
 // Hook for P_KillMobj by mobj type
 boolean LUAh_MobjDeath(mobj_t *target, mobj_t *inflictor, mobj_t *source)
 {
-	boolean handled = false;
+	hook_p hookp;
+	boolean hooked = false;
 	if (!gL || !(hooksAvailable[hook_MobjDeath/8] & (1<<(hook_MobjDeath%8))))
-		return false;
-
-	// clear the stack
-	lua_pop(gL, -1);
+		return 0;
 
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_MobjDeath);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+	lua_settop(gL, 0);
 
-	// mobjtype subtable
-	lua_rawgeti(gL, -1, target->type);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return false;
-	}
-	lua_remove(gL, -2); // remove hook table
-
-	LUA_PushUserdata(gL, target, META_MOBJ);
-	LUA_PushUserdata(gL, inflictor, META_MOBJ);
-	LUA_PushUserdata(gL, source, META_MOBJ);
-	lua_pushnil(gL);
-	while (lua_next(gL, -5)) {
-		lua_pushvalue(gL, -5); // target
-		lua_pushvalue(gL, -5); // inflictor
-		lua_pushvalue(gL, -5); // source
-		if (lua_pcall(gL, 3, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_MobjDeath
+		&& (hookp->s.mt == MT_NULL || hookp->s.mt == target->type))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, target, META_MOBJ);
+				LUA_PushUserdata(gL, inflictor, META_MOBJ);
+				LUA_PushUserdata(gL, source, META_MOBJ);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -4);
+			lua_pushvalue(gL, -4);
+			lua_pushvalue(gL, -4);
+			if (lua_pcall(gL, 3, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (lua_toboolean(gL, -1))
+				hooked = true;
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (lua_toboolean(gL, -1))
-			handled = true;
-		lua_pop(gL, 1); // pop return value
-	}
-	lua_pop(gL, 4); // pop arguments and mobjtype table
 
-	lua_gc(gL, LUA_GCSTEP, 1);
-	return handled;
+	lua_settop(gL, 0);
+	return hooked;
 }
 
 // Hook for B_BuildTiccmd
 boolean LUAh_BotTiccmd(player_t *bot, ticcmd_t *cmd)
 {
+	hook_p hookp;
 	boolean hooked = false;
 	if (!gL || !(hooksAvailable[hook_BotTiccmd/8] & (1<<(hook_BotTiccmd%8))))
 		return false;
 
-	// clear the stack
-	lua_pop(gL, -1);
-
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_BotTiccmd);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	LUA_PushUserdata(gL, bot, META_PLAYER);
-	LUA_PushUserdata(gL, cmd, META_TICCMD);
-
-	lua_pushnil(gL);
-	while (lua_next(gL, 1)) {
-		lua_pushvalue(gL, 2); // bot
-		lua_pushvalue(gL, 3); // cmd
-		if (lua_pcall(gL, 2, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	lua_settop(gL, 0);
+
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_BotTiccmd)
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, bot, META_PLAYER);
+				LUA_PushUserdata(gL, cmd, META_TICCMD);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -3);
+			lua_pushvalue(gL, -3);
+			if (lua_pcall(gL, 2, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (lua_toboolean(gL, -1))
+				hooked = true;
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (lua_toboolean(gL, -1))
-			hooked = true;
-		lua_pop(gL, 1); // pop return value
-	}
 
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCSTEP, 1);
+	lua_settop(gL, 0);
 	return hooked;
 }
 
 // Hook for B_BuildTailsTiccmd by skin name
 boolean LUAh_BotAI(mobj_t *sonic, mobj_t *tails, ticcmd_t *cmd)
 {
-	if (!gL || !tails->skin || !(hooksAvailable[hook_BotAI/8] & (1<<(hook_BotAI%8))))
-		return false;
-
-	// clear the stack
-	lua_pop(gL, -1);
-
-	// hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_BotAI);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	// bot skin ai function
-	lua_getfield(gL, 1, ((skin_t *)tails->skin)->name);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return false;
-	}
-	lua_remove(gL, 1); // pop the hook table
-
-	// Takes sonic, tails
-	// Returns forward, backward, left, right, jump, spin
-	LUA_PushUserdata(gL, sonic, META_MOBJ);
-	LUA_PushUserdata(gL, tails, META_MOBJ);
-	if (lua_pcall(gL, 2, 8, 0)) {
-		CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
-		lua_pop(gL,-1);
+	hook_p hookp;
+	boolean hooked = false;
+	if (!gL || !(hooksAvailable[hook_BotAI/8] & (1<<(hook_BotAI%8))))
 		return false;
-	}
 
-	// This turns forward, backward, left, right, jump, and spin into a proper ticcmd for tails.
-	if (lua_istable(gL, 1)) {
-		boolean forward=false, backward=false, left=false, right=false, strafeleft=false, straferight=false, jump=false, spin=false;
+	lua_settop(gL, 0);
 
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_BotAI
+		&& (hookp->s.skinname == NULL || !strcmp(hookp->s.skinname, ((skin_t*)tails->skin)->name)))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, sonic, META_MOBJ);
+				LUA_PushUserdata(gL, tails, META_MOBJ);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -3);
+			lua_pushvalue(gL, -3);
+			if (lua_pcall(gL, 2, 8, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+
+			// This turns forward, backward, left, right, jump, and spin into a proper ticcmd for tails.
+			if (lua_istable(gL, 2+1)) {
+				boolean forward=false, backward=false, left=false, right=false, strafeleft=false, straferight=false, jump=false, spin=false;
 #define CHECKFIELD(field) \
-		lua_getfield(gL, 1, #field);\
-		if (lua_toboolean(gL, -1))\
-			field = true;\
-		lua_pop(gL, 1);
-
-		CHECKFIELD(forward)
-		CHECKFIELD(backward)
-		CHECKFIELD(left)
-		CHECKFIELD(right)
-		CHECKFIELD(strafeleft)
-		CHECKFIELD(straferight)
-		CHECKFIELD(jump)
-		CHECKFIELD(spin)
-
+				lua_getfield(gL, 2+1, #field);\
+				if (lua_toboolean(gL, -1))\
+					field = true;\
+				lua_pop(gL, 1);
+
+				CHECKFIELD(forward)
+				CHECKFIELD(backward)
+				CHECKFIELD(left)
+				CHECKFIELD(right)
+				CHECKFIELD(strafeleft)
+				CHECKFIELD(straferight)
+				CHECKFIELD(jump)
+				CHECKFIELD(spin)
 #undef CHECKFIELD
+				B_KeysToTiccmd(tails, cmd, forward, backward, left, right, strafeleft, straferight, jump, spin);
+			} else
+				B_KeysToTiccmd(tails, cmd, lua_toboolean(gL, 2+1), lua_toboolean(gL, 2+2), lua_toboolean(gL, 2+3), lua_toboolean(gL, 2+4), lua_toboolean(gL, 2+5), lua_toboolean(gL, 2+6), lua_toboolean(gL, 2+7), lua_toboolean(gL, 2+8));
 
-		B_KeysToTiccmd(tails, cmd, forward, backward, left, right, strafeleft, straferight, jump, spin);
-	} else
-		B_KeysToTiccmd(tails, cmd, lua_toboolean(gL, 1), lua_toboolean(gL, 2), lua_toboolean(gL, 3), lua_toboolean(gL, 4), lua_toboolean(gL, 5), lua_toboolean(gL, 6), lua_toboolean(gL, 7), lua_toboolean(gL, 8));
+			lua_pop(gL, 8);
+			hooked = true;
+		}
 
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCSTEP, 1);
-	return true;
+	lua_settop(gL, 0);
+	return hooked;
 }
 
 // Hook for linedef executors
 boolean LUAh_LinedefExecute(line_t *line, mobj_t *mo, sector_t *sector)
 {
+	hook_p hookp;
+	boolean hooked = false;
 	if (!gL || !(hooksAvailable[hook_LinedefExecute/8] & (1<<(hook_LinedefExecute%8))))
-		return false;
-
-	// clear the stack
-	lua_pop(gL, -1);
-
-	// get hook table
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_LinedefExecute);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
+		return 0;
 
-	// get function by line text
-	lua_getfield(gL, 1, line->text);
-	if (lua_isnil(gL, -1)) {
-		lua_pop(gL, 2);
-		return false;
-	}
-	lua_remove(gL, 1); // pop hook table off the stack
+	lua_settop(gL, 0);
 
-	LUA_PushUserdata(gL, line, META_LINE);
-	LUA_PushUserdata(gL, mo, META_MOBJ);
-	LUA_PushUserdata(gL, sector, META_SECTOR);
-	LUA_Call(gL, 3); // pops hook function, line, mo, sector
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_LinedefExecute
+		&& !strcmp(hookp->s.funcname, line->text))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, line, META_LINE);
+				LUA_PushUserdata(gL, mo, META_MOBJ);
+				LUA_PushUserdata(gL, sector, META_SECTOR);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -4);
+			lua_pushvalue(gL, -4);
+			lua_pushvalue(gL, -4);
+			LUA_Call(gL, 3);
+			hooked = true;
+		}
 
-	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCSTEP, 1);
-	return true;
+	lua_settop(gL, 0);
+	return hooked;
 }
 
-// Hook for PlayerMsg -Red
+// Hook for player chat
 boolean LUAh_PlayerMsg(int source, int target, int flags, char *msg)
 {
-	boolean handled = false;
-
+	hook_p hookp;
+	boolean hooked = false;
 	if (!gL || !(hooksAvailable[hook_PlayerMsg/8] & (1<<(hook_PlayerMsg%8))))
 		return false;
 
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_PlayerMsg);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	LUA_PushUserdata(gL, &players[source], META_PLAYER); // Source player
-
-	if (flags & 2 /*HU_CSAY*/) { // csay TODO: make HU_CSAY accessible outside hu_stuff.c
-		lua_pushinteger(gL, 3); // type
-		lua_pushnil(gL); // target
-	} else if (target == -1) { // sayteam
-		lua_pushinteger(gL, 1); // type
-		lua_pushnil(gL); // target
-	} else if (target == 0) { // say
-		lua_pushinteger(gL, 0); // type
-		lua_pushnil(gL); // target
-	} else { // sayto
-		lua_pushinteger(gL, 2); // type
-		LUA_PushUserdata(gL, &players[target-1], META_PLAYER); // target
-	}
-
-	lua_pushstring(gL, msg); // msg
+	lua_settop(gL, 0);
 
-	lua_pushnil(gL);
-
-	while (lua_next(gL, -6)) {
-		lua_pushvalue(gL, -6); // source
-		lua_pushvalue(gL, -6); // type
-		lua_pushvalue(gL, -6); // target
-		lua_pushvalue(gL, -6); // msg
-		if (lua_pcall(gL, 4, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_PlayerMsg)
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, &players[source], META_PLAYER); // Source player
+				if (flags & 2 /*HU_CSAY*/) { // csay TODO: make HU_CSAY accessible outside hu_stuff.c
+					lua_pushinteger(gL, 3); // type
+					lua_pushnil(gL); // target
+				} else if (target == -1) { // sayteam
+					lua_pushinteger(gL, 1); // type
+					lua_pushnil(gL); // target
+				} else if (target == 0) { // say
+					lua_pushinteger(gL, 0); // type
+					lua_pushnil(gL); // target
+				} else { // sayto
+					lua_pushinteger(gL, 2); // type
+					LUA_PushUserdata(gL, &players[target-1], META_PLAYER); // target
+				}
+				lua_pushstring(gL, msg); // msg
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			lua_pushvalue(gL, -5);
+			if (lua_pcall(gL, 4, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (lua_toboolean(gL, -1))
+				hooked = true;
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (lua_toboolean(gL, -1))
-			handled = true;
-		lua_pop(gL, 1); // pop return value
-	}
-	lua_pop(gL, 4); // pop arguments and mobjtype table
 
-	lua_gc(gL, LUA_GCSTEP, 1);
-	return handled;
+	lua_settop(gL, 0);
+	return hooked;
 }
 
-// Hook for hurt messages -Red
-// The internal name is DeathMsg, but the API name is "HurtMsg". Keep that in mind. (Should this be fixed at some point?)
-// @TODO This hook should be fixed to take mobj type at the addHook parameter to compare to inflictor. (I couldn't get this to work without crashing)
-boolean LUAh_DeathMsg(player_t *player, mobj_t *inflictor, mobj_t *source)
+// Hook for hurt messages
+boolean LUAh_HurtMsg(player_t *player, mobj_t *inflictor, mobj_t *source)
 {
-	boolean handled = false;
-
-	if (!gL || !(hooksAvailable[hook_DeathMsg/8] & (1<<(hook_DeathMsg%8))))
+	hook_p hookp;
+	boolean hooked = false;
+	if (!gL || !(hooksAvailable[hook_HurtMsg/8] & (1<<(hook_HurtMsg%8))))
 		return false;
 
-	lua_getfield(gL, LUA_REGISTRYINDEX, "hook");
-	I_Assert(lua_istable(gL, -1));
-	lua_rawgeti(gL, -1, hook_DeathMsg);
-	lua_remove(gL, -2);
-	I_Assert(lua_istable(gL, -1));
-
-	LUA_PushUserdata(gL, player, META_PLAYER); // Player
-	LUA_PushUserdata(gL, inflictor, META_MOBJ); // Inflictor
-	LUA_PushUserdata(gL, source, META_MOBJ); // Source
-
-	lua_pushnil(gL);
+	lua_settop(gL, 0);
 
-	while (lua_next(gL, -5)) {
-		lua_pushvalue(gL, -5); // player
-		lua_pushvalue(gL, -5); // inflictor
-		lua_pushvalue(gL, -5); // source
-		if (lua_pcall(gL, 3, 1, 0)) {
-			CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL,-1));
+	for (hookp = roothook; hookp; hookp = hookp->next)
+		if (hookp->type == hook_HurtMsg
+		&& (hookp->s.mt == MT_NULL || (inflictor && hookp->s.mt == inflictor->type)))
+		{
+			if (lua_gettop(gL) == 0)
+			{
+				LUA_PushUserdata(gL, player, META_PLAYER);
+				LUA_PushUserdata(gL, inflictor, META_MOBJ);
+				LUA_PushUserdata(gL, source, META_MOBJ);
+			}
+			lua_pushfstring(gL, FMT_HOOKID, hookp->id);
+			lua_gettable(gL, LUA_REGISTRYINDEX);
+			lua_pushvalue(gL, -4);
+			lua_pushvalue(gL, -4);
+			lua_pushvalue(gL, -4);
+			if (lua_pcall(gL, 3, 1, 0)) {
+				if (!hookp->error || cv_debug & DBG_LUA)
+					CONS_Alert(CONS_WARNING,"%s\n",lua_tostring(gL, -1));
+				lua_pop(gL, 1);
+				hookp->error = true;
+				continue;
+			}
+			if (lua_toboolean(gL, -1))
+				hooked = true;
 			lua_pop(gL, 1);
-			continue;
 		}
-		if (lua_toboolean(gL, -1))
-			handled = true;
-		lua_pop(gL, 1); // pop return value
-	}
-	lua_pop(gL, 3); // pop arguments and mobjtype table
 
-	lua_gc(gL, LUA_GCSTEP, 1);
-	return handled;
+	lua_settop(gL, 0);
+	return hooked;
 }
 
 #endif
diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c
index 86ff11337a6fcd02e763da75ee612eb5ee789d1d..5a83d95b56a6a3a39cf7d0364c39a2866964dd26 100644
--- a/src/lua_hudlib.c
+++ b/src/lua_hudlib.c
@@ -674,8 +674,6 @@ void LUAh_GameHUD(player_t *stplayr)
 		LUA_Call(gL, 3);
 	}
 	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCCOLLECT, 0);
-
 	hud_running = false;
 }
 
@@ -701,8 +699,6 @@ void LUAh_ScoresHUD(void)
 		LUA_Call(gL, 1);
 	}
 	lua_pop(gL, -1);
-	lua_gc(gL, LUA_GCCOLLECT, 0);
-
 	hud_running = false;
 }
 
diff --git a/src/lua_infolib.c b/src/lua_infolib.c
index 61c64a8f69f195c6247406bcd8491b135691945d..a983bb00295a348e16dbabb77377c889e223bf17 100644
--- a/src/lua_infolib.c
+++ b/src/lua_infolib.c
@@ -175,8 +175,6 @@ static void A_Lua(mobj_t *actor)
 		--superstack;
 		superactions[superstack] = NULL;
 	}
-
-	lua_gc(gL, LUA_GCSTEP, 1);
 }
 
 // Arbitrary states[] table index -> state_t *
@@ -548,11 +546,11 @@ static int lib_setMobjInfo(lua_State *L)
 		else if (i == 15 || (str && fastcmp(str,"deathsound")))
 			info->deathsound = luaL_checkinteger(L, 3);
 		else if (i == 16 || (str && fastcmp(str,"speed")))
-			info->speed = (fixed_t)luaL_checkinteger(L, 3);
+			info->speed = luaL_checkfixed(L, 3);
 		else if (i == 17 || (str && fastcmp(str,"radius")))
-			info->radius = (fixed_t)luaL_checkinteger(L, 3);
+			info->radius = luaL_checkfixed(L, 3);
 		else if (i == 18 || (str && fastcmp(str,"height")))
-			info->height = (fixed_t)luaL_checkinteger(L, 3);
+			info->height = luaL_checkfixed(L, 3);
 		else if (i == 19 || (str && fastcmp(str,"dispoffset")))
 			info->dispoffset = (INT32)luaL_checkinteger(L, 3);
 		else if (i == 20 || (str && fastcmp(str,"mass")))
@@ -618,11 +616,11 @@ static int mobjinfo_get(lua_State *L)
 	else if (fastcmp(field,"deathsound"))
 		lua_pushinteger(L, info->deathsound);
 	else if (fastcmp(field,"speed"))
-		lua_pushinteger(L, info->speed);
+		lua_pushinteger(L, info->speed); // sometimes it's fixed_t, sometimes it's not...
 	else if (fastcmp(field,"radius"))
-		lua_pushinteger(L, info->radius);
+		lua_pushfixed(L, info->radius);
 	else if (fastcmp(field,"height"))
-		lua_pushinteger(L, info->height);
+		lua_pushfixed(L, info->height);
 	else if (fastcmp(field,"dispoffset"))
 		lua_pushinteger(L, info->dispoffset);
 	else if (fastcmp(field,"mass"))
@@ -694,11 +692,11 @@ static int mobjinfo_set(lua_State *L)
 	else if (fastcmp(field,"deathsound"))
 		info->deathsound = luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"speed"))
-		info->speed = (fixed_t)luaL_checkinteger(L, 3);
+		info->speed = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"radius"))
-		info->radius = (fixed_t)luaL_checkinteger(L, 3);
+		info->radius = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"height"))
-		info->height = (fixed_t)luaL_checkinteger(L, 3);
+		info->height = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"dispoffset"))
 		info->dispoffset = (INT32)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"mass"))
diff --git a/src/lua_maplib.c b/src/lua_maplib.c
index e5cc30c12571a3ce8f047f257add6fb0bf062841..0a12478cae32a289b3f4c9dda204bbf0d253f610 100644
--- a/src/lua_maplib.c
+++ b/src/lua_maplib.c
@@ -280,10 +280,10 @@ static int sector_get(lua_State *L)
 		lua_pushboolean(L, 1);
 		return 1;
 	case sector_floorheight:
-		lua_pushinteger(L, sector->floorheight);
+		lua_pushfixed(L, sector->floorheight);
 		return 1;
 	case sector_ceilingheight:
-		lua_pushinteger(L, sector->ceilingheight);
+		lua_pushfixed(L, sector->ceilingheight);
 		return 1;
 	case sector_floorpic: { // floorpic
 		levelflat_t *levelflat;
@@ -396,26 +396,30 @@ static int sector_set(lua_State *L)
 		return luaL_error(L, "sector_t field " LUA_QS " cannot be set.", sector_opt[field]);
 	case sector_floorheight: { // floorheight
 		boolean flag;
+		mobj_t *ptmthing = tmthing;
 		fixed_t lastpos = sector->floorheight;
-		sector->floorheight = (fixed_t)luaL_checkinteger(L, 3);
+		sector->floorheight = luaL_checkfixed(L, 3);
 		flag = P_CheckSector(sector, true);
 		if (flag && sector->numattached)
 		{
 			sector->floorheight = lastpos;
 			P_CheckSector(sector, true);
 		}
+		P_SetTarget(&tmthing, ptmthing);
 		break;
 	}
 	case sector_ceilingheight: { // ceilingheight
 		boolean flag;
+		mobj_t *ptmthing = tmthing;
 		fixed_t lastpos = sector->ceilingheight;
-		sector->ceilingheight = (fixed_t)luaL_checkinteger(L, 3);
+		sector->ceilingheight = luaL_checkfixed(L, 3);
 		flag = P_CheckSector(sector, true);
 		if (flag && sector->numattached)
 		{
 			sector->ceilingheight = lastpos;
 			P_CheckSector(sector, true);
 		}
+		P_SetTarget(&tmthing, ptmthing);
 		break;
 	}
 	case sector_floorpic:
@@ -509,10 +513,10 @@ static int line_get(lua_State *L)
 		LUA_PushUserdata(L, line->v2, META_VERTEX);
 		return 1;
 	case line_dx:
-		lua_pushinteger(L, line->dx);
+		lua_pushfixed(L, line->dx);
 		return 1;
 	case line_dy:
-		lua_pushinteger(L, line->dy);
+		lua_pushfixed(L, line->dy);
 		return 1;
 	case line_flags:
 		lua_pushinteger(L, line->flags);
@@ -628,10 +632,10 @@ static int side_get(lua_State *L)
 		lua_pushboolean(L, 1);
 		return 1;
 	case side_textureoffset:
-		lua_pushinteger(L, side->textureoffset);
+		lua_pushfixed(L, side->textureoffset);
 		return 1;
 	case side_rowoffset:
-		lua_pushinteger(L, side->rowoffset);
+		lua_pushfixed(L, side->rowoffset);
 		return 1;
 	case side_toptexture:
 		lua_pushinteger(L, side->toptexture);
@@ -658,6 +662,50 @@ static int side_get(lua_State *L)
 	return 0;
 }
 
+static int side_set(lua_State *L)
+{
+	side_t *side = *((side_t **)luaL_checkudata(L, 1, META_SIDE));
+	enum side_e field = luaL_checkoption(L, 2, side_opt[0], side_opt);
+
+	if (!side)
+	{
+		if (field == side_valid) {
+			lua_pushboolean(L, 0);
+			return 1;
+		}
+		return luaL_error(L, "accessed side_t doesn't exist anymore.");
+	}
+
+	switch(field)
+	{
+	case side_valid: // valid
+	case side_sector:
+	case side_special:
+	case side_text:
+	default:
+		return luaL_error(L, "side_t field " LUA_QS " cannot be set.", side_opt[field]);
+	case side_textureoffset:
+		side->textureoffset = luaL_checkfixed(L, 3);
+		break;
+	case side_rowoffset:
+		side->rowoffset = luaL_checkfixed(L, 3);
+		break;
+	case side_toptexture:
+        side->toptexture = luaL_checkinteger(L, 3);
+		break;
+	case side_bottomtexture:
+        side->bottomtexture = luaL_checkinteger(L, 3);
+		break;
+	case side_midtexture:
+        side->midtexture = luaL_checkinteger(L, 3);
+		break;
+	case side_repeatcnt:
+        side->repeatcnt = luaL_checkinteger(L, 3);
+		break;
+	}
+	return 0;
+}
+
 static int side_num(lua_State *L)
 {
 	side_t *side = *((side_t **)luaL_checkudata(L, 1, META_SIDE));
@@ -685,13 +733,13 @@ static int vertex_get(lua_State *L)
 		lua_pushboolean(L, 1);
 		return 1;
 	case vertex_x:
-		lua_pushinteger(L, vertex->x);
+		lua_pushfixed(L, vertex->x);
 		return 1;
 	case vertex_y:
-		lua_pushinteger(L, vertex->y);
+		lua_pushfixed(L, vertex->y);
 		return 1;
 	case vertex_z:
-		lua_pushinteger(L, vertex->z);
+		lua_pushfixed(L, vertex->z);
 		return 1;
 	}
 	return 0;
@@ -954,7 +1002,7 @@ static int ffloor_get(lua_State *L)
 		lua_pushboolean(L, 1);
 		return 1;
 	case ffloor_topheight:
-		lua_pushinteger(L, *ffloor->topheight);
+		lua_pushfixed(L, *ffloor->topheight);
 		return 1;
 	case ffloor_toppic: { // toppic
 		levelflat_t *levelflat;
@@ -968,7 +1016,7 @@ static int ffloor_get(lua_State *L)
 		lua_pushinteger(L, *ffloor->toplightlevel);
 		return 1;
 	case ffloor_bottomheight:
-		lua_pushinteger(L, *ffloor->bottomheight);
+		lua_pushfixed(L, *ffloor->bottomheight);
 		return 1;
 	case ffloor_bottompic: { // bottompic
 		levelflat_t *levelflat;
@@ -1027,14 +1075,16 @@ static int ffloor_set(lua_State *L)
 	case ffloor_topheight: { // topheight
 		boolean flag;
 		fixed_t lastpos = *ffloor->topheight;
+		mobj_t *ptmthing = tmthing;
 		sector_t *sector = &sectors[ffloor->secnum];
-		sector->ceilingheight = (fixed_t)luaL_checkinteger(L, 3);
+		sector->ceilingheight = luaL_checkfixed(L, 3);
 		flag = P_CheckSector(sector, true);
 		if (flag && sector->numattached)
 		{
 			*ffloor->topheight = lastpos;
 			P_CheckSector(sector, true);
 		}
+		P_SetTarget(&tmthing, ptmthing);
 		break;
 	}
 	case ffloor_toppic:
@@ -1046,14 +1096,16 @@ static int ffloor_set(lua_State *L)
 	case ffloor_bottomheight: { // bottomheight
 		boolean flag;
 		fixed_t lastpos = *ffloor->bottomheight;
+		mobj_t *ptmthing = tmthing;
 		sector_t *sector = &sectors[ffloor->secnum];
-		sector->floorheight = (fixed_t)luaL_checkinteger(L, 3);
+		sector->floorheight = luaL_checkfixed(L, 3);
 		flag = P_CheckSector(sector, true);
 		if (flag && sector->numattached)
 		{
 			*ffloor->bottomheight = lastpos;
 			P_CheckSector(sector, true);
 		}
+		P_SetTarget(&tmthing, ptmthing);
 		break;
 	}
 	case ffloor_bottompic:
@@ -1214,6 +1266,9 @@ int LUA_MapLib(lua_State *L)
 		lua_pushcfunction(L, side_get);
 		lua_setfield(L, -2, "__index");
 
+		lua_pushcfunction(L, side_set);
+		lua_setfield(L, -2, "__newindex");
+
 		lua_pushcfunction(L, side_num);
 		lua_setfield(L, -2, "__len");
 	lua_pop(L, 1);
diff --git a/src/lua_mathlib.c b/src/lua_mathlib.c
index f8b33ffd2ad08bfc10de72dc7e2195e91a2bd9c6..8ca2e17af8283bfc9fcdd2eab28a6d8131bfa6b6 100644
--- a/src/lua_mathlib.c
+++ b/src/lua_mathlib.c
@@ -47,37 +47,37 @@ static int lib_max(lua_State *L)
 
 static int lib_fixedangle(lua_State *L)
 {
-	lua_pushinteger(L, FixedAngle((fixed_t)luaL_checkinteger(L, 1)));
+	lua_pushangle(L, FixedAngle(luaL_checkfixed(L, 1)));
 	return 1;
 }
 
 static int lib_anglefixed(lua_State *L)
 {
-	lua_pushinteger(L, AngleFixed((angle_t)luaL_checkinteger(L, 1)));
+	lua_pushfixed(L, AngleFixed(luaL_checkangle(L, 1)));
 	return 1;
 }
 
 static int lib_invangle(lua_State *L)
 {
-	lua_pushinteger(L, InvAngle((angle_t)luaL_checkinteger(L, 1)));
+	lua_pushangle(L, InvAngle(luaL_checkangle(L, 1)));
 	return 1;
 }
 
 static int lib_finesine(lua_State *L)
 {
-	lua_pushinteger(L, FINESINE((luaL_checkinteger(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
+	lua_pushfixed(L, FINESINE((luaL_checkangle(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
 	return 1;
 }
 
 static int lib_finecosine(lua_State *L)
 {
-	lua_pushinteger(L, FINECOSINE((luaL_checkinteger(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
+	lua_pushfixed(L, FINECOSINE((luaL_checkangle(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
 	return 1;
 }
 
 static int lib_finetangent(lua_State *L)
 {
-	lua_pushinteger(L, FINETANGENT((luaL_checkinteger(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
+	lua_pushfixed(L, FINETANGENT((luaL_checkangle(L, 1)>>ANGLETOFINESHIFT) & FINEMASK));
 	return 1;
 }
 
@@ -86,61 +86,61 @@ static int lib_finetangent(lua_State *L)
 
 static int lib_fixedmul(lua_State *L)
 {
-	lua_pushinteger(L, FixedMul((fixed_t)luaL_checkinteger(L, 1), (fixed_t)luaL_checkinteger(L, 2)));
+	lua_pushfixed(L, FixedMul(luaL_checkfixed(L, 1), luaL_checkfixed(L, 2)));
 	return 1;
 }
 
 static int lib_fixedint(lua_State *L)
 {
-	lua_pushinteger(L, FixedInt((fixed_t)luaL_checkinteger(L, 1)));
+	lua_pushinteger(L, FixedInt(luaL_checkfixed(L, 1)));
 	return 1;
 }
 
 static int lib_fixeddiv(lua_State *L)
 {
-	lua_pushinteger(L, FixedDiv((fixed_t)luaL_checkinteger(L, 1), (fixed_t)luaL_checkinteger(L, 2)));
+	lua_pushfixed(L, FixedDiv(luaL_checkfixed(L, 1), luaL_checkfixed(L, 2)));
 	return 1;
 }
 
 static int lib_fixedrem(lua_State *L)
 {
-	lua_pushinteger(L, FixedRem((fixed_t)luaL_checkinteger(L, 1), (fixed_t)luaL_checkinteger(L, 2)));
+	lua_pushfixed(L, FixedRem(luaL_checkfixed(L, 1), luaL_checkfixed(L, 2)));
 	return 1;
 }
 
 static int lib_fixedsqrt(lua_State *L)
 {
-	lua_pushinteger(L, FixedSqrt((fixed_t)luaL_checkinteger(L, 1)));
+	lua_pushfixed(L, FixedSqrt(luaL_checkfixed(L, 1)));
 	return 1;
 }
 
 static int lib_fixedhypot(lua_State *L)
 {
-	lua_pushinteger(L, FixedHypot((fixed_t)luaL_checkinteger(L, 1), (fixed_t)luaL_checkinteger(L, 2)));
+	lua_pushfixed(L, FixedHypot(luaL_checkfixed(L, 1), luaL_checkfixed(L, 2)));
 	return 1;
 }
 
 static int lib_fixedfloor(lua_State *L)
 {
-	lua_pushinteger(L, FixedFloor((fixed_t)luaL_checkinteger(L, 1)));
+	lua_pushfixed(L, FixedFloor(luaL_checkfixed(L, 1)));
 	return 1;
 }
 
 static int lib_fixedtrunc(lua_State *L)
 {
-	lua_pushinteger(L, FixedTrunc((fixed_t)luaL_checkinteger(L, 1)));
+	lua_pushfixed(L, FixedTrunc(luaL_checkfixed(L, 1)));
 	return 1;
 }
 
 static int lib_fixedceil(lua_State *L)
 {
-	lua_pushinteger(L, FixedCeil((fixed_t)luaL_checkinteger(L, 1)));
+	lua_pushfixed(L, FixedCeil(luaL_checkfixed(L, 1)));
 	return 1;
 }
 
 static int lib_fixedround(lua_State *L)
 {
-	lua_pushinteger(L, FixedRound((fixed_t)luaL_checkinteger(L, 1)));
+	lua_pushfixed(L, FixedRound(luaL_checkfixed(L, 1)));
 	return 1;
 }
 
@@ -156,7 +156,7 @@ static int lib_getsecspecial(lua_State *L)
 
 static int lib_all7emeralds(lua_State *L)
 {
-	lua_pushinteger(L, ALL7EMERALDS(luaL_checkinteger(L, 1)));
+	lua_pushboolean(L, ALL7EMERALDS(luaL_checkinteger(L, 1)));
 	return 1;
 }
 
diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c
index cf4db8f398aee2e765f51560a47001eabcd31202..83e7039e4bbacb68079f78d62020bdb388a1f3ac 100644
--- a/src/lua_mobjlib.c
+++ b/src/lua_mobjlib.c
@@ -162,13 +162,13 @@ static int mobj_get(lua_State *L)
 		lua_pushboolean(L, 1);
 		break;
 	case mobj_x:
-		lua_pushinteger(L, mo->x);
+		lua_pushfixed(L, mo->x);
 		break;
 	case mobj_y:
-		lua_pushinteger(L, mo->y);
+		lua_pushfixed(L, mo->y);
 		break;
 	case mobj_z:
-		lua_pushinteger(L, mo->z);
+		lua_pushfixed(L, mo->z);
 		break;
 	case mobj_snext:
 		LUA_PushUserdata(L, mo->snext, META_MOBJ);
@@ -179,7 +179,7 @@ static int mobj_get(lua_State *L)
 		// i.e. it will always ultimately point to THIS mobj -- so that's actually not useful to Lua and won't be included.
 		return UNIMPLEMENTED;
 	case mobj_angle:
-		lua_pushinteger(L, mo->angle);
+		lua_pushangle(L, mo->angle);
 		break;
 	case mobj_sprite:
 		lua_pushinteger(L, mo->sprite);
@@ -193,28 +193,28 @@ static int mobj_get(lua_State *L)
 		LUA_PushUserdata(L, mo->subsector, META_SUBSECTOR);
 		break;
 	case mobj_floorz:
-		lua_pushinteger(L, mo->floorz);
+		lua_pushfixed(L, mo->floorz);
 		break;
 	case mobj_ceilingz:
-		lua_pushinteger(L, mo->ceilingz);
+		lua_pushfixed(L, mo->ceilingz);
 		break;
 	case mobj_radius:
-		lua_pushinteger(L, mo->radius);
+		lua_pushfixed(L, mo->radius);
 		break;
 	case mobj_height:
-		lua_pushinteger(L, mo->height);
+		lua_pushfixed(L, mo->height);
 		break;
 	case mobj_momx:
-		lua_pushinteger(L, mo->momx);
+		lua_pushfixed(L, mo->momx);
 		break;
 	case mobj_momy:
-		lua_pushinteger(L, mo->momy);
+		lua_pushfixed(L, mo->momy);
 		break;
 	case mobj_momz:
-		lua_pushinteger(L, mo->momz);
+		lua_pushfixed(L, mo->momz);
 		break;
 	case mobj_pmomz:
-		lua_pushinteger(L, mo->pmomz);
+		lua_pushfixed(L, mo->pmomz);
 		break;
 	case mobj_tics:
 		lua_pushinteger(L, mo->tics);
@@ -299,32 +299,32 @@ static int mobj_get(lua_State *L)
 		LUA_PushUserdata(L, mo->tracer, META_MOBJ);
 		break;
 	case mobj_friction:
-		lua_pushinteger(L, mo->friction);
+		lua_pushfixed(L, mo->friction);
 		break;
 	case mobj_movefactor:
-		lua_pushinteger(L, mo->movefactor);
+		lua_pushfixed(L, mo->movefactor);
 		break;
 	case mobj_fuse:
 		lua_pushinteger(L, mo->fuse);
 		break;
 	case mobj_watertop:
-		lua_pushinteger(L, mo->watertop);
+		lua_pushfixed(L, mo->watertop);
 		break;
 	case mobj_waterbottom:
-		lua_pushinteger(L, mo->waterbottom);
+		lua_pushfixed(L, mo->waterbottom);
 		break;
 	case mobj_mobjnum:
 		// mobjnum is a networking thing generated for $$$.sav
 		// and therefore shouldn't be used by Lua.
 		return UNIMPLEMENTED;
 	case mobj_scale:
-		lua_pushinteger(L, mo->scale);
+		lua_pushfixed(L, mo->scale);
 		break;
 	case mobj_destscale:
-		lua_pushinteger(L, mo->destscale);
+		lua_pushfixed(L, mo->destscale);
 		break;
 	case mobj_scalespeed:
-		lua_pushinteger(L, mo->scalespeed);
+		lua_pushfixed(L, mo->scalespeed);
 		break;
 	case mobj_extravalue1:
 		lua_pushinteger(L, mo->extravalue1);
@@ -382,7 +382,7 @@ static int mobj_set(lua_State *L)
 	{
 		// z doesn't cross sector bounds so it's okay.
 		mobj_t *ptmthing = tmthing;
-		mo->z = (fixed_t)luaL_checkinteger(L, 3);
+		mo->z = luaL_checkfixed(L, 3);
 		P_CheckPosition(mo, mo->x, mo->y);
 		mo->floorz = tmfloorz;
 		mo->ceilingz = tmceilingz;
@@ -394,7 +394,7 @@ static int mobj_set(lua_State *L)
 	case mobj_sprev:
 		return UNIMPLEMENTED;
 	case mobj_angle:
-		mo->angle = (angle_t)luaL_checkinteger(L, 3);
+		mo->angle = luaL_checkangle(L, 3);
 		if (mo->player == &players[consoleplayer])
 			localangle = mo->angle;
 		else if (mo->player == &players[secondarydisplayplayer])
@@ -417,7 +417,7 @@ static int mobj_set(lua_State *L)
 	case mobj_radius:
 	{
 		mobj_t *ptmthing = tmthing;
-		mo->radius = (fixed_t)luaL_checkinteger(L, 3);
+		mo->radius = luaL_checkfixed(L, 3);
 		if (mo->radius < 0)
 			mo->radius = 0;
 		P_CheckPosition(mo, mo->x, mo->y);
@@ -429,7 +429,7 @@ static int mobj_set(lua_State *L)
 	case mobj_height:
 	{
 		mobj_t *ptmthing = tmthing;
-		mo->height = (fixed_t)luaL_checkinteger(L, 3);
+		mo->height = luaL_checkfixed(L, 3);
 		if (mo->height < 0)
 			mo->height = 0;
 		P_CheckPosition(mo, mo->x, mo->y);
@@ -439,16 +439,17 @@ static int mobj_set(lua_State *L)
 		break;
 	}
 	case mobj_momx:
-		mo->momx = (fixed_t)luaL_checkinteger(L, 3);
+		mo->momx = luaL_checkfixed(L, 3);
 		break;
 	case mobj_momy:
-		mo->momy = (fixed_t)luaL_checkinteger(L, 3);
+		mo->momy = luaL_checkfixed(L, 3);
 		break;
 	case mobj_momz:
-		mo->momz = (fixed_t)luaL_checkinteger(L, 3);
+		mo->momz = luaL_checkfixed(L, 3);
 		break;
 	case mobj_pmomz:
-		mo->pmomz = (fixed_t)luaL_checkinteger(L, 3);
+		mo->pmomz = luaL_checkfixed(L, 3);
+		mo->eflags |= MFE_APPLYPMOMZ;
 		break;
 	case mobj_tics:
 		mo->tics = luaL_checkinteger(L, 3);
@@ -572,25 +573,25 @@ static int mobj_set(lua_State *L)
 		}
 		break;
 	case mobj_friction:
-		mo->friction = (fixed_t)luaL_checkinteger(L, 3);
+		mo->friction = luaL_checkfixed(L, 3);
 		break;
 	case mobj_movefactor:
-		mo->movefactor = (fixed_t)luaL_checkinteger(L, 3);
+		mo->movefactor = luaL_checkfixed(L, 3);
 		break;
 	case mobj_fuse:
 		mo->fuse = luaL_checkinteger(L, 3);
 		break;
 	case mobj_watertop:
-		mo->watertop = (fixed_t)luaL_checkinteger(L, 3);
+		mo->watertop = luaL_checkfixed(L, 3);
 		break;
 	case mobj_waterbottom:
-		mo->waterbottom = (fixed_t)luaL_checkinteger(L, 3);
+		mo->waterbottom = luaL_checkfixed(L, 3);
 		break;
 	case mobj_mobjnum:
 		return UNIMPLEMENTED;
 	case mobj_scale:
 	{
-		fixed_t scale = (fixed_t)luaL_checkinteger(L, 3);
+		fixed_t scale = luaL_checkfixed(L, 3);
 		if (scale < FRACUNIT/100)
 			scale = FRACUNIT/100;
 		mo->destscale = scale;
@@ -599,14 +600,14 @@ static int mobj_set(lua_State *L)
 	}
 	case mobj_destscale:
 	{
-		fixed_t scale = (fixed_t)luaL_checkinteger(L, 3);
+		fixed_t scale = luaL_checkfixed(L, 3);
 		if (scale < FRACUNIT/100)
 			scale = FRACUNIT/100;
 		mo->destscale = scale;
 		break;
 	}
 	case mobj_scalespeed:
-		mo->scalespeed = (fixed_t)luaL_checkinteger(L, 3);
+		mo->scalespeed = luaL_checkfixed(L, 3);
 		break;
 	case mobj_extravalue1:
 		mo->extravalue1 = luaL_checkinteger(L, 3);
diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c
index 7f64fff626e1fcec551daee0a20ded1b5c220917..64513ab9728e6a2e4c7723e3a80ef36ceb9bee59 100644
--- a/src/lua_playerlib.c
+++ b/src/lua_playerlib.c
@@ -109,15 +109,15 @@ static int player_get(lua_State *L)
 	else if (fastcmp(field,"playerstate"))
 		lua_pushinteger(L, plr->playerstate);
 	else if (fastcmp(field,"viewz"))
-		lua_pushinteger(L, plr->viewz);
+		lua_pushfixed(L, plr->viewz);
 	else if (fastcmp(field,"viewheight"))
-		lua_pushinteger(L, plr->viewheight);
+		lua_pushfixed(L, plr->viewheight);
 	else if (fastcmp(field,"deltaviewheight"))
-		lua_pushinteger(L, plr->deltaviewheight);
+		lua_pushfixed(L, plr->deltaviewheight);
 	else if (fastcmp(field,"bob"))
-		lua_pushinteger(L, plr->bob);
+		lua_pushfixed(L, plr->bob);
 	else if (fastcmp(field,"aiming"))
-		lua_pushinteger(L, plr->aiming);
+		lua_pushangle(L, plr->aiming);
 	else if (fastcmp(field,"health"))
 		lua_pushinteger(L, plr->health);
 	else if (fastcmp(field,"pity"))
@@ -141,13 +141,13 @@ static int player_get(lua_State *L)
 	else if (fastcmp(field,"score"))
 		lua_pushinteger(L, plr->score);
 	else if (fastcmp(field,"dashspeed"))
-		lua_pushinteger(L, plr->dashspeed);
+		lua_pushfixed(L, plr->dashspeed);
 	else if (fastcmp(field,"dashtime"))
 		lua_pushinteger(L, plr->dashtime);
 	else if (fastcmp(field,"normalspeed"))
-		lua_pushinteger(L, plr->normalspeed);
+		lua_pushfixed(L, plr->normalspeed);
 	else if (fastcmp(field,"runspeed"))
-		lua_pushinteger(L, plr->runspeed);
+		lua_pushfixed(L, plr->runspeed);
 	else if (fastcmp(field,"thrustfactor"))
 		lua_pushinteger(L, plr->thrustfactor);
 	else if (fastcmp(field,"accelstart"))
@@ -167,13 +167,13 @@ static int player_get(lua_State *L)
 	else if (fastcmp(field,"revitem"))
 		lua_pushinteger(L, plr->revitem);
 	else if (fastcmp(field,"actionspd"))
-		lua_pushinteger(L, plr->actionspd);
+		lua_pushfixed(L, plr->actionspd);
 	else if (fastcmp(field,"mindash"))
-		lua_pushinteger(L, plr->mindash);
+		lua_pushfixed(L, plr->mindash);
 	else if (fastcmp(field,"maxdash"))
-		lua_pushinteger(L, plr->maxdash);
+		lua_pushfixed(L, plr->maxdash);
 	else if (fastcmp(field,"jumpfactor"))
-		lua_pushinteger(L, plr->jumpfactor);
+		lua_pushfixed(L, plr->jumpfactor);
 	else if (fastcmp(field,"lives"))
 		lua_pushinteger(L, plr->lives);
 	else if (fastcmp(field,"continues"))
@@ -183,7 +183,7 @@ static int player_get(lua_State *L)
 	else if (fastcmp(field,"gotcontinue"))
 		lua_pushinteger(L, plr->gotcontinue);
 	else if (fastcmp(field,"speed"))
-		lua_pushinteger(L, plr->speed);
+		lua_pushfixed(L, plr->speed);
 	else if (fastcmp(field,"jumping"))
 		lua_pushboolean(L, plr->jumping);
 	else if (fastcmp(field,"secondjump"))
@@ -205,13 +205,13 @@ static int player_get(lua_State *L)
 	else if (fastcmp(field,"skidtime"))
 		lua_pushinteger(L, plr->skidtime);
 	else if (fastcmp(field,"cmomx"))
-		lua_pushinteger(L, plr->cmomx);
+		lua_pushfixed(L, plr->cmomx);
 	else if (fastcmp(field,"cmomy"))
-		lua_pushinteger(L, plr->cmomy);
+		lua_pushfixed(L, plr->cmomy);
 	else if (fastcmp(field,"rmomx"))
-		lua_pushinteger(L, plr->rmomx);
+		lua_pushfixed(L, plr->rmomx);
 	else if (fastcmp(field,"rmomy"))
-		lua_pushinteger(L, plr->rmomy);
+		lua_pushfixed(L, plr->rmomy);
 	else if (fastcmp(field,"numboxes"))
 		lua_pushinteger(L, plr->numboxes);
 	else if (fastcmp(field,"totalring"))
@@ -239,11 +239,11 @@ static int player_get(lua_State *L)
 	else if (fastcmp(field,"starposttime"))
 		lua_pushinteger(L, plr->starposttime);
 	else if (fastcmp(field,"starpostangle"))
-		lua_pushinteger(L, plr->starpostangle);
+		lua_pushangle(L, plr->starpostangle);
 	else if (fastcmp(field,"angle_pos"))
-		lua_pushinteger(L, plr->angle_pos);
+		lua_pushangle(L, plr->angle_pos);
 	else if (fastcmp(field,"old_angle_pos"))
-		lua_pushinteger(L, plr->old_angle_pos);
+		lua_pushangle(L, plr->old_angle_pos);
 	else if (fastcmp(field,"axis1"))
 		LUA_PushUserdata(L, plr->axis1, META_MOBJ);
 	else if (fastcmp(field,"axis2"))
@@ -305,16 +305,16 @@ static int player_get(lua_State *L)
 	else if (fastcmp(field,"awayviewtics"))
 		lua_pushinteger(L, plr->awayviewtics);
 	else if (fastcmp(field,"awayviewaiming"))
-		lua_pushinteger(L, plr->awayviewaiming);
+		lua_pushangle(L, plr->awayviewaiming);
 	else if (fastcmp(field,"spectator"))
-		lua_pushinteger(L, plr->spectator);
+		lua_pushboolean(L, plr->spectator);
 	else if (fastcmp(field,"bot"))
 		lua_pushinteger(L, plr->bot);
 	else if (fastcmp(field,"jointime"))
 		lua_pushinteger(L, plr->jointime);
 #ifdef HWRENDER
 	else if (fastcmp(field,"fovadd"))
-		lua_pushinteger(L, plr->fovadd);
+		lua_pushfixed(L, plr->fovadd);
 #endif
 	else {
 		lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS);
@@ -354,15 +354,15 @@ static int player_set(lua_State *L)
 	else if (fastcmp(field,"playerstate"))
 		plr->playerstate = luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"viewz"))
-		plr->viewz = (fixed_t)luaL_checkinteger(L, 3);
+		plr->viewz = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"viewheight"))
-		plr->viewheight = (fixed_t)luaL_checkinteger(L, 3);
+		plr->viewheight = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"deltaviewheight"))
-		plr->deltaviewheight = (fixed_t)luaL_checkinteger(L, 3);
+		plr->deltaviewheight = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"bob"))
-		plr->bob = (fixed_t)luaL_checkinteger(L, 3);
+		plr->bob = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"aiming")) {
-		plr->aiming = (angle_t)luaL_checkinteger(L, 3);
+		plr->aiming = luaL_checkangle(L, 3);
 		if (plr == &players[consoleplayer])
 			localaiming = plr->aiming;
 		else if (plr == &players[secondarydisplayplayer])
@@ -391,13 +391,13 @@ static int player_set(lua_State *L)
 	else if (fastcmp(field,"score"))
 		plr->score = (UINT32)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"dashspeed"))
-		plr->dashspeed = (fixed_t)luaL_checkinteger(L, 3);
+		plr->dashspeed = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"dashtime"))
 		plr->dashtime = (INT32)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"normalspeed"))
-		plr->normalspeed = (fixed_t)luaL_checkinteger(L, 3);
+		plr->normalspeed = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"runspeed"))
-		plr->runspeed = (fixed_t)luaL_checkinteger(L, 3);
+		plr->runspeed = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"thrustfactor"))
 		plr->thrustfactor = (UINT8)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"accelstart"))
@@ -433,7 +433,7 @@ static int player_set(lua_State *L)
 	else if (fastcmp(field,"gotcontinue"))
 		plr->gotcontinue = (UINT8)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"speed"))
-		plr->speed = (fixed_t)luaL_checkinteger(L, 3);
+		plr->speed = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"jumping"))
 		plr->jumping = luaL_checkboolean(L, 3);
 	else if (fastcmp(field,"secondjump"))
@@ -455,13 +455,13 @@ static int player_set(lua_State *L)
 	else if (fastcmp(field,"skidtime"))
 		plr->skidtime = (tic_t)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"cmomx"))
-		plr->cmomx = (fixed_t)luaL_checkinteger(L, 3);
+		plr->cmomx = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"cmomy"))
-		plr->cmomy = (fixed_t)luaL_checkinteger(L, 3);
+		plr->cmomy = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"rmomx"))
-		plr->rmomx = (fixed_t)luaL_checkinteger(L, 3);
+		plr->rmomx = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"rmomy"))
-		plr->rmomy = (fixed_t)luaL_checkinteger(L, 3);
+		plr->rmomy = luaL_checkfixed(L, 3);
 	else if (fastcmp(field,"numboxes"))
 		plr->numboxes = (INT16)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"totalring"))
@@ -489,11 +489,11 @@ static int player_set(lua_State *L)
 	else if (fastcmp(field,"starposttime"))
 		plr->starposttime = (tic_t)luaL_checkinteger(L, 3);
 	else if (fastcmp(field,"starpostangle"))
-		plr->starpostangle = (angle_t)luaL_checkinteger(L, 3);
+		plr->starpostangle = luaL_checkangle(L, 3);
 	else if (fastcmp(field,"angle_pos"))
-		plr->angle_pos = (angle_t)luaL_checkinteger(L, 3);
+		plr->angle_pos = luaL_checkangle(L, 3);
 	else if (fastcmp(field,"old_angle_pos"))
-		plr->old_angle_pos = (angle_t)luaL_checkinteger(L, 3);
+		plr->old_angle_pos = luaL_checkangle(L, 3);
 	else if (fastcmp(field,"axis1"))
 		P_SetTarget(&plr->axis1, *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ)));
 	else if (fastcmp(field,"axis2"))
@@ -569,7 +569,7 @@ static int player_set(lua_State *L)
 			P_SetTarget(&plr->awayviewmobj, plr->mo); // but since the script might set awayviewmobj immediately AFTER setting awayviewtics, use player mobj as filler for now.
 	}
 	else if (fastcmp(field,"awayviewaiming"))
-		plr->awayviewaiming = (angle_t)luaL_checkinteger(L, 3);
+		plr->awayviewaiming = luaL_checkangle(L, 3);
 	else if (fastcmp(field,"spectator"))
 		plr->spectator = lua_toboolean(L, 3);
 	else if (fastcmp(field,"bot"))
@@ -578,7 +578,7 @@ static int player_set(lua_State *L)
 		plr->jointime = (tic_t)luaL_checkinteger(L, 3);
 #ifdef HWRENDER
 	else if (fastcmp(field,"fovadd"))
-		plr->fovadd = (fixed_t)luaL_checkinteger(L, 3);
+		plr->fovadd = luaL_checkfixed(L, 3);
 #endif
 	else {
 		lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS);
diff --git a/src/lua_script.c b/src/lua_script.c
index 8b40d9f00b5ab9aed332ec84ae67fd1c4fa4dbe1..145104d9aac8c0c147bde29259377f8848512d81 100644
--- a/src/lua_script.c
+++ b/src/lua_script.c
@@ -442,7 +442,6 @@ enum
 	ARCH_NULL=0,
 	ARCH_BOOLEAN,
 	ARCH_SIGNED,
-	ARCH_UNSIGNED,
 	ARCH_STRING,
 	ARCH_TABLE,
 
@@ -522,13 +521,8 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
 	case LUA_TNUMBER:
 	{
 		lua_Integer number = lua_tointeger(gL, myindex);
-		if (number < 0) {
-			WRITEUINT8(save_p, ARCH_SIGNED);
-			WRITEFIXED(save_p, number);
-		} else {
-			WRITEUINT8(save_p, ARCH_UNSIGNED);
-			WRITEANGLE(save_p, number);
-		}
+        WRITEUINT8(save_p, ARCH_SIGNED);
+        WRITEFIXED(save_p, number);
 		break;
 	}
 	case LUA_TSTRING:
@@ -797,9 +791,6 @@ static UINT8 UnArchiveValue(int TABLESINDEX)
 	case ARCH_SIGNED:
 		lua_pushinteger(gL, READFIXED(save_p));
 		break;
-	case ARCH_UNSIGNED:
-		lua_pushinteger(gL, READANGLE(save_p));
-		break;
 	case ARCH_STRING:
 	{
 		char value[1024];
@@ -948,6 +939,14 @@ static void NetArchiveHook(lua_CFunction archFunc)
 	lua_pop(gL, 2);
 }
 
+void LUA_Step(void)
+{
+	if (!gL)
+		return;
+	lua_settop(gL, 0);
+	lua_gc(gL, LUA_GCSTEP, 1);
+}
+
 void LUA_Archive(void)
 {
 	INT32 i;
diff --git a/src/lua_script.h b/src/lua_script.h
index eaef13d1e635fce209fb1e4bc2f694dfb24b3ea8..292160a0b5356e2494d6557207dfe20c2167d993 100644
--- a/src/lua_script.h
+++ b/src/lua_script.h
@@ -19,9 +19,21 @@
 #include "blua/lua.h"
 #include "blua/lualib.h"
 #include "blua/lauxlib.h"
+
 #define lua_optboolean(L, i) (!lua_isnoneornil(L, i) && lua_toboolean(L, i))
 #define lua_opttrueboolean(L, i) (lua_isnoneornil(L, i) || lua_toboolean(L, i))
 
+// fixed_t casting
+// TODO add some distinction between fixed numbers and integer numbers
+// for at least the purpose of printing and maybe math.
+#define luaL_checkfixed(L, i) luaL_checkinteger(L, i)
+#define lua_pushfixed(L, f) lua_pushinteger(L, f)
+
+// angle_t casting
+// we reduce the angle to a fixed point between 0.0 and 1.0
+#define luaL_checkangle(L, i) (((angle_t)(luaL_checkfixed(L, i)&0xFFFF))<<16)
+#define lua_pushangle(L, a) lua_pushfixed(L, a>>16)
+
 #ifdef _DEBUG
 void LUA_ClearExtVars(void);
 #endif
@@ -36,6 +48,7 @@ void LUA_InvalidateUserdata(void *data);
 void LUA_InvalidateLevel(void);
 void LUA_InvalidateMapthings(void);
 void LUA_InvalidatePlayer(player_t *player);
+void LUA_Step(void);
 void LUA_Archive(void);
 void LUA_UnArchive(void);
 void Got_Luacmd(UINT8 **cp, INT32 playernum); // lua_consolelib.c
diff --git a/src/lua_skinlib.c b/src/lua_skinlib.c
index f797f30d6cc05a353921d6378692ff4a9fd87868..f07b4564c15d553c9b5640d03d6151fd0e69d87b 100644
--- a/src/lua_skinlib.c
+++ b/src/lua_skinlib.c
@@ -147,19 +147,19 @@ static int skin_get(lua_State *L)
 		lua_pushinteger(L, skin->revitem);
 		break;
 	case skin_actionspd:
-		lua_pushinteger(L, skin->actionspd);
+		lua_pushfixed(L, skin->actionspd);
 		break;
 	case skin_mindash:
-		lua_pushinteger(L, skin->mindash);
+		lua_pushfixed(L, skin->mindash);
 		break;
 	case skin_maxdash:
-		lua_pushinteger(L, skin->maxdash);
+		lua_pushfixed(L, skin->maxdash);
 		break;
 	case skin_normalspeed:
-		lua_pushinteger(L, skin->normalspeed);
+		lua_pushfixed(L, skin->normalspeed);
 		break;
 	case skin_runspeed:
-		lua_pushinteger(L, skin->runspeed);
+		lua_pushfixed(L, skin->runspeed);
 		break;
 	case skin_thrustfactor:
 		lua_pushinteger(L, skin->thrustfactor);
@@ -171,7 +171,7 @@ static int skin_get(lua_State *L)
 		lua_pushinteger(L, skin->acceleration);
 		break;
 	case skin_jumpfactor:
-		lua_pushinteger(L, skin->jumpfactor);
+		lua_pushfixed(L, skin->jumpfactor);
 		break;
 	case skin_starttranscolor:
 		lua_pushinteger(L, skin->starttranscolor);
diff --git a/src/p_enemy.c b/src/p_enemy.c
index ef9ff5ddaded2752a1277b5cd37a6483c47adb05..3cc9aaca29d772be7b955da90fd1da175458e885 100644
--- a/src/p_enemy.c
+++ b/src/p_enemy.c
@@ -7650,26 +7650,33 @@ void A_SetObjectFlags(mobj_t *actor)
 {
 	INT32 locvar1 = var1;
 	INT32 locvar2 = var2;
+	boolean unlinkthings = false;
 #ifdef HAVE_BLUA
 	if (LUA_CallAction("A_SetObjectFlags", actor))
 		return;
 #endif
 
-	P_UnsetThingPosition(actor);
-	if (sector_list)
-	{
-		P_DelSeclist(sector_list);
-		sector_list = NULL;
-	}
-
 	if (locvar2 == 2)
-		actor->flags |= locvar1;
+		locvar1 = actor->flags | locvar1;
 	else if (locvar2 == 1)
-		actor->flags &= ~locvar1;
-	else
-		actor->flags = locvar1;
+		locvar1 = actor->flags & ~locvar1;
 
-	P_SetThingPosition(actor);
+	if ((locvar1 & (MF_NOBLOCKMAP|MF_NOSECTOR)) != (actor->flags & (MF_NOBLOCKMAP|MF_NOSECTOR))) // Blockmap/sector status has changed, so reset the links
+		unlinkthings = true;
+
+	if (unlinkthings) {
+		P_UnsetThingPosition(actor);
+		if (sector_list)
+		{
+			P_DelSeclist(sector_list);
+			sector_list = NULL;
+		}
+	}
+
+	actor->flags = locvar1;
+
+	if (unlinkthings)
+		P_SetThingPosition(actor);
 }
 
 // Function: A_SetObjectFlags2
diff --git a/src/p_inter.c b/src/p_inter.c
index 146be5077b617ba8af0d5da6ded4466fbec5fbc4..de90f419e946c95e3a3b540659bc73387e12f916 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -1479,7 +1479,7 @@ static void P_HitDeathMessages(player_t *player, mobj_t *inflictor, mobj_t *sour
 		return; // Presumably it's obvious what's happening in splitscreen.
 
 #ifdef HAVE_BLUA
-	if (LUAh_DeathMsg(player, inflictor, source))
+	if (LUAh_HurtMsg(player, inflictor, source))
 		return;
 #endif
 
@@ -1953,7 +1953,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
 	{
 		target->flags &= ~(MF_SOLID|MF_SHOOTABLE); // does not block
 		P_UnsetThingPosition(target);
-		target->flags |= MF_NOBLOCKMAP;
+		target->flags |= MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY;
 		P_SetThingPosition(target);
 
 		if (!target->player->bot && !G_IsSpecialStage(gamemap)
@@ -2289,7 +2289,12 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
 		}
 	}
 	else if (target->player)
-		P_SetPlayerMobjState(target, target->info->deathstate);
+	{
+		if (damagetype == DMG_DROWNED || damagetype == DMG_SPACEDROWN)
+			P_SetPlayerMobjState(target, target->info->xdeathstate);
+		else
+			P_SetPlayerMobjState(target, target->info->deathstate);
+	}
 	else
 #ifdef DEBUG_NULL_DEATHSTATE
 		P_SetMobjState(target, S_NULL);
@@ -2582,7 +2587,7 @@ static inline void P_SuperDamage(player_t *player, mobj_t *inflictor, mobj_t *so
 	P_InstaThrust(player->mo, ang, fallbackspeed);
 
 	if (player->charflags & SF_SUPERANIMS)
-		P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_PAIN);
+		P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_STUN);
 	else
 		P_SetPlayerMobjState(player->mo, player->mo->info->painstate);
 
diff --git a/src/p_local.h b/src/p_local.h
index 1e0a9e2ebd7ef291dc8ce188d563803475bed04b..f2c516d5df44d53789eced3cee290788ad0f4023 100644
--- a/src/p_local.h
+++ b/src/p_local.h
@@ -276,7 +276,7 @@ boolean P_LookForPlayers(mobj_t *actor, boolean allaround, boolean tracer, fixed
 extern boolean floatok;
 extern fixed_t tmfloorz;
 extern fixed_t tmceilingz;
-extern mobj_t *tmfloorthing, *tmthing;
+extern mobj_t *tmfloorthing, *tmhitthing, *tmthing;
 extern camera_t *mapcampointer;
 
 /* cphipps 2004/08/30 */
diff --git a/src/p_map.c b/src/p_map.c
index 46e32e385439fbe8655e188fb50838ea67979e8c..99a40856958d5b4a0025ac3b1a46e9ebe43ce8f5 100644
--- a/src/p_map.c
+++ b/src/p_map.c
@@ -47,7 +47,7 @@ boolean floatok;
 fixed_t tmfloorz, tmceilingz;
 static fixed_t tmdropoffz, tmdrpoffceilz; // drop-off floor/ceiling heights
 mobj_t *tmfloorthing; // the thing corresponding to tmfloorz or NULL if tmfloorz is from a sector
-static mobj_t *tmhitthing; // the solid thing you bumped into (for collisions)
+mobj_t *tmhitthing; // the solid thing you bumped into (for collisions)
 
 // keep track of the line that lowers the ceiling,
 // so missiles don't explode against sky hack walls
@@ -121,7 +121,7 @@ void P_DoSpring(mobj_t *spring, mobj_t *object)
 		/*Someone want to make these work like bumpers?*/
 		return;
 	}
-	
+
 	object->eflags |= MFE_SPRUNG; // apply this flag asap!
 	spring->flags &= ~(MF_SOLID|MF_SPECIAL); // De-solidify
 
@@ -1233,7 +1233,7 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
 			{
 				// If you're inside goowater and slowing down
 				fixed_t sinklevel = FixedMul(thing->info->height/6, thing->scale);
-				fixed_t minspeed = FixedMul(thing->info->height/12, thing->scale);
+				fixed_t minspeed = FixedMul(thing->info->height/9, thing->scale);
 				if (thing->z < *rover->topheight && *rover->bottomheight < thingtop
 				&& abs(thing->momz) < minspeed)
 				{
@@ -1304,10 +1304,10 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y)
 	// based on their origin point, and can overlap
 	// into adjacent blocks by up to MAXRADIUS units.
 
-	xl = (tmbbox[BOXLEFT] - bmaporgx - MAXRADIUS)>>MAPBLOCKSHIFT;
-	xh = (tmbbox[BOXRIGHT] - bmaporgx + MAXRADIUS)>>MAPBLOCKSHIFT;
-	yl = (tmbbox[BOXBOTTOM] - bmaporgy - MAXRADIUS)>>MAPBLOCKSHIFT;
-	yh = (tmbbox[BOXTOP] - bmaporgy + MAXRADIUS)>>MAPBLOCKSHIFT;
+	xl = (unsigned)(tmbbox[BOXLEFT] - bmaporgx - MAXRADIUS)>>MAPBLOCKSHIFT;
+	xh = (unsigned)(tmbbox[BOXRIGHT] - bmaporgx + MAXRADIUS)>>MAPBLOCKSHIFT;
+	yl = (unsigned)(tmbbox[BOXBOTTOM] - bmaporgy - MAXRADIUS)>>MAPBLOCKSHIFT;
+	yh = (unsigned)(tmbbox[BOXTOP] - bmaporgy + MAXRADIUS)>>MAPBLOCKSHIFT;
 
 	BMBOUNDFIX(xl, xh, yl, yh);
 
@@ -1523,10 +1523,10 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam)
 	// based on their origin point, and can overlap
 	// into adjacent blocks by up to MAXRADIUS units.
 
-	xl = (tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
-	xh = (tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
-	yl = (tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
-	yh = (tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
+	xl = (unsigned)(tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
+	xh = (unsigned)(tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
+	yl = (unsigned)(tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
+	yh = (unsigned)(tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
 
 	BMBOUNDFIX(xl, xh, yl, yh);
 
@@ -1853,7 +1853,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
 
 				// Don't 'step up' while springing,
 				// Only step up "if needed".
-				if (thing->state-states == S_PLAY_JUMP
+				if (thing->player->panim == PA_JUMP
 				&& P_MobjFlip(thing)*thing->momz > FixedMul(FRACUNIT, thing->scale))
 					maxstep = 0;
 			}
@@ -1952,10 +1952,10 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
 	{
 		INT32 bx, by, xl, xh, yl, yh;
 
-		yh = (thing->y + MAXRADIUS - bmaporgy)>>MAPBLOCKSHIFT;
-		yl = (thing->y - MAXRADIUS - bmaporgy)>>MAPBLOCKSHIFT;
-		xh = (thing->x + MAXRADIUS - bmaporgx)>>MAPBLOCKSHIFT;
-		xl = (thing->x - MAXRADIUS - bmaporgx)>>MAPBLOCKSHIFT;
+		yh = (unsigned)(thing->y + MAXRADIUS - bmaporgy)>>MAPBLOCKSHIFT;
+		yl = (unsigned)(thing->y - MAXRADIUS - bmaporgy)>>MAPBLOCKSHIFT;
+		xh = (unsigned)(thing->x + MAXRADIUS - bmaporgx)>>MAPBLOCKSHIFT;
+		xl = (unsigned)(thing->x - MAXRADIUS - bmaporgx)>>MAPBLOCKSHIFT;
 
 		BMBOUNDFIX(xl, xh, yl, yh);
 
@@ -2052,6 +2052,7 @@ boolean P_SceneryTryMove(mobj_t *thing, fixed_t x, fixed_t y)
 //
 static boolean P_ThingHeightClip(mobj_t *thing)
 {
+	boolean floormoved;
 	fixed_t oldfloorz = thing->floorz;
 	boolean onfloor = P_IsObjectOnGround(thing);//(thing->z <= thing->floorz);
 
@@ -2063,6 +2064,9 @@ static boolean P_ThingHeightClip(mobj_t *thing)
 	if (P_MobjWasRemoved(thing))
 		return true;
 
+	floormoved = (thing->eflags & MFE_VERTICALFLIP && tmceilingz != thing->ceilingz)
+		|| (!(thing->eflags & MFE_VERTICALFLIP) && tmfloorz != thing->floorz);
+
 	thing->floorz = tmfloorz;
 	thing->ceilingz = tmceilingz;
 
@@ -2071,20 +2075,13 @@ static boolean P_ThingHeightClip(mobj_t *thing)
 	if (tmfloorz > oldfloorz+thing->height)
 		return true;
 
-	if (/*!tmfloorthing && */onfloor && !(thing->flags & MF_NOGRAVITY))
+	if (onfloor && !(thing->flags & MF_NOGRAVITY) && floormoved)
 	{
 		if (thing->eflags & MFE_VERTICALFLIP)
 			thing->pmomz = thing->ceilingz - (thing->z + thing->height);
 		else
 			thing->pmomz = thing->floorz - thing->z;
-
-		if (thing->player)
-		{
-			if (splitscreen && camera2.chase && thing->player == &players[secondarydisplayplayer])
-				camera2.z += thing->pmomz;
-			else if (camera.chase && thing->player == &players[displayplayer])
-				camera.z += thing->pmomz;
-		}
+		thing->eflags |= MFE_APPLYPMOMZ;
 
 		if (thing->eflags & MFE_VERTICALFLIP)
 			thing->z = thing->ceilingz - thing->height;
@@ -3040,10 +3037,10 @@ void P_RadiusAttack(mobj_t *spot, mobj_t *source, fixed_t damagedist)
 	fixed_t dist;
 
 	dist = FixedMul(damagedist, spot->scale) + MAXRADIUS;
-	yh = (spot->y + dist - bmaporgy)>>MAPBLOCKSHIFT;
-	yl = (spot->y - dist - bmaporgy)>>MAPBLOCKSHIFT;
-	xh = (spot->x + dist - bmaporgx)>>MAPBLOCKSHIFT;
-	xl = (spot->x - dist - bmaporgx)>>MAPBLOCKSHIFT;
+	yh = (unsigned)(spot->y + dist - bmaporgy)>>MAPBLOCKSHIFT;
+	yl = (unsigned)(spot->y - dist - bmaporgy)>>MAPBLOCKSHIFT;
+	xh = (unsigned)(spot->x + dist - bmaporgx)>>MAPBLOCKSHIFT;
+	xl = (unsigned)(spot->x - dist - bmaporgx)>>MAPBLOCKSHIFT;
 
 	BMBOUNDFIX(xl, xh, yl, yh);
 
@@ -3656,10 +3653,10 @@ void P_CreateSecNodeList(mobj_t *thing, fixed_t x, fixed_t y)
 
 	validcount++; // used to make sure we only process a line once
 
-	xl = (tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
-	xh = (tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
-	yl = (tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
-	yh = (tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
+	xl = (unsigned)(tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
+	xh = (unsigned)(tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
+	yl = (unsigned)(tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
+	yh = (unsigned)(tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
 
 	BMBOUNDFIX(xl, xh, yl, yh);
 
@@ -3735,10 +3732,10 @@ void P_CreatePrecipSecNodeList(precipmobj_t *thing,fixed_t x,fixed_t y)
 
 	validcount++; // used to make sure we only process a line once
 
-	xl = (preciptmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
-	xh = (preciptmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
-	yl = (preciptmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
-	yh = (preciptmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
+	xl = (unsigned)(preciptmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
+	xh = (unsigned)(preciptmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
+	yl = (unsigned)(preciptmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
+	yh = (unsigned)(preciptmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
 
 	BMBOUNDFIX(xl, xh, yl, yh);
 
diff --git a/src/p_maputl.c b/src/p_maputl.c
index c8bf420e781696eea2749dc5b0afce4f0b967c0a..a65d2fa763119d22c5b84af878b4068f9d1db088 100644
--- a/src/p_maputl.c
+++ b/src/p_maputl.c
@@ -814,8 +814,8 @@ void P_SetThingPosition(mobj_t *thing)
 	if (!(thing->flags & MF_NOBLOCKMAP))
 	{
 		// inert things don't need to be in blockmap
-		const INT32 blockx = (thing->x - bmaporgx)>>MAPBLOCKSHIFT;
-		const INT32 blocky = (thing->y - bmaporgy)>>MAPBLOCKSHIFT;
+		const INT32 blockx = (unsigned)(thing->x - bmaporgx)>>MAPBLOCKSHIFT;
+		const INT32 blocky = (unsigned)(thing->y - bmaporgy)>>MAPBLOCKSHIFT;
 		if (blockx >= 0 && blockx < bmapwidth
 			&& blocky >= 0 && blocky < bmapheight)
 		{
@@ -1317,10 +1317,10 @@ boolean P_RadiusLinesCheck(fixed_t radius, fixed_t x, fixed_t y,
 	tmbbox[BOXLEFT] = x - radius;
 
 	// check lines
-	xl = (tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
-	xh = (tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
-	yl = (tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
-	yh = (tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
+	xl = (unsigned)(tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
+	xh = (unsigned)(tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
+	yl = (unsigned)(tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
+	yh = (unsigned)(tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
 
 	for (bx = xl; bx <= xh; bx++)
 		for (by = yl; by <= yh; by++)
diff --git a/src/p_mobj.c b/src/p_mobj.c
index 9565648c2ccfeb31d157010b2df59e4871f11ac9..8ea71d6c7ca9a1fecec9405390ff118cf2d19a83 100644
--- a/src/p_mobj.c
+++ b/src/p_mobj.c
@@ -142,24 +142,29 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
 		{
 		case S_PLAY_STND:
 		case S_PLAY_WAIT:
-		case S_PLAY_GASP:
-			P_SetPlayerMobjState(mobj, S_PLAY_SUPER_STND);
-			return true;
-		case S_PLAY_FALL:
-		case S_PLAY_JUMP:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_STND);
 		case S_PLAY_WALK:
-			P_SetPlayerMobjState(mobj, S_PLAY_SUPER_WALK);
-			return true;
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_WALK);
 		case S_PLAY_RUN:
-			P_SetPlayerMobjState(mobj, S_PLAY_SUPER_RUN);
-			return true;
-		case S_PLAY_EDGE:
-			P_SetPlayerMobjState(mobj, S_PLAY_SUPER_EDGE);
-			return true;
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_RUN);
+		case S_PLAY_PAIN:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_PAIN);
+		case S_PLAY_DEAD:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_DEAD);
+		case S_PLAY_DRWN:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_DRWN);
 		case S_PLAY_SPIN:
 			if (!(player->charflags & SF_SUPERSPIN))
 				return true;
-			break;
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_SPIN);
+		case S_PLAY_GASP:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_GASP);
+		case S_PLAY_JUMP:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_JUMP);
+		case S_PLAY_FALL:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_FALL);
+		case S_PLAY_EDGE:
+			return P_SetPlayerMobjState(mobj, S_PLAY_SUPER_EDGE);
 		default:
 			break;
 		}
@@ -178,30 +183,48 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
 	{
 	case S_PLAY_STND:
 	case S_PLAY_WAIT:
-	case S_PLAY_EDGE:
-	case S_PLAY_RIDE:
 	case S_PLAY_SUPER_STND:
-	case S_PLAY_SUPER_EDGE:
 		player->panim = PA_IDLE;
 		break;
+	case S_PLAY_EDGE:
+	case S_PLAY_SUPER_EDGE:
+		player->panim = PA_EDGE;
+		break;
 	case S_PLAY_WALK:
 	case S_PLAY_SUPER_WALK:
+	case S_PLAY_SUPER_FLOAT:
 		player->panim = PA_WALK;
 		break;
 	case S_PLAY_RUN:
 	case S_PLAY_SUPER_RUN:
 		player->panim = PA_RUN;
 		break;
+	case S_PLAY_PAIN:
+	case S_PLAY_SUPER_PAIN:
+	case S_PLAY_SUPER_STUN:
+		player->panim = PA_PAIN;
+		break;
 	case S_PLAY_SPIN:
+	case S_PLAY_DASH:
+	case S_PLAY_SUPER_SPIN:
 		player->panim = PA_ROLL;
 		break;
+	case S_PLAY_JUMP:
+	case S_PLAY_SUPER_JUMP:
+		player->panim = PA_JUMP;
+		break;
 	case S_PLAY_FALL:
+	case S_PLAY_SUPER_FALL:
 		player->panim = PA_FALL;
 		break;
 	case S_PLAY_FLY:
 	case S_PLAY_GLIDE:
 		player->panim = PA_ABILITY;
 		break;
+	case S_PLAY_RIDE:
+	case S_PLAY_SUPER_RIDE:
+		player->panim = PA_RIDE;
+		break;
 	default:
 		player->panim = PA_ETC;
 		break;
@@ -272,8 +295,109 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
 		// Player animations
 		if (st->sprite == SPR_PLAY)
 		{
+			boolean noalt = false;
 			UINT8 spr2 = st->frame & FF_FRAMEMASK;
 			UINT16 frame = (mobj->frame & FF_FRAMEMASK)+1;
+
+			while (((skin_t *)mobj->skin)->sprites[spr2].numframes <= 0
+				&& spr2 != SPR2_STND)
+			{
+				switch(spr2)
+				{
+				case SPR2_RUN:
+					spr2 = SPR2_WALK;
+					break;
+				case SPR2_DRWN:
+					spr2 = SPR2_DEAD;
+					break;
+				case SPR2_DASH:
+					spr2 = SPR2_SPIN;
+					break;
+				case SPR2_GASP:
+					spr2 = SPR2_JUMP;
+					break;
+				case SPR2_JUMP:
+					spr2 = SPR2_FALL;
+					break;
+				case SPR2_FALL:
+					spr2 = SPR2_WALK;
+					break;
+				case SPR2_RIDE:
+					spr2 = SPR2_FALL;
+					break;
+
+				case SPR2_FLY:
+					spr2 = SPR2_JUMP;
+					break;
+				case SPR2_TIRE:
+					spr2 = SPR2_FLY;
+					break;
+
+				case SPR2_GLID:
+					spr2 = SPR2_FLY;
+					break;
+				case SPR2_CLMB:
+					spr2 = SPR2_WALK;
+					break;
+				case SPR2_CLNG:
+					spr2 = SPR2_CLMB;
+					break;
+
+				case SPR2_SIGN:
+				case SPR2_LIFE:
+					noalt = true;
+					break;
+
+				// Super sprites fallback to regular sprites
+				case SPR2_SWLK:
+					spr2 = SPR2_WALK;
+					break;
+				case SPR2_SRUN:
+					spr2 = SPR2_RUN;
+					break;
+				case SPR2_SPAN:
+					spr2 = SPR2_PAIN;
+					break;
+				case SPR2_SMSL:
+					spr2 = SPR2_SPAN;
+					break;
+				case SPR2_SDTH:
+					spr2 = SPR2_DEAD;
+					break;
+				case SPR2_SDRN:
+					spr2 = SPR2_DRWN;
+					break;
+				case SPR2_SSPN:
+					spr2 = SPR2_SPIN;
+					break;
+				case SPR2_SGSP:
+					spr2 = SPR2_GASP;
+					break;
+				case SPR2_SJMP:
+					spr2 = SPR2_JUMP;
+					break;
+				case SPR2_SFAL:
+					spr2 = SPR2_FALL;
+					break;
+				case SPR2_SEDG:
+					spr2 = SPR2_EDGE;
+					break;
+				case SPR2_SRID:
+					spr2 = SPR2_RIDE;
+					break;
+				case SPR2_SFLT:
+					spr2 = SPR2_SWLK;
+					break;
+
+				// Dunno? Just go to standing then.
+				default:
+					spr2 = SPR2_STND;
+					break;
+				}
+				if (noalt)
+					break;
+			}
+
 			if (mobj->sprite != SPR_PLAY)
 			{
 				mobj->sprite = SPR_PLAY;
@@ -281,6 +405,7 @@ boolean P_SetPlayerMobjState(mobj_t *mobj, statenum_t state)
 			}
 			else if (mobj->sprite2 != spr2)
 				frame = 0;
+
 			mobj->sprite2 = spr2;
 			if (!mobj->skin || frame >= ((skin_t *)mobj->skin)->sprites[spr2].numframes)
 				frame = 0;
@@ -1531,10 +1656,10 @@ static void P_RingZMovement(mobj_t *mo)
 		P_AdjustMobjFloorZ_PolyObjs(mo, mo->subsector);
 
 	// adjust height
-	if (mo->pmomz && mo->z != mo->floorz)
+	if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
 	{
 		mo->momz += mo->pmomz;
-		mo->pmomz = 0;
+		mo->eflags &= ~MFE_APPLYPMOMZ;
 	}
 	mo->z += mo->momz;
 
@@ -1600,10 +1725,10 @@ static boolean P_ZMovement(mobj_t *mo)
 		P_AdjustMobjFloorZ_PolyObjs(mo, mo->subsector);
 
 	// adjust height
-	if (mo->pmomz && mo->z != mo->floorz)
+	if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
 	{
 		mo->momz += mo->pmomz;
-		mo->pmomz = 0;
+		mo->eflags &= ~MFE_APPLYPMOMZ;
 	}
 	mo->z += mo->momz;
 
@@ -2025,11 +2150,11 @@ static void P_PlayerZMovement(mobj_t *mo)
 	}
 
 	// adjust height
-/*	if (mo->pmomz && mo->z > mo->floorz && !(mo->player->pflags & PF_JUMPED))
+	if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
 	{
 		mo->momz += mo->pmomz;
-		mo->pmomz = 0;
-	}*/
+		mo->eflags &= ~MFE_APPLYPMOMZ;
+	}
 
 	mo->z += mo->momz;
 
@@ -2046,7 +2171,7 @@ static void P_PlayerZMovement(mobj_t *mo)
 		else
 			mo->z = mo->floorz;
 
-		if (mo->player && (mo->player->pflags & PF_NIGHTSMODE))
+		if (mo->player->pflags & PF_NIGHTSMODE)
 		{
 			if (mo->player->flyangle < 90 || mo->player->flyangle >= 270)
 				mo->player->flyangle += P_MobjFlip(mo)*90;
@@ -2056,17 +2181,16 @@ static void P_PlayerZMovement(mobj_t *mo)
 			goto nightsdone;
 		}
 		// Get up if you fell.
-		if (mo->state == &states[mo->info->painstate] || mo->state-states == S_PLAY_SUPER_PAIN)
+		if (mo->player->panim == PA_PAIN)
 			P_SetPlayerMobjState(mo, S_PLAY_STND);
 
 		if (P_MobjFlip(mo)*mo->momz < 0) // falling
 		{
+			mo->pmomz = 0; // We're on a new floor, don't keep doing platform movement.
+
 			// Squat down. Decrease viewheight for a moment after hitting the ground (hard),
-			if (mo->player)
-			{
-				if (P_MobjFlip(mo)*mo->momz < -FixedMul(8*FRACUNIT, mo->scale))
-					mo->player->deltaviewheight = (P_MobjFlip(mo)*mo->momz)>>3; // make sure momz is negative
-			}
+			if (P_MobjFlip(mo)*mo->momz < -FixedMul(8*FRACUNIT, mo->scale))
+				mo->player->deltaviewheight = (P_MobjFlip(mo)*mo->momz)>>3; // make sure momz is negative
 
 			if (!tmfloorthing || tmfloorthing->flags & (MF_PUSHABLE|MF_MONITOR)
 				|| tmfloorthing->flags2 & MF2_STANDONME || tmfloorthing->type == MT_PLAYER) // Spin Attack
@@ -2139,14 +2263,14 @@ static void P_PlayerZMovement(mobj_t *mo)
 
 					// Cut momentum in half when you hit the ground and
 					// aren't pressing any controls.
-					if (!mo->player || (!(mo->player->cmd.forwardmove || mo->player->cmd.sidemove) && !mo->player->cmomx && !mo->player->cmomy && !(mo->player->pflags & PF_SPINNING)))
+					if (!(mo->player->cmd.forwardmove || mo->player->cmd.sidemove) && !mo->player->cmomx && !mo->player->cmomy && !(mo->player->pflags & PF_SPINNING))
 					{
 						mo->momx = mo->momx/2;
 						mo->momy = mo->momy/2;
 					}
 				}
 
-				if (mo->health && mo->player)
+				if (mo->health)
 				{
 					if (mo->player->pflags & PF_GLIDING) // ground gliding
 					{
@@ -2192,7 +2316,7 @@ static void P_PlayerZMovement(mobj_t *mo)
 					mo->player->powers[pw_tailsfly] = 0;
 				}
 			}
-			if (mo->player && !(mo->player->pflags & PF_SPINNING))
+			if (!(mo->player->pflags & PF_SPINNING))
 				mo->player->pflags &= ~PF_STARTDASH;
 
 			if (tmfloorthing && (tmfloorthing->flags & (MF_PUSHABLE|MF_MONITOR)
@@ -2235,7 +2359,7 @@ nightsdone:
 		else
 			mo->z = mo->ceilingz - mo->height;
 
-		if (mo->player && (mo->player->pflags & PF_NIGHTSMODE))
+		if (mo->player->pflags & PF_NIGHTSMODE)
 		{
 			if (mo->player->flyangle < 90 || mo->player->flyangle >= 270)
 				mo->player->flyangle -= P_MobjFlip(mo)*90;
@@ -2250,7 +2374,7 @@ nightsdone:
 		{
 			msecnode_t *node;
 
-			if (CheckForMarioBlocks && mo->player && !(netgame && mo->player->spectator)) // Only let the player punch
+			if (CheckForMarioBlocks && !(netgame && mo->player->spectator)) // Only let the player punch
 			{
 				// Search the touching sectors, from side-to-side...
 				for (node = mo->touching_sectorlist; node; node = node->m_snext)
@@ -2278,7 +2402,7 @@ nightsdone:
 			if (mariomode)
 				S_StartSound(mo, sfx_mario1);
 
-			if (!(mo->player && mo->player->climbing))
+			if (!mo->player->climbing)
 				mo->momz = 0;
 		}
 	}
@@ -2293,10 +2417,10 @@ static boolean P_SceneryZMovement(mobj_t *mo)
 		P_AdjustMobjFloorZ_PolyObjs(mo, mo->subsector);
 
 	// adjust height
-	if (mo->pmomz && mo->z != mo->floorz)
+	if (mo->eflags & MFE_APPLYPMOMZ && !P_IsObjectOnGround(mo))
 	{
 		mo->momz += mo->pmomz;
-		mo->pmomz = 0;
+		mo->eflags &= ~MFE_APPLYPMOMZ;
 	}
 	mo->z += mo->momz;
 
@@ -2564,10 +2688,8 @@ void P_MobjCheckWater(mobj_t *mobj)
 			return;
 
 		if ((mobj->eflags & MFE_GOOWATER || wasingoo)) { // Decide what happens to your momentum when you enter/leave goopy water.
-			if (wasinwater && P_MobjFlip(mobj)*mobj->momz > 0)
-				mobj->momz = FixedMul(mobj->momz, FixedDiv(9*FRACUNIT, 8*FRACUNIT)); // Give the mobj a little out-of-goo boost.
-			else if (P_MobjFlip(mobj)*mobj->momz < 0)
-				mobj->momz = FixedMul(mobj->momz, FixedDiv(2*FRACUNIT, 5*FRACUNIT)); // KILL its momentum.
+			if (P_MobjFlip(mobj)*mobj->momz < 0) // You are entering the goo?
+				mobj->momz = FixedMul(mobj->momz, FixedDiv(2*FRACUNIT, 5*FRACUNIT)); // kill momentum significantly, to make the goo feel thick.
 		}
 		else if (wasinwater && P_MobjFlip(mobj)*mobj->momz > 0)
 			mobj->momz = FixedMul(mobj->momz, FixedDiv(780*FRACUNIT, 457*FRACUNIT)); // Give the mobj a little out-of-water boost.
@@ -2876,10 +2998,10 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
 	thiscam->floorz = tmfloorz;
 	thiscam->ceilingz = tmceilingz;
 
-	if (thiscam->momz)
+	if (thiscam->momz || player->mo->pmomz)
 	{
 		// adjust height
-		thiscam->z += thiscam->momz;
+		thiscam->z += thiscam->momz + player->mo->pmomz;
 
 		if (!itsatwodlevel && !(player->pflags & PF_NOCLIP))
 		{
@@ -2937,6 +3059,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
 	msecnode_t *node;
 
 	I_Assert(mobj != NULL);
+	I_Assert(mobj->player != NULL);
 	I_Assert(!P_MobjWasRemoved(mobj));
 
 	P_MobjCheckWater(mobj);
@@ -2955,7 +3078,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
 		P_CheckPosition(mobj, mobj->x, mobj->y);
 		goto animonly;
 	}
-	else if (mobj->player && (mobj->player->pflags & PF_MACESPIN) && mobj->tracer)
+	else if (mobj->player->pflags & PF_MACESPIN && mobj->tracer)
 	{
 		P_CheckPosition(mobj, mobj->x, mobj->y);
 		goto animonly;
@@ -2974,7 +3097,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
 	else
 		P_TryMove(mobj, mobj->x, mobj->y, true);
 
-	if (!(netgame && mobj->player && mobj->player->spectator))
+	if (!(netgame && mobj->player->spectator))
 	{
 		// Crumbling platforms
 		for (node = mobj->touching_sectorlist; node; node = node->m_snext)
@@ -3057,18 +3180,14 @@ static void P_PlayerMobjThinker(mobj_t *mobj)
 	}
 	else
 	{
-		if (mobj->player)
+		mobj->player->jumping = 0;
+		mobj->player->pflags &= ~PF_JUMPED;
+		if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
 		{
-			mobj->player->jumping = 0;
-			mobj->player->pflags &= ~PF_JUMPED;
-			if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
-			{
-				mobj->player->secondjump = 0;
-				mobj->player->powers[pw_tailsfly] = 0;
-				P_SetPlayerMobjState(mobj, S_PLAY_WALK);
-			}
+			mobj->player->secondjump = 0;
+			mobj->player->powers[pw_tailsfly] = 0;
+			P_SetPlayerMobjState(mobj, S_PLAY_WALK);
 		}
-		mobj->pmomz = 0;
 		mobj->eflags &= ~MFE_JUSTHITFLOOR;
 	}
 
@@ -5488,6 +5607,8 @@ void P_MobjThinker(mobj_t *mobj)
 
 	mobj->eflags &= ~(MFE_PUSHED|MFE_SPRUNG);
 
+	tmfloorthing = tmhitthing = NULL;
+
 	// 970 allows ANY mobj to trigger a linedef exec
 	if (mobj->subsector && GETSECSPECIAL(mobj->subsector->sector->special, 2) == 8)
 	{
@@ -6535,19 +6656,22 @@ void P_MobjThinker(mobj_t *mobj)
 						if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
 						{
 							z = ss->sector->ceilingheight - mobjinfo[mobj->type].height;
-							if (mobj->spawnpoint->z)
-								z -= mobj->spawnpoint->z << FRACBITS;
+							if (mobj->spawnpoint->options >> ZSHIFT)
+								z -= (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS;
 						}
 						else
 						{
 							z = ss->sector->floorheight;
-							if (mobj->spawnpoint->z)
-								z += mobj->spawnpoint->z << FRACBITS;
+							if (mobj->spawnpoint->options >> ZSHIFT)
+								z += (mobj->spawnpoint->options >> ZSHIFT) << FRACBITS;
 						}
 						flagmo = P_SpawnMobj(x, y, z, mobj->type);
 						flagmo->spawnpoint = mobj->spawnpoint;
 						if (mobj->spawnpoint->options & MTF_OBJECTFLIP)
-							flagmo->spawnpoint->options |= MTF_OBJECTFLIP;
+						{
+							flagmo->eflags |= MFE_VERTICALFLIP;
+							flagmo->flags2 |= MF2_OBJECTFLIP;
+						}
 
 						if (mobj->type == MT_REDFLAG)
 						{
@@ -6681,17 +6805,6 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
 	}
 	else
 	{
-		if (mobj->player)
-		{
-			mobj->player->jumping = 0;
-			mobj->player->pflags &= ~PF_JUMPED;
-			if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
-			{
-				mobj->player->secondjump = 0;
-				mobj->player->powers[pw_tailsfly] = 0;
-				P_SetPlayerMobjState(mobj, S_PLAY_WALK);
-			}
-		}
 		mobj->pmomz = 0; // to prevent that weird rocketing gargoyle bug
 		mobj->eflags &= ~MFE_JUSTHITFLOOR;
 	}
@@ -6892,17 +7005,6 @@ void P_SceneryThinker(mobj_t *mobj)
 	}
 	else
 	{
-		if (mobj->player)
-		{
-			mobj->player->jumping = 0;
-			mobj->player->pflags &= ~PF_JUMPED;
-			if (mobj->player->secondjump || mobj->player->powers[pw_tailsfly])
-			{
-				mobj->player->secondjump = 0;
-				mobj->player->powers[pw_tailsfly] = 0;
-				P_SetPlayerMobjState(mobj, S_PLAY_WALK);
-			}
-		}
 		mobj->pmomz = 0; // to prevent that weird rocketing gargoyle bug
 		mobj->eflags &= ~MFE_JUSTHITFLOOR;
 	}
diff --git a/src/p_mobj.h b/src/p_mobj.h
index 8e782b92e5062db77f17a6d395783bece9d39c1d..62abe4808f33065c992098ebe9506c4fb8da40df 100644
--- a/src/p_mobj.h
+++ b/src/p_mobj.h
@@ -235,6 +235,8 @@ typedef enum
 	MFE_PUSHED            = 1<<7,
 	// Mobj was already sprung this tic
 	MFE_SPRUNG            = 1<<8,
+	// Platform movement
+	MFE_APPLYPMOMZ        = 1<<9,
 	// free: to and including 1<<15
 } mobjeflag_t;
 
diff --git a/src/p_polyobj.c b/src/p_polyobj.c
index 05cc03d34a429beac639411e3c18ac7a9938dcc2..ab7a63411226ddb03dbaf066ebb47dc5ee1c21dc 100644
--- a/src/p_polyobj.c
+++ b/src/p_polyobj.c
@@ -657,6 +657,14 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 id)
 		// TODO: sound sequence is in args[3]
 	}*/
 
+	// make sure array isn't empty
+	// since Polyobj_findExplicit is disabled currently, we have to do things here instead now!
+	if (po->segCount == 0)
+	{
+		po->isBad = true;
+		CONS_Debug(DBG_POLYOBJ, "Polyobject %d is empty\n", po->id);
+		return;
+	}
 
 	// set the polyobject's spawn spot
 	po->spawnSpot.x = spawnSpot->x;
@@ -848,10 +856,10 @@ static void Polyobj_linkToBlockmap(polyobj_t *po)
 		M_AddToBox(blockbox, po->vertices[i]->x, po->vertices[i]->y);
 
 	// adjust bounding box relative to blockmap
-	blockbox[BOXRIGHT]  = (blockbox[BOXRIGHT]  - bmaporgx) >> MAPBLOCKSHIFT;
-	blockbox[BOXLEFT]   = (blockbox[BOXLEFT]   - bmaporgx) >> MAPBLOCKSHIFT;
-	blockbox[BOXTOP]    = (blockbox[BOXTOP]    - bmaporgy) >> MAPBLOCKSHIFT;
-	blockbox[BOXBOTTOM] = (blockbox[BOXBOTTOM] - bmaporgy) >> MAPBLOCKSHIFT;
+	blockbox[BOXRIGHT]  = (unsigned)(blockbox[BOXRIGHT]  - bmaporgx) >> MAPBLOCKSHIFT;
+	blockbox[BOXLEFT]   = (unsigned)(blockbox[BOXLEFT]   - bmaporgx) >> MAPBLOCKSHIFT;
+	blockbox[BOXTOP]    = (unsigned)(blockbox[BOXTOP]    - bmaporgy) >> MAPBLOCKSHIFT;
+	blockbox[BOXBOTTOM] = (unsigned)(blockbox[BOXBOTTOM] - bmaporgy) >> MAPBLOCKSHIFT;
 
 	// link polyobject to every block its bounding box intersects
 	for (y = blockbox[BOXBOTTOM]; y <= blockbox[BOXTOP]; ++y)
@@ -1079,10 +1087,10 @@ static INT32 Polyobj_clipThings(polyobj_t *po, line_t *line)
 		return hitflags;
 
 	// adjust linedef bounding box to blockmap, extend by MAXRADIUS
-	linebox[BOXLEFT]   = (line->bbox[BOXLEFT]   - bmaporgx - MAXRADIUS) >> MAPBLOCKSHIFT;
-	linebox[BOXRIGHT]  = (line->bbox[BOXRIGHT]  - bmaporgx + MAXRADIUS) >> MAPBLOCKSHIFT;
-	linebox[BOXBOTTOM] = (line->bbox[BOXBOTTOM] - bmaporgy - MAXRADIUS) >> MAPBLOCKSHIFT;
-	linebox[BOXTOP]    = (line->bbox[BOXTOP]    - bmaporgy + MAXRADIUS) >> MAPBLOCKSHIFT;
+	linebox[BOXLEFT]   = (unsigned)(line->bbox[BOXLEFT]   - bmaporgx - MAXRADIUS) >> MAPBLOCKSHIFT;
+	linebox[BOXRIGHT]  = (unsigned)(line->bbox[BOXRIGHT]  - bmaporgx + MAXRADIUS) >> MAPBLOCKSHIFT;
+	linebox[BOXBOTTOM] = (unsigned)(line->bbox[BOXBOTTOM] - bmaporgy - MAXRADIUS) >> MAPBLOCKSHIFT;
+	linebox[BOXTOP]    = (unsigned)(line->bbox[BOXTOP]    - bmaporgy + MAXRADIUS) >> MAPBLOCKSHIFT;
 
 	// check all mobj blockmap cells the line contacts
 	for (y = linebox[BOXBOTTOM]; y <= linebox[BOXTOP]; ++y)
diff --git a/src/p_saveg.c b/src/p_saveg.c
index 45cc5bad355ad5f3fbbe3d926288164d5171b3ab..2afcfd0ef6f9cd11868ddbc96f6a1c70ff0c992c 100644
--- a/src/p_saveg.c
+++ b/src/p_saveg.c
@@ -1052,6 +1052,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
 		diff |= MD_TICS;
 	if (mobj->sprite != mobj->state->sprite)
 		diff |= MD_SPRITE;
+	if (mobj->sprite == SPR_PLAY && mobj->sprite2 != 0)
+		diff |= MD_SPRITE;
 	if (mobj->frame != mobj->state->frame)
 		diff |= MD_FRAME;
 	if (mobj->eflags)
diff --git a/src/p_spec.c b/src/p_spec.c
index 9800c5d1c741c4b1af1cec666bb6fdba860402c3..cb3340ee4677aaaef0e6d49bb267cdcba93b5ee2 100644
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -7401,10 +7401,10 @@ void T_Pusher(pusher_t *p)
 		tmbbox[BOXRIGHT]  = p->x + radius;
 		tmbbox[BOXLEFT]   = p->x - radius;
 
-		xl = (tmbbox[BOXLEFT] - bmaporgx - MAXRADIUS)>>MAPBLOCKSHIFT;
-		xh = (tmbbox[BOXRIGHT] - bmaporgx + MAXRADIUS)>>MAPBLOCKSHIFT;
-		yl = (tmbbox[BOXBOTTOM] - bmaporgy - MAXRADIUS)>>MAPBLOCKSHIFT;
-		yh = (tmbbox[BOXTOP] - bmaporgy + MAXRADIUS)>>MAPBLOCKSHIFT;
+		xl = (unsigned)(tmbbox[BOXLEFT] - bmaporgx - MAXRADIUS)>>MAPBLOCKSHIFT;
+		xh = (unsigned)(tmbbox[BOXRIGHT] - bmaporgx + MAXRADIUS)>>MAPBLOCKSHIFT;
+		yl = (unsigned)(tmbbox[BOXBOTTOM] - bmaporgy - MAXRADIUS)>>MAPBLOCKSHIFT;
+		yh = (unsigned)(tmbbox[BOXTOP] - bmaporgy + MAXRADIUS)>>MAPBLOCKSHIFT;
 		for (bx = xl; bx <= xh; bx++)
 			for (by = yl; by <= yh; by++)
 				P_BlockThingsIterator(bx,by, PIT_PushThing);
diff --git a/src/p_user.c b/src/p_user.c
index 32dc8733ff96415e4eaaa5ade5db572528771a43..c7d612efc7559c7d1405db4a20bfe96456a218db 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -2953,10 +2953,10 @@ static void P_DoTeeter(player_t *player)
 	{
 		INT32 bx, by, xl, xh, yl, yh;
 
-		yh = (player->mo->y + player->mo->radius - bmaporgy)>>MAPBLOCKSHIFT;
-		yl = (player->mo->y - player->mo->radius - bmaporgy)>>MAPBLOCKSHIFT;
-		xh = (player->mo->x + player->mo->radius - bmaporgx)>>MAPBLOCKSHIFT;
-		xl = (player->mo->x - player->mo->radius - bmaporgx)>>MAPBLOCKSHIFT;
+		yh = (unsigned)(player->mo->y + player->mo->radius - bmaporgy)>>MAPBLOCKSHIFT;
+		yl = (unsigned)(player->mo->y - player->mo->radius - bmaporgy)>>MAPBLOCKSHIFT;
+		xh = (unsigned)(player->mo->x + player->mo->radius - bmaporgx)>>MAPBLOCKSHIFT;
+		xl = (unsigned)(player->mo->x - player->mo->radius - bmaporgx)>>MAPBLOCKSHIFT;
 
 		BMBOUNDFIX(xl, xh, yl, yh);
 
@@ -3078,10 +3078,10 @@ teeterdone:
 	}
 	if (teeter)
 	{
-		if (player->panim == PA_IDLE && player->mo->state-states != S_PLAY_EDGE)
+		if (player->panim == PA_IDLE)
 			P_SetPlayerMobjState(player->mo, S_PLAY_EDGE);
 	}
-	else if (checkedforteeter && (player->mo->state-states == S_PLAY_EDGE || player->mo->state-states == S_PLAY_SUPER_EDGE))
+	else if (checkedforteeter && player->panim == PA_EDGE)
 		P_SetPlayerMobjState(player->mo, S_PLAY_STND);
 }
 
@@ -3436,14 +3436,35 @@ static void P_DoSuperStuff(player_t *player)
 
 			if (player->mo->health > 0)
 			{
-				if ((player->pflags & PF_JUMPED) || (player->pflags & PF_SPINNING))
+				if ((player->pflags & PF_JUMPED || player->pflags & PF_SPINNING)
+				&& player->mo->state-states != S_PLAY_DASH)
 					P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
-				else if (player->panim == PA_RUN)
-					P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
-				else if (player->panim == PA_WALK)
-					P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
-				else
+				else switch (player->mo->state-states)
+				{
+				default:
 					P_SetPlayerMobjState(player->mo, S_PLAY_STND);
+					break;
+				case S_PLAY_DASH:
+					break;
+				case S_PLAY_SUPER_WALK:
+					P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
+					break;
+				case S_PLAY_SUPER_RUN:
+					P_SetPlayerMobjState(player->mo, S_PLAY_RUN);
+					break;
+				case S_PLAY_SUPER_PAIN:
+					P_SetPlayerMobjState(player->mo, S_PLAY_PAIN);
+					break;
+				case S_PLAY_SUPER_JUMP:
+					P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
+					break;
+				case S_PLAY_SUPER_FALL:
+					P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
+					break;
+				case S_PLAY_SUPER_RIDE:
+					P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
+					break;
+				}
 
 				if (!player->exiting)
 				{
@@ -3630,11 +3651,22 @@ void P_DoJump(player_t *player, boolean soundandstate)
 
 	// set just an eensy above the ground
 	if (player->mo->eflags & MFE_VERTICALFLIP)
+	{
 		player->mo->z--;
+		if (player->mo->pmomz < 0)
+			player->mo->momz += player->mo->pmomz; // Add the platform's momentum to your jump.
+		else
+			player->mo->pmomz = 0;
+	}
 	else
+	{
 		player->mo->z++;
-
-	player->mo->z += player->mo->pmomz; // Solves problem of 'hitting around again after jumping on a moving platform'.
+		if (player->mo->pmomz > 0)
+			player->mo->momz += player->mo->pmomz; // Add the platform's momentum to your jump.
+		else
+			player->mo->pmomz = 0;
+	}
+	player->mo->eflags &= ~MFE_APPLYPMOMZ;
 
 	player->pflags |= PF_JUMPED;
 
@@ -3679,7 +3711,7 @@ static void P_DoSpinDash(player_t *player, ticcmd_t *cmd)
 			player->pflags |= PF_STARTDASH|PF_SPINNING;
 			player->dashspeed = FixedMul(FRACUNIT, player->mo->scale);
 			player->dashtime = 0;
-			P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
+			P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
 			player->pflags |= PF_USEDOWN;
 		}
 		else if ((cmd->buttons & BT_USE) && (player->pflags & PF_STARTDASH))
@@ -3692,9 +3724,12 @@ static void P_DoSpinDash(player_t *player, ticcmd_t *cmd)
 					S_StartSound(player->mo, sfx_spndsh); // Make the rev sound!
 
 				// Now spawn the color thok circle.
-				P_SpawnSpinMobj(player, player->revitem);
-				if (demorecording)
-					G_GhostAddRev();
+				if (player->mo->sprite2 != SPR2_DASH)
+				{
+					P_SpawnSpinMobj(player, player->revitem);
+					if (demorecording)
+						G_GhostAddRev();
+				}
 			}
 		}
 		// If not moving up or down, and travelling faster than a speed of four while not holding
@@ -3736,6 +3771,7 @@ static void P_DoSpinDash(player_t *player, ticcmd_t *cmd)
 		player->pflags &= ~PF_STARTDASH;
 		if (!((gametype == GT_RACE || gametype == GT_COMPETITION) && leveltime < 4*TICRATE))
 		{
+			P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
 			P_InstaThrust(player->mo, player->mo->angle, player->dashspeed); // catapult forward ho!!
 			if (!player->spectator)
 				S_StartSound(player->mo, sfx_zoom);
@@ -3743,7 +3779,9 @@ static void P_DoSpinDash(player_t *player, ticcmd_t *cmd)
 		player->dashspeed = 0;
 	}
 
-	if (onground && (player->pflags & PF_SPINNING) && !(player->panim == PA_ROLL))
+	if (onground && player->pflags & PF_STARTDASH && player->mo->state-states != S_PLAY_DASH)
+		P_SetPlayerMobjState(player->mo, S_PLAY_DASH);
+	else if (onground && player->pflags & PF_SPINNING && !(player->panim == PA_ROLL))
 		P_SetPlayerMobjState(player->mo, S_PLAY_SPIN);
 }
 
@@ -6411,13 +6449,17 @@ static void P_MovePlayer(player_t *player)
 	// MOVEMENT ANIMATIONS //
 	/////////////////////////
 
-	if ((cmd->forwardmove != 0 || cmd->sidemove != 0) || (player->powers[pw_super] && player->mo->z > player->mo->floorz))
+	if ((cmd->forwardmove != 0 || cmd->sidemove != 0) || (player->powers[pw_super] && !onground))
 	{
 		// If the player is moving fast enough,
 		// break into a run!
 		if (player->speed >= runspd && player->panim == PA_WALK && !player->skidtime && (onground || player->powers[pw_super]))
 			P_SetPlayerMobjState (player->mo, S_PLAY_RUN);
 
+		// Super floating at slow speeds has its own special animation.
+		else if (player->powers[pw_super] && player->panim == PA_IDLE && !onground)
+			P_SetPlayerMobjState (player->mo, S_PLAY_SUPER_FLOAT);
+
 		// Otherwise, just walk.
 		else if ((player->rmomx || player->rmomy) && player->panim == PA_IDLE)
 			P_SetPlayerMobjState (player->mo, S_PLAY_WALK);
@@ -6426,13 +6468,18 @@ static void P_MovePlayer(player_t *player)
 	// If your running animation is playing, and you're
 	// going too slow, switch back to the walking frames.
 	if (player->panim == PA_RUN && player->speed < runspd)
-		P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
+	{
+		if (!onground && player->powers[pw_super])
+			P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_FLOAT);
+		else
+			P_SetPlayerMobjState(player->mo, S_PLAY_WALK);
+	}
 
 	// If Springing, but travelling DOWNWARD, change back!
-	if (player->mo->state == &states[S_PLAY_JUMP] && P_MobjFlip(player->mo)*player->mo->momz < 0)
+	if (player->panim == PA_JUMP && P_MobjFlip(player->mo)*player->mo->momz < 0)
 		P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
 	// If Springing but on the ground, change back!
-	else if (onground && (player->mo->state == &states[S_PLAY_JUMP] || player->panim == PA_FALL || player->mo->state == &states[S_PLAY_RIDE]) && !player->mo->momz)
+	else if (onground && (player->panim == PA_JUMP || player->panim == PA_FALL || player->panim == PA_RIDE) && !player->mo->momz)
 		P_SetPlayerMobjState(player->mo, S_PLAY_STND);
 
 	// If you are stopped and are still walking, stand still!
@@ -6797,8 +6844,8 @@ static void P_MovePlayer(player_t *player)
 			if (player->charflags & SF_SUPER && player->powers[pw_super] && player->speed > FixedMul(5<<FRACBITS, player->mo->scale)
 			&& P_MobjFlip(player->mo)*player->mo->momz <= 0)
 			{
-				if (player->panim == PA_ROLL || player->mo->state-states == S_PLAY_PAIN)
-					P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_WALK);
+				if (player->panim == PA_ROLL || player->mo->state-states == S_PLAY_PAIN || player->panim == PA_WALK)
+					P_SetPlayerMobjState(player->mo, S_PLAY_SUPER_FLOAT);
 
 				player->mo->momz = 0;
 				player->pflags &= ~PF_SPINNING;
@@ -6857,7 +6904,7 @@ static void P_MovePlayer(player_t *player)
 	}
 
 	// Make sure you're not teetering when you shouldn't be.
-	if ((player->mo->state-states == S_PLAY_EDGE || player->mo->state-states == S_PLAY_SUPER_EDGE)
+	if (player->panim == PA_EDGE
 	&& (player->mo->momx || player->mo->momy || player->mo->momz))
 		P_SetPlayerMobjState(player->mo, S_PLAY_STND);
 
@@ -8086,10 +8133,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
 		INT32 xl, xh, yl, yh, bx, by;
 		validcount++;
 
-		xl = (tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
-		xh = (tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
-		yl = (tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
-		yh = (tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
+		xl = (unsigned)(tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
+		xh = (unsigned)(tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
+		yl = (unsigned)(tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
+		yh = (unsigned)(tmbbox[BOXTOP] - bmaporgy)>>MAPBLOCKSHIFT;
 
 		BMBOUNDFIX(xl, xh, yl, yh);
 
@@ -9036,7 +9083,6 @@ void P_PlayerThink(player_t *player)
 			player->mo->tracer->flags2 &= ~MF2_DONTDRAW;
 	}
 
-	player->mo->pmomz = 0;
 	player->pflags &= ~PF_SLIDING;
 
 /*
@@ -9387,4 +9433,7 @@ void P_PlayerAfterThink(player_t *player)
 		player->mo->flags2 |= MF2_DONTDRAW;
 		player->mo->flags |= MF_NOGRAVITY;
 	}
+
+	if (P_IsObjectOnGround(player->mo))
+		player->mo->pmomz = 0;
 }
diff --git a/src/tables.c b/src/tables.c
index fa71effef44bd50761014a2db52580f672421f56..190522a353651d95f12f29b6c529dd5220203ba4 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -679,1284 +679,1284 @@ fixed_t finetangent[4096] =
 
 fixed_t finesine[10240] =
 {
-	25, 75, 125, 175, 226, 276, 326, 376,
-	427, 477, 527, 578, 628, 678, 728, 779,
-	829, 879, 929, 980, 1030, 1080, 1130, 1181,
-	1231, 1281, 1331, 1382, 1432, 1482, 1532, 1583,
-	1633, 1683, 1733, 1784, 1834, 1884, 1934, 1985,
-	2035, 2085, 2135, 2186, 2236, 2286, 2336, 2387,
-	2437, 2487, 2537, 2587, 2638, 2688, 2738, 2788,
-	2839, 2889, 2939, 2989, 3039, 3090, 3140, 3190,
-	3240, 3291, 3341, 3391, 3441, 3491, 3541, 3592,
-	3642, 3692, 3742, 3792, 3843, 3893, 3943, 3993,
-	4043, 4093, 4144, 4194, 4244, 4294, 4344, 4394,
-	4445, 4495, 4545, 4595, 4645, 4695, 4745, 4796,
-	4846, 4896, 4946, 4996, 5046, 5096, 5146, 5197,
-	5247, 5297, 5347, 5397, 5447, 5497, 5547, 5597,
-	5647, 5697, 5748, 5798, 5848, 5898, 5948, 5998,
-	6048, 6098, 6148, 6198, 6248, 6298, 6348, 6398,
-	6448, 6498, 6548, 6598, 6648, 6698, 6748, 6798,
-	6848, 6898, 6948, 6998, 7048, 7098, 7148, 7198,
-	7248, 7298, 7348, 7398, 7448, 7498, 7548, 7598,
-	7648, 7697, 7747, 7797, 7847, 7897, 7947, 7997,
-	8047, 8097, 8147, 8196, 8246, 8296, 8346, 8396,
-	8446, 8496, 8545, 8595, 8645, 8695, 8745, 8794,
-	8844, 8894, 8944, 8994, 9043, 9093, 9143, 9193,
-	9243, 9292, 9342, 9392, 9442, 9491, 9541, 9591,
-	9640, 9690, 9740, 9790, 9839, 9889, 9939, 9988,
-	10038, 10088, 10137, 10187, 10237, 10286, 10336, 10386,
-	10435, 10485, 10534, 10584, 10634, 10683, 10733, 10782,
-	10832, 10882, 10931, 10981, 11030, 11080, 11129, 11179,
-	11228, 11278, 11327, 11377, 11426, 11476, 11525, 11575,
-	11624, 11674, 11723, 11773, 11822, 11872, 11921, 11970,
-	12020, 12069, 12119, 12168, 12218, 12267, 12316, 12366,
-	12415, 12464, 12514, 12563, 12612, 12662, 12711, 12760,
-	12810, 12859, 12908, 12957, 13007, 13056, 13105, 13154,
-	13204, 13253, 13302, 13351, 13401, 13450, 13499, 13548,
-	13597, 13647, 13696, 13745, 13794, 13843, 13892, 13941,
-	13990, 14040, 14089, 14138, 14187, 14236, 14285, 14334,
-	14383, 14432, 14481, 14530, 14579, 14628, 14677, 14726,
-	14775, 14824, 14873, 14922, 14971, 15020, 15069, 15118,
-	15167, 15215, 15264, 15313, 15362, 15411, 15460, 15509,
-	15557, 15606, 15655, 15704, 15753, 15802, 15850, 15899,
-	15948, 15997, 16045, 16094, 16143, 16191, 16240, 16289,
-	16338, 16386, 16435, 16484, 16532, 16581, 16629, 16678,
-	16727, 16775, 16824, 16872, 16921, 16970, 17018, 17067,
-	17115, 17164, 17212, 17261, 17309, 17358, 17406, 17455,
-	17503, 17551, 17600, 17648, 17697, 17745, 17793, 17842,
-	17890, 17939, 17987, 18035, 18084, 18132, 18180, 18228,
-	18277, 18325, 18373, 18421, 18470, 18518, 18566, 18614,
-	18663, 18711, 18759, 18807, 18855, 18903, 18951, 19000,
-	19048, 19096, 19144, 19192, 19240, 19288, 19336, 19384,
-	19432, 19480, 19528, 19576, 19624, 19672, 19720, 19768,
-	19816, 19864, 19912, 19959, 20007, 20055, 20103, 20151,
-	20199, 20246, 20294, 20342, 20390, 20438, 20485, 20533,
-	20581, 20629, 20676, 20724, 20772, 20819, 20867, 20915,
-	20962, 21010, 21057, 21105, 21153, 21200, 21248, 21295,
-	21343, 21390, 21438, 21485, 21533, 21580, 21628, 21675,
-	21723, 21770, 21817, 21865, 21912, 21960, 22007, 22054,
-	22102, 22149, 22196, 22243, 22291, 22338, 22385, 22433,
-	22480, 22527, 22574, 22621, 22668, 22716, 22763, 22810,
-	22857, 22904, 22951, 22998, 23045, 23092, 23139, 23186,
-	23233, 23280, 23327, 23374, 23421, 23468, 23515, 23562,
-	23609, 23656, 23703, 23750, 23796, 23843, 23890, 23937,
-	23984, 24030, 24077, 24124, 24171, 24217, 24264, 24311,
-	24357, 24404, 24451, 24497, 24544, 24591, 24637, 24684,
-	24730, 24777, 24823, 24870, 24916, 24963, 25009, 25056,
-	25102, 25149, 25195, 25241, 25288, 25334, 25381, 25427,
-	25473, 25520, 25566, 25612, 25658, 25705, 25751, 25797,
-	25843, 25889, 25936, 25982, 26028, 26074, 26120, 26166,
-	26212, 26258, 26304, 26350, 26396, 26442, 26488, 26534,
-	26580, 26626, 26672, 26718, 26764, 26810, 26856, 26902,
-	26947, 26993, 27039, 27085, 27131, 27176, 27222, 27268,
-	27313, 27359, 27405, 27450, 27496, 27542, 27587, 27633,
-	27678, 27724, 27770, 27815, 27861, 27906, 27952, 27997,
-	28042, 28088, 28133, 28179, 28224, 28269, 28315, 28360,
-	28405, 28451, 28496, 28541, 28586, 28632, 28677, 28722,
-	28767, 28812, 28858, 28903, 28948, 28993, 29038, 29083,
-	29128, 29173, 29218, 29263, 29308, 29353, 29398, 29443,
-	29488, 29533, 29577, 29622, 29667, 29712, 29757, 29801,
-	29846, 29891, 29936, 29980, 30025, 30070, 30114, 30159,
-	30204, 30248, 30293, 30337, 30382, 30426, 30471, 30515,
-	30560, 30604, 30649, 30693, 30738, 30782, 30826, 30871,
-	30915, 30959, 31004, 31048, 31092, 31136, 31181, 31225,
-	31269, 31313, 31357, 31402, 31446, 31490, 31534, 31578,
-	31622, 31666, 31710, 31754, 31798, 31842, 31886, 31930,
-	31974, 32017, 32061, 32105, 32149, 32193, 32236, 32280,
-	32324, 32368, 32411, 32455, 32499, 32542, 32586, 32630,
-	32673, 32717, 32760, 32804, 32847, 32891, 32934, 32978,
-	33021, 33065, 33108, 33151, 33195, 33238, 33281, 33325,
-	33368, 33411, 33454, 33498, 33541, 33584, 33627, 33670,
-	33713, 33756, 33799, 33843, 33886, 33929, 33972, 34015,
-	34057, 34100, 34143, 34186, 34229, 34272, 34315, 34358,
-	34400, 34443, 34486, 34529, 34571, 34614, 34657, 34699,
-	34742, 34785, 34827, 34870, 34912, 34955, 34997, 35040,
-	35082, 35125, 35167, 35210, 35252, 35294, 35337, 35379,
-	35421, 35464, 35506, 35548, 35590, 35633, 35675, 35717,
-	35759, 35801, 35843, 35885, 35927, 35969, 36011, 36053,
-	36095, 36137, 36179, 36221, 36263, 36305, 36347, 36388,
-	36430, 36472, 36514, 36555, 36597, 36639, 36681, 36722,
-	36764, 36805, 36847, 36889, 36930, 36972, 37013, 37055,
-	37096, 37137, 37179, 37220, 37262, 37303, 37344, 37386,
-	37427, 37468, 37509, 37551, 37592, 37633, 37674, 37715,
-	37756, 37797, 37838, 37879, 37920, 37961, 38002, 38043,
-	38084, 38125, 38166, 38207, 38248, 38288, 38329, 38370,
-	38411, 38451, 38492, 38533, 38573, 38614, 38655, 38695,
-	38736, 38776, 38817, 38857, 38898, 38938, 38979, 39019,
-	39059, 39100, 39140, 39180, 39221, 39261, 39301, 39341,
-	39382, 39422, 39462, 39502, 39542, 39582, 39622, 39662,
-	39702, 39742, 39782, 39822, 39862, 39902, 39942, 39982,
-	40021, 40061, 40101, 40141, 40180, 40220, 40260, 40300,
-	40339, 40379, 40418, 40458, 40497, 40537, 40576, 40616,
-	40655, 40695, 40734, 40773, 40813, 40852, 40891, 40931,
-	40970, 41009, 41048, 41087, 41127, 41166, 41205, 41244,
-	41283, 41322, 41361, 41400, 41439, 41478, 41517, 41556,
-	41595, 41633, 41672, 41711, 41750, 41788, 41827, 41866,
-	41904, 41943, 41982, 42020, 42059, 42097, 42136, 42174,
-	42213, 42251, 42290, 42328, 42366, 42405, 42443, 42481,
-	42520, 42558, 42596, 42634, 42672, 42711, 42749, 42787,
-	42825, 42863, 42901, 42939, 42977, 43015, 43053, 43091,
-	43128, 43166, 43204, 43242, 43280, 43317, 43355, 43393,
-	43430, 43468, 43506, 43543, 43581, 43618, 43656, 43693,
-	43731, 43768, 43806, 43843, 43880, 43918, 43955, 43992,
-	44029, 44067, 44104, 44141, 44178, 44215, 44252, 44289,
-	44326, 44363, 44400, 44437, 44474, 44511, 44548, 44585,
-	44622, 44659, 44695, 44732, 44769, 44806, 44842, 44879,
-	44915, 44952, 44989, 45025, 45062, 45098, 45135, 45171,
-	45207, 45244, 45280, 45316, 45353, 45389, 45425, 45462,
-	45498, 45534, 45570, 45606, 45642, 45678, 45714, 45750,
-	45786, 45822, 45858, 45894, 45930, 45966, 46002, 46037,
-	46073, 46109, 46145, 46180, 46216, 46252, 46287, 46323,
-	46358, 46394, 46429, 46465, 46500, 46536, 46571, 46606,
-	46642, 46677, 46712, 46747, 46783, 46818, 46853, 46888,
-	46923, 46958, 46993, 47028, 47063, 47098, 47133, 47168,
-	47203, 47238, 47273, 47308, 47342, 47377, 47412, 47446,
-	47481, 47516, 47550, 47585, 47619, 47654, 47688, 47723,
-	47757, 47792, 47826, 47860, 47895, 47929, 47963, 47998,
-	48032, 48066, 48100, 48134, 48168, 48202, 48237, 48271,
-	48305, 48338, 48372, 48406, 48440, 48474, 48508, 48542,
-	48575, 48609, 48643, 48676, 48710, 48744, 48777, 48811,
-	48844, 48878, 48911, 48945, 48978, 49012, 49045, 49078,
-	49112, 49145, 49178, 49211, 49244, 49278, 49311, 49344,
-	49377, 49410, 49443, 49476, 49509, 49542, 49575, 49608,
-	49640, 49673, 49706, 49739, 49771, 49804, 49837, 49869,
-	49902, 49935, 49967, 50000, 50032, 50065, 50097, 50129,
-	50162, 50194, 50226, 50259, 50291, 50323, 50355, 50387,
-	50420, 50452, 50484, 50516, 50548, 50580, 50612, 50644,
-	50675, 50707, 50739, 50771, 50803, 50834, 50866, 50898,
-	50929, 50961, 50993, 51024, 51056, 51087, 51119, 51150,
-	51182, 51213, 51244, 51276, 51307, 51338, 51369, 51401,
-	51432, 51463, 51494, 51525, 51556, 51587, 51618, 51649,
-	51680, 51711, 51742, 51773, 51803, 51834, 51865, 51896,
-	51926, 51957, 51988, 52018, 52049, 52079, 52110, 52140,
-	52171, 52201, 52231, 52262, 52292, 52322, 52353, 52383,
-	52413, 52443, 52473, 52503, 52534, 52564, 52594, 52624,
-	52653, 52683, 52713, 52743, 52773, 52803, 52832, 52862,
-	52892, 52922, 52951, 52981, 53010, 53040, 53069, 53099,
-	53128, 53158, 53187, 53216, 53246, 53275, 53304, 53334,
-	53363, 53392, 53421, 53450, 53479, 53508, 53537, 53566,
-	53595, 53624, 53653, 53682, 53711, 53739, 53768, 53797,
-	53826, 53854, 53883, 53911, 53940, 53969, 53997, 54026,
-	54054, 54082, 54111, 54139, 54167, 54196, 54224, 54252,
-	54280, 54308, 54337, 54365, 54393, 54421, 54449, 54477,
-	54505, 54533, 54560, 54588, 54616, 54644, 54672, 54699,
-	54727, 54755, 54782, 54810, 54837, 54865, 54892, 54920,
-	54947, 54974, 55002, 55029, 55056, 55084, 55111, 55138,
-	55165, 55192, 55219, 55246, 55274, 55300, 55327, 55354,
-	55381, 55408, 55435, 55462, 55489, 55515, 55542, 55569,
-	55595, 55622, 55648, 55675, 55701, 55728, 55754, 55781,
-	55807, 55833, 55860, 55886, 55912, 55938, 55965, 55991,
-	56017, 56043, 56069, 56095, 56121, 56147, 56173, 56199,
-	56225, 56250, 56276, 56302, 56328, 56353, 56379, 56404,
-	56430, 56456, 56481, 56507, 56532, 56557, 56583, 56608,
-	56633, 56659, 56684, 56709, 56734, 56760, 56785, 56810,
-	56835, 56860, 56885, 56910, 56935, 56959, 56984, 57009,
-	57034, 57059, 57083, 57108, 57133, 57157, 57182, 57206,
-	57231, 57255, 57280, 57304, 57329, 57353, 57377, 57402,
-	57426, 57450, 57474, 57498, 57522, 57546, 57570, 57594,
-	57618, 57642, 57666, 57690, 57714, 57738, 57762, 57785,
-	57809, 57833, 57856, 57880, 57903, 57927, 57950, 57974,
-	57997, 58021, 58044, 58067, 58091, 58114, 58137, 58160,
-	58183, 58207, 58230, 58253, 58276, 58299, 58322, 58345,
-	58367, 58390, 58413, 58436, 58459, 58481, 58504, 58527,
-	58549, 58572, 58594, 58617, 58639, 58662, 58684, 58706,
-	58729, 58751, 58773, 58795, 58818, 58840, 58862, 58884,
-	58906, 58928, 58950, 58972, 58994, 59016, 59038, 59059,
-	59081, 59103, 59125, 59146, 59168, 59190, 59211, 59233,
-	59254, 59276, 59297, 59318, 59340, 59361, 59382, 59404,
-	59425, 59446, 59467, 59488, 59509, 59530, 59551, 59572,
-	59593, 59614, 59635, 59656, 59677, 59697, 59718, 59739,
-	59759, 59780, 59801, 59821, 59842, 59862, 59883, 59903,
-	59923, 59944, 59964, 59984, 60004, 60025, 60045, 60065,
-	60085, 60105, 60125, 60145, 60165, 60185, 60205, 60225,
-	60244, 60264, 60284, 60304, 60323, 60343, 60363, 60382,
-	60402, 60421, 60441, 60460, 60479, 60499, 60518, 60537,
-	60556, 60576, 60595, 60614, 60633, 60652, 60671, 60690,
-	60709, 60728, 60747, 60766, 60785, 60803, 60822, 60841,
-	60859, 60878, 60897, 60915, 60934, 60952, 60971, 60989,
-	61007, 61026, 61044, 61062, 61081, 61099, 61117, 61135,
-	61153, 61171, 61189, 61207, 61225, 61243, 61261, 61279,
-	61297, 61314, 61332, 61350, 61367, 61385, 61403, 61420,
-	61438, 61455, 61473, 61490, 61507, 61525, 61542, 61559,
-	61577, 61594, 61611, 61628, 61645, 61662, 61679, 61696,
-	61713, 61730, 61747, 61764, 61780, 61797, 61814, 61831,
-	61847, 61864, 61880, 61897, 61913, 61930, 61946, 61963,
-	61979, 61995, 62012, 62028, 62044, 62060, 62076, 62092,
-	62108, 62125, 62141, 62156, 62172, 62188, 62204, 62220,
-	62236, 62251, 62267, 62283, 62298, 62314, 62329, 62345,
-	62360, 62376, 62391, 62407, 62422, 62437, 62453, 62468,
-	62483, 62498, 62513, 62528, 62543, 62558, 62573, 62588,
-	62603, 62618, 62633, 62648, 62662, 62677, 62692, 62706,
-	62721, 62735, 62750, 62764, 62779, 62793, 62808, 62822,
-	62836, 62850, 62865, 62879, 62893, 62907, 62921, 62935,
-	62949, 62963, 62977, 62991, 63005, 63019, 63032, 63046,
-	63060, 63074, 63087, 63101, 63114, 63128, 63141, 63155,
-	63168, 63182, 63195, 63208, 63221, 63235, 63248, 63261,
-	63274, 63287, 63300, 63313, 63326, 63339, 63352, 63365,
-	63378, 63390, 63403, 63416, 63429, 63441, 63454, 63466,
-	63479, 63491, 63504, 63516, 63528, 63541, 63553, 63565,
-	63578, 63590, 63602, 63614, 63626, 63638, 63650, 63662,
-	63674, 63686, 63698, 63709, 63721, 63733, 63745, 63756,
-	63768, 63779, 63791, 63803, 63814, 63825, 63837, 63848,
-	63859, 63871, 63882, 63893, 63904, 63915, 63927, 63938,
-	63949, 63960, 63971, 63981, 63992, 64003, 64014, 64025,
-	64035, 64046, 64057, 64067, 64078, 64088, 64099, 64109,
-	64120, 64130, 64140, 64151, 64161, 64171, 64181, 64192,
-	64202, 64212, 64222, 64232, 64242, 64252, 64261, 64271,
-	64281, 64291, 64301, 64310, 64320, 64330, 64339, 64349,
-	64358, 64368, 64377, 64387, 64396, 64405, 64414, 64424,
-	64433, 64442, 64451, 64460, 64469, 64478, 64487, 64496,
-	64505, 64514, 64523, 64532, 64540, 64549, 64558, 64566,
-	64575, 64584, 64592, 64601, 64609, 64617, 64626, 64634,
-	64642, 64651, 64659, 64667, 64675, 64683, 64691, 64699,
-	64707, 64715, 64723, 64731, 64739, 64747, 64754, 64762,
-	64770, 64777, 64785, 64793, 64800, 64808, 64815, 64822,
-	64830, 64837, 64844, 64852, 64859, 64866, 64873, 64880,
-	64887, 64895, 64902, 64908, 64915, 64922, 64929, 64936,
-	64943, 64949, 64956, 64963, 64969, 64976, 64982, 64989,
-	64995, 65002, 65008, 65015, 65021, 65027, 65033, 65040,
-	65046, 65052, 65058, 65064, 65070, 65076, 65082, 65088,
-	65094, 65099, 65105, 65111, 65117, 65122, 65128, 65133,
-	65139, 65144, 65150, 65155, 65161, 65166, 65171, 65177,
-	65182, 65187, 65192, 65197, 65202, 65207, 65212, 65217,
-	65222, 65227, 65232, 65237, 65242, 65246, 65251, 65256,
-	65260, 65265, 65270, 65274, 65279, 65283, 65287, 65292,
-	65296, 65300, 65305, 65309, 65313, 65317, 65321, 65325,
-	65329, 65333, 65337, 65341, 65345, 65349, 65352, 65356,
-	65360, 65363, 65367, 65371, 65374, 65378, 65381, 65385,
-	65388, 65391, 65395, 65398, 65401, 65404, 65408, 65411,
-	65414, 65417, 65420, 65423, 65426, 65429, 65431, 65434,
-	65437, 65440, 65442, 65445, 65448, 65450, 65453, 65455,
-	65458, 65460, 65463, 65465, 65467, 65470, 65472, 65474,
-	65476, 65478, 65480, 65482, 65484, 65486, 65488, 65490,
-	65492, 65494, 65496, 65497, 65499, 65501, 65502, 65504,
-	65505, 65507, 65508, 65510, 65511, 65513, 65514, 65515,
-	65516, 65518, 65519, 65520, 65521, 65522, 65523, 65524,
-	65525, 65526, 65527, 65527, 65528, 65529, 65530, 65530,
+	0, 50, 100, 150, 201, 251, 301, 351,
+	402, 452, 502, 552, 603, 653, 703, 753,
+	804, 854, 904, 955, 1005, 1055, 1105, 1156,
+	1206, 1256, 1306, 1357, 1407, 1457, 1507, 1558,
+	1608, 1658, 1708, 1759, 1809, 1859, 1909, 1960,
+	2010, 2060, 2110, 2161, 2211, 2261, 2311, 2361,
+	2412, 2462, 2512, 2562, 2613, 2663, 2713, 2763,
+	2814, 2864, 2914, 2964, 3014, 3065, 3115, 3165,
+	3215, 3265, 3316, 3366, 3416, 3466, 3516, 3567,
+	3617, 3667, 3717, 3767, 3818, 3868, 3918, 3968,
+	4018, 4068, 4119, 4169, 4219, 4269, 4319, 4369,
+	4420, 4470, 4520, 4570, 4620, 4670, 4720, 4770,
+	4821, 4871, 4921, 4971, 5021, 5071, 5121, 5171,
+	5222, 5272, 5322, 5372, 5422, 5472, 5522, 5572,
+	5622, 5672, 5722, 5773, 5823, 5873, 5923, 5973,
+	6023, 6073, 6123, 6173, 6223, 6273, 6323, 6373,
+	6423, 6473, 6523, 6573, 6623, 6673, 6723, 6773,
+	6823, 6873, 6923, 6973, 7023, 7073, 7123, 7173,
+	7223, 7273, 7323, 7373, 7423, 7473, 7523, 7573,
+	7623, 7672, 7722, 7772, 7822, 7872, 7922, 7972,
+	8022, 8072, 8122, 8171, 8221, 8271, 8321, 8371,
+	8421, 8471, 8520, 8570, 8620, 8670, 8720, 8770,
+	8819, 8869, 8919, 8969, 9019, 9068, 9118, 9168,
+	9218, 9267, 9317, 9367, 9417, 9466, 9516, 9566,
+	9616, 9665, 9715, 9765, 9814, 9864, 9914, 9964,
+	10013, 10063, 10113, 10162, 10212, 10262, 10311, 10361,
+	10410, 10460, 10510, 10559, 10609, 10658, 10708, 10758,
+	10807, 10857, 10906, 10956, 11006, 11055, 11105, 11154,
+	11204, 11253, 11303, 11352, 11402, 11451, 11501, 11550,
+	11600, 11649, 11699, 11748, 11797, 11847, 11896, 11946,
+	11995, 12045, 12094, 12143, 12193, 12242, 12292, 12341,
+	12390, 12440, 12489, 12538, 12588, 12637, 12686, 12736,
+	12785, 12834, 12884, 12933, 12982, 13031, 13081, 13130,
+	13179, 13228, 13278, 13327, 13376, 13425, 13474, 13524,
+	13573, 13622, 13671, 13720, 13769, 13819, 13868, 13917,
+	13966, 14015, 14064, 14113, 14162, 14211, 14260, 14309,
+	14359, 14408, 14457, 14506, 14555, 14604, 14653, 14702,
+	14751, 14800, 14849, 14897, 14946, 14995, 15044, 15093,
+	15142, 15191, 15240, 15289, 15338, 15387, 15435, 15484,
+	15533, 15582, 15631, 15680, 15728, 15777, 15826, 15875,
+	15923, 15972, 16021, 16070, 16118, 16167, 16216, 16265,
+	16313, 16362, 16411, 16459, 16508, 16557, 16605, 16654,
+	16702, 16751, 16800, 16848, 16897, 16945, 16994, 17042,
+	17091, 17139, 17188, 17236, 17285, 17333, 17382, 17430,
+	17479, 17527, 17576, 17624, 17672, 17721, 17769, 17818,
+	17866, 17914, 17963, 18011, 18059, 18108, 18156, 18204,
+	18253, 18301, 18349, 18397, 18446, 18494, 18542, 18590,
+	18638, 18687, 18735, 18783, 18831, 18879, 18927, 18975,
+	19024, 19072, 19120, 19168, 19216, 19264, 19312, 19360,
+	19408, 19456, 19504, 19552, 19600, 19648, 19696, 19744,
+	19792, 19840, 19888, 19935, 19983, 20031, 20079, 20127,
+	20175, 20223, 20270, 20318, 20366, 20414, 20461, 20509,
+	20557, 20605, 20652, 20700, 20748, 20795, 20843, 20891,
+	20938, 20986, 21034, 21081, 21129, 21176, 21224, 21271,
+	21319, 21367, 21414, 21462, 21509, 21557, 21604, 21651,
+	21699, 21746, 21794, 21841, 21889, 21936, 21983, 22031,
+	22078, 22125, 22173, 22220, 22267, 22314, 22362, 22409,
+	22456, 22503, 22551, 22598, 22645, 22692, 22739, 22786,
+	22833, 22881, 22928, 22975, 23022, 23069, 23116, 23163,
+	23210, 23257, 23304, 23351, 23398, 23445, 23492, 23539,
+	23586, 23632, 23679, 23726, 23773, 23820, 23867, 23914,
+	23960, 24007, 24054, 24101, 24147, 24194, 24241, 24287,
+	24334, 24381, 24427, 24474, 24521, 24567, 24614, 24660,
+	24707, 24754, 24800, 24847, 24893, 24940, 24986, 25033,
+	25079, 25125, 25172, 25218, 25265, 25311, 25357, 25404,
+	25450, 25496, 25543, 25589, 25635, 25681, 25728, 25774,
+	25820, 25866, 25913, 25959, 26005, 26051, 26097, 26143,
+	26189, 26235, 26281, 26327, 26373, 26419, 26465, 26511,
+	26557, 26603, 26649, 26695, 26741, 26787, 26833, 26879,
+	26925, 26970, 27016, 27062, 27108, 27153, 27199, 27245,
+	27291, 27336, 27382, 27428, 27473, 27519, 27565, 27610,
+	27656, 27701, 27747, 27792, 27838, 27883, 27929, 27974,
+	28020, 28065, 28111, 28156, 28201, 28247, 28292, 28337,
+	28383, 28428, 28473, 28519, 28564, 28609, 28654, 28699,
+	28745, 28790, 28835, 28880, 28925, 28970, 29015, 29060,
+	29105, 29151, 29196, 29241, 29285, 29330, 29375, 29420,
+	29465, 29510, 29555, 29600, 29645, 29690, 29734, 29779,
+	29824, 29869, 29913, 29958, 30003, 30047, 30092, 30137,
+	30181, 30226, 30271, 30315, 30360, 30404, 30449, 30493,
+	30538, 30582, 30627, 30671, 30715, 30760, 30804, 30849,
+	30893, 30937, 30982, 31026, 31070, 31114, 31159, 31203,
+	31247, 31291, 31335, 31379, 31424, 31468, 31512, 31556,
+	31600, 31644, 31688, 31732, 31776, 31820, 31864, 31908,
+	31952, 31995, 32039, 32083, 32127, 32171, 32215, 32258,
+	32302, 32346, 32390, 32433, 32477, 32521, 32564, 32608,
+	32651, 32695, 32738, 32782, 32826, 32869, 32912, 32956,
+	32999, 33043, 33086, 33130, 33173, 33216, 33260, 33303,
+	33346, 33389, 33433, 33476, 33519, 33562, 33605, 33649,
+	33692, 33735, 33778, 33821, 33864, 33907, 33950, 33993,
+	34036, 34079, 34122, 34165, 34208, 34251, 34293, 34336,
+	34379, 34422, 34465, 34507, 34550, 34593, 34635, 34678,
+	34721, 34763, 34806, 34849, 34891, 34934, 34976, 35019,
+	35061, 35104, 35146, 35188, 35231, 35273, 35316, 35358,
+	35400, 35442, 35485, 35527, 35569, 35611, 35654, 35696,
+	35738, 35780, 35822, 35864, 35906, 35948, 35990, 36032,
+	36074, 36116, 36158, 36200, 36242, 36284, 36326, 36368,
+	36409, 36451, 36493, 36535, 36576, 36618, 36660, 36701,
+	36743, 36785, 36826, 36868, 36909, 36951, 36992, 37034,
+	37075, 37117, 37158, 37200, 37241, 37282, 37324, 37365,
+	37406, 37447, 37489, 37530, 37571, 37612, 37653, 37695,
+	37736, 37777, 37818, 37859, 37900, 37941, 37982, 38023,
+	38064, 38105, 38146, 38186, 38227, 38268, 38309, 38350,
+	38390, 38431, 38472, 38512, 38553, 38594, 38634, 38675,
+	38716, 38756, 38797, 38837, 38878, 38918, 38958, 38999,
+	39039, 39080, 39120, 39160, 39201, 39241, 39281, 39321,
+	39362, 39402, 39442, 39482, 39522, 39562, 39602, 39642,
+	39682, 39722, 39762, 39802, 39842, 39882, 39922, 39962,
+	40002, 40041, 40081, 40121, 40161, 40200, 40240, 40280,
+	40319, 40359, 40399, 40438, 40478, 40517, 40557, 40596,
+	40636, 40675, 40714, 40754, 40793, 40832, 40872, 40911,
+	40950, 40990, 41029, 41068, 41107, 41146, 41185, 41224,
+	41263, 41303, 41342, 41381, 41419, 41458, 41497, 41536,
+	41575, 41614, 41653, 41692, 41730, 41769, 41808, 41846,
+	41885, 41924, 41962, 42001, 42040, 42078, 42117, 42155,
+	42194, 42232, 42271, 42309, 42347, 42386, 42424, 42462,
+	42501, 42539, 42577, 42615, 42653, 42692, 42730, 42768,
+	42806, 42844, 42882, 42920, 42958, 42996, 43034, 43072,
+	43110, 43147, 43185, 43223, 43261, 43298, 43336, 43374,
+	43412, 43449, 43487, 43524, 43562, 43600, 43637, 43675,
+	43712, 43749, 43787, 43824, 43862, 43899, 43936, 43974,
+	44011, 44048, 44085, 44122, 44160, 44197, 44234, 44271,
+	44308, 44345, 44382, 44419, 44456, 44493, 44530, 44567,
+	44603, 44640, 44677, 44714, 44750, 44787, 44824, 44861,
+	44897, 44934, 44970, 45007, 45043, 45080, 45116, 45153,
+	45189, 45226, 45262, 45298, 45335, 45371, 45407, 45443,
+	45480, 45516, 45552, 45588, 45624, 45660, 45696, 45732,
+	45768, 45804, 45840, 45876, 45912, 45948, 45984, 46019,
+	46055, 46091, 46127, 46162, 46198, 46234, 46269, 46305,
+	46340, 46376, 46411, 46447, 46482, 46518, 46553, 46589,
+	46624, 46659, 46695, 46730, 46765, 46800, 46835, 46871,
+	46906, 46941, 46976, 47011, 47046, 47081, 47116, 47151,
+	47186, 47220, 47255, 47290, 47325, 47360, 47394, 47429,
+	47464, 47498, 47533, 47568, 47602, 47637, 47671, 47706,
+	47740, 47775, 47809, 47843, 47878, 47912, 47946, 47981,
+	48015, 48049, 48083, 48117, 48151, 48185, 48219, 48254,
+	48288, 48321, 48355, 48389, 48423, 48457, 48491, 48525,
+	48558, 48592, 48626, 48660, 48693, 48727, 48760, 48794,
+	48828, 48861, 48895, 48928, 48961, 48995, 49028, 49062,
+	49095, 49128, 49161, 49195, 49228, 49261, 49294, 49327,
+	49360, 49393, 49426, 49459, 49492, 49525, 49558, 49591,
+	49624, 49657, 49690, 49722, 49755, 49788, 49820, 49853,
+	49886, 49918, 49951, 49983, 50016, 50048, 50081, 50113,
+	50146, 50178, 50210, 50242, 50275, 50307, 50339, 50371,
+	50403, 50436, 50468, 50500, 50532, 50564, 50596, 50628,
+	50660, 50691, 50723, 50755, 50787, 50819, 50850, 50882,
+	50914, 50945, 50977, 51008, 51040, 51072, 51103, 51134,
+	51166, 51197, 51229, 51260, 51291, 51323, 51354, 51385,
+	51416, 51447, 51478, 51510, 51541, 51572, 51603, 51634,
+	51665, 51695, 51726, 51757, 51788, 51819, 51850, 51880,
+	51911, 51942, 51972, 52003, 52033, 52064, 52095, 52125,
+	52155, 52186, 52216, 52247, 52277, 52307, 52338, 52368,
+	52398, 52428, 52458, 52488, 52518, 52549, 52579, 52609,
+	52639, 52668, 52698, 52728, 52758, 52788, 52818, 52847,
+	52877, 52907, 52936, 52966, 52996, 53025, 53055, 53084,
+	53114, 53143, 53172, 53202, 53231, 53260, 53290, 53319,
+	53348, 53377, 53407, 53436, 53465, 53494, 53523, 53552,
+	53581, 53610, 53639, 53667, 53696, 53725, 53754, 53783,
+	53811, 53840, 53869, 53897, 53926, 53954, 53983, 54011,
+	54040, 54068, 54097, 54125, 54153, 54182, 54210, 54238,
+	54266, 54294, 54323, 54351, 54379, 54407, 54435, 54463,
+	54491, 54519, 54546, 54574, 54602, 54630, 54658, 54685,
+	54713, 54741, 54768, 54796, 54823, 54851, 54879, 54906,
+	54933, 54961, 54988, 55015, 55043, 55070, 55097, 55124,
+	55152, 55179, 55206, 55233, 55260, 55287, 55314, 55341,
+	55368, 55395, 55422, 55448, 55475, 55502, 55529, 55555,
+	55582, 55609, 55635, 55662, 55688, 55715, 55741, 55768,
+	55794, 55820, 55847, 55873, 55899, 55925, 55952, 55978,
+	56004, 56030, 56056, 56082, 56108, 56134, 56160, 56186,
+	56212, 56237, 56263, 56289, 56315, 56340, 56366, 56392,
+	56417, 56443, 56468, 56494, 56519, 56545, 56570, 56595,
+	56621, 56646, 56671, 56697, 56722, 56747, 56772, 56797,
+	56822, 56847, 56872, 56897, 56922, 56947, 56972, 56997,
+	57022, 57046, 57071, 57096, 57120, 57145, 57170, 57194,
+	57219, 57243, 57268, 57292, 57316, 57341, 57365, 57389,
+	57414, 57438, 57462, 57486, 57510, 57534, 57558, 57582,
+	57606, 57630, 57654, 57678, 57702, 57726, 57750, 57773,
+	57797, 57821, 57844, 57868, 57892, 57915, 57939, 57962,
+	57986, 58009, 58032, 58056, 58079, 58102, 58125, 58149,
+	58172, 58195, 58218, 58241, 58264, 58287, 58310, 58333,
+	58356, 58379, 58402, 58424, 58447, 58470, 58493, 58515,
+	58538, 58560, 58583, 58605, 58628, 58650, 58673, 58695,
+	58718, 58740, 58762, 58784, 58807, 58829, 58851, 58873,
+	58895, 58917, 58939, 58961, 58983, 59005, 59027, 59049,
+	59070, 59092, 59114, 59135, 59157, 59179, 59200, 59222,
+	59243, 59265, 59286, 59308, 59329, 59350, 59372, 59393,
+	59414, 59435, 59457, 59478, 59499, 59520, 59541, 59562,
+	59583, 59604, 59625, 59645, 59666, 59687, 59708, 59728,
+	59749, 59770, 59790, 59811, 59831, 59852, 59872, 59893,
+	59913, 59934, 59954, 59974, 59994, 60015, 60035, 60055,
+	60075, 60095, 60115, 60135, 60155, 60175, 60195, 60215,
+	60235, 60254, 60274, 60294, 60313, 60333, 60353, 60372,
+	60392, 60411, 60431, 60450, 60470, 60489, 60508, 60528,
+	60547, 60566, 60585, 60604, 60624, 60643, 60662, 60681,
+	60700, 60719, 60737, 60756, 60775, 60794, 60813, 60831,
+	60850, 60869, 60887, 60906, 60924, 60943, 60961, 60980,
+	60998, 61017, 61035, 61053, 61071, 61090, 61108, 61126,
+	61144, 61162, 61180, 61198, 61216, 61234, 61252, 61270,
+	61288, 61305, 61323, 61341, 61359, 61376, 61394, 61411,
+	61429, 61446, 61464, 61481, 61499, 61516, 61533, 61551,
+	61568, 61585, 61602, 61619, 61637, 61654, 61671, 61688,
+	61705, 61721, 61738, 61755, 61772, 61789, 61805, 61822,
+	61839, 61855, 61872, 61889, 61905, 61922, 61938, 61954,
+	61971, 61987, 62003, 62020, 62036, 62052, 62068, 62084,
+	62100, 62117, 62133, 62148, 62164, 62180, 62196, 62212,
+	62228, 62244, 62259, 62275, 62291, 62306, 62322, 62337,
+	62353, 62368, 62384, 62399, 62414, 62430, 62445, 62460,
+	62475, 62491, 62506, 62521, 62536, 62551, 62566, 62581,
+	62596, 62610, 62625, 62640, 62655, 62670, 62684, 62699,
+	62714, 62728, 62743, 62757, 62772, 62786, 62800, 62815,
+	62829, 62843, 62858, 62872, 62886, 62900, 62914, 62928,
+	62942, 62956, 62970, 62984, 62998, 63012, 63026, 63039,
+	63053, 63067, 63080, 63094, 63108, 63121, 63135, 63148,
+	63162, 63175, 63188, 63202, 63215, 63228, 63241, 63254,
+	63268, 63281, 63294, 63307, 63320, 63333, 63346, 63358,
+	63371, 63384, 63397, 63410, 63422, 63435, 63447, 63460,
+	63473, 63485, 63498, 63510, 63522, 63535, 63547, 63559,
+	63571, 63584, 63596, 63608, 63620, 63632, 63644, 63656,
+	63668, 63680, 63692, 63704, 63715, 63727, 63739, 63750,
+	63762, 63774, 63785, 63797, 63808, 63820, 63831, 63842,
+	63854, 63865, 63876, 63888, 63899, 63910, 63921, 63932,
+	63943, 63954, 63965, 63976, 63987, 63998, 64009, 64019,
+	64030, 64041, 64051, 64062, 64073, 64083, 64094, 64104,
+	64115, 64125, 64135, 64146, 64156, 64166, 64176, 64186,
+	64197, 64207, 64217, 64227, 64237, 64247, 64257, 64266,
+	64276, 64286, 64296, 64305, 64315, 64325, 64334, 64344,
+	64353, 64363, 64372, 64382, 64391, 64401, 64410, 64419,
+	64428, 64437, 64447, 64456, 64465, 64474, 64483, 64492,
+	64501, 64510, 64518, 64527, 64536, 64545, 64553, 64562,
+	64571, 64579, 64588, 64596, 64605, 64613, 64622, 64630,
+	64638, 64646, 64655, 64663, 64671, 64679, 64687, 64695,
+	64703, 64711, 64719, 64727, 64735, 64743, 64751, 64758,
+	64766, 64774, 64781, 64789, 64796, 64804, 64811, 64819,
+	64826, 64834, 64841, 64848, 64855, 64863, 64870, 64877,
+	64884, 64891, 64898, 64905, 64912, 64919, 64926, 64933,
+	64939, 64946, 64953, 64959, 64966, 64973, 64979, 64986,
+	64992, 64999, 65005, 65011, 65018, 65024, 65030, 65036,
+	65043, 65049, 65055, 65061, 65067, 65073, 65079, 65085,
+	65091, 65096, 65102, 65108, 65114, 65119, 65125, 65131,
+	65136, 65142, 65147, 65153, 65158, 65163, 65169, 65174,
+	65179, 65184, 65190, 65195, 65200, 65205, 65210, 65215,
+	65220, 65225, 65230, 65235, 65239, 65244, 65249, 65253,
+	65258, 65263, 65267, 65272, 65276, 65281, 65285, 65290,
+	65294, 65298, 65302, 65307, 65311, 65315, 65319, 65323,
+	65327, 65331, 65335, 65339, 65343, 65347, 65350, 65354,
+	65358, 65362, 65365, 65369, 65372, 65376, 65379, 65383,
+	65386, 65390, 65393, 65396, 65400, 65403, 65406, 65409,
+	65412, 65415, 65418, 65421, 65424, 65427, 65430, 65433,
+	65436, 65438, 65441, 65444, 65446, 65449, 65452, 65454,
+	65457, 65459, 65461, 65464, 65466, 65468, 65471, 65473,
+	65475, 65477, 65479, 65481, 65483, 65485, 65487, 65489,
+	65491, 65493, 65495, 65496, 65498, 65500, 65501, 65503,
+	65505, 65506, 65508, 65509, 65511, 65512, 65513, 65515,
+	65516, 65517, 65518, 65519, 65520, 65521, 65522, 65523,
+	65524, 65525, 65526, 65527, 65528, 65529, 65529, 65530,
 	65531, 65531, 65532, 65532, 65533, 65533, 65534, 65534,
 	65534, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
-	65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
-	65534, 65534, 65533, 65533, 65532, 65532, 65531, 65531,
-	65530, 65530, 65529, 65528, 65527, 65527, 65526, 65525,
-	65524, 65523, 65522, 65521, 65520, 65519, 65518, 65516,
-	65515, 65514, 65513, 65511, 65510, 65508, 65507, 65505,
-	65504, 65502, 65501, 65499, 65497, 65496, 65494, 65492,
-	65490, 65488, 65486, 65484, 65482, 65480, 65478, 65476,
-	65474, 65472, 65470, 65467, 65465, 65463, 65460, 65458,
-	65455, 65453, 65450, 65448, 65445, 65442, 65440, 65437,
-	65434, 65431, 65429, 65426, 65423, 65420, 65417, 65414,
-	65411, 65408, 65404, 65401, 65398, 65395, 65391, 65388,
-	65385, 65381, 65378, 65374, 65371, 65367, 65363, 65360,
-	65356, 65352, 65349, 65345, 65341, 65337, 65333, 65329,
-	65325, 65321, 65317, 65313, 65309, 65305, 65300, 65296,
-	65292, 65287, 65283, 65279, 65274, 65270, 65265, 65260,
-	65256, 65251, 65246, 65242, 65237, 65232, 65227, 65222,
-	65217, 65212, 65207, 65202, 65197, 65192, 65187, 65182,
-	65177, 65171, 65166, 65161, 65155, 65150, 65144, 65139,
-	65133, 65128, 65122, 65117, 65111, 65105, 65099, 65094,
-	65088, 65082, 65076, 65070, 65064, 65058, 65052, 65046,
-	65040, 65033, 65027, 65021, 65015, 65008, 65002, 64995,
-	64989, 64982, 64976, 64969, 64963, 64956, 64949, 64943,
-	64936, 64929, 64922, 64915, 64908, 64902, 64895, 64887,
-	64880, 64873, 64866, 64859, 64852, 64844, 64837, 64830,
-	64822, 64815, 64808, 64800, 64793, 64785, 64777, 64770,
-	64762, 64754, 64747, 64739, 64731, 64723, 64715, 64707,
-	64699, 64691, 64683, 64675, 64667, 64659, 64651, 64642,
-	64634, 64626, 64617, 64609, 64600, 64592, 64584, 64575,
-	64566, 64558, 64549, 64540, 64532, 64523, 64514, 64505,
-	64496, 64487, 64478, 64469, 64460, 64451, 64442, 64433,
-	64424, 64414, 64405, 64396, 64387, 64377, 64368, 64358,
-	64349, 64339, 64330, 64320, 64310, 64301, 64291, 64281,
-	64271, 64261, 64252, 64242, 64232, 64222, 64212, 64202,
-	64192, 64181, 64171, 64161, 64151, 64140, 64130, 64120,
-	64109, 64099, 64088, 64078, 64067, 64057, 64046, 64035,
-	64025, 64014, 64003, 63992, 63981, 63971, 63960, 63949,
-	63938, 63927, 63915, 63904, 63893, 63882, 63871, 63859,
-	63848, 63837, 63825, 63814, 63803, 63791, 63779, 63768,
-	63756, 63745, 63733, 63721, 63709, 63698, 63686, 63674,
-	63662, 63650, 63638, 63626, 63614, 63602, 63590, 63578,
-	63565, 63553, 63541, 63528, 63516, 63504, 63491, 63479,
-	63466, 63454, 63441, 63429, 63416, 63403, 63390, 63378,
-	63365, 63352, 63339, 63326, 63313, 63300, 63287, 63274,
-	63261, 63248, 63235, 63221, 63208, 63195, 63182, 63168,
-	63155, 63141, 63128, 63114, 63101, 63087, 63074, 63060,
-	63046, 63032, 63019, 63005, 62991, 62977, 62963, 62949,
-	62935, 62921, 62907, 62893, 62879, 62865, 62850, 62836,
-	62822, 62808, 62793, 62779, 62764, 62750, 62735, 62721,
-	62706, 62692, 62677, 62662, 62648, 62633, 62618, 62603,
-	62588, 62573, 62558, 62543, 62528, 62513, 62498, 62483,
-	62468, 62453, 62437, 62422, 62407, 62391, 62376, 62360,
-	62345, 62329, 62314, 62298, 62283, 62267, 62251, 62236,
-	62220, 62204, 62188, 62172, 62156, 62141, 62125, 62108,
-	62092, 62076, 62060, 62044, 62028, 62012, 61995, 61979,
-	61963, 61946, 61930, 61913, 61897, 61880, 61864, 61847,
-	61831, 61814, 61797, 61780, 61764, 61747, 61730, 61713,
-	61696, 61679, 61662, 61645, 61628, 61611, 61594, 61577,
-	61559, 61542, 61525, 61507, 61490, 61473, 61455, 61438,
-	61420, 61403, 61385, 61367, 61350, 61332, 61314, 61297,
-	61279, 61261, 61243, 61225, 61207, 61189, 61171, 61153,
-	61135, 61117, 61099, 61081, 61062, 61044, 61026, 61007,
-	60989, 60971, 60952, 60934, 60915, 60897, 60878, 60859,
-	60841, 60822, 60803, 60785, 60766, 60747, 60728, 60709,
-	60690, 60671, 60652, 60633, 60614, 60595, 60576, 60556,
-	60537, 60518, 60499, 60479, 60460, 60441, 60421, 60402,
-	60382, 60363, 60343, 60323, 60304, 60284, 60264, 60244,
-	60225, 60205, 60185, 60165, 60145, 60125, 60105, 60085,
-	60065, 60045, 60025, 60004, 59984, 59964, 59944, 59923,
-	59903, 59883, 59862, 59842, 59821, 59801, 59780, 59759,
-	59739, 59718, 59697, 59677, 59656, 59635, 59614, 59593,
-	59572, 59551, 59530, 59509, 59488, 59467, 59446, 59425,
-	59404, 59382, 59361, 59340, 59318, 59297, 59276, 59254,
-	59233, 59211, 59190, 59168, 59146, 59125, 59103, 59081,
-	59059, 59038, 59016, 58994, 58972, 58950, 58928, 58906,
-	58884, 58862, 58840, 58818, 58795, 58773, 58751, 58729,
-	58706, 58684, 58662, 58639, 58617, 58594, 58572, 58549,
-	58527, 58504, 58481, 58459, 58436, 58413, 58390, 58367,
-	58345, 58322, 58299, 58276, 58253, 58230, 58207, 58183,
-	58160, 58137, 58114, 58091, 58067, 58044, 58021, 57997,
-	57974, 57950, 57927, 57903, 57880, 57856, 57833, 57809,
-	57785, 57762, 57738, 57714, 57690, 57666, 57642, 57618,
-	57594, 57570, 57546, 57522, 57498, 57474, 57450, 57426,
-	57402, 57377, 57353, 57329, 57304, 57280, 57255, 57231,
-	57206, 57182, 57157, 57133, 57108, 57083, 57059, 57034,
-	57009, 56984, 56959, 56935, 56910, 56885, 56860, 56835,
-	56810, 56785, 56760, 56734, 56709, 56684, 56659, 56633,
-	56608, 56583, 56557, 56532, 56507, 56481, 56456, 56430,
-	56404, 56379, 56353, 56328, 56302, 56276, 56250, 56225,
-	56199, 56173, 56147, 56121, 56095, 56069, 56043, 56017,
-	55991, 55965, 55938, 55912, 55886, 55860, 55833, 55807,
-	55781, 55754, 55728, 55701, 55675, 55648, 55622, 55595,
-	55569, 55542, 55515, 55489, 55462, 55435, 55408, 55381,
-	55354, 55327, 55300, 55274, 55246, 55219, 55192, 55165,
-	55138, 55111, 55084, 55056, 55029, 55002, 54974, 54947,
-	54920, 54892, 54865, 54837, 54810, 54782, 54755, 54727,
-	54699, 54672, 54644, 54616, 54588, 54560, 54533, 54505,
-	54477, 54449, 54421, 54393, 54365, 54337, 54308, 54280,
-	54252, 54224, 54196, 54167, 54139, 54111, 54082, 54054,
-	54026, 53997, 53969, 53940, 53911, 53883, 53854, 53826,
-	53797, 53768, 53739, 53711, 53682, 53653, 53624, 53595,
-	53566, 53537, 53508, 53479, 53450, 53421, 53392, 53363,
-	53334, 53304, 53275, 53246, 53216, 53187, 53158, 53128,
-	53099, 53069, 53040, 53010, 52981, 52951, 52922, 52892,
-	52862, 52832, 52803, 52773, 52743, 52713, 52683, 52653,
-	52624, 52594, 52564, 52534, 52503, 52473, 52443, 52413,
-	52383, 52353, 52322, 52292, 52262, 52231, 52201, 52171,
-	52140, 52110, 52079, 52049, 52018, 51988, 51957, 51926,
-	51896, 51865, 51834, 51803, 51773, 51742, 51711, 51680,
-	51649, 51618, 51587, 51556, 51525, 51494, 51463, 51432,
-	51401, 51369, 51338, 51307, 51276, 51244, 51213, 51182,
-	51150, 51119, 51087, 51056, 51024, 50993, 50961, 50929,
-	50898, 50866, 50834, 50803, 50771, 50739, 50707, 50675,
-	50644, 50612, 50580, 50548, 50516, 50484, 50452, 50420,
-	50387, 50355, 50323, 50291, 50259, 50226, 50194, 50162,
-	50129, 50097, 50065, 50032, 50000, 49967, 49935, 49902,
-	49869, 49837, 49804, 49771, 49739, 49706, 49673, 49640,
-	49608, 49575, 49542, 49509, 49476, 49443, 49410, 49377,
-	49344, 49311, 49278, 49244, 49211, 49178, 49145, 49112,
-	49078, 49045, 49012, 48978, 48945, 48911, 48878, 48844,
-	48811, 48777, 48744, 48710, 48676, 48643, 48609, 48575,
-	48542, 48508, 48474, 48440, 48406, 48372, 48338, 48304,
-	48271, 48237, 48202, 48168, 48134, 48100, 48066, 48032,
-	47998, 47963, 47929, 47895, 47860, 47826, 47792, 47757,
-	47723, 47688, 47654, 47619, 47585, 47550, 47516, 47481,
-	47446, 47412, 47377, 47342, 47308, 47273, 47238, 47203,
-	47168, 47133, 47098, 47063, 47028, 46993, 46958, 46923,
-	46888, 46853, 46818, 46783, 46747, 46712, 46677, 46642,
-	46606, 46571, 46536, 46500, 46465, 46429, 46394, 46358,
-	46323, 46287, 46252, 46216, 46180, 46145, 46109, 46073,
-	46037, 46002, 45966, 45930, 45894, 45858, 45822, 45786,
-	45750, 45714, 45678, 45642, 45606, 45570, 45534, 45498,
-	45462, 45425, 45389, 45353, 45316, 45280, 45244, 45207,
-	45171, 45135, 45098, 45062, 45025, 44989, 44952, 44915,
-	44879, 44842, 44806, 44769, 44732, 44695, 44659, 44622,
-	44585, 44548, 44511, 44474, 44437, 44400, 44363, 44326,
-	44289, 44252, 44215, 44178, 44141, 44104, 44067, 44029,
-	43992, 43955, 43918, 43880, 43843, 43806, 43768, 43731,
-	43693, 43656, 43618, 43581, 43543, 43506, 43468, 43430,
-	43393, 43355, 43317, 43280, 43242, 43204, 43166, 43128,
-	43091, 43053, 43015, 42977, 42939, 42901, 42863, 42825,
-	42787, 42749, 42711, 42672, 42634, 42596, 42558, 42520,
-	42481, 42443, 42405, 42366, 42328, 42290, 42251, 42213,
-	42174, 42136, 42097, 42059, 42020, 41982, 41943, 41904,
-	41866, 41827, 41788, 41750, 41711, 41672, 41633, 41595,
-	41556, 41517, 41478, 41439, 41400, 41361, 41322, 41283,
-	41244, 41205, 41166, 41127, 41088, 41048, 41009, 40970,
-	40931, 40891, 40852, 40813, 40773, 40734, 40695, 40655,
-	40616, 40576, 40537, 40497, 40458, 40418, 40379, 40339,
-	40300, 40260, 40220, 40180, 40141, 40101, 40061, 40021,
-	39982, 39942, 39902, 39862, 39822, 39782, 39742, 39702,
-	39662, 39622, 39582, 39542, 39502, 39462, 39422, 39382,
-	39341, 39301, 39261, 39221, 39180, 39140, 39100, 39059,
-	39019, 38979, 38938, 38898, 38857, 38817, 38776, 38736,
-	38695, 38655, 38614, 38573, 38533, 38492, 38451, 38411,
-	38370, 38329, 38288, 38248, 38207, 38166, 38125, 38084,
-	38043, 38002, 37961, 37920, 37879, 37838, 37797, 37756,
-	37715, 37674, 37633, 37592, 37551, 37509, 37468, 37427,
-	37386, 37344, 37303, 37262, 37220, 37179, 37137, 37096,
-	37055, 37013, 36972, 36930, 36889, 36847, 36805, 36764,
-	36722, 36681, 36639, 36597, 36556, 36514, 36472, 36430,
-	36388, 36347, 36305, 36263, 36221, 36179, 36137, 36095,
-	36053, 36011, 35969, 35927, 35885, 35843, 35801, 35759,
-	35717, 35675, 35633, 35590, 35548, 35506, 35464, 35421,
-	35379, 35337, 35294, 35252, 35210, 35167, 35125, 35082,
-	35040, 34997, 34955, 34912, 34870, 34827, 34785, 34742,
-	34699, 34657, 34614, 34571, 34529, 34486, 34443, 34400,
-	34358, 34315, 34272, 34229, 34186, 34143, 34100, 34057,
-	34015, 33972, 33929, 33886, 33843, 33799, 33756, 33713,
-	33670, 33627, 33584, 33541, 33498, 33454, 33411, 33368,
-	33325, 33281, 33238, 33195, 33151, 33108, 33065, 33021,
-	32978, 32934, 32891, 32847, 32804, 32760, 32717, 32673,
-	32630, 32586, 32542, 32499, 32455, 32411, 32368, 32324,
-	32280, 32236, 32193, 32149, 32105, 32061, 32017, 31974,
-	31930, 31886, 31842, 31798, 31754, 31710, 31666, 31622,
-	31578, 31534, 31490, 31446, 31402, 31357, 31313, 31269,
-	31225, 31181, 31136, 31092, 31048, 31004, 30959, 30915,
-	30871, 30826, 30782, 30738, 30693, 30649, 30604, 30560,
-	30515, 30471, 30426, 30382, 30337, 30293, 30248, 30204,
-	30159, 30114, 30070, 30025, 29980, 29936, 29891, 29846,
-	29801, 29757, 29712, 29667, 29622, 29577, 29533, 29488,
-	29443, 29398, 29353, 29308, 29263, 29218, 29173, 29128,
-	29083, 29038, 28993, 28948, 28903, 28858, 28812, 28767,
-	28722, 28677, 28632, 28586, 28541, 28496, 28451, 28405,
-	28360, 28315, 28269, 28224, 28179, 28133, 28088, 28042,
-	27997, 27952, 27906, 27861, 27815, 27770, 27724, 27678,
-	27633, 27587, 27542, 27496, 27450, 27405, 27359, 27313,
-	27268, 27222, 27176, 27131, 27085, 27039, 26993, 26947,
-	26902, 26856, 26810, 26764, 26718, 26672, 26626, 26580,
-	26534, 26488, 26442, 26396, 26350, 26304, 26258, 26212,
-	26166, 26120, 26074, 26028, 25982, 25936, 25889, 25843,
-	25797, 25751, 25705, 25658, 25612, 25566, 25520, 25473,
-	25427, 25381, 25334, 25288, 25241, 25195, 25149, 25102,
-	25056, 25009, 24963, 24916, 24870, 24823, 24777, 24730,
-	24684, 24637, 24591, 24544, 24497, 24451, 24404, 24357,
-	24311, 24264, 24217, 24171, 24124, 24077, 24030, 23984,
-	23937, 23890, 23843, 23796, 23750, 23703, 23656, 23609,
-	23562, 23515, 23468, 23421, 23374, 23327, 23280, 23233,
-	23186, 23139, 23092, 23045, 22998, 22951, 22904, 22857,
-	22810, 22763, 22716, 22668, 22621, 22574, 22527, 22480,
-	22433, 22385, 22338, 22291, 22243, 22196, 22149, 22102,
-	22054, 22007, 21960, 21912, 21865, 21817, 21770, 21723,
-	21675, 21628, 21580, 21533, 21485, 21438, 21390, 21343,
-	21295, 21248, 21200, 21153, 21105, 21057, 21010, 20962,
-	20915, 20867, 20819, 20772, 20724, 20676, 20629, 20581,
-	20533, 20485, 20438, 20390, 20342, 20294, 20246, 20199,
-	20151, 20103, 20055, 20007, 19959, 19912, 19864, 19816,
-	19768, 19720, 19672, 19624, 19576, 19528, 19480, 19432,
-	19384, 19336, 19288, 19240, 19192, 19144, 19096, 19048,
-	19000, 18951, 18903, 18855, 18807, 18759, 18711, 18663,
-	18614, 18566, 18518, 18470, 18421, 18373, 18325, 18277,
-	18228, 18180, 18132, 18084, 18035, 17987, 17939, 17890,
-	17842, 17793, 17745, 17697, 17648, 17600, 17551, 17503,
-	17455, 17406, 17358, 17309, 17261, 17212, 17164, 17115,
-	17067, 17018, 16970, 16921, 16872, 16824, 16775, 16727,
-	16678, 16629, 16581, 16532, 16484, 16435, 16386, 16338,
-	16289, 16240, 16191, 16143, 16094, 16045, 15997, 15948,
-	15899, 15850, 15802, 15753, 15704, 15655, 15606, 15557,
-	15509, 15460, 15411, 15362, 15313, 15264, 15215, 15167,
-	15118, 15069, 15020, 14971, 14922, 14873, 14824, 14775,
-	14726, 14677, 14628, 14579, 14530, 14481, 14432, 14383,
-	14334, 14285, 14236, 14187, 14138, 14089, 14040, 13990,
-	13941, 13892, 13843, 13794, 13745, 13696, 13646, 13597,
-	13548, 13499, 13450, 13401, 13351, 13302, 13253, 13204,
-	13154, 13105, 13056, 13007, 12957, 12908, 12859, 12810,
-	12760, 12711, 12662, 12612, 12563, 12514, 12464, 12415,
-	12366, 12316, 12267, 12218, 12168, 12119, 12069, 12020,
-	11970, 11921, 11872, 11822, 11773, 11723, 11674, 11624,
-	11575, 11525, 11476, 11426, 11377, 11327, 11278, 11228,
-	11179, 11129, 11080, 11030, 10981, 10931, 10882, 10832,
-	10782, 10733, 10683, 10634, 10584, 10534, 10485, 10435,
-	10386, 10336, 10286, 10237, 10187, 10137, 10088, 10038,
-	9988, 9939, 9889, 9839, 9790, 9740, 9690, 9640,
-	9591, 9541, 9491, 9442, 9392, 9342, 9292, 9243,
-	9193, 9143, 9093, 9043, 8994, 8944, 8894, 8844,
-	8794, 8745, 8695, 8645, 8595, 8545, 8496, 8446,
-	8396, 8346, 8296, 8246, 8196, 8147, 8097, 8047,
-	7997, 7947, 7897, 7847, 7797, 7747, 7697, 7648,
-	7598, 7548, 7498, 7448, 7398, 7348, 7298, 7248,
-	7198, 7148, 7098, 7048, 6998, 6948, 6898, 6848,
-	6798, 6748, 6698, 6648, 6598, 6548, 6498, 6448,
-	6398, 6348, 6298, 6248, 6198, 6148, 6098, 6048,
-	5998, 5948, 5898, 5848, 5798, 5748, 5697, 5647,
-	5597, 5547, 5497, 5447, 5397, 5347, 5297, 5247,
-	5197, 5146, 5096, 5046, 4996, 4946, 4896, 4846,
-	4796, 4745, 4695, 4645, 4595, 4545, 4495, 4445,
-	4394, 4344, 4294, 4244, 4194, 4144, 4093, 4043,
-	3993, 3943, 3893, 3843, 3792, 3742, 3692, 3642,
-	3592, 3541, 3491, 3441, 3391, 3341, 3291, 3240,
-	3190, 3140, 3090, 3039, 2989, 2939, 2889, 2839,
-	2788, 2738, 2688, 2638, 2587, 2537, 2487, 2437,
-	2387, 2336, 2286, 2236, 2186, 2135, 2085, 2035,
-	1985, 1934, 1884, 1834, 1784, 1733, 1683, 1633,
-	1583, 1532, 1482, 1432, 1382, 1331, 1281, 1231,
-	1181, 1130, 1080, 1030, 980, 929, 879, 829,
-	779, 728, 678, 628, 578, 527, 477, 427,
-	376, 326, 276, 226, 175, 125, 75, 25,
-	-25, -75, -125, -175, -226, -276, -326, -376,
-	-427, -477, -527, -578, -628, -678, -728, -779,
-	-829, -879, -929, -980, -1030, -1080, -1130, -1181,
-	-1231, -1281, -1331, -1382, -1432, -1482, -1532, -1583,
-	-1633, -1683, -1733, -1784, -1834, -1884, -1934, -1985,
-	-2035, -2085, -2135, -2186, -2236, -2286, -2336, -2387,
-	-2437, -2487, -2537, -2588, -2638, -2688, -2738, -2788,
-	-2839, -2889, -2939, -2989, -3039, -3090, -3140, -3190,
-	-3240, -3291, -3341, -3391, -3441, -3491, -3541, -3592,
-	-3642, -3692, -3742, -3792, -3843, -3893, -3943, -3993,
-	-4043, -4093, -4144, -4194, -4244, -4294, -4344, -4394,
-	-4445, -4495, -4545, -4595, -4645, -4695, -4745, -4796,
-	-4846, -4896, -4946, -4996, -5046, -5096, -5146, -5197,
-	-5247, -5297, -5347, -5397, -5447, -5497, -5547, -5597,
-	-5647, -5697, -5748, -5798, -5848, -5898, -5948, -5998,
-	-6048, -6098, -6148, -6198, -6248, -6298, -6348, -6398,
-	-6448, -6498, -6548, -6598, -6648, -6698, -6748, -6798,
-	-6848, -6898, -6948, -6998, -7048, -7098, -7148, -7198,
-	-7248, -7298, -7348, -7398, -7448, -7498, -7548, -7598,
-	-7648, -7697, -7747, -7797, -7847, -7897, -7947, -7997,
-	-8047, -8097, -8147, -8196, -8246, -8296, -8346, -8396,
-	-8446, -8496, -8545, -8595, -8645, -8695, -8745, -8794,
-	-8844, -8894, -8944, -8994, -9043, -9093, -9143, -9193,
-	-9243, -9292, -9342, -9392, -9442, -9491, -9541, -9591,
-	-9640, -9690, -9740, -9790, -9839, -9889, -9939, -9988,
-	-10038, -10088, -10137, -10187, -10237, -10286, -10336, -10386,
-	-10435, -10485, -10534, -10584, -10634, -10683, -10733, -10782,
-	-10832, -10882, -10931, -10981, -11030, -11080, -11129, -11179,
-	-11228, -11278, -11327, -11377, -11426, -11476, -11525, -11575,
-	-11624, -11674, -11723, -11773, -11822, -11872, -11921, -11970,
-	-12020, -12069, -12119, -12168, -12218, -12267, -12316, -12366,
-	-12415, -12464, -12514, -12563, -12612, -12662, -12711, -12760,
-	-12810, -12859, -12908, -12957, -13007, -13056, -13105, -13154,
-	-13204, -13253, -13302, -13351, -13401, -13450, -13499, -13548,
-	-13597, -13647, -13696, -13745, -13794, -13843, -13892, -13941,
-	-13990, -14040, -14089, -14138, -14187, -14236, -14285, -14334,
-	-14383, -14432, -14481, -14530, -14579, -14628, -14677, -14726,
-	-14775, -14824, -14873, -14922, -14971, -15020, -15069, -15118,
-	-15167, -15215, -15264, -15313, -15362, -15411, -15460, -15509,
-	-15557, -15606, -15655, -15704, -15753, -15802, -15850, -15899,
-	-15948, -15997, -16045, -16094, -16143, -16191, -16240, -16289,
-	-16338, -16386, -16435, -16484, -16532, -16581, -16629, -16678,
-	-16727, -16775, -16824, -16872, -16921, -16970, -17018, -17067,
-	-17115, -17164, -17212, -17261, -17309, -17358, -17406, -17455,
-	-17503, -17551, -17600, -17648, -17697, -17745, -17793, -17842,
-	-17890, -17939, -17987, -18035, -18084, -18132, -18180, -18228,
-	-18277, -18325, -18373, -18421, -18470, -18518, -18566, -18614,
-	-18663, -18711, -18759, -18807, -18855, -18903, -18951, -19000,
-	-19048, -19096, -19144, -19192, -19240, -19288, -19336, -19384,
-	-19432, -19480, -19528, -19576, -19624, -19672, -19720, -19768,
-	-19816, -19864, -19912, -19959, -20007, -20055, -20103, -20151,
-	-20199, -20246, -20294, -20342, -20390, -20438, -20485, -20533,
-	-20581, -20629, -20676, -20724, -20772, -20819, -20867, -20915,
-	-20962, -21010, -21057, -21105, -21153, -21200, -21248, -21295,
-	-21343, -21390, -21438, -21485, -21533, -21580, -21628, -21675,
-	-21723, -21770, -21817, -21865, -21912, -21960, -22007, -22054,
-	-22102, -22149, -22196, -22243, -22291, -22338, -22385, -22433,
-	-22480, -22527, -22574, -22621, -22668, -22716, -22763, -22810,
-	-22857, -22904, -22951, -22998, -23045, -23092, -23139, -23186,
-	-23233, -23280, -23327, -23374, -23421, -23468, -23515, -23562,
-	-23609, -23656, -23703, -23750, -23796, -23843, -23890, -23937,
-	-23984, -24030, -24077, -24124, -24171, -24217, -24264, -24311,
-	-24357, -24404, -24451, -24497, -24544, -24591, -24637, -24684,
-	-24730, -24777, -24823, -24870, -24916, -24963, -25009, -25056,
-	-25102, -25149, -25195, -25241, -25288, -25334, -25381, -25427,
-	-25473, -25520, -25566, -25612, -25658, -25705, -25751, -25797,
-	-25843, -25889, -25936, -25982, -26028, -26074, -26120, -26166,
-	-26212, -26258, -26304, -26350, -26396, -26442, -26488, -26534,
-	-26580, -26626, -26672, -26718, -26764, -26810, -26856, -26902,
-	-26947, -26993, -27039, -27085, -27131, -27176, -27222, -27268,
-	-27313, -27359, -27405, -27450, -27496, -27542, -27587, -27633,
-	-27678, -27724, -27770, -27815, -27861, -27906, -27952, -27997,
-	-28042, -28088, -28133, -28179, -28224, -28269, -28315, -28360,
-	-28405, -28451, -28496, -28541, -28586, -28632, -28677, -28722,
-	-28767, -28812, -28858, -28903, -28948, -28993, -29038, -29083,
-	-29128, -29173, -29218, -29263, -29308, -29353, -29398, -29443,
-	-29488, -29533, -29577, -29622, -29667, -29712, -29757, -29801,
-	-29846, -29891, -29936, -29980, -30025, -30070, -30114, -30159,
-	-30204, -30248, -30293, -30337, -30382, -30426, -30471, -30515,
-	-30560, -30604, -30649, -30693, -30738, -30782, -30826, -30871,
-	-30915, -30959, -31004, -31048, -31092, -31136, -31181, -31225,
-	-31269, -31313, -31357, -31402, -31446, -31490, -31534, -31578,
-	-31622, -31666, -31710, -31754, -31798, -31842, -31886, -31930,
-	-31974, -32017, -32061, -32105, -32149, -32193, -32236, -32280,
-	-32324, -32368, -32411, -32455, -32499, -32542, -32586, -32630,
-	-32673, -32717, -32760, -32804, -32847, -32891, -32934, -32978,
-	-33021, -33065, -33108, -33151, -33195, -33238, -33281, -33325,
-	-33368, -33411, -33454, -33498, -33541, -33584, -33627, -33670,
-	-33713, -33756, -33799, -33843, -33886, -33929, -33972, -34015,
-	-34057, -34100, -34143, -34186, -34229, -34272, -34315, -34358,
-	-34400, -34443, -34486, -34529, -34571, -34614, -34657, -34699,
-	-34742, -34785, -34827, -34870, -34912, -34955, -34997, -35040,
-	-35082, -35125, -35167, -35210, -35252, -35294, -35337, -35379,
-	-35421, -35464, -35506, -35548, -35590, -35633, -35675, -35717,
-	-35759, -35801, -35843, -35885, -35927, -35969, -36011, -36053,
-	-36095, -36137, -36179, -36221, -36263, -36305, -36347, -36388,
-	-36430, -36472, -36514, -36555, -36597, -36639, -36681, -36722,
-	-36764, -36805, -36847, -36889, -36930, -36972, -37013, -37055,
-	-37096, -37137, -37179, -37220, -37262, -37303, -37344, -37386,
-	-37427, -37468, -37509, -37551, -37592, -37633, -37674, -37715,
-	-37756, -37797, -37838, -37879, -37920, -37961, -38002, -38043,
-	-38084, -38125, -38166, -38207, -38248, -38288, -38329, -38370,
-	-38411, -38451, -38492, -38533, -38573, -38614, -38655, -38695,
-	-38736, -38776, -38817, -38857, -38898, -38938, -38979, -39019,
-	-39059, -39100, -39140, -39180, -39221, -39261, -39301, -39341,
-	-39382, -39422, -39462, -39502, -39542, -39582, -39622, -39662,
-	-39702, -39742, -39782, -39822, -39862, -39902, -39942, -39982,
-	-40021, -40061, -40101, -40141, -40180, -40220, -40260, -40299,
-	-40339, -40379, -40418, -40458, -40497, -40537, -40576, -40616,
-	-40655, -40695, -40734, -40773, -40813, -40852, -40891, -40931,
-	-40970, -41009, -41048, -41087, -41127, -41166, -41205, -41244,
-	-41283, -41322, -41361, -41400, -41439, -41478, -41517, -41556,
-	-41595, -41633, -41672, -41711, -41750, -41788, -41827, -41866,
-	-41904, -41943, -41982, -42020, -42059, -42097, -42136, -42174,
-	-42213, -42251, -42290, -42328, -42366, -42405, -42443, -42481,
-	-42520, -42558, -42596, -42634, -42672, -42711, -42749, -42787,
-	-42825, -42863, -42901, -42939, -42977, -43015, -43053, -43091,
-	-43128, -43166, -43204, -43242, -43280, -43317, -43355, -43393,
-	-43430, -43468, -43506, -43543, -43581, -43618, -43656, -43693,
-	-43731, -43768, -43806, -43843, -43880, -43918, -43955, -43992,
-	-44029, -44067, -44104, -44141, -44178, -44215, -44252, -44289,
-	-44326, -44363, -44400, -44437, -44474, -44511, -44548, -44585,
-	-44622, -44659, -44695, -44732, -44769, -44806, -44842, -44879,
-	-44915, -44952, -44989, -45025, -45062, -45098, -45135, -45171,
-	-45207, -45244, -45280, -45316, -45353, -45389, -45425, -45462,
-	-45498, -45534, -45570, -45606, -45642, -45678, -45714, -45750,
-	-45786, -45822, -45858, -45894, -45930, -45966, -46002, -46037,
-	-46073, -46109, -46145, -46180, -46216, -46252, -46287, -46323,
-	-46358, -46394, -46429, -46465, -46500, -46536, -46571, -46606,
-	-46642, -46677, -46712, -46747, -46783, -46818, -46853, -46888,
-	-46923, -46958, -46993, -47028, -47063, -47098, -47133, -47168,
-	-47203, -47238, -47273, -47308, -47342, -47377, -47412, -47446,
-	-47481, -47516, -47550, -47585, -47619, -47654, -47688, -47723,
-	-47757, -47792, -47826, -47860, -47895, -47929, -47963, -47998,
-	-48032, -48066, -48100, -48134, -48168, -48202, -48236, -48271,
-	-48304, -48338, -48372, -48406, -48440, -48474, -48508, -48542,
-	-48575, -48609, -48643, -48676, -48710, -48744, -48777, -48811,
-	-48844, -48878, -48911, -48945, -48978, -49012, -49045, -49078,
-	-49112, -49145, -49178, -49211, -49244, -49278, -49311, -49344,
-	-49377, -49410, -49443, -49476, -49509, -49542, -49575, -49608,
-	-49640, -49673, -49706, -49739, -49771, -49804, -49837, -49869,
-	-49902, -49935, -49967, -50000, -50032, -50065, -50097, -50129,
-	-50162, -50194, -50226, -50259, -50291, -50323, -50355, -50387,
-	-50420, -50452, -50484, -50516, -50548, -50580, -50612, -50644,
-	-50675, -50707, -50739, -50771, -50803, -50834, -50866, -50898,
-	-50929, -50961, -50993, -51024, -51056, -51087, -51119, -51150,
-	-51182, -51213, -51244, -51276, -51307, -51338, -51369, -51401,
-	-51432, -51463, -51494, -51525, -51556, -51587, -51618, -51649,
-	-51680, -51711, -51742, -51773, -51803, -51834, -51865, -51896,
-	-51926, -51957, -51988, -52018, -52049, -52079, -52110, -52140,
-	-52171, -52201, -52231, -52262, -52292, -52322, -52353, -52383,
-	-52413, -52443, -52473, -52503, -52534, -52564, -52594, -52624,
-	-52653, -52683, -52713, -52743, -52773, -52803, -52832, -52862,
-	-52892, -52922, -52951, -52981, -53010, -53040, -53069, -53099,
-	-53128, -53158, -53187, -53216, -53246, -53275, -53304, -53334,
-	-53363, -53392, -53421, -53450, -53479, -53508, -53537, -53566,
-	-53595, -53624, -53653, -53682, -53711, -53739, -53768, -53797,
-	-53826, -53854, -53883, -53911, -53940, -53969, -53997, -54026,
-	-54054, -54082, -54111, -54139, -54167, -54196, -54224, -54252,
-	-54280, -54308, -54337, -54365, -54393, -54421, -54449, -54477,
-	-54505, -54533, -54560, -54588, -54616, -54644, -54672, -54699,
-	-54727, -54755, -54782, -54810, -54837, -54865, -54892, -54920,
-	-54947, -54974, -55002, -55029, -55056, -55084, -55111, -55138,
-	-55165, -55192, -55219, -55246, -55274, -55300, -55327, -55354,
-	-55381, -55408, -55435, -55462, -55489, -55515, -55542, -55569,
-	-55595, -55622, -55648, -55675, -55701, -55728, -55754, -55781,
-	-55807, -55833, -55860, -55886, -55912, -55938, -55965, -55991,
-	-56017, -56043, -56069, -56095, -56121, -56147, -56173, -56199,
-	-56225, -56250, -56276, -56302, -56328, -56353, -56379, -56404,
-	-56430, -56456, -56481, -56507, -56532, -56557, -56583, -56608,
-	-56633, -56659, -56684, -56709, -56734, -56760, -56785, -56810,
-	-56835, -56860, -56885, -56910, -56935, -56959, -56984, -57009,
-	-57034, -57059, -57083, -57108, -57133, -57157, -57182, -57206,
-	-57231, -57255, -57280, -57304, -57329, -57353, -57377, -57402,
-	-57426, -57450, -57474, -57498, -57522, -57546, -57570, -57594,
-	-57618, -57642, -57666, -57690, -57714, -57738, -57762, -57785,
-	-57809, -57833, -57856, -57880, -57903, -57927, -57950, -57974,
-	-57997, -58021, -58044, -58067, -58091, -58114, -58137, -58160,
-	-58183, -58207, -58230, -58253, -58276, -58299, -58322, -58345,
-	-58367, -58390, -58413, -58436, -58459, -58481, -58504, -58527,
-	-58549, -58572, -58594, -58617, -58639, -58662, -58684, -58706,
-	-58729, -58751, -58773, -58795, -58818, -58840, -58862, -58884,
-	-58906, -58928, -58950, -58972, -58994, -59016, -59038, -59059,
-	-59081, -59103, -59125, -59146, -59168, -59190, -59211, -59233,
-	-59254, -59276, -59297, -59318, -59340, -59361, -59382, -59404,
-	-59425, -59446, -59467, -59488, -59509, -59530, -59551, -59572,
-	-59593, -59614, -59635, -59656, -59677, -59697, -59718, -59739,
-	-59759, -59780, -59801, -59821, -59842, -59862, -59883, -59903,
-	-59923, -59944, -59964, -59984, -60004, -60025, -60045, -60065,
-	-60085, -60105, -60125, -60145, -60165, -60185, -60205, -60225,
-	-60244, -60264, -60284, -60304, -60323, -60343, -60363, -60382,
-	-60402, -60421, -60441, -60460, -60479, -60499, -60518, -60537,
-	-60556, -60576, -60595, -60614, -60633, -60652, -60671, -60690,
-	-60709, -60728, -60747, -60766, -60785, -60803, -60822, -60841,
-	-60859, -60878, -60897, -60915, -60934, -60952, -60971, -60989,
-	-61007, -61026, -61044, -61062, -61081, -61099, -61117, -61135,
-	-61153, -61171, -61189, -61207, -61225, -61243, -61261, -61279,
-	-61297, -61314, -61332, -61350, -61367, -61385, -61403, -61420,
-	-61438, -61455, -61473, -61490, -61507, -61525, -61542, -61559,
-	-61577, -61594, -61611, -61628, -61645, -61662, -61679, -61696,
-	-61713, -61730, -61747, -61764, -61780, -61797, -61814, -61831,
-	-61847, -61864, -61880, -61897, -61913, -61930, -61946, -61963,
-	-61979, -61995, -62012, -62028, -62044, -62060, -62076, -62092,
-	-62108, -62125, -62141, -62156, -62172, -62188, -62204, -62220,
-	-62236, -62251, -62267, -62283, -62298, -62314, -62329, -62345,
-	-62360, -62376, -62391, -62407, -62422, -62437, -62453, -62468,
-	-62483, -62498, -62513, -62528, -62543, -62558, -62573, -62588,
-	-62603, -62618, -62633, -62648, -62662, -62677, -62692, -62706,
-	-62721, -62735, -62750, -62764, -62779, -62793, -62808, -62822,
-	-62836, -62850, -62865, -62879, -62893, -62907, -62921, -62935,
-	-62949, -62963, -62977, -62991, -63005, -63019, -63032, -63046,
-	-63060, -63074, -63087, -63101, -63114, -63128, -63141, -63155,
-	-63168, -63182, -63195, -63208, -63221, -63235, -63248, -63261,
-	-63274, -63287, -63300, -63313, -63326, -63339, -63352, -63365,
-	-63378, -63390, -63403, -63416, -63429, -63441, -63454, -63466,
-	-63479, -63491, -63504, -63516, -63528, -63541, -63553, -63565,
-	-63578, -63590, -63602, -63614, -63626, -63638, -63650, -63662,
-	-63674, -63686, -63698, -63709, -63721, -63733, -63745, -63756,
-	-63768, -63779, -63791, -63803, -63814, -63825, -63837, -63848,
-	-63859, -63871, -63882, -63893, -63904, -63915, -63927, -63938,
-	-63949, -63960, -63971, -63981, -63992, -64003, -64014, -64025,
-	-64035, -64046, -64057, -64067, -64078, -64088, -64099, -64109,
-	-64120, -64130, -64140, -64151, -64161, -64171, -64181, -64192,
-	-64202, -64212, -64222, -64232, -64242, -64252, -64261, -64271,
-	-64281, -64291, -64301, -64310, -64320, -64330, -64339, -64349,
-	-64358, -64368, -64377, -64387, -64396, -64405, -64414, -64424,
-	-64433, -64442, -64451, -64460, -64469, -64478, -64487, -64496,
-	-64505, -64514, -64523, -64532, -64540, -64549, -64558, -64566,
-	-64575, -64584, -64592, -64601, -64609, -64617, -64626, -64634,
-	-64642, -64651, -64659, -64667, -64675, -64683, -64691, -64699,
-	-64707, -64715, -64723, -64731, -64739, -64747, -64754, -64762,
-	-64770, -64777, -64785, -64793, -64800, -64808, -64815, -64822,
-	-64830, -64837, -64844, -64852, -64859, -64866, -64873, -64880,
-	-64887, -64895, -64902, -64908, -64915, -64922, -64929, -64936,
-	-64943, -64949, -64956, -64963, -64969, -64976, -64982, -64989,
-	-64995, -65002, -65008, -65015, -65021, -65027, -65033, -65040,
-	-65046, -65052, -65058, -65064, -65070, -65076, -65082, -65088,
-	-65094, -65099, -65105, -65111, -65117, -65122, -65128, -65133,
-	-65139, -65144, -65150, -65155, -65161, -65166, -65171, -65177,
-	-65182, -65187, -65192, -65197, -65202, -65207, -65212, -65217,
-	-65222, -65227, -65232, -65237, -65242, -65246, -65251, -65256,
-	-65260, -65265, -65270, -65274, -65279, -65283, -65287, -65292,
-	-65296, -65300, -65305, -65309, -65313, -65317, -65321, -65325,
-	-65329, -65333, -65337, -65341, -65345, -65349, -65352, -65356,
-	-65360, -65363, -65367, -65371, -65374, -65378, -65381, -65385,
-	-65388, -65391, -65395, -65398, -65401, -65404, -65408, -65411,
-	-65414, -65417, -65420, -65423, -65426, -65429, -65431, -65434,
-	-65437, -65440, -65442, -65445, -65448, -65450, -65453, -65455,
-	-65458, -65460, -65463, -65465, -65467, -65470, -65472, -65474,
-	-65476, -65478, -65480, -65482, -65484, -65486, -65488, -65490,
-	-65492, -65494, -65496, -65497, -65499, -65501, -65502, -65504,
-	-65505, -65507, -65508, -65510, -65511, -65513, -65514, -65515,
-	-65516, -65518, -65519, -65520, -65521, -65522, -65523, -65524,
-	-65525, -65526, -65527, -65527, -65528, -65529, -65530, -65530,
+	65536, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+	65534, 65534, 65534, 65533, 65533, 65532, 65532, 65531,
+	65531, 65530, 65529, 65529, 65528, 65527, 65526, 65525,
+	65524, 65523, 65522, 65521, 65520, 65519, 65518, 65517,
+	65516, 65515, 65513, 65512, 65511, 65509, 65508, 65506,
+	65505, 65503, 65501, 65500, 65498, 65496, 65495, 65493,
+	65491, 65489, 65487, 65485, 65483, 65481, 65479, 65477,
+	65475, 65473, 65471, 65468, 65466, 65464, 65461, 65459,
+	65457, 65454, 65452, 65449, 65446, 65444, 65441, 65438,
+	65436, 65433, 65430, 65427, 65424, 65421, 65418, 65415,
+	65412, 65409, 65406, 65403, 65400, 65396, 65393, 65390,
+	65386, 65383, 65379, 65376, 65372, 65369, 65365, 65362,
+	65358, 65354, 65350, 65347, 65343, 65339, 65335, 65331,
+	65327, 65323, 65319, 65315, 65311, 65307, 65302, 65298,
+	65294, 65290, 65285, 65281, 65276, 65272, 65267, 65263,
+	65258, 65253, 65249, 65244, 65239, 65235, 65230, 65225,
+	65220, 65215, 65210, 65205, 65200, 65195, 65190, 65184,
+	65179, 65174, 65169, 65163, 65158, 65153, 65147, 65142,
+	65136, 65131, 65125, 65119, 65114, 65108, 65102, 65096,
+	65091, 65085, 65079, 65073, 65067, 65061, 65055, 65049,
+	65043, 65036, 65030, 65024, 65018, 65011, 65005, 64999,
+	64992, 64986, 64979, 64973, 64966, 64959, 64953, 64946,
+	64939, 64933, 64926, 64919, 64912, 64905, 64898, 64891,
+	64884, 64877, 64870, 64863, 64855, 64848, 64841, 64834,
+	64826, 64819, 64811, 64804, 64796, 64789, 64781, 64774,
+	64766, 64758, 64751, 64743, 64735, 64727, 64719, 64711,
+	64703, 64695, 64687, 64679, 64671, 64663, 64655, 64646,
+	64638, 64630, 64622, 64613, 64605, 64596, 64588, 64579,
+	64571, 64562, 64553, 64545, 64536, 64527, 64518, 64510,
+	64501, 64492, 64483, 64474, 64465, 64456, 64447, 64437,
+	64428, 64419, 64410, 64401, 64391, 64382, 64372, 64363,
+	64353, 64344, 64334, 64325, 64315, 64305, 64296, 64286,
+	64276, 64266, 64257, 64247, 64237, 64227, 64217, 64207,
+	64197, 64186, 64176, 64166, 64156, 64146, 64135, 64125,
+	64115, 64104, 64094, 64083, 64073, 64062, 64051, 64041,
+	64030, 64019, 64009, 63998, 63987, 63976, 63965, 63954,
+	63943, 63932, 63921, 63910, 63899, 63888, 63876, 63865,
+	63854, 63842, 63831, 63820, 63808, 63797, 63785, 63774,
+	63762, 63750, 63739, 63727, 63715, 63704, 63692, 63680,
+	63668, 63656, 63644, 63632, 63620, 63608, 63596, 63584,
+	63571, 63559, 63547, 63535, 63522, 63510, 63498, 63485,
+	63473, 63460, 63447, 63435, 63422, 63410, 63397, 63384,
+	63371, 63358, 63346, 63333, 63320, 63307, 63294, 63281,
+	63268, 63254, 63241, 63228, 63215, 63202, 63188, 63175,
+	63162, 63148, 63135, 63121, 63108, 63094, 63080, 63067,
+	63053, 63039, 63026, 63012, 62998, 62984, 62970, 62956,
+	62942, 62928, 62914, 62900, 62886, 62872, 62858, 62843,
+	62829, 62815, 62800, 62786, 62772, 62757, 62743, 62728,
+	62714, 62699, 62684, 62670, 62655, 62640, 62625, 62610,
+	62596, 62581, 62566, 62551, 62536, 62521, 62506, 62491,
+	62475, 62460, 62445, 62430, 62414, 62399, 62384, 62368,
+	62353, 62337, 62322, 62306, 62291, 62275, 62259, 62244,
+	62228, 62212, 62196, 62180, 62164, 62148, 62133, 62117,
+	62100, 62084, 62068, 62052, 62036, 62020, 62003, 61987,
+	61971, 61954, 61938, 61922, 61905, 61889, 61872, 61855,
+	61839, 61822, 61805, 61789, 61772, 61755, 61738, 61721,
+	61705, 61688, 61671, 61654, 61637, 61619, 61602, 61585,
+	61568, 61551, 61533, 61516, 61499, 61481, 61464, 61446,
+	61429, 61411, 61394, 61376, 61359, 61341, 61323, 61305,
+	61288, 61270, 61252, 61234, 61216, 61198, 61180, 61162,
+	61144, 61126, 61108, 61090, 61071, 61053, 61035, 61017,
+	60998, 60980, 60961, 60943, 60924, 60906, 60887, 60869,
+	60850, 60831, 60813, 60794, 60775, 60756, 60737, 60719,
+	60700, 60681, 60662, 60643, 60624, 60604, 60585, 60566,
+	60547, 60528, 60508, 60489, 60470, 60450, 60431, 60411,
+	60392, 60372, 60353, 60333, 60313, 60294, 60274, 60254,
+	60235, 60215, 60195, 60175, 60155, 60135, 60115, 60095,
+	60075, 60055, 60035, 60015, 59994, 59974, 59954, 59934,
+	59913, 59893, 59872, 59852, 59831, 59811, 59790, 59770,
+	59749, 59728, 59708, 59687, 59666, 59645, 59625, 59604,
+	59583, 59562, 59541, 59520, 59499, 59478, 59457, 59435,
+	59414, 59393, 59372, 59350, 59329, 59308, 59286, 59265,
+	59243, 59222, 59200, 59179, 59157, 59135, 59114, 59092,
+	59070, 59049, 59027, 59005, 58983, 58961, 58939, 58917,
+	58895, 58873, 58851, 58829, 58807, 58784, 58762, 58740,
+	58718, 58695, 58673, 58650, 58628, 58605, 58583, 58560,
+	58538, 58515, 58493, 58470, 58447, 58424, 58402, 58379,
+	58356, 58333, 58310, 58287, 58264, 58241, 58218, 58195,
+	58172, 58149, 58125, 58102, 58079, 58056, 58032, 58009,
+	57986, 57962, 57939, 57915, 57892, 57868, 57844, 57821,
+	57797, 57773, 57750, 57726, 57702, 57678, 57654, 57630,
+	57606, 57582, 57558, 57534, 57510, 57486, 57462, 57438,
+	57414, 57389, 57365, 57341, 57316, 57292, 57268, 57243,
+	57219, 57194, 57170, 57145, 57120, 57096, 57071, 57046,
+	57022, 56997, 56972, 56947, 56922, 56897, 56872, 56847,
+	56822, 56797, 56772, 56747, 56722, 56697, 56671, 56646,
+	56621, 56595, 56570, 56545, 56519, 56494, 56468, 56443,
+	56417, 56392, 56366, 56340, 56315, 56289, 56263, 56237,
+	56212, 56186, 56160, 56134, 56108, 56082, 56056, 56030,
+	56004, 55978, 55952, 55925, 55899, 55873, 55847, 55820,
+	55794, 55768, 55741, 55715, 55688, 55662, 55635, 55609,
+	55582, 55555, 55529, 55502, 55475, 55448, 55422, 55395,
+	55368, 55341, 55314, 55287, 55260, 55233, 55206, 55179,
+	55152, 55124, 55097, 55070, 55043, 55015, 54988, 54961,
+	54933, 54906, 54879, 54851, 54823, 54796, 54768, 54741,
+	54713, 54685, 54658, 54630, 54602, 54574, 54546, 54519,
+	54491, 54463, 54435, 54407, 54379, 54351, 54323, 54294,
+	54266, 54238, 54210, 54182, 54153, 54125, 54097, 54068,
+	54040, 54011, 53983, 53954, 53926, 53897, 53869, 53840,
+	53811, 53783, 53754, 53725, 53696, 53667, 53639, 53610,
+	53581, 53552, 53523, 53494, 53465, 53436, 53407, 53377,
+	53348, 53319, 53290, 53260, 53231, 53202, 53172, 53143,
+	53114, 53084, 53055, 53025, 52996, 52966, 52936, 52907,
+	52877, 52847, 52818, 52788, 52758, 52728, 52698, 52668,
+	52639, 52609, 52579, 52549, 52518, 52488, 52458, 52428,
+	52398, 52368, 52338, 52307, 52277, 52247, 52216, 52186,
+	52155, 52125, 52095, 52064, 52033, 52003, 51972, 51942,
+	51911, 51880, 51850, 51819, 51788, 51757, 51726, 51695,
+	51665, 51634, 51603, 51572, 51541, 51510, 51478, 51447,
+	51416, 51385, 51354, 51323, 51291, 51260, 51229, 51197,
+	51166, 51134, 51103, 51072, 51040, 51008, 50977, 50945,
+	50914, 50882, 50850, 50819, 50787, 50755, 50723, 50691,
+	50660, 50628, 50596, 50564, 50532, 50500, 50468, 50436,
+	50403, 50371, 50339, 50307, 50275, 50242, 50210, 50178,
+	50146, 50113, 50081, 50048, 50016, 49983, 49951, 49918,
+	49886, 49853, 49820, 49788, 49755, 49722, 49690, 49657,
+	49624, 49591, 49558, 49525, 49492, 49459, 49426, 49393,
+	49360, 49327, 49294, 49261, 49228, 49195, 49161, 49128,
+	49095, 49062, 49028, 48995, 48961, 48928, 48895, 48861,
+	48828, 48794, 48760, 48727, 48693, 48660, 48626, 48592,
+	48558, 48525, 48491, 48457, 48423, 48389, 48355, 48321,
+	48288, 48254, 48219, 48185, 48151, 48117, 48083, 48049,
+	48015, 47981, 47946, 47912, 47878, 47843, 47809, 47775,
+	47740, 47706, 47671, 47637, 47602, 47568, 47533, 47498,
+	47464, 47429, 47394, 47360, 47325, 47290, 47255, 47220,
+	47186, 47151, 47116, 47081, 47046, 47011, 46976, 46941,
+	46906, 46871, 46835, 46800, 46765, 46730, 46695, 46659,
+	46624, 46589, 46553, 46518, 46482, 46447, 46411, 46376,
+	46340, 46305, 46269, 46234, 46198, 46162, 46127, 46091,
+	46055, 46019, 45984, 45948, 45912, 45876, 45840, 45804,
+	45768, 45732, 45696, 45660, 45624, 45588, 45552, 45516,
+	45480, 45443, 45407, 45371, 45335, 45298, 45262, 45226,
+	45189, 45153, 45116, 45080, 45043, 45007, 44970, 44934,
+	44897, 44861, 44824, 44787, 44750, 44714, 44677, 44640,
+	44603, 44567, 44530, 44493, 44456, 44419, 44382, 44345,
+	44308, 44271, 44234, 44197, 44160, 44122, 44085, 44048,
+	44011, 43974, 43936, 43899, 43862, 43824, 43787, 43749,
+	43712, 43675, 43637, 43600, 43562, 43524, 43487, 43449,
+	43412, 43374, 43336, 43298, 43261, 43223, 43185, 43147,
+	43110, 43072, 43034, 42996, 42958, 42920, 42882, 42844,
+	42806, 42768, 42730, 42692, 42653, 42615, 42577, 42539,
+	42501, 42462, 42424, 42386, 42347, 42309, 42271, 42232,
+	42194, 42155, 42117, 42078, 42040, 42001, 41962, 41924,
+	41885, 41846, 41808, 41769, 41730, 41692, 41653, 41614,
+	41575, 41536, 41497, 41458, 41419, 41381, 41342, 41303,
+	41263, 41224, 41185, 41146, 41107, 41068, 41029, 40990,
+	40950, 40911, 40872, 40832, 40793, 40754, 40714, 40675,
+	40636, 40596, 40557, 40517, 40478, 40438, 40399, 40359,
+	40319, 40280, 40240, 40200, 40161, 40121, 40081, 40041,
+	40002, 39962, 39922, 39882, 39842, 39802, 39762, 39722,
+	39682, 39642, 39602, 39562, 39522, 39482, 39442, 39402,
+	39362, 39321, 39281, 39241, 39201, 39160, 39120, 39080,
+	39039, 38999, 38958, 38918, 38878, 38837, 38797, 38756,
+	38716, 38675, 38634, 38594, 38553, 38512, 38472, 38431,
+	38390, 38350, 38309, 38268, 38227, 38186, 38146, 38105,
+	38064, 38023, 37982, 37941, 37900, 37859, 37818, 37777,
+	37736, 37695, 37653, 37612, 37571, 37530, 37489, 37447,
+	37406, 37365, 37324, 37282, 37241, 37200, 37158, 37117,
+	37075, 37034, 36992, 36951, 36909, 36868, 36826, 36785,
+	36743, 36701, 36660, 36618, 36576, 36535, 36493, 36451,
+	36409, 36368, 36326, 36284, 36242, 36200, 36158, 36116,
+	36074, 36032, 35990, 35948, 35906, 35864, 35822, 35780,
+	35738, 35696, 35654, 35611, 35569, 35527, 35485, 35442,
+	35400, 35358, 35316, 35273, 35231, 35188, 35146, 35104,
+	35061, 35019, 34976, 34934, 34891, 34849, 34806, 34763,
+	34721, 34678, 34635, 34593, 34550, 34507, 34465, 34422,
+	34379, 34336, 34293, 34251, 34208, 34165, 34122, 34079,
+	34036, 33993, 33950, 33907, 33864, 33821, 33778, 33735,
+	33692, 33649, 33605, 33562, 33519, 33476, 33433, 33389,
+	33346, 33303, 33260, 33216, 33173, 33130, 33086, 33043,
+	32999, 32956, 32912, 32869, 32826, 32782, 32738, 32695,
+	32651, 32608, 32564, 32521, 32477, 32433, 32390, 32346,
+	32302, 32258, 32215, 32171, 32127, 32083, 32039, 31995,
+	31952, 31908, 31864, 31820, 31776, 31732, 31688, 31644,
+	31600, 31556, 31512, 31468, 31424, 31379, 31335, 31291,
+	31247, 31203, 31159, 31114, 31070, 31026, 30982, 30937,
+	30893, 30849, 30804, 30760, 30715, 30671, 30627, 30582,
+	30538, 30493, 30449, 30404, 30360, 30315, 30271, 30226,
+	30181, 30137, 30092, 30047, 30003, 29958, 29913, 29869,
+	29824, 29779, 29734, 29690, 29645, 29600, 29555, 29510,
+	29465, 29420, 29375, 29330, 29285, 29241, 29196, 29151,
+	29105, 29060, 29015, 28970, 28925, 28880, 28835, 28790,
+	28745, 28699, 28654, 28609, 28564, 28519, 28473, 28428,
+	28383, 28337, 28292, 28247, 28201, 28156, 28111, 28065,
+	28020, 27974, 27929, 27883, 27838, 27792, 27747, 27701,
+	27656, 27610, 27565, 27519, 27473, 27428, 27382, 27336,
+	27291, 27245, 27199, 27153, 27108, 27062, 27016, 26970,
+	26925, 26879, 26833, 26787, 26741, 26695, 26649, 26603,
+	26557, 26511, 26465, 26419, 26373, 26327, 26281, 26235,
+	26189, 26143, 26097, 26051, 26005, 25959, 25913, 25866,
+	25820, 25774, 25728, 25681, 25635, 25589, 25543, 25496,
+	25450, 25404, 25357, 25311, 25265, 25218, 25172, 25125,
+	25079, 25033, 24986, 24940, 24893, 24847, 24800, 24754,
+	24707, 24660, 24614, 24567, 24521, 24474, 24427, 24381,
+	24334, 24287, 24241, 24194, 24147, 24101, 24054, 24007,
+	23960, 23914, 23867, 23820, 23773, 23726, 23679, 23632,
+	23586, 23539, 23492, 23445, 23398, 23351, 23304, 23257,
+	23210, 23163, 23116, 23069, 23022, 22975, 22928, 22881,
+	22833, 22786, 22739, 22692, 22645, 22598, 22551, 22503,
+	22456, 22409, 22362, 22314, 22267, 22220, 22173, 22125,
+	22078, 22031, 21983, 21936, 21889, 21841, 21794, 21746,
+	21699, 21651, 21604, 21557, 21509, 21462, 21414, 21367,
+	21319, 21271, 21224, 21176, 21129, 21081, 21034, 20986,
+	20938, 20891, 20843, 20795, 20748, 20700, 20652, 20605,
+	20557, 20509, 20461, 20414, 20366, 20318, 20270, 20223,
+	20175, 20127, 20079, 20031, 19983, 19935, 19888, 19840,
+	19792, 19744, 19696, 19648, 19600, 19552, 19504, 19456,
+	19408, 19360, 19312, 19264, 19216, 19168, 19120, 19072,
+	19024, 18975, 18927, 18879, 18831, 18783, 18735, 18687,
+	18638, 18590, 18542, 18494, 18446, 18397, 18349, 18301,
+	18253, 18204, 18156, 18108, 18059, 18011, 17963, 17914,
+	17866, 17818, 17769, 17721, 17672, 17624, 17576, 17527,
+	17479, 17430, 17382, 17333, 17285, 17236, 17188, 17139,
+	17091, 17042, 16994, 16945, 16897, 16848, 16800, 16751,
+	16702, 16654, 16605, 16557, 16508, 16459, 16411, 16362,
+	16313, 16265, 16216, 16167, 16118, 16070, 16021, 15972,
+	15923, 15875, 15826, 15777, 15728, 15680, 15631, 15582,
+	15533, 15484, 15435, 15387, 15338, 15289, 15240, 15191,
+	15142, 15093, 15044, 14995, 14946, 14897, 14849, 14800,
+	14751, 14702, 14653, 14604, 14555, 14506, 14457, 14408,
+	14359, 14309, 14260, 14211, 14162, 14113, 14064, 14015,
+	13966, 13917, 13868, 13819, 13769, 13720, 13671, 13622,
+	13573, 13524, 13474, 13425, 13376, 13327, 13278, 13228,
+	13179, 13130, 13081, 13031, 12982, 12933, 12884, 12834,
+	12785, 12736, 12686, 12637, 12588, 12538, 12489, 12440,
+	12390, 12341, 12292, 12242, 12193, 12143, 12094, 12045,
+	11995, 11946, 11896, 11847, 11797, 11748, 11699, 11649,
+	11600, 11550, 11501, 11451, 11402, 11352, 11303, 11253,
+	11204, 11154, 11105, 11055, 11006, 10956, 10906, 10857,
+	10807, 10758, 10708, 10658, 10609, 10559, 10510, 10460,
+	10410, 10361, 10311, 10262, 10212, 10162, 10113, 10063,
+	10013, 9964, 9914, 9864, 9814, 9765, 9715, 9665,
+	9616, 9566, 9516, 9466, 9417, 9367, 9317, 9267,
+	9218, 9168, 9118, 9068, 9019, 8969, 8919, 8869,
+	8819, 8770, 8720, 8670, 8620, 8570, 8520, 8471,
+	8421, 8371, 8321, 8271, 8221, 8171, 8122, 8072,
+	8022, 7972, 7922, 7872, 7822, 7772, 7722, 7672,
+	7623, 7573, 7523, 7473, 7423, 7373, 7323, 7273,
+	7223, 7173, 7123, 7073, 7023, 6973, 6923, 6873,
+	6823, 6773, 6723, 6673, 6623, 6573, 6523, 6473,
+	6423, 6373, 6323, 6273, 6223, 6173, 6123, 6073,
+	6023, 5973, 5923, 5873, 5823, 5773, 5722, 5672,
+	5622, 5572, 5522, 5472, 5422, 5372, 5322, 5272,
+	5222, 5171, 5121, 5071, 5021, 4971, 4921, 4871,
+	4821, 4770, 4720, 4670, 4620, 4570, 4520, 4470,
+	4420, 4369, 4319, 4269, 4219, 4169, 4119, 4068,
+	4018, 3968, 3918, 3868, 3818, 3767, 3717, 3667,
+	3617, 3567, 3516, 3466, 3416, 3366, 3316, 3265,
+	3215, 3165, 3115, 3065, 3014, 2964, 2914, 2864,
+	2814, 2763, 2713, 2663, 2613, 2562, 2512, 2462,
+	2412, 2361, 2311, 2261, 2211, 2161, 2110, 2060,
+	2010, 1960, 1909, 1859, 1809, 1759, 1708, 1658,
+	1608, 1558, 1507, 1457, 1407, 1357, 1306, 1256,
+	1206, 1156, 1105, 1055, 1005, 955, 904, 854,
+	804, 753, 703, 653, 603, 552, 502, 452,
+	402, 351, 301, 251, 201, 150, 100, 50,
+	0, -50, -100, -150, -201, -251, -301, -351,
+	-402, -452, -502, -552, -603, -653, -703, -753,
+	-804, -854, -904, -955, -1005, -1055, -1105, -1156,
+	-1206, -1256, -1306, -1357, -1407, -1457, -1507, -1558,
+	-1608, -1658, -1708, -1759, -1809, -1859, -1909, -1960,
+	-2010, -2060, -2110, -2161, -2211, -2261, -2311, -2361,
+	-2412, -2462, -2512, -2562, -2613, -2663, -2713, -2763,
+	-2814, -2864, -2914, -2964, -3014, -3065, -3115, -3165,
+	-3215, -3265, -3316, -3366, -3416, -3466, -3516, -3567,
+	-3617, -3667, -3717, -3767, -3818, -3868, -3918, -3968,
+	-4018, -4068, -4119, -4169, -4219, -4269, -4319, -4369,
+	-4420, -4470, -4520, -4570, -4620, -4670, -4720, -4770,
+	-4821, -4871, -4921, -4971, -5021, -5071, -5121, -5171,
+	-5222, -5272, -5322, -5372, -5422, -5472, -5522, -5572,
+	-5622, -5672, -5722, -5773, -5823, -5873, -5923, -5973,
+	-6023, -6073, -6123, -6173, -6223, -6273, -6323, -6373,
+	-6423, -6473, -6523, -6573, -6623, -6673, -6723, -6773,
+	-6823, -6873, -6923, -6973, -7023, -7073, -7123, -7173,
+	-7223, -7273, -7323, -7373, -7423, -7473, -7523, -7573,
+	-7623, -7672, -7722, -7772, -7822, -7872, -7922, -7972,
+	-8022, -8072, -8122, -8171, -8221, -8271, -8321, -8371,
+	-8421, -8471, -8520, -8570, -8620, -8670, -8720, -8770,
+	-8819, -8869, -8919, -8969, -9019, -9068, -9118, -9168,
+	-9218, -9267, -9317, -9367, -9417, -9466, -9516, -9566,
+	-9616, -9665, -9715, -9765, -9814, -9864, -9914, -9964,
+	-10013, -10063, -10113, -10162, -10212, -10262, -10311, -10361,
+	-10410, -10460, -10510, -10559, -10609, -10658, -10708, -10758,
+	-10807, -10857, -10906, -10956, -11006, -11055, -11105, -11154,
+	-11204, -11253, -11303, -11352, -11402, -11451, -11501, -11550,
+	-11600, -11649, -11699, -11748, -11797, -11847, -11896, -11946,
+	-11995, -12045, -12094, -12143, -12193, -12242, -12292, -12341,
+	-12390, -12440, -12489, -12538, -12588, -12637, -12686, -12736,
+	-12785, -12834, -12884, -12933, -12982, -13031, -13081, -13130,
+	-13179, -13228, -13278, -13327, -13376, -13425, -13474, -13524,
+	-13573, -13622, -13671, -13720, -13769, -13819, -13868, -13917,
+	-13966, -14015, -14064, -14113, -14162, -14211, -14260, -14309,
+	-14359, -14408, -14457, -14506, -14555, -14604, -14653, -14702,
+	-14751, -14800, -14849, -14897, -14946, -14995, -15044, -15093,
+	-15142, -15191, -15240, -15289, -15338, -15387, -15435, -15484,
+	-15533, -15582, -15631, -15680, -15728, -15777, -15826, -15875,
+	-15923, -15972, -16021, -16070, -16118, -16167, -16216, -16265,
+	-16313, -16362, -16411, -16459, -16508, -16557, -16605, -16654,
+	-16702, -16751, -16800, -16848, -16897, -16945, -16994, -17042,
+	-17091, -17139, -17188, -17236, -17285, -17333, -17382, -17430,
+	-17479, -17527, -17576, -17624, -17672, -17721, -17769, -17818,
+	-17866, -17914, -17963, -18011, -18059, -18108, -18156, -18204,
+	-18253, -18301, -18349, -18397, -18446, -18494, -18542, -18590,
+	-18638, -18687, -18735, -18783, -18831, -18879, -18927, -18975,
+	-19024, -19072, -19120, -19168, -19216, -19264, -19312, -19360,
+	-19408, -19456, -19504, -19552, -19600, -19648, -19696, -19744,
+	-19792, -19840, -19888, -19935, -19983, -20031, -20079, -20127,
+	-20175, -20223, -20270, -20318, -20366, -20414, -20461, -20509,
+	-20557, -20605, -20652, -20700, -20748, -20795, -20843, -20891,
+	-20938, -20986, -21034, -21081, -21129, -21176, -21224, -21271,
+	-21319, -21367, -21414, -21462, -21509, -21557, -21604, -21651,
+	-21699, -21746, -21794, -21841, -21889, -21936, -21983, -22031,
+	-22078, -22125, -22173, -22220, -22267, -22314, -22362, -22409,
+	-22456, -22503, -22551, -22598, -22645, -22692, -22739, -22786,
+	-22833, -22881, -22928, -22975, -23022, -23069, -23116, -23163,
+	-23210, -23257, -23304, -23351, -23398, -23445, -23492, -23539,
+	-23586, -23632, -23679, -23726, -23773, -23820, -23867, -23914,
+	-23960, -24007, -24054, -24101, -24147, -24194, -24241, -24287,
+	-24334, -24381, -24427, -24474, -24521, -24567, -24614, -24660,
+	-24707, -24754, -24800, -24847, -24893, -24940, -24986, -25033,
+	-25079, -25125, -25172, -25218, -25265, -25311, -25357, -25404,
+	-25450, -25496, -25543, -25589, -25635, -25681, -25728, -25774,
+	-25820, -25866, -25913, -25959, -26005, -26051, -26097, -26143,
+	-26189, -26235, -26281, -26327, -26373, -26419, -26465, -26511,
+	-26557, -26603, -26649, -26695, -26741, -26787, -26833, -26879,
+	-26925, -26970, -27016, -27062, -27108, -27153, -27199, -27245,
+	-27291, -27336, -27382, -27428, -27473, -27519, -27565, -27610,
+	-27656, -27701, -27747, -27792, -27838, -27883, -27929, -27974,
+	-28020, -28065, -28111, -28156, -28201, -28247, -28292, -28337,
+	-28383, -28428, -28473, -28519, -28564, -28609, -28654, -28699,
+	-28745, -28790, -28835, -28880, -28925, -28970, -29015, -29060,
+	-29105, -29151, -29196, -29241, -29285, -29330, -29375, -29420,
+	-29465, -29510, -29555, -29600, -29645, -29690, -29734, -29779,
+	-29824, -29869, -29913, -29958, -30003, -30047, -30092, -30137,
+	-30181, -30226, -30271, -30315, -30360, -30404, -30449, -30493,
+	-30538, -30582, -30627, -30671, -30715, -30760, -30804, -30849,
+	-30893, -30937, -30982, -31026, -31070, -31114, -31159, -31203,
+	-31247, -31291, -31335, -31379, -31424, -31468, -31512, -31556,
+	-31600, -31644, -31688, -31732, -31776, -31820, -31864, -31908,
+	-31952, -31995, -32039, -32083, -32127, -32171, -32215, -32258,
+	-32302, -32346, -32390, -32433, -32477, -32521, -32564, -32608,
+	-32651, -32695, -32738, -32782, -32826, -32869, -32912, -32956,
+	-32999, -33043, -33086, -33130, -33173, -33216, -33260, -33303,
+	-33346, -33389, -33433, -33476, -33519, -33562, -33605, -33649,
+	-33692, -33735, -33778, -33821, -33864, -33907, -33950, -33993,
+	-34036, -34079, -34122, -34165, -34208, -34251, -34293, -34336,
+	-34379, -34422, -34465, -34507, -34550, -34593, -34635, -34678,
+	-34721, -34763, -34806, -34849, -34891, -34934, -34976, -35019,
+	-35061, -35104, -35146, -35188, -35231, -35273, -35316, -35358,
+	-35400, -35442, -35485, -35527, -35569, -35611, -35654, -35696,
+	-35738, -35780, -35822, -35864, -35906, -35948, -35990, -36032,
+	-36074, -36116, -36158, -36200, -36242, -36284, -36326, -36368,
+	-36409, -36451, -36493, -36535, -36576, -36618, -36660, -36701,
+	-36743, -36785, -36826, -36868, -36909, -36951, -36992, -37034,
+	-37075, -37117, -37158, -37200, -37241, -37282, -37324, -37365,
+	-37406, -37447, -37489, -37530, -37571, -37612, -37653, -37695,
+	-37736, -37777, -37818, -37859, -37900, -37941, -37982, -38023,
+	-38064, -38105, -38146, -38186, -38227, -38268, -38309, -38350,
+	-38390, -38431, -38472, -38512, -38553, -38594, -38634, -38675,
+	-38716, -38756, -38797, -38837, -38878, -38918, -38958, -38999,
+	-39039, -39080, -39120, -39160, -39201, -39241, -39281, -39321,
+	-39362, -39402, -39442, -39482, -39522, -39562, -39602, -39642,
+	-39682, -39722, -39762, -39802, -39842, -39882, -39922, -39962,
+	-40002, -40041, -40081, -40121, -40161, -40200, -40240, -40280,
+	-40319, -40359, -40399, -40438, -40478, -40517, -40557, -40596,
+	-40636, -40675, -40714, -40754, -40793, -40832, -40872, -40911,
+	-40950, -40990, -41029, -41068, -41107, -41146, -41185, -41224,
+	-41263, -41303, -41342, -41381, -41419, -41458, -41497, -41536,
+	-41575, -41614, -41653, -41692, -41730, -41769, -41808, -41846,
+	-41885, -41924, -41962, -42001, -42040, -42078, -42117, -42155,
+	-42194, -42232, -42271, -42309, -42347, -42386, -42424, -42462,
+	-42501, -42539, -42577, -42615, -42653, -42692, -42730, -42768,
+	-42806, -42844, -42882, -42920, -42958, -42996, -43034, -43072,
+	-43110, -43147, -43185, -43223, -43261, -43298, -43336, -43374,
+	-43412, -43449, -43487, -43524, -43562, -43600, -43637, -43675,
+	-43712, -43749, -43787, -43824, -43862, -43899, -43936, -43974,
+	-44011, -44048, -44085, -44122, -44160, -44197, -44234, -44271,
+	-44308, -44345, -44382, -44419, -44456, -44493, -44530, -44567,
+	-44603, -44640, -44677, -44714, -44750, -44787, -44824, -44861,
+	-44897, -44934, -44970, -45007, -45043, -45080, -45116, -45153,
+	-45189, -45226, -45262, -45298, -45335, -45371, -45407, -45443,
+	-45480, -45516, -45552, -45588, -45624, -45660, -45696, -45732,
+	-45768, -45804, -45840, -45876, -45912, -45948, -45984, -46019,
+	-46055, -46091, -46127, -46162, -46198, -46234, -46269, -46305,
+	-46340, -46376, -46411, -46447, -46482, -46518, -46553, -46589,
+	-46624, -46659, -46695, -46730, -46765, -46800, -46835, -46871,
+	-46906, -46941, -46976, -47011, -47046, -47081, -47116, -47151,
+	-47186, -47220, -47255, -47290, -47325, -47360, -47394, -47429,
+	-47464, -47498, -47533, -47568, -47602, -47637, -47671, -47706,
+	-47740, -47775, -47809, -47843, -47878, -47912, -47946, -47981,
+	-48015, -48049, -48083, -48117, -48151, -48185, -48219, -48254,
+	-48288, -48321, -48355, -48389, -48423, -48457, -48491, -48525,
+	-48558, -48592, -48626, -48660, -48693, -48727, -48760, -48794,
+	-48828, -48861, -48895, -48928, -48961, -48995, -49028, -49062,
+	-49095, -49128, -49161, -49195, -49228, -49261, -49294, -49327,
+	-49360, -49393, -49426, -49459, -49492, -49525, -49558, -49591,
+	-49624, -49657, -49690, -49722, -49755, -49788, -49820, -49853,
+	-49886, -49918, -49951, -49983, -50016, -50048, -50081, -50113,
+	-50146, -50178, -50210, -50242, -50275, -50307, -50339, -50371,
+	-50403, -50436, -50468, -50500, -50532, -50564, -50596, -50628,
+	-50660, -50691, -50723, -50755, -50787, -50819, -50850, -50882,
+	-50914, -50945, -50977, -51008, -51040, -51072, -51103, -51134,
+	-51166, -51197, -51229, -51260, -51291, -51323, -51354, -51385,
+	-51416, -51447, -51478, -51510, -51541, -51572, -51603, -51634,
+	-51665, -51695, -51726, -51757, -51788, -51819, -51850, -51880,
+	-51911, -51942, -51972, -52003, -52033, -52064, -52095, -52125,
+	-52155, -52186, -52216, -52247, -52277, -52307, -52338, -52368,
+	-52398, -52428, -52458, -52488, -52518, -52549, -52579, -52609,
+	-52639, -52668, -52698, -52728, -52758, -52788, -52818, -52847,
+	-52877, -52907, -52936, -52966, -52996, -53025, -53055, -53084,
+	-53114, -53143, -53172, -53202, -53231, -53260, -53290, -53319,
+	-53348, -53377, -53407, -53436, -53465, -53494, -53523, -53552,
+	-53581, -53610, -53639, -53667, -53696, -53725, -53754, -53783,
+	-53811, -53840, -53869, -53897, -53926, -53954, -53983, -54011,
+	-54040, -54068, -54097, -54125, -54153, -54182, -54210, -54238,
+	-54266, -54294, -54323, -54351, -54379, -54407, -54435, -54463,
+	-54491, -54519, -54546, -54574, -54602, -54630, -54658, -54685,
+	-54713, -54741, -54768, -54796, -54823, -54851, -54879, -54906,
+	-54933, -54961, -54988, -55015, -55043, -55070, -55097, -55124,
+	-55152, -55179, -55206, -55233, -55260, -55287, -55314, -55341,
+	-55368, -55395, -55422, -55448, -55475, -55502, -55529, -55555,
+	-55582, -55609, -55635, -55662, -55688, -55715, -55741, -55768,
+	-55794, -55820, -55847, -55873, -55899, -55925, -55952, -55978,
+	-56004, -56030, -56056, -56082, -56108, -56134, -56160, -56186,
+	-56212, -56237, -56263, -56289, -56315, -56340, -56366, -56392,
+	-56417, -56443, -56468, -56494, -56519, -56545, -56570, -56595,
+	-56621, -56646, -56671, -56697, -56722, -56747, -56772, -56797,
+	-56822, -56847, -56872, -56897, -56922, -56947, -56972, -56997,
+	-57022, -57046, -57071, -57096, -57120, -57145, -57170, -57194,
+	-57219, -57243, -57268, -57292, -57316, -57341, -57365, -57389,
+	-57414, -57438, -57462, -57486, -57510, -57534, -57558, -57582,
+	-57606, -57630, -57654, -57678, -57702, -57726, -57750, -57773,
+	-57797, -57821, -57844, -57868, -57892, -57915, -57939, -57962,
+	-57986, -58009, -58032, -58056, -58079, -58102, -58125, -58149,
+	-58172, -58195, -58218, -58241, -58264, -58287, -58310, -58333,
+	-58356, -58379, -58402, -58424, -58447, -58470, -58493, -58515,
+	-58538, -58560, -58583, -58605, -58628, -58650, -58673, -58695,
+	-58718, -58740, -58762, -58784, -58807, -58829, -58851, -58873,
+	-58895, -58917, -58939, -58961, -58983, -59005, -59027, -59049,
+	-59070, -59092, -59114, -59135, -59157, -59179, -59200, -59222,
+	-59243, -59265, -59286, -59308, -59329, -59350, -59372, -59393,
+	-59414, -59435, -59457, -59478, -59499, -59520, -59541, -59562,
+	-59583, -59604, -59625, -59645, -59666, -59687, -59708, -59728,
+	-59749, -59770, -59790, -59811, -59831, -59852, -59872, -59893,
+	-59913, -59934, -59954, -59974, -59994, -60015, -60035, -60055,
+	-60075, -60095, -60115, -60135, -60155, -60175, -60195, -60215,
+	-60235, -60254, -60274, -60294, -60313, -60333, -60353, -60372,
+	-60392, -60411, -60431, -60450, -60470, -60489, -60508, -60528,
+	-60547, -60566, -60585, -60604, -60624, -60643, -60662, -60681,
+	-60700, -60719, -60737, -60756, -60775, -60794, -60813, -60831,
+	-60850, -60869, -60887, -60906, -60924, -60943, -60961, -60980,
+	-60998, -61017, -61035, -61053, -61071, -61090, -61108, -61126,
+	-61144, -61162, -61180, -61198, -61216, -61234, -61252, -61270,
+	-61288, -61305, -61323, -61341, -61359, -61376, -61394, -61411,
+	-61429, -61446, -61464, -61481, -61499, -61516, -61533, -61551,
+	-61568, -61585, -61602, -61619, -61637, -61654, -61671, -61688,
+	-61705, -61721, -61738, -61755, -61772, -61789, -61805, -61822,
+	-61839, -61855, -61872, -61889, -61905, -61922, -61938, -61954,
+	-61971, -61987, -62003, -62020, -62036, -62052, -62068, -62084,
+	-62100, -62117, -62133, -62148, -62164, -62180, -62196, -62212,
+	-62228, -62244, -62259, -62275, -62291, -62306, -62322, -62337,
+	-62353, -62368, -62384, -62399, -62414, -62430, -62445, -62460,
+	-62475, -62491, -62506, -62521, -62536, -62551, -62566, -62581,
+	-62596, -62610, -62625, -62640, -62655, -62670, -62684, -62699,
+	-62714, -62728, -62743, -62757, -62772, -62786, -62800, -62815,
+	-62829, -62843, -62858, -62872, -62886, -62900, -62914, -62928,
+	-62942, -62956, -62970, -62984, -62998, -63012, -63026, -63039,
+	-63053, -63067, -63080, -63094, -63108, -63121, -63135, -63148,
+	-63162, -63175, -63188, -63202, -63215, -63228, -63241, -63254,
+	-63268, -63281, -63294, -63307, -63320, -63333, -63346, -63358,
+	-63371, -63384, -63397, -63410, -63422, -63435, -63447, -63460,
+	-63473, -63485, -63498, -63510, -63522, -63535, -63547, -63559,
+	-63571, -63584, -63596, -63608, -63620, -63632, -63644, -63656,
+	-63668, -63680, -63692, -63704, -63715, -63727, -63739, -63750,
+	-63762, -63774, -63785, -63797, -63808, -63820, -63831, -63842,
+	-63854, -63865, -63876, -63888, -63899, -63910, -63921, -63932,
+	-63943, -63954, -63965, -63976, -63987, -63998, -64009, -64019,
+	-64030, -64041, -64051, -64062, -64073, -64083, -64094, -64104,
+	-64115, -64125, -64135, -64146, -64156, -64166, -64176, -64186,
+	-64197, -64207, -64217, -64227, -64237, -64247, -64257, -64266,
+	-64276, -64286, -64296, -64305, -64315, -64325, -64334, -64344,
+	-64353, -64363, -64372, -64382, -64391, -64401, -64410, -64419,
+	-64428, -64437, -64447, -64456, -64465, -64474, -64483, -64492,
+	-64501, -64510, -64518, -64527, -64536, -64545, -64553, -64562,
+	-64571, -64579, -64588, -64596, -64605, -64613, -64622, -64630,
+	-64638, -64646, -64655, -64663, -64671, -64679, -64687, -64695,
+	-64703, -64711, -64719, -64727, -64735, -64743, -64751, -64758,
+	-64766, -64774, -64781, -64789, -64796, -64804, -64811, -64819,
+	-64826, -64834, -64841, -64848, -64855, -64863, -64870, -64877,
+	-64884, -64891, -64898, -64905, -64912, -64919, -64926, -64933,
+	-64939, -64946, -64953, -64959, -64966, -64973, -64979, -64986,
+	-64992, -64999, -65005, -65011, -65018, -65024, -65030, -65036,
+	-65043, -65049, -65055, -65061, -65067, -65073, -65079, -65085,
+	-65091, -65096, -65102, -65108, -65114, -65119, -65125, -65131,
+	-65136, -65142, -65147, -65153, -65158, -65163, -65169, -65174,
+	-65179, -65184, -65190, -65195, -65200, -65205, -65210, -65215,
+	-65220, -65225, -65230, -65235, -65239, -65244, -65249, -65253,
+	-65258, -65263, -65267, -65272, -65276, -65281, -65285, -65290,
+	-65294, -65298, -65302, -65307, -65311, -65315, -65319, -65323,
+	-65327, -65331, -65335, -65339, -65343, -65347, -65350, -65354,
+	-65358, -65362, -65365, -65369, -65372, -65376, -65379, -65383,
+	-65386, -65390, -65393, -65396, -65400, -65403, -65406, -65409,
+	-65412, -65415, -65418, -65421, -65424, -65427, -65430, -65433,
+	-65436, -65438, -65441, -65444, -65446, -65449, -65452, -65454,
+	-65457, -65459, -65461, -65464, -65466, -65468, -65471, -65473,
+	-65475, -65477, -65479, -65481, -65483, -65485, -65487, -65489,
+	-65491, -65493, -65495, -65496, -65498, -65500, -65501, -65503,
+	-65505, -65506, -65508, -65509, -65511, -65512, -65513, -65515,
+	-65516, -65517, -65518, -65519, -65520, -65521, -65522, -65523,
+	-65524, -65525, -65526, -65527, -65528, -65529, -65529, -65530,
 	-65531, -65531, -65532, -65532, -65533, -65533, -65534, -65534,
 	-65534, -65535, -65535, -65535, -65535, -65535, -65535, -65535,
-	-65535, -65535, -65535, -65535, -65535, -65535, -65535, -65534,
-	-65534, -65534, -65533, -65533, -65532, -65532, -65531, -65531,
-	-65530, -65530, -65529, -65528, -65527, -65527, -65526, -65525,
-	-65524, -65523, -65522, -65521, -65520, -65519, -65518, -65516,
-	-65515, -65514, -65513, -65511, -65510, -65508, -65507, -65505,
-	-65504, -65502, -65501, -65499, -65497, -65496, -65494, -65492,
-	-65490, -65488, -65486, -65484, -65482, -65480, -65478, -65476,
-	-65474, -65472, -65470, -65467, -65465, -65463, -65460, -65458,
-	-65455, -65453, -65450, -65448, -65445, -65442, -65440, -65437,
-	-65434, -65431, -65429, -65426, -65423, -65420, -65417, -65414,
-	-65411, -65408, -65404, -65401, -65398, -65395, -65391, -65388,
-	-65385, -65381, -65378, -65374, -65371, -65367, -65363, -65360,
-	-65356, -65352, -65349, -65345, -65341, -65337, -65333, -65329,
-	-65325, -65321, -65317, -65313, -65309, -65305, -65300, -65296,
-	-65292, -65287, -65283, -65279, -65274, -65270, -65265, -65260,
-	-65256, -65251, -65246, -65242, -65237, -65232, -65227, -65222,
-	-65217, -65212, -65207, -65202, -65197, -65192, -65187, -65182,
-	-65177, -65171, -65166, -65161, -65155, -65150, -65144, -65139,
-	-65133, -65128, -65122, -65117, -65111, -65105, -65099, -65094,
-	-65088, -65082, -65076, -65070, -65064, -65058, -65052, -65046,
-	-65040, -65033, -65027, -65021, -65015, -65008, -65002, -64995,
-	-64989, -64982, -64976, -64969, -64963, -64956, -64949, -64943,
-	-64936, -64929, -64922, -64915, -64908, -64902, -64895, -64887,
-	-64880, -64873, -64866, -64859, -64852, -64844, -64837, -64830,
-	-64822, -64815, -64808, -64800, -64793, -64785, -64777, -64770,
-	-64762, -64754, -64747, -64739, -64731, -64723, -64715, -64707,
-	-64699, -64691, -64683, -64675, -64667, -64659, -64651, -64642,
-	-64634, -64626, -64617, -64609, -64601, -64592, -64584, -64575,
-	-64566, -64558, -64549, -64540, -64532, -64523, -64514, -64505,
-	-64496, -64487, -64478, -64469, -64460, -64451, -64442, -64433,
-	-64424, -64414, -64405, -64396, -64387, -64377, -64368, -64358,
-	-64349, -64339, -64330, -64320, -64310, -64301, -64291, -64281,
-	-64271, -64261, -64252, -64242, -64232, -64222, -64212, -64202,
-	-64192, -64181, -64171, -64161, -64151, -64140, -64130, -64120,
-	-64109, -64099, -64088, -64078, -64067, -64057, -64046, -64035,
-	-64025, -64014, -64003, -63992, -63981, -63971, -63960, -63949,
-	-63938, -63927, -63915, -63904, -63893, -63882, -63871, -63859,
-	-63848, -63837, -63825, -63814, -63803, -63791, -63779, -63768,
-	-63756, -63745, -63733, -63721, -63709, -63698, -63686, -63674,
-	-63662, -63650, -63638, -63626, -63614, -63602, -63590, -63578,
-	-63565, -63553, -63541, -63528, -63516, -63504, -63491, -63479,
-	-63466, -63454, -63441, -63429, -63416, -63403, -63390, -63378,
-	-63365, -63352, -63339, -63326, -63313, -63300, -63287, -63274,
-	-63261, -63248, -63235, -63221, -63208, -63195, -63182, -63168,
-	-63155, -63141, -63128, -63114, -63101, -63087, -63074, -63060,
-	-63046, -63032, -63019, -63005, -62991, -62977, -62963, -62949,
-	-62935, -62921, -62907, -62893, -62879, -62865, -62850, -62836,
-	-62822, -62808, -62793, -62779, -62764, -62750, -62735, -62721,
-	-62706, -62692, -62677, -62662, -62648, -62633, -62618, -62603,
-	-62588, -62573, -62558, -62543, -62528, -62513, -62498, -62483,
-	-62468, -62453, -62437, -62422, -62407, -62391, -62376, -62360,
-	-62345, -62329, -62314, -62298, -62283, -62267, -62251, -62236,
-	-62220, -62204, -62188, -62172, -62156, -62141, -62125, -62108,
-	-62092, -62076, -62060, -62044, -62028, -62012, -61995, -61979,
-	-61963, -61946, -61930, -61913, -61897, -61880, -61864, -61847,
-	-61831, -61814, -61797, -61780, -61764, -61747, -61730, -61713,
-	-61696, -61679, -61662, -61645, -61628, -61611, -61594, -61577,
-	-61559, -61542, -61525, -61507, -61490, -61473, -61455, -61438,
-	-61420, -61403, -61385, -61367, -61350, -61332, -61314, -61297,
-	-61279, -61261, -61243, -61225, -61207, -61189, -61171, -61153,
-	-61135, -61117, -61099, -61081, -61062, -61044, -61026, -61007,
-	-60989, -60971, -60952, -60934, -60915, -60897, -60878, -60859,
-	-60841, -60822, -60803, -60785, -60766, -60747, -60728, -60709,
-	-60690, -60671, -60652, -60633, -60614, -60595, -60576, -60556,
-	-60537, -60518, -60499, -60479, -60460, -60441, -60421, -60402,
-	-60382, -60363, -60343, -60323, -60304, -60284, -60264, -60244,
-	-60225, -60205, -60185, -60165, -60145, -60125, -60105, -60085,
-	-60065, -60045, -60025, -60004, -59984, -59964, -59944, -59923,
-	-59903, -59883, -59862, -59842, -59821, -59801, -59780, -59759,
-	-59739, -59718, -59697, -59677, -59656, -59635, -59614, -59593,
-	-59572, -59551, -59530, -59509, -59488, -59467, -59446, -59425,
-	-59404, -59382, -59361, -59340, -59318, -59297, -59276, -59254,
-	-59233, -59211, -59189, -59168, -59146, -59125, -59103, -59081,
-	-59059, -59038, -59016, -58994, -58972, -58950, -58928, -58906,
-	-58884, -58862, -58840, -58818, -58795, -58773, -58751, -58729,
-	-58706, -58684, -58662, -58639, -58617, -58594, -58572, -58549,
-	-58527, -58504, -58481, -58459, -58436, -58413, -58390, -58367,
-	-58345, -58322, -58299, -58276, -58253, -58230, -58207, -58183,
-	-58160, -58137, -58114, -58091, -58067, -58044, -58021, -57997,
-	-57974, -57950, -57927, -57903, -57880, -57856, -57833, -57809,
-	-57785, -57762, -57738, -57714, -57690, -57666, -57642, -57618,
-	-57594, -57570, -57546, -57522, -57498, -57474, -57450, -57426,
-	-57402, -57377, -57353, -57329, -57304, -57280, -57255, -57231,
-	-57206, -57182, -57157, -57133, -57108, -57083, -57059, -57034,
-	-57009, -56984, -56959, -56935, -56910, -56885, -56860, -56835,
-	-56810, -56785, -56760, -56734, -56709, -56684, -56659, -56633,
-	-56608, -56583, -56557, -56532, -56507, -56481, -56456, -56430,
-	-56404, -56379, -56353, -56328, -56302, -56276, -56250, -56225,
-	-56199, -56173, -56147, -56121, -56095, -56069, -56043, -56017,
-	-55991, -55965, -55938, -55912, -55886, -55860, -55833, -55807,
-	-55781, -55754, -55728, -55701, -55675, -55648, -55622, -55595,
-	-55569, -55542, -55515, -55489, -55462, -55435, -55408, -55381,
-	-55354, -55327, -55300, -55274, -55246, -55219, -55192, -55165,
-	-55138, -55111, -55084, -55056, -55029, -55002, -54974, -54947,
-	-54920, -54892, -54865, -54837, -54810, -54782, -54755, -54727,
-	-54699, -54672, -54644, -54616, -54588, -54560, -54533, -54505,
-	-54477, -54449, -54421, -54393, -54365, -54337, -54308, -54280,
-	-54252, -54224, -54196, -54167, -54139, -54111, -54082, -54054,
-	-54026, -53997, -53969, -53940, -53911, -53883, -53854, -53826,
-	-53797, -53768, -53739, -53711, -53682, -53653, -53624, -53595,
-	-53566, -53537, -53508, -53479, -53450, -53421, -53392, -53363,
-	-53334, -53304, -53275, -53246, -53216, -53187, -53158, -53128,
-	-53099, -53069, -53040, -53010, -52981, -52951, -52922, -52892,
-	-52862, -52832, -52803, -52773, -52743, -52713, -52683, -52653,
-	-52624, -52594, -52564, -52534, -52503, -52473, -52443, -52413,
-	-52383, -52353, -52322, -52292, -52262, -52231, -52201, -52171,
-	-52140, -52110, -52079, -52049, -52018, -51988, -51957, -51926,
-	-51896, -51865, -51834, -51803, -51773, -51742, -51711, -51680,
-	-51649, -51618, -51587, -51556, -51525, -51494, -51463, -51432,
-	-51401, -51369, -51338, -51307, -51276, -51244, -51213, -51182,
-	-51150, -51119, -51087, -51056, -51024, -50993, -50961, -50929,
-	-50898, -50866, -50834, -50803, -50771, -50739, -50707, -50675,
-	-50644, -50612, -50580, -50548, -50516, -50484, -50452, -50420,
-	-50387, -50355, -50323, -50291, -50259, -50226, -50194, -50162,
-	-50129, -50097, -50065, -50032, -50000, -49967, -49935, -49902,
-	-49869, -49837, -49804, -49771, -49739, -49706, -49673, -49640,
-	-49608, -49575, -49542, -49509, -49476, -49443, -49410, -49377,
-	-49344, -49311, -49278, -49244, -49211, -49178, -49145, -49112,
-	-49078, -49045, -49012, -48978, -48945, -48911, -48878, -48844,
-	-48811, -48777, -48744, -48710, -48676, -48643, -48609, -48575,
-	-48542, -48508, -48474, -48440, -48406, -48372, -48338, -48305,
-	-48271, -48237, -48202, -48168, -48134, -48100, -48066, -48032,
-	-47998, -47963, -47929, -47895, -47860, -47826, -47792, -47757,
-	-47723, -47688, -47654, -47619, -47585, -47550, -47516, -47481,
-	-47446, -47412, -47377, -47342, -47307, -47273, -47238, -47203,
-	-47168, -47133, -47098, -47063, -47028, -46993, -46958, -46923,
-	-46888, -46853, -46818, -46783, -46747, -46712, -46677, -46642,
-	-46606, -46571, -46536, -46500, -46465, -46429, -46394, -46358,
-	-46323, -46287, -46251, -46216, -46180, -46145, -46109, -46073,
-	-46037, -46002, -45966, -45930, -45894, -45858, -45822, -45786,
-	-45750, -45714, -45678, -45642, -45606, -45570, -45534, -45498,
-	-45462, -45425, -45389, -45353, -45316, -45280, -45244, -45207,
-	-45171, -45135, -45098, -45062, -45025, -44989, -44952, -44915,
-	-44879, -44842, -44806, -44769, -44732, -44695, -44659, -44622,
-	-44585, -44548, -44511, -44474, -44437, -44400, -44363, -44326,
-	-44289, -44252, -44215, -44178, -44141, -44104, -44067, -44029,
-	-43992, -43955, -43918, -43880, -43843, -43806, -43768, -43731,
-	-43693, -43656, -43618, -43581, -43543, -43506, -43468, -43430,
-	-43393, -43355, -43317, -43280, -43242, -43204, -43166, -43128,
-	-43091, -43053, -43015, -42977, -42939, -42901, -42863, -42825,
-	-42787, -42749, -42711, -42672, -42634, -42596, -42558, -42520,
-	-42481, -42443, -42405, -42366, -42328, -42290, -42251, -42213,
-	-42174, -42136, -42097, -42059, -42020, -41982, -41943, -41904,
-	-41866, -41827, -41788, -41750, -41711, -41672, -41633, -41595,
-	-41556, -41517, -41478, -41439, -41400, -41361, -41322, -41283,
-	-41244, -41205, -41166, -41127, -41087, -41048, -41009, -40970,
-	-40931, -40891, -40852, -40813, -40773, -40734, -40695, -40655,
-	-40616, -40576, -40537, -40497, -40458, -40418, -40379, -40339,
-	-40299, -40260, -40220, -40180, -40141, -40101, -40061, -40021,
-	-39982, -39942, -39902, -39862, -39822, -39782, -39742, -39702,
-	-39662, -39622, -39582, -39542, -39502, -39462, -39422, -39382,
-	-39341, -39301, -39261, -39221, -39180, -39140, -39100, -39059,
-	-39019, -38979, -38938, -38898, -38857, -38817, -38776, -38736,
-	-38695, -38655, -38614, -38573, -38533, -38492, -38451, -38411,
-	-38370, -38329, -38288, -38248, -38207, -38166, -38125, -38084,
-	-38043, -38002, -37961, -37920, -37879, -37838, -37797, -37756,
-	-37715, -37674, -37633, -37592, -37550, -37509, -37468, -37427,
-	-37386, -37344, -37303, -37262, -37220, -37179, -37137, -37096,
-	-37055, -37013, -36972, -36930, -36889, -36847, -36805, -36764,
-	-36722, -36681, -36639, -36597, -36556, -36514, -36472, -36430,
-	-36388, -36347, -36305, -36263, -36221, -36179, -36137, -36095,
-	-36053, -36011, -35969, -35927, -35885, -35843, -35801, -35759,
-	-35717, -35675, -35633, -35590, -35548, -35506, -35464, -35421,
-	-35379, -35337, -35294, -35252, -35210, -35167, -35125, -35082,
-	-35040, -34997, -34955, -34912, -34870, -34827, -34785, -34742,
-	-34699, -34657, -34614, -34571, -34529, -34486, -34443, -34400,
-	-34358, -34315, -34272, -34229, -34186, -34143, -34100, -34057,
-	-34015, -33972, -33929, -33886, -33843, -33799, -33756, -33713,
-	-33670, -33627, -33584, -33541, -33498, -33454, -33411, -33368,
-	-33325, -33281, -33238, -33195, -33151, -33108, -33065, -33021,
-	-32978, -32934, -32891, -32847, -32804, -32760, -32717, -32673,
-	-32630, -32586, -32542, -32499, -32455, -32411, -32368, -32324,
-	-32280, -32236, -32193, -32149, -32105, -32061, -32017, -31974,
-	-31930, -31886, -31842, -31798, -31754, -31710, -31666, -31622,
-	-31578, -31534, -31490, -31446, -31402, -31357, -31313, -31269,
-	-31225, -31181, -31136, -31092, -31048, -31004, -30959, -30915,
-	-30871, -30826, -30782, -30738, -30693, -30649, -30604, -30560,
-	-30515, -30471, -30426, -30382, -30337, -30293, -30248, -30204,
-	-30159, -30114, -30070, -30025, -29980, -29936, -29891, -29846,
-	-29801, -29757, -29712, -29667, -29622, -29577, -29533, -29488,
-	-29443, -29398, -29353, -29308, -29263, -29218, -29173, -29128,
-	-29083, -29038, -28993, -28948, -28903, -28858, -28812, -28767,
-	-28722, -28677, -28632, -28586, -28541, -28496, -28451, -28405,
-	-28360, -28315, -28269, -28224, -28179, -28133, -28088, -28042,
-	-27997, -27952, -27906, -27861, -27815, -27770, -27724, -27678,
-	-27633, -27587, -27542, -27496, -27450, -27405, -27359, -27313,
-	-27268, -27222, -27176, -27131, -27085, -27039, -26993, -26947,
-	-26902, -26856, -26810, -26764, -26718, -26672, -26626, -26580,
-	-26534, -26488, -26442, -26396, -26350, -26304, -26258, -26212,
-	-26166, -26120, -26074, -26028, -25982, -25936, -25889, -25843,
-	-25797, -25751, -25705, -25658, -25612, -25566, -25520, -25473,
-	-25427, -25381, -25334, -25288, -25241, -25195, -25149, -25102,
-	-25056, -25009, -24963, -24916, -24870, -24823, -24777, -24730,
-	-24684, -24637, -24591, -24544, -24497, -24451, -24404, -24357,
-	-24311, -24264, -24217, -24171, -24124, -24077, -24030, -23984,
-	-23937, -23890, -23843, -23796, -23750, -23703, -23656, -23609,
-	-23562, -23515, -23468, -23421, -23374, -23327, -23280, -23233,
-	-23186, -23139, -23092, -23045, -22998, -22951, -22904, -22857,
-	-22810, -22763, -22716, -22668, -22621, -22574, -22527, -22480,
-	-22432, -22385, -22338, -22291, -22243, -22196, -22149, -22102,
-	-22054, -22007, -21960, -21912, -21865, -21817, -21770, -21723,
-	-21675, -21628, -21580, -21533, -21485, -21438, -21390, -21343,
-	-21295, -21248, -21200, -21153, -21105, -21057, -21010, -20962,
-	-20915, -20867, -20819, -20772, -20724, -20676, -20629, -20581,
-	-20533, -20485, -20438, -20390, -20342, -20294, -20246, -20199,
-	-20151, -20103, -20055, -20007, -19959, -19912, -19864, -19816,
-	-19768, -19720, -19672, -19624, -19576, -19528, -19480, -19432,
-	-19384, -19336, -19288, -19240, -19192, -19144, -19096, -19048,
-	-19000, -18951, -18903, -18855, -18807, -18759, -18711, -18663,
-	-18614, -18566, -18518, -18470, -18421, -18373, -18325, -18277,
-	-18228, -18180, -18132, -18084, -18035, -17987, -17939, -17890,
-	-17842, -17793, -17745, -17697, -17648, -17600, -17551, -17503,
-	-17455, -17406, -17358, -17309, -17261, -17212, -17164, -17115,
-	-17067, -17018, -16970, -16921, -16872, -16824, -16775, -16727,
-	-16678, -16629, -16581, -16532, -16484, -16435, -16386, -16338,
-	-16289, -16240, -16191, -16143, -16094, -16045, -15997, -15948,
-	-15899, -15850, -15802, -15753, -15704, -15655, -15606, -15557,
-	-15509, -15460, -15411, -15362, -15313, -15264, -15215, -15167,
-	-15118, -15069, -15020, -14971, -14922, -14873, -14824, -14775,
-	-14726, -14677, -14628, -14579, -14530, -14481, -14432, -14383,
-	-14334, -14285, -14236, -14187, -14138, -14089, -14040, -13990,
-	-13941, -13892, -13843, -13794, -13745, -13696, -13647, -13597,
-	-13548, -13499, -13450, -13401, -13351, -13302, -13253, -13204,
-	-13154, -13105, -13056, -13007, -12957, -12908, -12859, -12810,
-	-12760, -12711, -12662, -12612, -12563, -12514, -12464, -12415,
-	-12366, -12316, -12267, -12217, -12168, -12119, -12069, -12020,
-	-11970, -11921, -11872, -11822, -11773, -11723, -11674, -11624,
-	-11575, -11525, -11476, -11426, -11377, -11327, -11278, -11228,
-	-11179, -11129, -11080, -11030, -10981, -10931, -10882, -10832,
-	-10782, -10733, -10683, -10634, -10584, -10534, -10485, -10435,
-	-10386, -10336, -10286, -10237, -10187, -10137, -10088, -10038,
-	-9988, -9939, -9889, -9839, -9790, -9740, -9690, -9640,
-	-9591, -9541, -9491, -9442, -9392, -9342, -9292, -9243,
-	-9193, -9143, -9093, -9043, -8994, -8944, -8894, -8844,
-	-8794, -8745, -8695, -8645, -8595, -8545, -8496, -8446,
-	-8396, -8346, -8296, -8246, -8196, -8147, -8097, -8047,
-	-7997, -7947, -7897, -7847, -7797, -7747, -7697, -7648,
-	-7598, -7548, -7498, -7448, -7398, -7348, -7298, -7248,
-	-7198, -7148, -7098, -7048, -6998, -6948, -6898, -6848,
-	-6798, -6748, -6698, -6648, -6598, -6548, -6498, -6448,
-	-6398, -6348, -6298, -6248, -6198, -6148, -6098, -6048,
-	-5998, -5948, -5898, -5848, -5798, -5747, -5697, -5647,
-	-5597, -5547, -5497, -5447, -5397, -5347, -5297, -5247,
-	-5197, -5146, -5096, -5046, -4996, -4946, -4896, -4846,
-	-4796, -4745, -4695, -4645, -4595, -4545, -4495, -4445,
-	-4394, -4344, -4294, -4244, -4194, -4144, -4093, -4043,
-	-3993, -3943, -3893, -3843, -3792, -3742, -3692, -3642,
-	-3592, -3541, -3491, -3441, -3391, -3341, -3291, -3240,
-	-3190, -3140, -3090, -3039, -2989, -2939, -2889, -2839,
-	-2788, -2738, -2688, -2638, -2588, -2537, -2487, -2437,
-	-2387, -2336, -2286, -2236, -2186, -2135, -2085, -2035,
-	-1985, -1934, -1884, -1834, -1784, -1733, -1683, -1633,
-	-1583, -1532, -1482, -1432, -1382, -1331, -1281, -1231,
-	-1181, -1130, -1080, -1030, -980, -929, -879, -829,
-	-779, -728, -678, -628, -578, -527, -477, -427,
-	-376, -326, -276, -226, -175, -125, -75, -25,
-	25, 75, 125, 175, 226, 276, 326, 376,
-	427, 477, 527, 578, 628, 678, 728, 779,
-	829, 879, 929, 980, 1030, 1080, 1130, 1181,
-	1231, 1281, 1331, 1382, 1432, 1482, 1532, 1583,
-	1633, 1683, 1733, 1784, 1834, 1884, 1934, 1985,
-	2035, 2085, 2135, 2186, 2236, 2286, 2336, 2387,
-	2437, 2487, 2537, 2587, 2638, 2688, 2738, 2788,
-	2839, 2889, 2939, 2989, 3039, 3090, 3140, 3190,
-	3240, 3291, 3341, 3391, 3441, 3491, 3542, 3592,
-	3642, 3692, 3742, 3792, 3843, 3893, 3943, 3993,
-	4043, 4093, 4144, 4194, 4244, 4294, 4344, 4394,
-	4445, 4495, 4545, 4595, 4645, 4695, 4745, 4796,
-	4846, 4896, 4946, 4996, 5046, 5096, 5146, 5197,
-	5247, 5297, 5347, 5397, 5447, 5497, 5547, 5597,
-	5647, 5697, 5747, 5798, 5848, 5898, 5948, 5998,
-	6048, 6098, 6148, 6198, 6248, 6298, 6348, 6398,
-	6448, 6498, 6548, 6598, 6648, 6698, 6748, 6798,
-	6848, 6898, 6948, 6998, 7048, 7098, 7148, 7198,
-	7248, 7298, 7348, 7398, 7448, 7498, 7548, 7598,
-	7648, 7697, 7747, 7797, 7847, 7897, 7947, 7997,
-	8047, 8097, 8147, 8196, 8246, 8296, 8346, 8396,
-	8446, 8496, 8545, 8595, 8645, 8695, 8745, 8794,
-	8844, 8894, 8944, 8994, 9043, 9093, 9143, 9193,
-	9243, 9292, 9342, 9392, 9442, 9491, 9541, 9591,
-	9640, 9690, 9740, 9790, 9839, 9889, 9939, 9988,
-	10038, 10088, 10137, 10187, 10237, 10286, 10336, 10386,
-	10435, 10485, 10534, 10584, 10634, 10683, 10733, 10782,
-	10832, 10882, 10931, 10981, 11030, 11080, 11129, 11179,
-	11228, 11278, 11327, 11377, 11426, 11476, 11525, 11575,
-	11624, 11674, 11723, 11773, 11822, 11872, 11921, 11970,
-	12020, 12069, 12119, 12168, 12218, 12267, 12316, 12366,
-	12415, 12464, 12514, 12563, 12612, 12662, 12711, 12760,
-	12810, 12859, 12908, 12957, 13007, 13056, 13105, 13154,
-	13204, 13253, 13302, 13351, 13401, 13450, 13499, 13548,
-	13597, 13647, 13696, 13745, 13794, 13843, 13892, 13941,
-	13990, 14040, 14089, 14138, 14187, 14236, 14285, 14334,
-	14383, 14432, 14481, 14530, 14579, 14628, 14677, 14726,
-	14775, 14824, 14873, 14922, 14971, 15020, 15069, 15118,
-	15167, 15215, 15264, 15313, 15362, 15411, 15460, 15509,
-	15557, 15606, 15655, 15704, 15753, 15802, 15850, 15899,
-	15948, 15997, 16045, 16094, 16143, 16191, 16240, 16289,
-	16338, 16386, 16435, 16484, 16532, 16581, 16629, 16678,
-	16727, 16775, 16824, 16872, 16921, 16970, 17018, 17067,
-	17115, 17164, 17212, 17261, 17309, 17358, 17406, 17455,
-	17503, 17551, 17600, 17648, 17697, 17745, 17793, 17842,
-	17890, 17939, 17987, 18035, 18084, 18132, 18180, 18228,
-	18277, 18325, 18373, 18421, 18470, 18518, 18566, 18614,
-	18663, 18711, 18759, 18807, 18855, 18903, 18951, 19000,
-	19048, 19096, 19144, 19192, 19240, 19288, 19336, 19384,
-	19432, 19480, 19528, 19576, 19624, 19672, 19720, 19768,
-	19816, 19864, 19912, 19959, 20007, 20055, 20103, 20151,
-	20199, 20246, 20294, 20342, 20390, 20438, 20485, 20533,
-	20581, 20629, 20676, 20724, 20772, 20819, 20867, 20915,
-	20962, 21010, 21057, 21105, 21153, 21200, 21248, 21295,
-	21343, 21390, 21438, 21485, 21533, 21580, 21628, 21675,
-	21723, 21770, 21817, 21865, 21912, 21960, 22007, 22054,
-	22102, 22149, 22196, 22243, 22291, 22338, 22385, 22432,
-	22480, 22527, 22574, 22621, 22668, 22716, 22763, 22810,
-	22857, 22904, 22951, 22998, 23045, 23092, 23139, 23186,
-	23233, 23280, 23327, 23374, 23421, 23468, 23515, 23562,
-	23609, 23656, 23703, 23750, 23796, 23843, 23890, 23937,
-	23984, 24030, 24077, 24124, 24171, 24217, 24264, 24311,
-	24357, 24404, 24451, 24497, 24544, 24591, 24637, 24684,
-	24730, 24777, 24823, 24870, 24916, 24963, 25009, 25056,
-	25102, 25149, 25195, 25241, 25288, 25334, 25381, 25427,
-	25473, 25520, 25566, 25612, 25658, 25705, 25751, 25797,
-	25843, 25889, 25936, 25982, 26028, 26074, 26120, 26166,
-	26212, 26258, 26304, 26350, 26396, 26442, 26488, 26534,
-	26580, 26626, 26672, 26718, 26764, 26810, 26856, 26902,
-	26947, 26993, 27039, 27085, 27131, 27176, 27222, 27268,
-	27313, 27359, 27405, 27450, 27496, 27542, 27587, 27633,
-	27678, 27724, 27770, 27815, 27861, 27906, 27952, 27997,
-	28042, 28088, 28133, 28179, 28224, 28269, 28315, 28360,
-	28405, 28451, 28496, 28541, 28586, 28632, 28677, 28722,
-	28767, 28812, 28858, 28903, 28948, 28993, 29038, 29083,
-	29128, 29173, 29218, 29263, 29308, 29353, 29398, 29443,
-	29488, 29533, 29577, 29622, 29667, 29712, 29757, 29801,
-	29846, 29891, 29936, 29980, 30025, 30070, 30114, 30159,
-	30204, 30248, 30293, 30337, 30382, 30427, 30471, 30516,
-	30560, 30604, 30649, 30693, 30738, 30782, 30826, 30871,
-	30915, 30959, 31004, 31048, 31092, 31136, 31181, 31225,
-	31269, 31313, 31357, 31402, 31446, 31490, 31534, 31578,
-	31622, 31666, 31710, 31754, 31798, 31842, 31886, 31930,
-	31974, 32017, 32061, 32105, 32149, 32193, 32236, 32280,
-	32324, 32368, 32411, 32455, 32499, 32542, 32586, 32630,
-	32673, 32717, 32760, 32804, 32847, 32891, 32934, 32978,
-	33021, 33065, 33108, 33151, 33195, 33238, 33281, 33325,
-	33368, 33411, 33454, 33498, 33541, 33584, 33627, 33670,
-	33713, 33756, 33799, 33843, 33886, 33929, 33972, 34015,
-	34057, 34100, 34143, 34186, 34229, 34272, 34315, 34358,
-	34400, 34443, 34486, 34529, 34571, 34614, 34657, 34699,
-	34742, 34785, 34827, 34870, 34912, 34955, 34997, 35040,
-	35082, 35125, 35167, 35210, 35252, 35294, 35337, 35379,
-	35421, 35464, 35506, 35548, 35590, 35633, 35675, 35717,
-	35759, 35801, 35843, 35885, 35927, 35969, 36011, 36053,
-	36095, 36137, 36179, 36221, 36263, 36305, 36347, 36388,
-	36430, 36472, 36514, 36556, 36597, 36639, 36681, 36722,
-	36764, 36805, 36847, 36889, 36930, 36972, 37013, 37055,
-	37096, 37137, 37179, 37220, 37262, 37303, 37344, 37386,
-	37427, 37468, 37509, 37551, 37592, 37633, 37674, 37715,
-	37756, 37797, 37838, 37879, 37920, 37961, 38002, 38043,
-	38084, 38125, 38166, 38207, 38248, 38288, 38329, 38370,
-	38411, 38451, 38492, 38533, 38573, 38614, 38655, 38695,
-	38736, 38776, 38817, 38857, 38898, 38938, 38979, 39019,
-	39059, 39100, 39140, 39180, 39221, 39261, 39301, 39341,
-	39382, 39422, 39462, 39502, 39542, 39582, 39622, 39662,
-	39702, 39742, 39782, 39822, 39862, 39902, 39942, 39982,
-	40021, 40061, 40101, 40141, 40180, 40220, 40260, 40299,
-	40339, 40379, 40418, 40458, 40497, 40537, 40576, 40616,
-	40655, 40695, 40734, 40773, 40813, 40852, 40891, 40931,
-	40970, 41009, 41048, 41087, 41127, 41166, 41205, 41244,
-	41283, 41322, 41361, 41400, 41439, 41478, 41517, 41556,
-	41595, 41633, 41672, 41711, 41750, 41788, 41827, 41866,
-	41904, 41943, 41982, 42020, 42059, 42097, 42136, 42174,
-	42213, 42251, 42290, 42328, 42366, 42405, 42443, 42481,
-	42520, 42558, 42596, 42634, 42672, 42711, 42749, 42787,
-	42825, 42863, 42901, 42939, 42977, 43015, 43053, 43091,
-	43128, 43166, 43204, 43242, 43280, 43317, 43355, 43393,
-	43430, 43468, 43506, 43543, 43581, 43618, 43656, 43693,
-	43731, 43768, 43806, 43843, 43880, 43918, 43955, 43992,
-	44029, 44067, 44104, 44141, 44178, 44215, 44252, 44289,
-	44326, 44363, 44400, 44437, 44474, 44511, 44548, 44585,
-	44622, 44659, 44695, 44732, 44769, 44806, 44842, 44879,
-	44915, 44952, 44989, 45025, 45062, 45098, 45135, 45171,
-	45207, 45244, 45280, 45316, 45353, 45389, 45425, 45462,
-	45498, 45534, 45570, 45606, 45642, 45678, 45714, 45750,
-	45786, 45822, 45858, 45894, 45930, 45966, 46002, 46037,
-	46073, 46109, 46145, 46180, 46216, 46252, 46287, 46323,
-	46358, 46394, 46429, 46465, 46500, 46536, 46571, 46606,
-	46642, 46677, 46712, 46747, 46783, 46818, 46853, 46888,
-	46923, 46958, 46993, 47028, 47063, 47098, 47133, 47168,
-	47203, 47238, 47273, 47308, 47342, 47377, 47412, 47446,
-	47481, 47516, 47550, 47585, 47619, 47654, 47688, 47723,
-	47757, 47792, 47826, 47861, 47895, 47929, 47963, 47998,
-	48032, 48066, 48100, 48134, 48168, 48202, 48237, 48271,
-	48305, 48338, 48372, 48406, 48440, 48474, 48508, 48542,
-	48575, 48609, 48643, 48676, 48710, 48744, 48777, 48811,
-	48844, 48878, 48911, 48945, 48978, 49012, 49045, 49078,
-	49112, 49145, 49178, 49211, 49244, 49278, 49311, 49344,
-	49377, 49410, 49443, 49476, 49509, 49542, 49575, 49608,
-	49640, 49673, 49706, 49739, 49771, 49804, 49837, 49869,
-	49902, 49935, 49967, 50000, 50032, 50064, 50097, 50129,
-	50162, 50194, 50226, 50259, 50291, 50323, 50355, 50387,
-	50420, 50452, 50484, 50516, 50548, 50580, 50612, 50644,
-	50675, 50707, 50739, 50771, 50803, 50834, 50866, 50898,
-	50929, 50961, 50993, 51024, 51056, 51087, 51119, 51150,
-	51182, 51213, 51244, 51276, 51307, 51338, 51369, 51401,
-	51432, 51463, 51494, 51525, 51556, 51587, 51618, 51649,
-	51680, 51711, 51742, 51773, 51803, 51834, 51865, 51896,
-	51926, 51957, 51988, 52018, 52049, 52079, 52110, 52140,
-	52171, 52201, 52231, 52262, 52292, 52322, 52353, 52383,
-	52413, 52443, 52473, 52503, 52534, 52564, 52594, 52624,
-	52653, 52683, 52713, 52743, 52773, 52803, 52832, 52862,
-	52892, 52922, 52951, 52981, 53010, 53040, 53069, 53099,
-	53128, 53158, 53187, 53216, 53246, 53275, 53304, 53334,
-	53363, 53392, 53421, 53450, 53479, 53508, 53537, 53566,
-	53595, 53624, 53653, 53682, 53711, 53739, 53768, 53797,
-	53826, 53854, 53883, 53912, 53940, 53969, 53997, 54026,
-	54054, 54082, 54111, 54139, 54167, 54196, 54224, 54252,
-	54280, 54309, 54337, 54365, 54393, 54421, 54449, 54477,
-	54505, 54533, 54560, 54588, 54616, 54644, 54672, 54699,
-	54727, 54755, 54782, 54810, 54837, 54865, 54892, 54920,
-	54947, 54974, 55002, 55029, 55056, 55084, 55111, 55138,
-	55165, 55192, 55219, 55246, 55274, 55300, 55327, 55354,
-	55381, 55408, 55435, 55462, 55489, 55515, 55542, 55569,
-	55595, 55622, 55648, 55675, 55701, 55728, 55754, 55781,
-	55807, 55833, 55860, 55886, 55912, 55938, 55965, 55991,
-	56017, 56043, 56069, 56095, 56121, 56147, 56173, 56199,
-	56225, 56250, 56276, 56302, 56328, 56353, 56379, 56404,
-	56430, 56456, 56481, 56507, 56532, 56557, 56583, 56608,
-	56633, 56659, 56684, 56709, 56734, 56760, 56785, 56810,
-	56835, 56860, 56885, 56910, 56935, 56959, 56984, 57009,
-	57034, 57059, 57083, 57108, 57133, 57157, 57182, 57206,
-	57231, 57255, 57280, 57304, 57329, 57353, 57377, 57402,
-	57426, 57450, 57474, 57498, 57522, 57546, 57570, 57594,
-	57618, 57642, 57666, 57690, 57714, 57738, 57762, 57785,
-	57809, 57833, 57856, 57880, 57903, 57927, 57950, 57974,
-	57997, 58021, 58044, 58067, 58091, 58114, 58137, 58160,
-	58183, 58207, 58230, 58253, 58276, 58299, 58322, 58345,
-	58367, 58390, 58413, 58436, 58459, 58481, 58504, 58527,
-	58549, 58572, 58594, 58617, 58639, 58662, 58684, 58706,
-	58729, 58751, 58773, 58795, 58818, 58840, 58862, 58884,
-	58906, 58928, 58950, 58972, 58994, 59016, 59038, 59059,
-	59081, 59103, 59125, 59146, 59168, 59190, 59211, 59233,
-	59254, 59276, 59297, 59318, 59340, 59361, 59382, 59404,
-	59425, 59446, 59467, 59488, 59509, 59530, 59551, 59572,
-	59593, 59614, 59635, 59656, 59677, 59697, 59718, 59739,
-	59759, 59780, 59801, 59821, 59842, 59862, 59883, 59903,
-	59923, 59944, 59964, 59984, 60004, 60025, 60045, 60065,
-	60085, 60105, 60125, 60145, 60165, 60185, 60205, 60225,
-	60244, 60264, 60284, 60304, 60323, 60343, 60363, 60382,
-	60402, 60421, 60441, 60460, 60479, 60499, 60518, 60537,
-	60556, 60576, 60595, 60614, 60633, 60652, 60671, 60690,
-	60709, 60728, 60747, 60766, 60785, 60803, 60822, 60841,
-	60859, 60878, 60897, 60915, 60934, 60952, 60971, 60989,
-	61007, 61026, 61044, 61062, 61081, 61099, 61117, 61135,
-	61153, 61171, 61189, 61207, 61225, 61243, 61261, 61279,
-	61297, 61314, 61332, 61350, 61367, 61385, 61403, 61420,
-	61438, 61455, 61473, 61490, 61507, 61525, 61542, 61559,
-	61577, 61594, 61611, 61628, 61645, 61662, 61679, 61696,
-	61713, 61730, 61747, 61764, 61780, 61797, 61814, 61831,
-	61847, 61864, 61880, 61897, 61913, 61930, 61946, 61963,
-	61979, 61995, 62012, 62028, 62044, 62060, 62076, 62092,
-	62108, 62125, 62141, 62156, 62172, 62188, 62204, 62220,
-	62236, 62251, 62267, 62283, 62298, 62314, 62329, 62345,
-	62360, 62376, 62391, 62407, 62422, 62437, 62453, 62468,
-	62483, 62498, 62513, 62528, 62543, 62558, 62573, 62588,
-	62603, 62618, 62633, 62648, 62662, 62677, 62692, 62706,
-	62721, 62735, 62750, 62764, 62779, 62793, 62808, 62822,
-	62836, 62850, 62865, 62879, 62893, 62907, 62921, 62935,
-	62949, 62963, 62977, 62991, 63005, 63019, 63032, 63046,
-	63060, 63074, 63087, 63101, 63114, 63128, 63141, 63155,
-	63168, 63182, 63195, 63208, 63221, 63235, 63248, 63261,
-	63274, 63287, 63300, 63313, 63326, 63339, 63352, 63365,
-	63378, 63390, 63403, 63416, 63429, 63441, 63454, 63466,
-	63479, 63491, 63504, 63516, 63528, 63541, 63553, 63565,
-	63578, 63590, 63602, 63614, 63626, 63638, 63650, 63662,
-	63674, 63686, 63698, 63709, 63721, 63733, 63745, 63756,
-	63768, 63779, 63791, 63803, 63814, 63825, 63837, 63848,
-	63859, 63871, 63882, 63893, 63904, 63915, 63927, 63938,
-	63949, 63960, 63971, 63981, 63992, 64003, 64014, 64025,
-	64035, 64046, 64057, 64067, 64078, 64088, 64099, 64109,
-	64120, 64130, 64140, 64151, 64161, 64171, 64181, 64192,
-	64202, 64212, 64222, 64232, 64242, 64252, 64261, 64271,
-	64281, 64291, 64301, 64310, 64320, 64330, 64339, 64349,
-	64358, 64368, 64377, 64387, 64396, 64405, 64414, 64424,
-	64433, 64442, 64451, 64460, 64469, 64478, 64487, 64496,
-	64505, 64514, 64523, 64532, 64540, 64549, 64558, 64566,
-	64575, 64584, 64592, 64600, 64609, 64617, 64626, 64634,
-	64642, 64651, 64659, 64667, 64675, 64683, 64691, 64699,
-	64707, 64715, 64723, 64731, 64739, 64747, 64754, 64762,
-	64770, 64777, 64785, 64793, 64800, 64808, 64815, 64822,
-	64830, 64837, 64844, 64852, 64859, 64866, 64873, 64880,
-	64887, 64895, 64902, 64908, 64915, 64922, 64929, 64936,
-	64943, 64949, 64956, 64963, 64969, 64976, 64982, 64989,
-	64995, 65002, 65008, 65015, 65021, 65027, 65033, 65040,
-	65046, 65052, 65058, 65064, 65070, 65076, 65082, 65088,
-	65094, 65099, 65105, 65111, 65117, 65122, 65128, 65133,
-	65139, 65144, 65150, 65155, 65161, 65166, 65171, 65177,
-	65182, 65187, 65192, 65197, 65202, 65207, 65212, 65217,
-	65222, 65227, 65232, 65237, 65242, 65246, 65251, 65256,
-	65260, 65265, 65270, 65274, 65279, 65283, 65287, 65292,
-	65296, 65300, 65305, 65309, 65313, 65317, 65321, 65325,
-	65329, 65333, 65337, 65341, 65345, 65349, 65352, 65356,
-	65360, 65363, 65367, 65371, 65374, 65378, 65381, 65385,
-	65388, 65391, 65395, 65398, 65401, 65404, 65408, 65411,
-	65414, 65417, 65420, 65423, 65426, 65429, 65431, 65434,
-	65437, 65440, 65442, 65445, 65448, 65450, 65453, 65455,
-	65458, 65460, 65463, 65465, 65467, 65470, 65472, 65474,
-	65476, 65478, 65480, 65482, 65484, 65486, 65488, 65490,
-	65492, 65494, 65496, 65497, 65499, 65501, 65502, 65504,
-	65505, 65507, 65508, 65510, 65511, 65513, 65514, 65515,
-	65516, 65518, 65519, 65520, 65521, 65522, 65523, 65524,
-	65525, 65526, 65527, 65527, 65528, 65529, 65530, 65530,
+	-65536, -65535, -65535, -65535, -65535, -65535, -65535, -65535,
+	-65534, -65534, -65534, -65533, -65533, -65532, -65532, -65531,
+	-65531, -65530, -65529, -65529, -65528, -65527, -65526, -65525,
+	-65524, -65523, -65522, -65521, -65520, -65519, -65518, -65517,
+	-65516, -65515, -65513, -65512, -65511, -65509, -65508, -65506,
+	-65505, -65503, -65501, -65500, -65498, -65496, -65495, -65493,
+	-65491, -65489, -65487, -65485, -65483, -65481, -65479, -65477,
+	-65475, -65473, -65471, -65468, -65466, -65464, -65461, -65459,
+	-65457, -65454, -65452, -65449, -65446, -65444, -65441, -65438,
+	-65436, -65433, -65430, -65427, -65424, -65421, -65418, -65415,
+	-65412, -65409, -65406, -65403, -65400, -65396, -65393, -65390,
+	-65386, -65383, -65379, -65376, -65372, -65369, -65365, -65362,
+	-65358, -65354, -65350, -65347, -65343, -65339, -65335, -65331,
+	-65327, -65323, -65319, -65315, -65311, -65307, -65302, -65298,
+	-65294, -65290, -65285, -65281, -65276, -65272, -65267, -65263,
+	-65258, -65253, -65249, -65244, -65239, -65235, -65230, -65225,
+	-65220, -65215, -65210, -65205, -65200, -65195, -65190, -65184,
+	-65179, -65174, -65169, -65163, -65158, -65153, -65147, -65142,
+	-65136, -65131, -65125, -65119, -65114, -65108, -65102, -65096,
+	-65091, -65085, -65079, -65073, -65067, -65061, -65055, -65049,
+	-65043, -65036, -65030, -65024, -65018, -65011, -65005, -64999,
+	-64992, -64986, -64979, -64973, -64966, -64959, -64953, -64946,
+	-64939, -64933, -64926, -64919, -64912, -64905, -64898, -64891,
+	-64884, -64877, -64870, -64863, -64855, -64848, -64841, -64834,
+	-64826, -64819, -64811, -64804, -64796, -64789, -64781, -64774,
+	-64766, -64758, -64751, -64743, -64735, -64727, -64719, -64711,
+	-64703, -64695, -64687, -64679, -64671, -64663, -64655, -64646,
+	-64638, -64630, -64622, -64613, -64605, -64596, -64588, -64579,
+	-64571, -64562, -64553, -64545, -64536, -64527, -64518, -64510,
+	-64501, -64492, -64483, -64474, -64465, -64456, -64447, -64437,
+	-64428, -64419, -64410, -64401, -64391, -64382, -64372, -64363,
+	-64353, -64344, -64334, -64325, -64315, -64305, -64296, -64286,
+	-64276, -64266, -64257, -64247, -64237, -64227, -64217, -64207,
+	-64197, -64186, -64176, -64166, -64156, -64146, -64135, -64125,
+	-64115, -64104, -64094, -64083, -64073, -64062, -64051, -64041,
+	-64030, -64019, -64009, -63998, -63987, -63976, -63965, -63954,
+	-63943, -63932, -63921, -63910, -63899, -63888, -63876, -63865,
+	-63854, -63842, -63831, -63820, -63808, -63797, -63785, -63774,
+	-63762, -63750, -63739, -63727, -63715, -63704, -63692, -63680,
+	-63668, -63656, -63644, -63632, -63620, -63608, -63596, -63584,
+	-63571, -63559, -63547, -63535, -63522, -63510, -63498, -63485,
+	-63473, -63460, -63447, -63435, -63422, -63410, -63397, -63384,
+	-63371, -63358, -63346, -63333, -63320, -63307, -63294, -63281,
+	-63268, -63254, -63241, -63228, -63215, -63202, -63188, -63175,
+	-63162, -63148, -63135, -63121, -63108, -63094, -63080, -63067,
+	-63053, -63039, -63026, -63012, -62998, -62984, -62970, -62956,
+	-62942, -62928, -62914, -62900, -62886, -62872, -62858, -62843,
+	-62829, -62815, -62800, -62786, -62772, -62757, -62743, -62728,
+	-62714, -62699, -62684, -62670, -62655, -62640, -62625, -62610,
+	-62596, -62581, -62566, -62551, -62536, -62521, -62506, -62491,
+	-62475, -62460, -62445, -62430, -62414, -62399, -62384, -62368,
+	-62353, -62337, -62322, -62306, -62291, -62275, -62259, -62244,
+	-62228, -62212, -62196, -62180, -62164, -62148, -62133, -62117,
+	-62100, -62084, -62068, -62052, -62036, -62020, -62003, -61987,
+	-61971, -61954, -61938, -61922, -61905, -61889, -61872, -61855,
+	-61839, -61822, -61805, -61789, -61772, -61755, -61738, -61721,
+	-61705, -61688, -61671, -61654, -61637, -61619, -61602, -61585,
+	-61568, -61551, -61533, -61516, -61499, -61481, -61464, -61446,
+	-61429, -61411, -61394, -61376, -61359, -61341, -61323, -61305,
+	-61288, -61270, -61252, -61234, -61216, -61198, -61180, -61162,
+	-61144, -61126, -61108, -61090, -61071, -61053, -61035, -61017,
+	-60998, -60980, -60961, -60943, -60924, -60906, -60887, -60869,
+	-60850, -60831, -60813, -60794, -60775, -60756, -60737, -60719,
+	-60700, -60681, -60662, -60643, -60624, -60604, -60585, -60566,
+	-60547, -60528, -60508, -60489, -60470, -60450, -60431, -60411,
+	-60392, -60372, -60353, -60333, -60313, -60294, -60274, -60254,
+	-60235, -60215, -60195, -60175, -60155, -60135, -60115, -60095,
+	-60075, -60055, -60035, -60015, -59994, -59974, -59954, -59934,
+	-59913, -59893, -59872, -59852, -59831, -59811, -59790, -59770,
+	-59749, -59728, -59708, -59687, -59666, -59645, -59625, -59604,
+	-59583, -59562, -59541, -59520, -59499, -59478, -59457, -59435,
+	-59414, -59393, -59372, -59350, -59329, -59308, -59286, -59265,
+	-59243, -59222, -59200, -59179, -59157, -59135, -59114, -59092,
+	-59070, -59049, -59027, -59005, -58983, -58961, -58939, -58917,
+	-58895, -58873, -58851, -58829, -58807, -58784, -58762, -58740,
+	-58718, -58695, -58673, -58650, -58628, -58605, -58583, -58560,
+	-58538, -58515, -58493, -58470, -58447, -58424, -58402, -58379,
+	-58356, -58333, -58310, -58287, -58264, -58241, -58218, -58195,
+	-58172, -58149, -58125, -58102, -58079, -58056, -58032, -58009,
+	-57986, -57962, -57939, -57915, -57892, -57868, -57844, -57821,
+	-57797, -57773, -57750, -57726, -57702, -57678, -57654, -57630,
+	-57606, -57582, -57558, -57534, -57510, -57486, -57462, -57438,
+	-57414, -57389, -57365, -57341, -57316, -57292, -57268, -57243,
+	-57219, -57194, -57170, -57145, -57120, -57096, -57071, -57046,
+	-57022, -56997, -56972, -56947, -56922, -56897, -56872, -56847,
+	-56822, -56797, -56772, -56747, -56722, -56697, -56671, -56646,
+	-56621, -56595, -56570, -56545, -56519, -56494, -56468, -56443,
+	-56417, -56392, -56366, -56340, -56315, -56289, -56263, -56237,
+	-56212, -56186, -56160, -56134, -56108, -56082, -56056, -56030,
+	-56004, -55978, -55952, -55925, -55899, -55873, -55847, -55820,
+	-55794, -55768, -55741, -55715, -55688, -55662, -55635, -55609,
+	-55582, -55555, -55529, -55502, -55475, -55448, -55422, -55395,
+	-55368, -55341, -55314, -55287, -55260, -55233, -55206, -55179,
+	-55152, -55124, -55097, -55070, -55043, -55015, -54988, -54961,
+	-54933, -54906, -54879, -54851, -54823, -54796, -54768, -54741,
+	-54713, -54685, -54658, -54630, -54602, -54574, -54546, -54519,
+	-54491, -54463, -54435, -54407, -54379, -54351, -54323, -54294,
+	-54266, -54238, -54210, -54182, -54153, -54125, -54097, -54068,
+	-54040, -54011, -53983, -53954, -53926, -53897, -53869, -53840,
+	-53811, -53783, -53754, -53725, -53696, -53667, -53639, -53610,
+	-53581, -53552, -53523, -53494, -53465, -53436, -53407, -53377,
+	-53348, -53319, -53290, -53260, -53231, -53202, -53172, -53143,
+	-53114, -53084, -53055, -53025, -52996, -52966, -52936, -52907,
+	-52877, -52847, -52818, -52788, -52758, -52728, -52698, -52668,
+	-52639, -52609, -52579, -52549, -52518, -52488, -52458, -52428,
+	-52398, -52368, -52338, -52307, -52277, -52247, -52216, -52186,
+	-52155, -52125, -52095, -52064, -52033, -52003, -51972, -51942,
+	-51911, -51880, -51850, -51819, -51788, -51757, -51726, -51695,
+	-51665, -51634, -51603, -51572, -51541, -51510, -51478, -51447,
+	-51416, -51385, -51354, -51323, -51291, -51260, -51229, -51197,
+	-51166, -51134, -51103, -51072, -51040, -51008, -50977, -50945,
+	-50914, -50882, -50850, -50819, -50787, -50755, -50723, -50691,
+	-50660, -50628, -50596, -50564, -50532, -50500, -50468, -50436,
+	-50403, -50371, -50339, -50307, -50275, -50242, -50210, -50178,
+	-50146, -50113, -50081, -50048, -50016, -49983, -49951, -49918,
+	-49886, -49853, -49820, -49788, -49755, -49722, -49690, -49657,
+	-49624, -49591, -49558, -49525, -49492, -49459, -49426, -49393,
+	-49360, -49327, -49294, -49261, -49228, -49195, -49161, -49128,
+	-49095, -49062, -49028, -48995, -48961, -48928, -48895, -48861,
+	-48828, -48794, -48760, -48727, -48693, -48660, -48626, -48592,
+	-48558, -48525, -48491, -48457, -48423, -48389, -48355, -48321,
+	-48288, -48254, -48219, -48185, -48151, -48117, -48083, -48049,
+	-48015, -47981, -47946, -47912, -47878, -47843, -47809, -47775,
+	-47740, -47706, -47671, -47637, -47602, -47568, -47533, -47498,
+	-47464, -47429, -47394, -47360, -47325, -47290, -47255, -47220,
+	-47186, -47151, -47116, -47081, -47046, -47011, -46976, -46941,
+	-46906, -46871, -46835, -46800, -46765, -46730, -46695, -46659,
+	-46624, -46589, -46553, -46518, -46482, -46447, -46411, -46376,
+	-46340, -46305, -46269, -46234, -46198, -46162, -46127, -46091,
+	-46055, -46019, -45984, -45948, -45912, -45876, -45840, -45804,
+	-45768, -45732, -45696, -45660, -45624, -45588, -45552, -45516,
+	-45480, -45443, -45407, -45371, -45335, -45298, -45262, -45226,
+	-45189, -45153, -45116, -45080, -45043, -45007, -44970, -44934,
+	-44897, -44861, -44824, -44787, -44750, -44714, -44677, -44640,
+	-44603, -44567, -44530, -44493, -44456, -44419, -44382, -44345,
+	-44308, -44271, -44234, -44197, -44160, -44122, -44085, -44048,
+	-44011, -43974, -43936, -43899, -43862, -43824, -43787, -43749,
+	-43712, -43675, -43637, -43600, -43562, -43524, -43487, -43449,
+	-43412, -43374, -43336, -43298, -43261, -43223, -43185, -43147,
+	-43110, -43072, -43034, -42996, -42958, -42920, -42882, -42844,
+	-42806, -42768, -42730, -42692, -42653, -42615, -42577, -42539,
+	-42501, -42462, -42424, -42386, -42347, -42309, -42271, -42232,
+	-42194, -42155, -42117, -42078, -42040, -42001, -41962, -41924,
+	-41885, -41846, -41808, -41769, -41730, -41692, -41653, -41614,
+	-41575, -41536, -41497, -41458, -41419, -41381, -41342, -41303,
+	-41263, -41224, -41185, -41146, -41107, -41068, -41029, -40990,
+	-40950, -40911, -40872, -40832, -40793, -40754, -40714, -40675,
+	-40636, -40596, -40557, -40517, -40478, -40438, -40399, -40359,
+	-40319, -40280, -40240, -40200, -40161, -40121, -40081, -40041,
+	-40002, -39962, -39922, -39882, -39842, -39802, -39762, -39722,
+	-39682, -39642, -39602, -39562, -39522, -39482, -39442, -39402,
+	-39362, -39321, -39281, -39241, -39201, -39160, -39120, -39080,
+	-39039, -38999, -38958, -38918, -38878, -38837, -38797, -38756,
+	-38716, -38675, -38634, -38594, -38553, -38512, -38472, -38431,
+	-38390, -38350, -38309, -38268, -38227, -38186, -38146, -38105,
+	-38064, -38023, -37982, -37941, -37900, -37859, -37818, -37777,
+	-37736, -37695, -37653, -37612, -37571, -37530, -37489, -37447,
+	-37406, -37365, -37324, -37282, -37241, -37200, -37158, -37117,
+	-37075, -37034, -36992, -36951, -36909, -36868, -36826, -36785,
+	-36743, -36701, -36660, -36618, -36576, -36535, -36493, -36451,
+	-36409, -36368, -36326, -36284, -36242, -36200, -36158, -36116,
+	-36074, -36032, -35990, -35948, -35906, -35864, -35822, -35780,
+	-35738, -35696, -35654, -35611, -35569, -35527, -35485, -35442,
+	-35400, -35358, -35316, -35273, -35231, -35188, -35146, -35104,
+	-35061, -35019, -34976, -34934, -34891, -34849, -34806, -34763,
+	-34721, -34678, -34635, -34593, -34550, -34507, -34465, -34422,
+	-34379, -34336, -34293, -34251, -34208, -34165, -34122, -34079,
+	-34036, -33993, -33950, -33907, -33864, -33821, -33778, -33735,
+	-33692, -33649, -33605, -33562, -33519, -33476, -33433, -33389,
+	-33346, -33303, -33260, -33216, -33173, -33130, -33086, -33043,
+	-32999, -32956, -32912, -32869, -32826, -32782, -32738, -32695,
+	-32651, -32608, -32564, -32521, -32477, -32433, -32390, -32346,
+	-32302, -32258, -32215, -32171, -32127, -32083, -32039, -31995,
+	-31952, -31908, -31864, -31820, -31776, -31732, -31688, -31644,
+	-31600, -31556, -31512, -31468, -31424, -31379, -31335, -31291,
+	-31247, -31203, -31159, -31114, -31070, -31026, -30982, -30937,
+	-30893, -30849, -30804, -30760, -30715, -30671, -30627, -30582,
+	-30538, -30493, -30449, -30404, -30360, -30315, -30271, -30226,
+	-30181, -30137, -30092, -30047, -30003, -29958, -29913, -29869,
+	-29824, -29779, -29734, -29690, -29645, -29600, -29555, -29510,
+	-29465, -29420, -29375, -29330, -29285, -29241, -29196, -29151,
+	-29105, -29060, -29015, -28970, -28925, -28880, -28835, -28790,
+	-28745, -28699, -28654, -28609, -28564, -28519, -28473, -28428,
+	-28383, -28337, -28292, -28247, -28201, -28156, -28111, -28065,
+	-28020, -27974, -27929, -27883, -27838, -27792, -27747, -27701,
+	-27656, -27610, -27565, -27519, -27473, -27428, -27382, -27336,
+	-27291, -27245, -27199, -27153, -27108, -27062, -27016, -26970,
+	-26925, -26879, -26833, -26787, -26741, -26695, -26649, -26603,
+	-26557, -26511, -26465, -26419, -26373, -26327, -26281, -26235,
+	-26189, -26143, -26097, -26051, -26005, -25959, -25913, -25866,
+	-25820, -25774, -25728, -25681, -25635, -25589, -25543, -25496,
+	-25450, -25404, -25357, -25311, -25265, -25218, -25172, -25125,
+	-25079, -25033, -24986, -24940, -24893, -24847, -24800, -24754,
+	-24707, -24660, -24614, -24567, -24521, -24474, -24427, -24381,
+	-24334, -24287, -24241, -24194, -24147, -24101, -24054, -24007,
+	-23960, -23914, -23867, -23820, -23773, -23726, -23679, -23632,
+	-23586, -23539, -23492, -23445, -23398, -23351, -23304, -23257,
+	-23210, -23163, -23116, -23069, -23022, -22975, -22928, -22881,
+	-22833, -22786, -22739, -22692, -22645, -22598, -22551, -22503,
+	-22456, -22409, -22362, -22314, -22267, -22220, -22173, -22125,
+	-22078, -22031, -21983, -21936, -21889, -21841, -21794, -21746,
+	-21699, -21651, -21604, -21557, -21509, -21462, -21414, -21367,
+	-21319, -21271, -21224, -21176, -21129, -21081, -21034, -20986,
+	-20938, -20891, -20843, -20795, -20748, -20700, -20652, -20605,
+	-20557, -20509, -20461, -20414, -20366, -20318, -20270, -20223,
+	-20175, -20127, -20079, -20031, -19983, -19935, -19888, -19840,
+	-19792, -19744, -19696, -19648, -19600, -19552, -19504, -19456,
+	-19408, -19360, -19312, -19264, -19216, -19168, -19120, -19072,
+	-19024, -18975, -18927, -18879, -18831, -18783, -18735, -18687,
+	-18638, -18590, -18542, -18494, -18446, -18397, -18349, -18301,
+	-18253, -18204, -18156, -18108, -18059, -18011, -17963, -17914,
+	-17866, -17818, -17769, -17721, -17672, -17624, -17576, -17527,
+	-17479, -17430, -17382, -17333, -17285, -17236, -17188, -17139,
+	-17091, -17042, -16994, -16945, -16897, -16848, -16800, -16751,
+	-16702, -16654, -16605, -16557, -16508, -16459, -16411, -16362,
+	-16313, -16265, -16216, -16167, -16118, -16070, -16021, -15972,
+	-15923, -15875, -15826, -15777, -15728, -15680, -15631, -15582,
+	-15533, -15484, -15435, -15387, -15338, -15289, -15240, -15191,
+	-15142, -15093, -15044, -14995, -14946, -14897, -14849, -14800,
+	-14751, -14702, -14653, -14604, -14555, -14506, -14457, -14408,
+	-14359, -14309, -14260, -14211, -14162, -14113, -14064, -14015,
+	-13966, -13917, -13868, -13819, -13769, -13720, -13671, -13622,
+	-13573, -13524, -13474, -13425, -13376, -13327, -13278, -13228,
+	-13179, -13130, -13081, -13031, -12982, -12933, -12884, -12834,
+	-12785, -12736, -12686, -12637, -12588, -12538, -12489, -12440,
+	-12390, -12341, -12292, -12242, -12193, -12143, -12094, -12045,
+	-11995, -11946, -11896, -11847, -11797, -11748, -11699, -11649,
+	-11600, -11550, -11501, -11451, -11402, -11352, -11303, -11253,
+	-11204, -11154, -11105, -11055, -11006, -10956, -10906, -10857,
+	-10807, -10758, -10708, -10658, -10609, -10559, -10510, -10460,
+	-10410, -10361, -10311, -10262, -10212, -10162, -10113, -10063,
+	-10013, -9964, -9914, -9864, -9814, -9765, -9715, -9665,
+	-9616, -9566, -9516, -9466, -9417, -9367, -9317, -9267,
+	-9218, -9168, -9118, -9068, -9019, -8969, -8919, -8869,
+	-8819, -8770, -8720, -8670, -8620, -8570, -8520, -8471,
+	-8421, -8371, -8321, -8271, -8221, -8171, -8122, -8072,
+	-8022, -7972, -7922, -7872, -7822, -7772, -7722, -7672,
+	-7623, -7573, -7523, -7473, -7423, -7373, -7323, -7273,
+	-7223, -7173, -7123, -7073, -7023, -6973, -6923, -6873,
+	-6823, -6773, -6723, -6673, -6623, -6573, -6523, -6473,
+	-6423, -6373, -6323, -6273, -6223, -6173, -6123, -6073,
+	-6023, -5973, -5923, -5873, -5823, -5773, -5722, -5672,
+	-5622, -5572, -5522, -5472, -5422, -5372, -5322, -5272,
+	-5222, -5171, -5121, -5071, -5021, -4971, -4921, -4871,
+	-4821, -4770, -4720, -4670, -4620, -4570, -4520, -4470,
+	-4420, -4369, -4319, -4269, -4219, -4169, -4119, -4068,
+	-4018, -3968, -3918, -3868, -3818, -3767, -3717, -3667,
+	-3617, -3567, -3516, -3466, -3416, -3366, -3316, -3265,
+	-3215, -3165, -3115, -3065, -3014, -2964, -2914, -2864,
+	-2814, -2763, -2713, -2663, -2613, -2562, -2512, -2462,
+	-2412, -2361, -2311, -2261, -2211, -2161, -2110, -2060,
+	-2010, -1960, -1909, -1859, -1809, -1759, -1708, -1658,
+	-1608, -1558, -1507, -1457, -1407, -1357, -1306, -1256,
+	-1206, -1156, -1105, -1055, -1005, -955, -904, -854,
+	-804, -753, -703, -653, -603, -552, -502, -452,
+	-402, -351, -301, -251, -201, -150, -100, -50,
+	0, 50, 100, 150, 201, 251, 301, 351,
+	402, 452, 502, 552, 603, 653, 703, 753,
+	804, 854, 904, 955, 1005, 1055, 1105, 1156,
+	1206, 1256, 1306, 1357, 1407, 1457, 1507, 1558,
+	1608, 1658, 1708, 1759, 1809, 1859, 1909, 1960,
+	2010, 2060, 2110, 2161, 2211, 2261, 2311, 2361,
+	2412, 2462, 2512, 2562, 2613, 2663, 2713, 2763,
+	2814, 2864, 2914, 2964, 3014, 3065, 3115, 3165,
+	3215, 3265, 3316, 3366, 3416, 3466, 3516, 3567,
+	3617, 3667, 3717, 3767, 3818, 3868, 3918, 3968,
+	4018, 4068, 4119, 4169, 4219, 4269, 4319, 4369,
+	4420, 4470, 4520, 4570, 4620, 4670, 4720, 4770,
+	4821, 4871, 4921, 4971, 5021, 5071, 5121, 5171,
+	5222, 5272, 5322, 5372, 5422, 5472, 5522, 5572,
+	5622, 5672, 5722, 5773, 5823, 5873, 5923, 5973,
+	6023, 6073, 6123, 6173, 6223, 6273, 6323, 6373,
+	6423, 6473, 6523, 6573, 6623, 6673, 6723, 6773,
+	6823, 6873, 6923, 6973, 7023, 7073, 7123, 7173,
+	7223, 7273, 7323, 7373, 7423, 7473, 7523, 7573,
+	7623, 7672, 7722, 7772, 7822, 7872, 7922, 7972,
+	8022, 8072, 8122, 8171, 8221, 8271, 8321, 8371,
+	8421, 8471, 8520, 8570, 8620, 8670, 8720, 8770,
+	8819, 8869, 8919, 8969, 9019, 9068, 9118, 9168,
+	9218, 9267, 9317, 9367, 9417, 9466, 9516, 9566,
+	9616, 9665, 9715, 9765, 9814, 9864, 9914, 9964,
+	10013, 10063, 10113, 10162, 10212, 10262, 10311, 10361,
+	10410, 10460, 10510, 10559, 10609, 10658, 10708, 10758,
+	10807, 10857, 10906, 10956, 11006, 11055, 11105, 11154,
+	11204, 11253, 11303, 11352, 11402, 11451, 11501, 11550,
+	11600, 11649, 11699, 11748, 11797, 11847, 11896, 11946,
+	11995, 12045, 12094, 12143, 12193, 12242, 12292, 12341,
+	12390, 12440, 12489, 12538, 12588, 12637, 12686, 12736,
+	12785, 12834, 12884, 12933, 12982, 13031, 13081, 13130,
+	13179, 13228, 13278, 13327, 13376, 13425, 13474, 13524,
+	13573, 13622, 13671, 13720, 13769, 13819, 13868, 13917,
+	13966, 14015, 14064, 14113, 14162, 14211, 14260, 14309,
+	14359, 14408, 14457, 14506, 14555, 14604, 14653, 14702,
+	14751, 14800, 14849, 14897, 14946, 14995, 15044, 15093,
+	15142, 15191, 15240, 15289, 15338, 15387, 15435, 15484,
+	15533, 15582, 15631, 15680, 15728, 15777, 15826, 15875,
+	15923, 15972, 16021, 16070, 16118, 16167, 16216, 16265,
+	16313, 16362, 16411, 16459, 16508, 16557, 16605, 16654,
+	16702, 16751, 16800, 16848, 16897, 16945, 16994, 17042,
+	17091, 17139, 17188, 17236, 17285, 17333, 17382, 17430,
+	17479, 17527, 17576, 17624, 17672, 17721, 17769, 17818,
+	17866, 17914, 17963, 18011, 18059, 18108, 18156, 18204,
+	18253, 18301, 18349, 18397, 18446, 18494, 18542, 18590,
+	18638, 18687, 18735, 18783, 18831, 18879, 18927, 18975,
+	19024, 19072, 19120, 19168, 19216, 19264, 19312, 19360,
+	19408, 19456, 19504, 19552, 19600, 19648, 19696, 19744,
+	19792, 19840, 19888, 19935, 19983, 20031, 20079, 20127,
+	20175, 20223, 20270, 20318, 20366, 20414, 20461, 20509,
+	20557, 20605, 20652, 20700, 20748, 20795, 20843, 20891,
+	20938, 20986, 21034, 21081, 21129, 21176, 21224, 21271,
+	21319, 21367, 21414, 21462, 21509, 21557, 21604, 21651,
+	21699, 21746, 21794, 21841, 21889, 21936, 21983, 22031,
+	22078, 22125, 22173, 22220, 22267, 22314, 22362, 22409,
+	22456, 22503, 22551, 22598, 22645, 22692, 22739, 22786,
+	22833, 22881, 22928, 22975, 23022, 23069, 23116, 23163,
+	23210, 23257, 23304, 23351, 23398, 23445, 23492, 23539,
+	23586, 23632, 23679, 23726, 23773, 23820, 23867, 23914,
+	23960, 24007, 24054, 24101, 24147, 24194, 24241, 24287,
+	24334, 24381, 24427, 24474, 24521, 24567, 24614, 24660,
+	24707, 24754, 24800, 24847, 24893, 24940, 24986, 25033,
+	25079, 25125, 25172, 25218, 25265, 25311, 25357, 25404,
+	25450, 25496, 25543, 25589, 25635, 25681, 25728, 25774,
+	25820, 25866, 25913, 25959, 26005, 26051, 26097, 26143,
+	26189, 26235, 26281, 26327, 26373, 26419, 26465, 26511,
+	26557, 26603, 26649, 26695, 26741, 26787, 26833, 26879,
+	26925, 26970, 27016, 27062, 27108, 27153, 27199, 27245,
+	27291, 27336, 27382, 27428, 27473, 27519, 27565, 27610,
+	27656, 27701, 27747, 27792, 27838, 27883, 27929, 27974,
+	28020, 28065, 28111, 28156, 28201, 28247, 28292, 28337,
+	28383, 28428, 28473, 28519, 28564, 28609, 28654, 28699,
+	28745, 28790, 28835, 28880, 28925, 28970, 29015, 29060,
+	29105, 29151, 29196, 29241, 29285, 29330, 29375, 29420,
+	29465, 29510, 29555, 29600, 29645, 29690, 29734, 29779,
+	29824, 29869, 29913, 29958, 30003, 30047, 30092, 30137,
+	30181, 30226, 30271, 30315, 30360, 30404, 30449, 30493,
+	30538, 30582, 30627, 30671, 30715, 30760, 30804, 30849,
+	30893, 30937, 30982, 31026, 31070, 31114, 31159, 31203,
+	31247, 31291, 31335, 31379, 31424, 31468, 31512, 31556,
+	31600, 31644, 31688, 31732, 31776, 31820, 31864, 31908,
+	31952, 31995, 32039, 32083, 32127, 32171, 32215, 32258,
+	32302, 32346, 32390, 32433, 32477, 32521, 32564, 32608,
+	32651, 32695, 32738, 32782, 32826, 32869, 32912, 32956,
+	32999, 33043, 33086, 33130, 33173, 33216, 33260, 33303,
+	33346, 33389, 33433, 33476, 33519, 33562, 33605, 33649,
+	33692, 33735, 33778, 33821, 33864, 33907, 33950, 33993,
+	34036, 34079, 34122, 34165, 34208, 34251, 34293, 34336,
+	34379, 34422, 34465, 34507, 34550, 34593, 34635, 34678,
+	34721, 34763, 34806, 34849, 34891, 34934, 34976, 35019,
+	35061, 35104, 35146, 35188, 35231, 35273, 35316, 35358,
+	35400, 35442, 35485, 35527, 35569, 35611, 35654, 35696,
+	35738, 35780, 35822, 35864, 35906, 35948, 35990, 36032,
+	36074, 36116, 36158, 36200, 36242, 36284, 36326, 36368,
+	36409, 36451, 36493, 36535, 36576, 36618, 36660, 36701,
+	36743, 36785, 36826, 36868, 36909, 36951, 36992, 37034,
+	37075, 37117, 37158, 37200, 37241, 37282, 37324, 37365,
+	37406, 37447, 37489, 37530, 37571, 37612, 37653, 37695,
+	37736, 37777, 37818, 37859, 37900, 37941, 37982, 38023,
+	38064, 38105, 38146, 38186, 38227, 38268, 38309, 38350,
+	38390, 38431, 38472, 38512, 38553, 38594, 38634, 38675,
+	38716, 38756, 38797, 38837, 38878, 38918, 38958, 38999,
+	39039, 39080, 39120, 39160, 39201, 39241, 39281, 39321,
+	39362, 39402, 39442, 39482, 39522, 39562, 39602, 39642,
+	39682, 39722, 39762, 39802, 39842, 39882, 39922, 39962,
+	40002, 40041, 40081, 40121, 40161, 40200, 40240, 40280,
+	40319, 40359, 40399, 40438, 40478, 40517, 40557, 40596,
+	40636, 40675, 40714, 40754, 40793, 40832, 40872, 40911,
+	40950, 40990, 41029, 41068, 41107, 41146, 41185, 41224,
+	41263, 41303, 41342, 41381, 41419, 41458, 41497, 41536,
+	41575, 41614, 41653, 41692, 41730, 41769, 41808, 41846,
+	41885, 41924, 41962, 42001, 42040, 42078, 42117, 42155,
+	42194, 42232, 42271, 42309, 42347, 42386, 42424, 42462,
+	42501, 42539, 42577, 42615, 42653, 42692, 42730, 42768,
+	42806, 42844, 42882, 42920, 42958, 42996, 43034, 43072,
+	43110, 43147, 43185, 43223, 43261, 43298, 43336, 43374,
+	43412, 43449, 43487, 43524, 43562, 43600, 43637, 43675,
+	43712, 43749, 43787, 43824, 43862, 43899, 43936, 43974,
+	44011, 44048, 44085, 44122, 44160, 44197, 44234, 44271,
+	44308, 44345, 44382, 44419, 44456, 44493, 44530, 44567,
+	44603, 44640, 44677, 44714, 44750, 44787, 44824, 44861,
+	44897, 44934, 44970, 45007, 45043, 45080, 45116, 45153,
+	45189, 45226, 45262, 45298, 45335, 45371, 45407, 45443,
+	45480, 45516, 45552, 45588, 45624, 45660, 45696, 45732,
+	45768, 45804, 45840, 45876, 45912, 45948, 45984, 46019,
+	46055, 46091, 46127, 46162, 46198, 46234, 46269, 46305,
+	46340, 46376, 46411, 46447, 46482, 46518, 46553, 46589,
+	46624, 46659, 46695, 46730, 46765, 46800, 46835, 46871,
+	46906, 46941, 46976, 47011, 47046, 47081, 47116, 47151,
+	47186, 47220, 47255, 47290, 47325, 47360, 47394, 47429,
+	47464, 47498, 47533, 47568, 47602, 47637, 47671, 47706,
+	47740, 47775, 47809, 47843, 47878, 47912, 47946, 47981,
+	48015, 48049, 48083, 48117, 48151, 48185, 48219, 48254,
+	48288, 48321, 48355, 48389, 48423, 48457, 48491, 48525,
+	48558, 48592, 48626, 48660, 48693, 48727, 48760, 48794,
+	48828, 48861, 48895, 48928, 48961, 48995, 49028, 49062,
+	49095, 49128, 49161, 49195, 49228, 49261, 49294, 49327,
+	49360, 49393, 49426, 49459, 49492, 49525, 49558, 49591,
+	49624, 49657, 49690, 49722, 49755, 49788, 49820, 49853,
+	49886, 49918, 49951, 49983, 50016, 50048, 50081, 50113,
+	50146, 50178, 50210, 50242, 50275, 50307, 50339, 50371,
+	50403, 50436, 50468, 50500, 50532, 50564, 50596, 50628,
+	50660, 50691, 50723, 50755, 50787, 50819, 50850, 50882,
+	50914, 50945, 50977, 51008, 51040, 51072, 51103, 51134,
+	51166, 51197, 51229, 51260, 51291, 51323, 51354, 51385,
+	51416, 51447, 51478, 51510, 51541, 51572, 51603, 51634,
+	51665, 51695, 51726, 51757, 51788, 51819, 51850, 51880,
+	51911, 51942, 51972, 52003, 52033, 52064, 52095, 52125,
+	52155, 52186, 52216, 52247, 52277, 52307, 52338, 52368,
+	52398, 52428, 52458, 52488, 52518, 52549, 52579, 52609,
+	52639, 52668, 52698, 52728, 52758, 52788, 52818, 52847,
+	52877, 52907, 52936, 52966, 52996, 53025, 53055, 53084,
+	53114, 53143, 53172, 53202, 53231, 53260, 53290, 53319,
+	53348, 53377, 53407, 53436, 53465, 53494, 53523, 53552,
+	53581, 53610, 53639, 53667, 53696, 53725, 53754, 53783,
+	53811, 53840, 53869, 53897, 53926, 53954, 53983, 54011,
+	54040, 54068, 54097, 54125, 54153, 54182, 54210, 54238,
+	54266, 54294, 54323, 54351, 54379, 54407, 54435, 54463,
+	54491, 54519, 54546, 54574, 54602, 54630, 54658, 54685,
+	54713, 54741, 54768, 54796, 54823, 54851, 54879, 54906,
+	54933, 54961, 54988, 55015, 55043, 55070, 55097, 55124,
+	55152, 55179, 55206, 55233, 55260, 55287, 55314, 55341,
+	55368, 55395, 55422, 55448, 55475, 55502, 55529, 55555,
+	55582, 55609, 55635, 55662, 55688, 55715, 55741, 55768,
+	55794, 55820, 55847, 55873, 55899, 55925, 55952, 55978,
+	56004, 56030, 56056, 56082, 56108, 56134, 56160, 56186,
+	56212, 56237, 56263, 56289, 56315, 56340, 56366, 56392,
+	56417, 56443, 56468, 56494, 56519, 56545, 56570, 56595,
+	56621, 56646, 56671, 56697, 56722, 56747, 56772, 56797,
+	56822, 56847, 56872, 56897, 56922, 56947, 56972, 56997,
+	57022, 57046, 57071, 57096, 57120, 57145, 57170, 57194,
+	57219, 57243, 57268, 57292, 57316, 57341, 57365, 57389,
+	57414, 57438, 57462, 57486, 57510, 57534, 57558, 57582,
+	57606, 57630, 57654, 57678, 57702, 57726, 57750, 57773,
+	57797, 57821, 57844, 57868, 57892, 57915, 57939, 57962,
+	57986, 58009, 58032, 58056, 58079, 58102, 58125, 58149,
+	58172, 58195, 58218, 58241, 58264, 58287, 58310, 58333,
+	58356, 58379, 58402, 58424, 58447, 58470, 58493, 58515,
+	58538, 58560, 58583, 58605, 58628, 58650, 58673, 58695,
+	58718, 58740, 58762, 58784, 58807, 58829, 58851, 58873,
+	58895, 58917, 58939, 58961, 58983, 59005, 59027, 59049,
+	59070, 59092, 59114, 59135, 59157, 59179, 59200, 59222,
+	59243, 59265, 59286, 59308, 59329, 59350, 59372, 59393,
+	59414, 59435, 59457, 59478, 59499, 59520, 59541, 59562,
+	59583, 59604, 59625, 59645, 59666, 59687, 59708, 59728,
+	59749, 59770, 59790, 59811, 59831, 59852, 59872, 59893,
+	59913, 59934, 59954, 59974, 59994, 60015, 60035, 60055,
+	60075, 60095, 60115, 60135, 60155, 60175, 60195, 60215,
+	60235, 60254, 60274, 60294, 60313, 60333, 60353, 60372,
+	60392, 60411, 60431, 60450, 60470, 60489, 60508, 60528,
+	60547, 60566, 60585, 60604, 60624, 60643, 60662, 60681,
+	60700, 60719, 60737, 60756, 60775, 60794, 60813, 60831,
+	60850, 60869, 60887, 60906, 60924, 60943, 60961, 60980,
+	60998, 61017, 61035, 61053, 61071, 61090, 61108, 61126,
+	61144, 61162, 61180, 61198, 61216, 61234, 61252, 61270,
+	61288, 61305, 61323, 61341, 61359, 61376, 61394, 61411,
+	61429, 61446, 61464, 61481, 61499, 61516, 61533, 61551,
+	61568, 61585, 61602, 61619, 61637, 61654, 61671, 61688,
+	61705, 61721, 61738, 61755, 61772, 61789, 61805, 61822,
+	61839, 61855, 61872, 61889, 61905, 61922, 61938, 61954,
+	61971, 61987, 62003, 62020, 62036, 62052, 62068, 62084,
+	62100, 62117, 62133, 62148, 62164, 62180, 62196, 62212,
+	62228, 62244, 62259, 62275, 62291, 62306, 62322, 62337,
+	62353, 62368, 62384, 62399, 62414, 62430, 62445, 62460,
+	62475, 62491, 62506, 62521, 62536, 62551, 62566, 62581,
+	62596, 62610, 62625, 62640, 62655, 62670, 62684, 62699,
+	62714, 62728, 62743, 62757, 62772, 62786, 62800, 62815,
+	62829, 62843, 62858, 62872, 62886, 62900, 62914, 62928,
+	62942, 62956, 62970, 62984, 62998, 63012, 63026, 63039,
+	63053, 63067, 63080, 63094, 63108, 63121, 63135, 63148,
+	63162, 63175, 63188, 63202, 63215, 63228, 63241, 63254,
+	63268, 63281, 63294, 63307, 63320, 63333, 63346, 63358,
+	63371, 63384, 63397, 63410, 63422, 63435, 63447, 63460,
+	63473, 63485, 63498, 63510, 63522, 63535, 63547, 63559,
+	63571, 63584, 63596, 63608, 63620, 63632, 63644, 63656,
+	63668, 63680, 63692, 63704, 63715, 63727, 63739, 63750,
+	63762, 63774, 63785, 63797, 63808, 63820, 63831, 63842,
+	63854, 63865, 63876, 63888, 63899, 63910, 63921, 63932,
+	63943, 63954, 63965, 63976, 63987, 63998, 64009, 64019,
+	64030, 64041, 64051, 64062, 64073, 64083, 64094, 64104,
+	64115, 64125, 64135, 64146, 64156, 64166, 64176, 64186,
+	64197, 64207, 64217, 64227, 64237, 64247, 64257, 64266,
+	64276, 64286, 64296, 64305, 64315, 64325, 64334, 64344,
+	64353, 64363, 64372, 64382, 64391, 64401, 64410, 64419,
+	64428, 64437, 64447, 64456, 64465, 64474, 64483, 64492,
+	64501, 64510, 64518, 64527, 64536, 64545, 64553, 64562,
+	64571, 64579, 64588, 64596, 64605, 64613, 64622, 64630,
+	64638, 64646, 64655, 64663, 64671, 64679, 64687, 64695,
+	64703, 64711, 64719, 64727, 64735, 64743, 64751, 64758,
+	64766, 64774, 64781, 64789, 64796, 64804, 64811, 64819,
+	64826, 64834, 64841, 64848, 64855, 64863, 64870, 64877,
+	64884, 64891, 64898, 64905, 64912, 64919, 64926, 64933,
+	64939, 64946, 64953, 64959, 64966, 64973, 64979, 64986,
+	64992, 64999, 65005, 65011, 65018, 65024, 65030, 65036,
+	65043, 65049, 65055, 65061, 65067, 65073, 65079, 65085,
+	65091, 65096, 65102, 65108, 65114, 65119, 65125, 65131,
+	65136, 65142, 65147, 65153, 65158, 65163, 65169, 65174,
+	65179, 65184, 65190, 65195, 65200, 65205, 65210, 65215,
+	65220, 65225, 65230, 65235, 65239, 65244, 65249, 65253,
+	65258, 65263, 65267, 65272, 65276, 65281, 65285, 65290,
+	65294, 65298, 65302, 65307, 65311, 65315, 65319, 65323,
+	65327, 65331, 65335, 65339, 65343, 65347, 65350, 65354,
+	65358, 65362, 65365, 65369, 65372, 65376, 65379, 65383,
+	65386, 65390, 65393, 65396, 65400, 65403, 65406, 65409,
+	65412, 65415, 65418, 65421, 65424, 65427, 65430, 65433,
+	65436, 65438, 65441, 65444, 65446, 65449, 65452, 65454,
+	65457, 65459, 65461, 65464, 65466, 65468, 65471, 65473,
+	65475, 65477, 65479, 65481, 65483, 65485, 65487, 65489,
+	65491, 65493, 65495, 65496, 65498, 65500, 65501, 65503,
+	65505, 65506, 65508, 65509, 65511, 65512, 65513, 65515,
+	65516, 65517, 65518, 65519, 65520, 65521, 65522, 65523,
+	65524, 65525, 65526, 65527, 65528, 65529, 65529, 65530,
 	65531, 65531, 65532, 65532, 65533, 65533, 65534, 65534,
 	65534, 65535, 65535, 65535, 65535, 65535, 65535, 65535
 };