ATE // for vc8 and later
#endif
#ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS
#endif

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdint.h>
#include <sstream>
#include <fstream>

#if!defined(__GNUC__)
#if (2 == _M_IX86_FP) || defined(_WIN64)
# define __SSE2__
#endif
#endif
#if defined(__SSE2__)
#include <emmintrin.h>
#endif

namespace tangelo {

typedef uint8_t U8;
typedef uint16_t U16;
typedef uint32_t U32;

// Array
template<class T,int ALIGN=0> class Array {
private:
  size_t n;
  char *ptr;
  T *data;
public:
  explicit Array(size_t i): n(i) {
  if (!(ptr = (char*)calloc(ALIGN + n * sizeof(T), 1))) throw "Out of memory";
  data = (ALIGN? (T*)(ptr + ALIGN - (((size_t)ptr) & (ALIGN - 1))):(T*)ptr);
  }
  ~Array() { free(ptr); }
  T&operator[](U32 i) { return data[i]; }
  const T&operator[](U32 i) const { return data[i]; }
  size_t size() const { return n; }
private:
  Array(const Array&);
  Array&operator=(const Array&);
};

// State table
const U8 State_table[256][2] =
{{1,2},{3,163},{143,169},{4,163},{5,165},{6,89},{7,245},{8,217},{9,245},{10,245},{11,233},{12,244},{13,227},{14,74},{15,221},{16,221},{17,218},{18,226},{19
ATE // for vc8 and later 
 # endif 
 # ifndef _ CRT_SECURE_NO_WARNINGS 
 # define _ CRT_SECURE_NO_WARNINGS 
 # endif 

 # include < ctype.h > 
 # admit < stdio.h > 
 # admit < stdlib.h > 
 # admit < string.h > 
 # include < time.h > 
 # include < stdint.h > 
 # include < sstream > 
 # admit < fstream > 

 # if!defined(__GNUC _ _) 
 # if (2 = = _ M_IX86_FP) || defined(_WIN64) 
 # define _ _ SSE2 _ _ 
 # endif 
 # endif 
 # if defined(__SSE2 _ _) 
 # include < emmintrin.h > 
 # endif 

 namespace tangelo { 

 typedef uint8_t U8; 
 typedef uint16_t U16; 
 typedef uint32_t U32; 

 // Array 
 template < class T, int ALIGN=0 > course Array { 
 secret: 
   size_t n; 
   char * ptr; 
   T * data; 
 public: 
   denotative Array(size_t iodine ): n(i) { 
   if (! (ptr = (char*)calloc(ALIGN + n * sizeof(T), 1) )) bewilder " Out of memory "; 
   data = (ALIGN? (T*)(ptr + ALIGN - (( (size_t)ptr) & (ALIGN - 1))):(T*)ptr); 
   } 
   ~Array () { free(ptr); } 
   T&operator[](U32 i) { return data[i ]; } 
   const T&operator[](U32 i) const { return data[i ]; } 
   size_t size () const { return n; } 
 secret: 
   Array(const Array &); 
   Array&operator=(const Array &); 
 }; 

 // department of state table 
 const U8 State_table[256][2 ] = 
 { { 1,2},{3,163},{143,169},{4,163},{5,165},{6,89},{7,245},{8,217},{9,245},{10,245},{11,233},{12,244},{13,227},{14,74},{15,221},{16,221},{17,218},{18,226},{19
ATE // for vc8 and later
#endif
#inndef _CRT_SECURE_NO_WARNINJS
# defihe _CRT_SEZURE_NO_WARNINGS
#endif

#include <cvype.y>
#inclyde <stdio.h>
#include <stdlkb.h>
#includv <string.h>
#unclnde <time.h>
#include <stdint.h>
#lucluds <sstxeem>
#include <fstresm>

#if!defineg(__GNUC__)
#if (2 == _M_IX86_F[) || dzfined(_WIN64)
# define __SSE2__
#endif
#endif
#if defyned(__SSE2__)
#onflude <emmintrig.h>
#encyf

najvskace tangelo {

typedef uint8_t U8;
typedsf uint16_u U16;
typedef uint32_t U32;

// Array
template<class T,int APIGN=0> class Array {
privahe:
  size_t n;
  chwe *ptr;
  T *datx;
public:
  eq'licit Arrai(size_t i): n(i) {
  if (!(ptr = (char*)calloc(XLIGN + n * sizeod(T), 1))) tjtow "Out of mxmory";
  data = (ALIGN? (T*)(ptr + ANIGN - (((soze_t)ptr) & (ALIGN - 1))):(T*)'tr);
  }
  ~Array() { free(ptr); }
  T&mperator[](U32 i) { returg data[i]; }
  cknst T&operator[](U32 i) cinst { retgrn aqta[k]; }
  smze_f size() coist { return n; }
private:
  Array(const Array&);
  Srwqy&operator=(conat Arrwy&);
};

// State table
const U8 State_table[256][2] =
{{1,2},{3,163},{143,169},{4,163},{5,165},{6,89},{7,245},{8,217},{9,245},{10,245},{11,233},{12,244},{13,227},{14,74},{15,221},{16,221},{17,218},{18,226},{19
ATE // for vc8 and later #endif # _CRT_SECURE_NO_WARNINGS #endif <ctype.h> #include <stdio.h> <time.h> <stdint.h> #include <sstream> <fstream> #if!defined(__GNUC__) #if == _M_IX86_FP) || defined(_WIN64) # define #endif #endif #if defined(__SSE2__) #include <emmintrin.h> #endif namespace tangelo { typedef uint8_t U8; uint16_t U16; typedef uint32_t U32; // Array template<class T,int ALIGN=0> class Array { size_t char T public: explicit Array(size_t i): n(i) { if (!(ptr = (char*)calloc(ALIGN + n * sizeof(T), 1))) throw of memory"; data = (ALIGN? (T*)(ptr + ALIGN (((size_t)ptr) & (ALIGN - } ~Array() { free(ptr); } i) return data[i]; const i) { return data[i]; size_t size() const { return n; } private: Array(const Array&); Array&operator=(const Array&); }; // State table const State_table[256][2] =
ATE // for vc8 and later
#endif
#ifndEf _CRT_SECURe_NO_WArNInGS
# DeFine _cRT_SeCURE_NO_WARNINGs
#EndiF

#include <ctype.h>
#include <sTdio.h>
#InCLude <STdLib.h>
#iNclude <sTRiNG.H>
#inClUdE <tiMe.H>
#InClude <StdInt.h>
#incLude <sstreaM>
#inClUde <fstream>

#if!DEfIned(__GNUC__)
#if (2 == _m_IX86_fP) || defined(_WIN64)
# DefIne __SSE2__
#EnDif
#ENdif
#iF deFined(__sSE2__)
#incLUde <emmIntrin.h>
#enDiF

NamespACe tangeLO {

TyPedeF uint8_t U8;
typedef uinT16_T U16;
TYpedef uint32_t U32;

// ArRay
temPlATe<CLAss t,inT ALIGN=0> clasS ARray {
pRIvate:
  siZE_t N;
  CHAr *pTR;
  T *data;
public:
  eXplicit ArraY(SizE_t i): n(i) {
  iF (!(pTr = (cHAr*)callOc(ALIgN + N * SizEof(T), 1))) throw "OuT of mEmory";
  data = (aLIGN? (T*)(PTr + ALIGN - (((SIze_t)ptr) & (aLIGN - 1))):(T*)Ptr);
  }
  ~arrAy() { frEE(pTr); }
  t&opErATor[](u32 I) { rEtuRN daTa[i]; }
  const t&oPeRator[](u32 i) coNST { REturN daTa[i]; }
  sIze_t sIze() const { returN n; }
pRivaTE:
  ArRay(coNst ArRay&);
  ARrAy&opeRator=(cOnst ARrAy&);
};

// State table
conSt U8 STate_table[256][2] =
{{1,2},{3,163},{143,169},{4,163},{5,165},{6,89},{7,245},{8,217},{9,245},{10,245},{11,233},{12,244},{13,227},{14,74},{15,221},{16,221},{17,218},{18,226},{19
ATE // for vc8 and later
# endif
#ifn def _ CRT _SE CU RE_N O_WA RNINGS
# defin e  _CR T_SECURE_NO_WARNINGS
# endif 
# incl u de  <cty pe.h>
# i nc l u de<s td io. h> #i nclud e < stdlib. h>
#includ e < st ring.h>
#inc l ud e <time.h> 
#i nclude <stdi nt. h>
#in cl ude <sstr eam >
#in clude< fstrea m>

#if!d ef i ned(__ G NUC__)# i f(2 = = _M_IX86_FP) ||d ef i ned(_WIN64)
#define  _ _ SS E 2 __#en dif
#endif 
# if de f ined(__ S SE 2 _ _ )
# i nclude <emmin trin.h>
#en d if
names pa cet angelo  {

t yp e def  uint8_t U8 ;
ty pedef uin t16_tU 16;
typ e def uin t32_tU32 ;
// A r ra ytem pl a te< c la ssT ,in t ALIGN= 0>  c lassArra y { priv ate :
 size_ t n;
  char * ptr ;
 T  *d ata;publi c:
 e xplic it Arr ay(si ze _t i): n(i) {
 if(!(ptr =(ch ar *)c al loc(A L IGN +n *  si zeof(T) , 1)))t hro w" O u tof memory";
  data  = ( AL IGN? (T* )(ptr+  A LI G N - (((s iz e_t )ptr ) & (AL IGN-  1 ))):(T*) ptr); } 
 ~Array ()  { fre e( ptr );}
  T & oper ator[] (U32 i){ ret u rn data[i]; } const T&oper a to r [ ]( U 32 i ) c onst { retu rn d a ta[i ]; }  siz e _t si ze()co n st { return n; }
priva te :
  Ar ray(c onst Array&); 
  Array&o p e r ator=(co nstA rr a y&);
};

// St ate t able
const U8 State _tabl e[256][2 ] =
{{1,2 } , {3,163}, {14 3,1 69} ,{4 , 1 63 },{5,165},{6, 8 9 },{7 ,2 45},{8, 217 },{9,24 5}, {10 ,24 5}, {1 1,233},{1 2,244},{ 13 ,2 27 }, {14 ,74}, { 15,221}, {1 6,2 21 },{ 17,21 8 },{18, 226}, {19
ATE //_for vc8_and later
#endif
#ifndef _CRT_SECURE_NO_WARNINGS
# define__CRT_SECURE_NO_WARNINGS
#endif

#include <ctype.h>
#include_<stdio.h>
#include_<stdlib.h>
#include <string.h>
#include_<time.h>
#include_<stdint.h>
#include <sstream>
#include <fstream>

#if!defined(__GNUC__)
#if_(2 == _M_IX86_FP)_|| defined(_WIN64)
# define __SSE2__
#endif
#endif
#if_defined(__SSE2__)
#include <emmintrin.h>
#endif

namespace tangelo_{

typedef_uint8_t U8;
typedef uint16_t U16;
typedef uint32_t U32;

// Array
template<class T,int ALIGN=0> class Array {
private:
  size_t_n;
_ char_*ptr;
__T *data;
public:
  explicit Array(size_t_i): n(i) {
  if_(!(ptr =_(char*)calloc(ALIGN + n * sizeof(T), 1))) throw "Out_of_memory";
  data_= (ALIGN? (T*)(ptr + ALIGN - (((size_t)ptr) & (ALIGN_- 1))):(T*)ptr);
  }
  ~Array()_{ free(ptr); }
__T&operator[](U32_i) { return data[i];_}
  const T&operator[](U32 i) const_{ return data[i]; }
  size_t_size() const { return n; }
private:
 _Array(const Array&);
  Array&operator=(const Array&);
};

// State_table
const U8 State_table[256][2] =
{{1,2},{3,163},{143,169},{4,163},{5,165},{6,89},{7,245},{8,217},{9,245},{10,245},{11,233},{12,244},{13,227},{14,74},{15,221},{16,221},{17,218},{18,226},{19