code
stringlengths
1
2.06M
language
stringclasses
1 value
/********************************************************************** * File: memry.c (Formerly memory.c) * Description: Memory allocation with builtin safety checks. * Author: Ray Smith * Created: Wed Jan 22 09:43:33 GMT 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "memry.h" #include <stdlib.h> // With improvements in OS memory allocators, internal memory management // is no longer required, so all these functions now map to their malloc // family equivalents. // TODO(rays) further cleanup by redirecting calls to new and creating proper // constructors. char *alloc_string(inT32 count) { // Round up the amount allocated to a multiple of 4 return static_cast<char*>(malloc((count + 3) & ~3)); } void free_string(char *string) { free(string); } void* alloc_struct(inT32 count, const char *) { return malloc(count); } void free_struct(void *deadstruct, inT32, const char *) { free(deadstruct); } void *alloc_mem(inT32 count) { return malloc(static_cast<size_t>(count)); } void *alloc_big_zeros(inT32 count) { return calloc(static_cast<size_t>(count), 1); } void free_mem(void *oldchunk) { free(oldchunk); } void free_big_mem(void *oldchunk) { free(oldchunk); }
C++
// Copyright 2011 Google Inc. All Rights Reserved. // Author: rays@google.com (Ray Smith) /////////////////////////////////////////////////////////////////////// // File: bitvector.h // Description: Class replacement for BITVECTOR. // Author: Ray Smith // Created: Mon Jan 10 17:44:01 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCUTIL_BITVECTOR_H__ #define TESSERACT_CCUTIL_BITVECTOR_H__ #include <assert.h> #include <stdio.h> #include "host.h" namespace tesseract { // Trivial class to encapsulate a fixed-length array of bits, with // Serialize/DeSerialize. Replaces the old macros. class BitVector { public: // Fast lookup table to get the first least significant set bit in a byte. // For zero, the table has 255, but since it is a special case, most code // that uses this table will check for zero before looking up lsb_index_. static const uinT8 lsb_index_[256]; // Fast lookup table to get the residual bits after zeroing the least // significant set bit in a byte. static const uinT8 lsb_eroded_[256]; // Fast lookup table to give the number of set bits in a byte. static const int hamming_table_[256]; BitVector(); // Initializes the array to length * false. explicit BitVector(int length); BitVector(const BitVector& src); BitVector& operator=(const BitVector& src); ~BitVector(); // Initializes the array to length * false. void Init(int length); // Returns the number of bits that are accessible in the vector. int size() const { return bit_size_; } // Writes to the given file. Returns false in case of error. bool Serialize(FILE* fp) const; // Reads from the given file. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool DeSerialize(bool swap, FILE* fp); void SetAllFalse(); void SetAllTrue(); // Accessors to set/reset/get bits. // The range of index is [0, size()-1]. // There is debug-only bounds checking. void SetBit(int index) { array_[WordIndex(index)] |= BitMask(index); } void ResetBit(int index) { array_[WordIndex(index)] &= ~BitMask(index); } void SetValue(int index, bool value) { if (value) SetBit(index); else ResetBit(index); } bool At(int index) const { return (array_[WordIndex(index)] & BitMask(index)) != 0; } bool operator[](int index) const { return (array_[WordIndex(index)] & BitMask(index)) != 0; } // Returns the index of the next set bit after the given index. // Useful for quickly iterating through the set bits in a sparse vector. int NextSetBit(int prev_bit) const; // Returns the number of set bits in the vector. int NumSetBits() const; // Logical in-place operations on whole bit vectors. Tries to do something // sensible if they aren't the same size, but they should be really. void operator|=(const BitVector& other); void operator&=(const BitVector& other); void operator^=(const BitVector& other); // Set subtraction *this = v1 - v2. void SetSubtract(const BitVector& v1, const BitVector& v2); private: // Allocates memory for a vector of the given length. void Alloc(int length); // Computes the index to array_ for the given index, with debug range // checking. int WordIndex(int index) const { assert(0 <= index && index < bit_size_); return index / kBitFactor; } // Returns a mask to select the appropriate bit for the given index. uinT32 BitMask(int index) const { return 1 << (index & (kBitFactor - 1)); } // Returns the number of array elements needed to represent the current // bit_size_. int WordLength() const { return (bit_size_ + kBitFactor - 1) / kBitFactor; } // Returns the number of bytes consumed by the array_. int ByteLength() const { return WordLength() * sizeof(*array_); } // Number of bits in this BitVector. inT32 bit_size_; // Array of words used to pack the bits. // Bits are stored little-endian by uinT32 word, ie by word first and then // starting with the least significant bit in each word. uinT32* array_; // Number of bits in an array_ element. static const int kBitFactor = sizeof(uinT32) * 8; }; } // namespace tesseract. #endif // TESSERACT_CCUTIL_BITVECTOR_H__
C++
/********************************************************************** * File: strngs.h (Formerly strings.h) * Description: STRING class definition. * Author: Ray Smith * Created: Fri Feb 15 09:15:01 GMT 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef STRNGS_H #define STRNGS_H #include <stdio.h> #include <string.h> #include "platform.h" #include "memry.h" namespace tesseract { class TFile; } // namespace tesseract. // STRING_IS_PROTECTED means that string[index] = X is invalid // because you have to go through strings interface to modify it. // This allows the string to ensure internal integrity and maintain // its own string length. Unfortunately this is not possible because // STRINGS are used as direct-manipulation data buffers for things // like length arrays and many places cast away the const on string() // to mutate the string. Turning this off means that internally we // cannot assume we know the strlen. #define STRING_IS_PROTECTED 0 template <typename T> class GenericVector; class TESS_API STRING { public: STRING(); STRING(const STRING &string); STRING(const char *string); STRING(const char *data, int length); ~STRING (); // Writes to the given file. Returns false in case of error. bool Serialize(FILE* fp) const; // Reads from the given file. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool DeSerialize(bool swap, FILE* fp); // Writes to the given file. Returns false in case of error. bool Serialize(tesseract::TFile* fp) const; // Reads from the given file. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool DeSerialize(bool swap, tesseract::TFile* fp); BOOL8 contains(const char c) const; inT32 length() const; inT32 size() const { return length(); } const char *string() const; const char *c_str() const; inline char* strdup() const { inT32 len = length() + 1; return strncpy(new char[len], GetCStr(), len); } #if STRING_IS_PROTECTED const char &operator[] (inT32 index) const; // len is number of chars in s to insert starting at index in this string void insert_range(inT32 index, const char*s, int len); void erase_range(inT32 index, int len); #else char &operator[] (inT32 index) const; #endif void split(const char c, GenericVector<STRING> *splited); void truncate_at(inT32 index); BOOL8 operator== (const STRING & string) const; BOOL8 operator!= (const STRING & string) const; BOOL8 operator!= (const char *string) const; STRING & operator= (const char *string); STRING & operator= (const STRING & string); STRING operator+ (const STRING & string) const; STRING operator+ (const char ch) const; STRING & operator+= (const char *string); STRING & operator+= (const STRING & string); STRING & operator+= (const char ch); // Assignment for strings which are not null-terminated. void assign(const char *cstr, int len); // Appends the given string and int (as a %d) to this. // += cannot be used for ints as there as a char += operator that would // be ambiguous, and ints usually need a string before or between them // anyway. void add_str_int(const char* str, int number); // Appends the given string and double (as a %.8g) to this. void add_str_double(const char* str, double number); // ensure capacity but keep pointer encapsulated inline void ensure(inT32 min_capacity) { ensure_cstr(min_capacity); } private: typedef struct STRING_HEADER { // How much space was allocated in the string buffer for char data. int capacity_; // used_ is how much of the capacity is currently being used, // including a '\0' terminator. // // If used_ is 0 then string is NULL (not even the '\0') // else if used_ > 0 then it is strlen() + 1 (because it includes '\0') // else strlen is >= 0 (not NULL) but needs to be computed. // this condition is set when encapsulation is violated because // an API returned a mutable string. // // capacity_ - used_ = excess capacity that the string can grow // without reallocating mutable int used_; } STRING_HEADER; // To preserve the behavior of the old serialization, we only have space // for one pointer in this structure. So we are embedding a data structure // at the start of the storage that will hold additional state variables, // then storing the actual string contents immediately after. STRING_HEADER* data_; // returns the header part of the storage inline STRING_HEADER* GetHeader() { return data_; } inline const STRING_HEADER* GetHeader() const { return data_; } // returns the string data part of storage inline char* GetCStr() { return ((char *)data_) + sizeof(STRING_HEADER); }; inline const char* GetCStr() const { return ((const char *)data_) + sizeof(STRING_HEADER); }; inline bool InvariantOk() const { #if STRING_IS_PROTECTED return (GetHeader()->used_ == 0) ? (string() == NULL) : (GetHeader()->used_ == (strlen(string()) + 1)); #else return true; #endif } // Ensure string has requested capacity as optimization // to avoid unnecessary reallocations. // The return value is a cstr buffer with at least requested capacity char* ensure_cstr(inT32 min_capacity); void FixHeader() const; // make used_ non-negative, even if const char* AllocData(int used, int capacity); void DiscardData(); }; #endif
C++
// Copyright 2012 Google Inc. All Rights Reserved. // Author: rays@google.com (Ray Smith) /////////////////////////////////////////////////////////////////////// // File: doubleptr.h // Description: Double-ended pointer that keeps pointing correctly even // when reallocated or copied. // Author: Ray Smith // Created: Wed Mar 14 12:22:57 PDT 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCUTIL_DOUBLEPTR_H_ #define TESSERACT_CCUTIL_DOUBLEPTR_H_ #include "errcode.h" namespace tesseract { // A smart pointer class that implements a double-ended pointer. Each end // points to the other end. The copy constructor and operator= have MOVE // semantics, meaning that the relationship with the other end moves to the // destination of the copy, leaving the source unattached. // For this reason both the copy constructor and the operator= take a non-const // reference argument, and the const reference versions cannot be used. // DoublePtr is useful to incorporate into structures that are part of a // collection such as GenericVector or STL containers, where reallocs can // relocate the members. DoublePtr is also useful in a GenericHeap, where it // can correctly maintain the pointer to an element of the heap despite it // getting moved around on the heap. class DoublePtr { public: DoublePtr() : other_end_(NULL) {} // Copy constructor steals the partner off src and is therefore a non // const reference arg. // Copying a const DoublePtr generates a compiler error. DoublePtr(DoublePtr& src) { other_end_ = src.other_end_; if (other_end_ != NULL) { other_end_->other_end_ = this; src.other_end_ = NULL; } } // Operator= steals the partner off src, and therefore needs src to be a non- // const reference. // Assigning from a const DoublePtr generates a compiler error. void operator=(DoublePtr& src) { Disconnect(); other_end_ = src.other_end_; if (other_end_ != NULL) { other_end_->other_end_ = this; src.other_end_ = NULL; } } // Connects this and other, discarding any existing connections. void Connect(DoublePtr* other) { other->Disconnect(); Disconnect(); other->other_end_ = this; other_end_ = other; } // Disconnects this and other, making OtherEnd() return NULL for both. void Disconnect() { if (other_end_ != NULL) { other_end_->other_end_ = NULL; other_end_ = NULL; } } // Returns the pointer to the other end of the double pointer. DoublePtr* OtherEnd() const { return other_end_; } private: // Pointer to the other end of the link. It is always true that either // other_end_ == NULL or other_end_->other_end_ == this. DoublePtr* other_end_; }; } // namespace tesseract. #endif // THIRD_PARTY_TESSERACT_CCUTIL_DOUBLEPTR_H_
C++
/********************************************************************** * File: serialis.h (Formerly serialmac.h) * Description: Inline routines and macros for serialisation functions * Author: Phil Cheatle * Created: Tue Oct 08 08:33:12 BST 1991 * * (C) Copyright 1990, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "serialis.h" #include <stdio.h> #include "genericvector.h" namespace tesseract { TFile::TFile() : offset_(0), data_(NULL), data_is_owned_(false), is_writing_(false) { } TFile::~TFile() { if (data_is_owned_) delete data_; } bool TFile::Open(const STRING& filename, FileReader reader) { if (!data_is_owned_) { data_ = new GenericVector<char>; data_is_owned_ = true; } offset_ = 0; is_writing_ = false; if (reader == NULL) return LoadDataFromFile(filename, data_); else return (*reader)(filename, data_); } bool TFile::Open(const char* data, int size) { offset_ = 0; if (!data_is_owned_) { data_ = new GenericVector<char>; data_is_owned_ = true; } is_writing_ = false; data_->init_to_size(size, 0); memcpy(&(*data_)[0], data, size); return true; } bool TFile::Open(FILE* fp, inT64 end_offset) { offset_ = 0; inT64 current_pos = ftell(fp); if (end_offset < 0) { if (fseek(fp, 0, SEEK_END)) return false; end_offset = ftell(fp); if (fseek(fp, current_pos, SEEK_SET)) return false; } int size = end_offset - current_pos; is_writing_ = false; if (!data_is_owned_) { data_ = new GenericVector<char>; data_is_owned_ = true; } data_->init_to_size(size, 0); return static_cast<int>(fread(&(*data_)[0], 1, size, fp)) == size; } char* TFile::FGets(char* buffer, int buffer_size) { ASSERT_HOST(!is_writing_); int size = 0; while (size + 1 < buffer_size && offset_ < data_->size()) { buffer[size++] = (*data_)[offset_++]; if ((*data_)[offset_ - 1] == '\n') break; } if (size < buffer_size) buffer[size] = '\0'; return size > 0 ? buffer : NULL; } int TFile::FRead(void* buffer, int size, int count) { ASSERT_HOST(!is_writing_); int required_size = size * count; if (required_size <= 0) return 0; char* char_buffer = reinterpret_cast<char*>(buffer); if (data_->size() - offset_ < required_size) required_size = data_->size() - offset_; if (required_size > 0) memcpy(char_buffer, &(*data_)[offset_], required_size); offset_ += required_size; return required_size / size; } void TFile::Rewind() { ASSERT_HOST(!is_writing_); offset_ = 0; } void TFile::OpenWrite(GenericVector<char>* data) { offset_ = 0; if (data != NULL) { if (data_is_owned_) delete data_; data_ = data; data_is_owned_ = false; } else if (!data_is_owned_) { data_ = new GenericVector<char>; data_is_owned_ = true; } is_writing_ = true; data_->truncate(0); } bool TFile::CloseWrite(const STRING& filename, FileWriter writer) { ASSERT_HOST(is_writing_); if (writer == NULL) return SaveDataToFile(*data_, filename); else return (*writer)(*data_, filename); } int TFile::FWrite(const void* buffer, int size, int count) { ASSERT_HOST(is_writing_); int total = size * count; if (total <= 0) return 0; const char* buf = reinterpret_cast<const char*>(buffer); // This isn't very efficient, but memory is so fast compared to disk // that it is relatively unimportant, and very simple. for (int i = 0; i < total; ++i) data_->push_back(buf[i]); return count; } } // namespace tesseract.
C++
/****************************************************************************** ** Filename: Host.h ** Purpose: This is the system independent typedefs and defines ** Author: MN, JG, MD ** Version: 5.4.1 ** History: 11/7/94 MCD received the modification that Lennart made ** to port to 32 bit world and modify this file so that it ** will be shared between platform. ** 11/9/94 MCD Make MSW32 subset of MSW. Now MSW means ** MicroSoft Window and MSW32 means the 32 bit worlds ** of MicroSoft Window. Therefore you want the environment ** to be MicroSoft Window and in the 32 bit world - ** _WIN32 must be defined by your compiler. ** 11/30/94 MCD Incorporated comments received for more ** readability and the missing typedef for FLOAT. ** 12/1/94 MCD Added PFVOID typedef ** 5/1/95 MCD. Made many changes based on the inputs. ** Changes: ** 1) Rearrange the #ifdef so that there're definitions for ** particular platforms. ** 2) Took out the #define for computer and environment ** that developer can uncomment ** 3) Added __OLDCODE__ where the defines will be ** obsoleted in the next version and advise not to use. ** 4) Added the definitions for the following: ** FILE_HANDLE, MEMORY_HANDLE, BOOL8, ** MAX_INT8, MAX_INT16, MAX_INT32, MAX_UINT8 ** MAX_UINT16, MAX_UINT32, MAX_FLOAT32 ** 06/19/96 MCD. Took out MAX_FLOAT32 ** 07/15/96 MCD. Fixed the comments error ** Add back BOOL8. ** ** (c) Copyright Hewlett-Packard Company, 1988-1996. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ #ifndef __HOST__ #define __HOST__ /****************************************************************************** ** IMPORTANT!!! ** ** ** ** Defines either _WIN32, __MAC__, __UNIX__, __OS2__, __PM__ to ** use the specified definitions indicated below in the preprocessor settings. ** ** ** ** Also define either __FarProc__ or __FarData__ and __MOTO__ to use the ** specified definitions indicated below in the preprocessor settings. ** ** ** ** If a preprocessor settings is not allow in the compiler that is being use, ** then it is recommended that a "platform.h" is created with the definition ** of the computer and/or operating system. ******************************************************************************/ #include "platform.h" /* _WIN32 */ #ifdef _WIN32 #include <windows.h> #include <winbase.h> // winbase.h contains windows.h #endif /********************************************************/ /* __MAC__ */ #ifdef __MAC__ #include <Types.h> /*----------------------------*/ /*----------------------------*/ #endif /********************************************************/ #if defined(__UNIX__) || defined( __DOS__ ) || defined(__OS2__) || defined(__PM__) /*----------------------------*/ /* FarProc and FarData */ /*----------------------------*/ /*----------------------------*/ #endif /***************************************************************************** ** ** Standard GHC Definitions ** *****************************************************************************/ #ifdef __MOTO__ #define __NATIVE__ MOTO #else #define __NATIVE__ INTEL #endif //typedef HANDLE FD* PHANDLE; // definitions of portable data types (numbers and characters) typedef SIGNED char inT8; typedef unsigned char uinT8; typedef short inT16; typedef unsigned short uinT16; typedef int inT32; typedef unsigned int uinT32; #if (_MSC_VER >= 1200) //%%% vkr for VC 6.0 typedef INT64 inT64; typedef UINT64 uinT64; #else typedef long long int inT64; typedef unsigned long long int uinT64; #endif //%%% vkr for VC 6.0 typedef float FLOAT32; typedef double FLOAT64; typedef unsigned char BOOL8; #define INT32FORMAT "%d" #define INT64FORMAT "%lld" #define MAX_INT8 0x7f #define MAX_INT16 0x7fff #define MAX_INT32 0x7fffffff #define MAX_UINT8 0xff #define MAX_UINT16 0xffff #define MAX_UINT32 0xffffffff #define MAX_FLOAT32 ((float)3.40282347e+38) #define MIN_INT8 0x80 #define MIN_INT16 0x8000 #define MIN_INT32 static_cast<int>(0x80000000) #define MIN_UINT8 0x00 #define MIN_UINT16 0x0000 #define MIN_UINT32 0x00000000 #define MIN_FLOAT32 ((float)1.17549435e-38) // Defines #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #ifndef NULL #define NULL 0L #endif // Return true if x is within tolerance of y template<class T> bool NearlyEqual(T x, T y, T tolerance) { T diff = x - y; return diff <= tolerance && -diff <= tolerance; } #endif
C++
/********************************************************************** * File: elst2.c (Formerly elist2.c) * Description: Doubly linked embedded list code not in the include file. * Author: Phil Cheatle * Created: Wed Jan 23 11:04:47 GMT 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include <stdlib.h> #include "host.h" #include "elst2.h" /*********************************************************************** * MEMBER FUNCTIONS OF CLASS: ELIST2 * ================================= **********************************************************************/ /*********************************************************************** * ELIST2::internal_clear * * Used by the destructor and the "clear" member function of derived list * classes to destroy all the elements on the list. * The calling function passes a "zapper" function which can be called to * delete each element of the list, regardless of its derived type. This * technique permits a generic clear function to destroy elements of * different derived types correctly, without requiring virtual functions and * the consequential memory overhead. **********************************************************************/ void ELIST2::internal_clear ( //destroy all links void (*zapper) (ELIST2_LINK *)) { //ptr to zapper functn ELIST2_LINK *ptr; ELIST2_LINK *next; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2::internal_clear", ABORT, NULL); #endif if (!empty ()) { ptr = last->next; //set to first last->next = NULL; //break circle last = NULL; //set list empty while (ptr) { next = ptr->next; zapper(ptr); ptr = next; } } } /*********************************************************************** * ELIST2::assign_to_sublist * * The list is set to a sublist of another list. "This" list must be empty * before this function is invoked. The two iterators passed must refer to * the same list, different from "this" one. The sublist removed is the * inclusive list from start_it's current position to end_it's current * position. If this range passes over the end of the source list then the * source list has its end set to the previous element of start_it. The * extracted sublist is unaffected by the end point of the source list, its * end point is always the end_it position. **********************************************************************/ void ELIST2::assign_to_sublist( //to this list ELIST2_ITERATOR *start_it, //from list start ELIST2_ITERATOR *end_it) { //from list end const ERRCODE LIST_NOT_EMPTY = "Destination list must be empty before extracting a sublist"; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2::assign_to_sublist", ABORT, NULL); #endif if (!empty ()) LIST_NOT_EMPTY.error ("ELIST2.assign_to_sublist", ABORT, NULL); last = start_it->extract_sublist (end_it); } /*********************************************************************** * ELIST2::length * * Return count of elements on list **********************************************************************/ inT32 ELIST2::length() const { // count elements ELIST2_ITERATOR it(const_cast<ELIST2*>(this)); inT32 count = 0; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2::length", ABORT, NULL); #endif for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) count++; return count; } /*********************************************************************** * ELIST2::sort * * Sort elements on list * NB If you dont like the const declarations in the comparator, coerce yours: * ( int (*)(const void *, const void *) **********************************************************************/ void ELIST2::sort ( //sort elements int comparator ( //comparison routine const void *, const void *)) { ELIST2_ITERATOR it(this); inT32 count; ELIST2_LINK **base; //ptr array to sort ELIST2_LINK **current; inT32 i; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2::sort", ABORT, NULL); #endif /* Allocate an array of pointers, one per list element */ count = length (); base = (ELIST2_LINK **) malloc (count * sizeof (ELIST2_LINK *)); /* Extract all elements, putting the pointers in the array */ current = base; for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) { *current = it.extract (); current++; } /* Sort the pointer array */ qsort ((char *) base, count, sizeof (*base), comparator); /* Rebuild the list from the sorted pointers */ current = base; for (i = 0; i < count; i++) { it.add_to_end (*current); current++; } free(base); } // Assuming list has been sorted already, insert new_link to // keep the list sorted according to the same comparison function. // Comparision function is the same as used by sort, i.e. uses double // indirection. Time is O(1) to add to beginning or end. // Time is linear to add pre-sorted items to an empty list. void ELIST2::add_sorted(int comparator(const void*, const void*), ELIST2_LINK* new_link) { // Check for adding at the end. if (last == NULL || comparator(&last, &new_link) < 0) { if (last == NULL) { new_link->next = new_link; new_link->prev = new_link; } else { new_link->next = last->next; new_link->prev = last; last->next = new_link; new_link->next->prev = new_link; } last = new_link; } else { // Need to use an iterator. ELIST2_ITERATOR it(this); for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) { ELIST2_LINK* link = it.data(); if (comparator(&link, &new_link) > 0) break; } if (it.cycled_list()) it.add_to_end(new_link); else it.add_before_then_move(new_link); } } /*********************************************************************** * MEMBER FUNCTIONS OF CLASS: ELIST2_ITERATOR * ========================================== **********************************************************************/ /*********************************************************************** * ELIST2_ITERATOR::forward * * Move the iterator to the next element of the list. * REMEMBER: ALL LISTS ARE CIRCULAR. **********************************************************************/ ELIST2_LINK *ELIST2_ITERATOR::forward() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2_ITERATOR::forward", ABORT, NULL); if (!list) NO_LIST.error ("ELIST2_ITERATOR::forward", ABORT, NULL); #endif if (list->empty ()) return NULL; if (current) { //not removed so //set previous prev = current; started_cycling = TRUE; // In case next is deleted by another iterator, get it from the current. current = current->next; } else { if (ex_current_was_cycle_pt) cycle_pt = next; current = next; } next = current->next; #ifndef NDEBUG if (!current) NULL_DATA.error ("ELIST2_ITERATOR::forward", ABORT, NULL); if (!next) NULL_NEXT.error ("ELIST2_ITERATOR::forward", ABORT, "This is: %p Current is: %p", this, current); #endif return current; } /*********************************************************************** * ELIST2_ITERATOR::backward * * Move the iterator to the previous element of the list. * REMEMBER: ALL LISTS ARE CIRCULAR. **********************************************************************/ ELIST2_LINK *ELIST2_ITERATOR::backward() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2_ITERATOR::backward", ABORT, NULL); if (!list) NO_LIST.error ("ELIST2_ITERATOR::backward", ABORT, NULL); #endif if (list->empty ()) return NULL; if (current) { //not removed so //set previous next = current; started_cycling = TRUE; // In case prev is deleted by another iterator, get it from current. current = current->prev; } else { if (ex_current_was_cycle_pt) cycle_pt = prev; current = prev; } prev = current->prev; #ifndef NDEBUG if (!current) NULL_DATA.error ("ELIST2_ITERATOR::backward", ABORT, NULL); if (!prev) NULL_PREV.error ("ELIST2_ITERATOR::backward", ABORT, "This is: %p Current is: %p", this, current); #endif return current; } /*********************************************************************** * ELIST2_ITERATOR::data_relative * * Return the data pointer to the element "offset" elements from current. * (This function can't be INLINEd because it contains a loop) **********************************************************************/ ELIST2_LINK *ELIST2_ITERATOR::data_relative( //get data + or - .. inT8 offset) { //offset from current ELIST2_LINK *ptr; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2_ITERATOR::data_relative", ABORT, NULL); if (!list) NO_LIST.error ("ELIST2_ITERATOR::data_relative", ABORT, NULL); if (list->empty ()) EMPTY_LIST.error ("ELIST2_ITERATOR::data_relative", ABORT, NULL); #endif if (offset < 0) for (ptr = current ? current : next; offset++ < 0; ptr = ptr->prev); else for (ptr = current ? current : prev; offset-- > 0; ptr = ptr->next); #ifndef NDEBUG if (!ptr) NULL_DATA.error ("ELIST2_ITERATOR::data_relative", ABORT, NULL); #endif return ptr; } /*********************************************************************** * ELIST2_ITERATOR::exchange() * * Given another iterator, whose current element is a different element on * the same list list OR an element of another list, exchange the two current * elements. On return, each iterator points to the element which was the * other iterators current on entry. * (This function hasn't been in-lined because its a bit big!) **********************************************************************/ void ELIST2_ITERATOR::exchange( //positions of 2 links ELIST2_ITERATOR *other_it) { //other iterator const ERRCODE DONT_EXCHANGE_DELETED = "Can't exchange deleted elements of lists"; ELIST2_LINK *old_current; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2_ITERATOR::exchange", ABORT, NULL); if (!list) NO_LIST.error ("ELIST2_ITERATOR::exchange", ABORT, NULL); if (!other_it) BAD_PARAMETER.error ("ELIST2_ITERATOR::exchange", ABORT, "other_it NULL"); if (!(other_it->list)) NO_LIST.error ("ELIST2_ITERATOR::exchange", ABORT, "other_it"); #endif /* Do nothing if either list is empty or if both iterators reference the same link */ if ((list->empty ()) || (other_it->list->empty ()) || (current == other_it->current)) return; /* Error if either current element is deleted */ if (!current || !other_it->current) DONT_EXCHANGE_DELETED.error ("ELIST2_ITERATOR.exchange", ABORT, NULL); /* Now handle the 4 cases: doubleton list; non-doubleton adjacent elements (other before this); non-doubleton adjacent elements (this before other); non-adjacent elements. */ //adjacent links if ((next == other_it->current) || (other_it->next == current)) { //doubleton list if ((next == other_it->current) && (other_it->next == current)) { prev = next = current; other_it->prev = other_it->next = other_it->current; } else { //non-doubleton with //adjacent links //other before this if (other_it->next == current) { other_it->prev->next = current; other_it->current->next = next; other_it->current->prev = current; current->next = other_it->current; current->prev = other_it->prev; next->prev = other_it->current; other_it->next = other_it->current; prev = current; } else { //this before other prev->next = other_it->current; current->next = other_it->next; current->prev = other_it->current; other_it->current->next = current; other_it->current->prev = prev; other_it->next->prev = current; next = current; other_it->prev = other_it->current; } } } else { //no overlap prev->next = other_it->current; current->next = other_it->next; current->prev = other_it->prev; next->prev = other_it->current; other_it->prev->next = current; other_it->current->next = next; other_it->current->prev = prev; other_it->next->prev = current; } /* update end of list pointer when necessary (remember that the 2 iterators may iterate over different lists!) */ if (list->last == current) list->last = other_it->current; if (other_it->list->last == other_it->current) other_it->list->last = current; if (current == cycle_pt) cycle_pt = other_it->cycle_pt; if (other_it->current == other_it->cycle_pt) other_it->cycle_pt = cycle_pt; /* The actual exchange - in all cases*/ old_current = current; current = other_it->current; other_it->current = old_current; } /*********************************************************************** * ELIST2_ITERATOR::extract_sublist() * * This is a private member, used only by ELIST2::assign_to_sublist. * Given another iterator for the same list, extract the links from THIS to * OTHER inclusive, link them into a new circular list, and return a * pointer to the last element. * (Can't inline this function because it contains a loop) **********************************************************************/ ELIST2_LINK *ELIST2_ITERATOR::extract_sublist( //from this current ELIST2_ITERATOR *other_it) { //to other current #ifndef NDEBUG const ERRCODE BAD_EXTRACTION_PTS = "Can't extract sublist from points on different lists"; const ERRCODE DONT_EXTRACT_DELETED = "Can't extract a sublist marked by deleted points"; #endif const ERRCODE BAD_SUBLIST = "Can't find sublist end point in original list"; ELIST2_ITERATOR temp_it = *this; ELIST2_LINK *end_of_new_list; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("ELIST2_ITERATOR::extract_sublist", ABORT, NULL); if (!other_it) BAD_PARAMETER.error ("ELIST2_ITERATOR::extract_sublist", ABORT, "other_it NULL"); if (!list) NO_LIST.error ("ELIST2_ITERATOR::extract_sublist", ABORT, NULL); if (list != other_it->list) BAD_EXTRACTION_PTS.error ("ELIST2_ITERATOR.extract_sublist", ABORT, NULL); if (list->empty ()) EMPTY_LIST.error ("ELIST2_ITERATOR::extract_sublist", ABORT, NULL); if (!current || !other_it->current) DONT_EXTRACT_DELETED.error ("ELIST2_ITERATOR.extract_sublist", ABORT, NULL); #endif ex_current_was_last = other_it->ex_current_was_last = FALSE; ex_current_was_cycle_pt = FALSE; other_it->ex_current_was_cycle_pt = FALSE; temp_it.mark_cycle_pt (); do { //walk sublist if (temp_it.cycled_list ()) //cant find end pt BAD_SUBLIST.error ("ELIST2_ITERATOR.extract_sublist", ABORT, NULL); if (temp_it.at_last ()) { list->last = prev; ex_current_was_last = other_it->ex_current_was_last = TRUE; } if (temp_it.current == cycle_pt) ex_current_was_cycle_pt = TRUE; if (temp_it.current == other_it->cycle_pt) other_it->ex_current_was_cycle_pt = TRUE; temp_it.forward (); } //do INCLUSIVE list while (temp_it.prev != other_it->current); //circularise sublist other_it->current->next = current; //circularise sublist current->prev = other_it->current; end_of_new_list = other_it->current; //sublist = whole list if (prev == other_it->current) { list->last = NULL; prev = current = next = NULL; other_it->prev = other_it->current = other_it->next = NULL; } else { prev->next = other_it->next; other_it->next->prev = prev; current = other_it->current = NULL; next = other_it->next; other_it->prev = prev; } return end_of_new_list; }
C++
// Copyright 2012 Google Inc. All Rights Reserved. // Author: rays@google.com (Ray Smith) /////////////////////////////////////////////////////////////////////// // File: genericheap.h // Description: Template heap class. // Author: Ray Smith, based on Dan Johnson's original code. // Created: Wed Mar 14 08:13:00 PDT 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "errcode.h" #include "genericvector.h" #ifndef TESSERACT_CCUTIL_GENERICHEAP_H_ #define TESSERACT_CCUTIL_GENERICHEAP_H_ namespace tesseract { // GenericHeap requires 1 template argument: // Pair will normally be either KDPairInc<Key, Data> or KDPairDec<Key, Data> // for some arbitrary Key and scalar, smart pointer, or non-ownership pointer // Data type, according to whether a MIN heap or a MAX heap is desired, // respectively. Using KDPtrPairInc<Key, Data> or KDPtrPairDec<Key, Data>, // GenericHeap can also handle simple Data pointers and own them. // If no additional data is required, Pair can also be a scalar, since // GenericHeap doesn't look inside it except for operator<. // // The heap is stored as a packed binary tree in an array hosted by a // GenericVector<Pair>, with the invariant that the children of each node are // both NOT Pair::operator< the parent node. KDPairInc defines Pair::operator< // to use Key::operator< to generate a MIN heap and KDPairDec defines // Pair::operator< to use Key::operator> to generate a MAX heap by reversing // all the comparisons. // See http://en.wikipedia.org/wiki/Heap_(data_structure) for more detail on // the basic heap implementation. // // Insertion and removal are both O(log n) and, unlike the STL heap, an // explicit Reshuffle function allows a node to be repositioned in time O(log n) // after changing its value. // // Accessing the element for revaluation is a more complex matter, since the // index and pointer can be changed arbitrarily by heap operations. // Revaluation can be done by making the Data type in the Pair derived from or // contain a DoublePtr as its first data element, making it possible to convert // the pointer to a Pair using KDPairInc::RecastDataPointer. template <typename Pair> class GenericHeap { public: GenericHeap() {} // The initial size is only a GenericVector::reserve. It is not enforced as // the size limit of the heap. Caller must implement their own enforcement. explicit GenericHeap(int initial_size) { heap_.reserve(initial_size); } // Simple accessors. bool empty() const { return heap_.empty(); } int size() const { return heap_.size(); } int size_reserved() const { return heap_.size_reserved(); } void clear() { // Clear truncates to 0 to keep the number reserved in tact. heap_.truncate(0); } // Provides access to the underlying vector. // Caution! any changes that modify the keys will invalidate the heap! GenericVector<Pair>* heap() { return &heap_; } // Provides read-only access to an element of the underlying vector. const Pair& get(int index) const { return heap_[index]; } // Add entry to the heap, keeping the smallest item at the top, by operator<. // Note that *entry is used as the source of operator=, but it is non-const // to allow for a smart pointer to be contained within. // Time = O(log n). void Push(Pair* entry) { int hole_index = heap_.size(); // Make a hole in the end of heap_ and sift it up to be the correct // location for the new *entry. To avoid needing a default constructor // for primitive types, and to allow for use of DoublePtr in the Pair // somewhere, we have to incur a double copy here. heap_.push_back(*entry); *entry = heap_.back(); hole_index = SiftUp(hole_index, *entry); heap_[hole_index] = *entry; } // Get the value of the top (smallest, defined by operator< ) element. const Pair& PeekTop() const { return heap_[0]; } // Removes the top element of the heap. If entry is not NULL, the element // is copied into *entry, otherwise it is discarded. // Returns false if the heap was already empty. // Time = O(log n). bool Pop(Pair* entry) { int new_size = heap_.size() - 1; if (new_size < 0) return false; // Already empty. if (entry != NULL) *entry = heap_[0]; if (new_size > 0) { // Sift the hole at the start of the heap_ downwards to match the last // element. Pair hole_pair = heap_[new_size]; heap_.truncate(new_size); int hole_index = SiftDown(0, hole_pair); heap_[hole_index] = hole_pair; } else { heap_.truncate(new_size); } return true; } // Removes the MAXIMUM element of the heap. (MIN from a MAX heap.) If entry is // not NULL, the element is copied into *entry, otherwise it is discarded. // Time = O(n). Returns false if the heap was already empty. bool PopWorst(Pair* entry) { int heap_size = heap_.size(); if (heap_size == 0) return false; // It cannot be empty! // Find the maximum element. Its index is guaranteed to be greater than // the index of the parent of the last element, since by the heap invariant // the parent must be less than or equal to the children. int worst_index = heap_size - 1; int end_parent = ParentNode(worst_index); for (int i = worst_index - 1; i > end_parent; --i) { if (heap_[worst_index] < heap_[i]) worst_index = i; } // Extract the worst element from the heap, leaving a hole at worst_index. if (entry != NULL) *entry = heap_[worst_index]; --heap_size; if (heap_size > 0) { // Sift the hole upwards to match the last element of the heap_ Pair hole_pair = heap_[heap_size]; int hole_index = SiftUp(worst_index, hole_pair); heap_[hole_index] = hole_pair; } heap_.truncate(heap_size); return true; } // The pointed-to Pair has changed its key value, so the location of pair // is reshuffled to maintain the heap invariant. // Must be a valid pointer to an element of the heap_! // Caution! Since GenericHeap is based on GenericVector, reallocs may occur // whenever the vector is extended and elements may get shuffled by any // Push or Pop operation. Therefore use this function only if Data in Pair is // of type DoublePtr, derived (first) from DoublePtr, or has a DoublePtr as // its first element. Reshuffles the heap to maintain the invariant. // Time = O(log n). void Reshuffle(Pair* pair) { int index = pair - &heap_[0]; Pair hole_pair = heap_[index]; index = SiftDown(index, hole_pair); index = SiftUp(index, hole_pair); heap_[index] = hole_pair; } private: // A hole in the heap exists at hole_index, and we want to fill it with the // given pair. SiftUp sifts the hole upward to the correct position and // returns the destination index without actually putting pair there. int SiftUp(int hole_index, const Pair& pair) { int parent; while (hole_index > 0 && pair < heap_[parent = ParentNode(hole_index)]) { heap_[hole_index] = heap_[parent]; hole_index = parent; } return hole_index; } // A hole in the heap exists at hole_index, and we want to fill it with the // given pair. SiftDown sifts the hole downward to the correct position and // returns the destination index without actually putting pair there. int SiftDown(int hole_index, const Pair& pair) { int heap_size = heap_.size(); int child; while ((child = LeftChild(hole_index)) < heap_size) { if (child + 1 < heap_size && heap_[child + 1] < heap_[child]) ++child; if (heap_[child] < pair) { heap_[hole_index] = heap_[child]; hole_index = child; } else { break; } } return hole_index; } // Functions to navigate the tree. Unlike the original implementation, we // store the root at index 0. int ParentNode(int index) const { return (index + 1) / 2 - 1; } int LeftChild(int index) const { return index * 2 + 1; } private: GenericVector<Pair> heap_; }; } // namespace tesseract #endif // TESSERACT_CCUTIL_GENERICHEAP_H_
C++
/////////////////////////////////////////////////////////////////////// // File: tessdatamanager.cpp // Description: Functions to handle loading/combining tesseract data files. // Author: Daria Antonova // Created: Wed Jun 03 11:26:43 PST 2009 // // (C) Copyright 2009, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #endif #include "tessdatamanager.h" #include <stdio.h> #include "helpers.h" #include "serialis.h" #include "strngs.h" #include "tprintf.h" #include "params.h" namespace tesseract { bool TessdataManager::Init(const char *data_file_name, int debug_level) { int i; debug_level_ = debug_level; data_file_name_ = data_file_name; data_file_ = fopen(data_file_name, "rb"); if (data_file_ == NULL) { tprintf("Error opening data file %s\n", data_file_name); tprintf("Please make sure the TESSDATA_PREFIX environment variable is set " "to the parent directory of your \"tessdata\" directory.\n"); return false; } fread(&actual_tessdata_num_entries_, sizeof(inT32), 1, data_file_); swap_ = (actual_tessdata_num_entries_ > kMaxNumTessdataEntries); if (swap_) { ReverseN(&actual_tessdata_num_entries_, sizeof(actual_tessdata_num_entries_)); } ASSERT_HOST(actual_tessdata_num_entries_ <= TESSDATA_NUM_ENTRIES); fread(offset_table_, sizeof(inT64), actual_tessdata_num_entries_, data_file_); if (swap_) { for (i = 0 ; i < actual_tessdata_num_entries_; ++i) { ReverseN(&offset_table_[i], sizeof(offset_table_[i])); } } if (debug_level_) { tprintf("TessdataManager loaded %d types of tesseract data files.\n", actual_tessdata_num_entries_); for (i = 0; i < actual_tessdata_num_entries_; ++i) { tprintf("Offset for type %d is %lld\n", i, offset_table_[i]); } } return true; } void TessdataManager::CopyFile(FILE *input_file, FILE *output_file, bool newline_end, inT64 num_bytes_to_copy) { if (num_bytes_to_copy == 0) return; int buffer_size = 1024; if (num_bytes_to_copy > 0 && buffer_size > num_bytes_to_copy) { buffer_size = num_bytes_to_copy; } inT64 num_bytes_copied = 0; char *chunk = new char[buffer_size]; int bytes_read; char last_char = 0x0; while ((bytes_read = fread(chunk, sizeof(char), buffer_size, input_file))) { fwrite(chunk, sizeof(char), bytes_read, output_file); last_char = chunk[bytes_read-1]; if (num_bytes_to_copy > 0) { num_bytes_copied += bytes_read; if (num_bytes_copied == num_bytes_to_copy) break; if (num_bytes_copied + buffer_size > num_bytes_to_copy) { buffer_size = num_bytes_to_copy - num_bytes_copied; } } } if (newline_end) ASSERT_HOST(last_char == '\n'); delete[] chunk; } bool TessdataManager::WriteMetadata(inT64 *offset_table, const char * language_data_path_prefix, FILE *output_file) { inT32 num_entries = TESSDATA_NUM_ENTRIES; bool result = true; if (fseek(output_file, 0, SEEK_SET) != 0 || fwrite(&num_entries, sizeof(inT32), 1, output_file) != 1 || fwrite(offset_table, sizeof(inT64), TESSDATA_NUM_ENTRIES, output_file) != TESSDATA_NUM_ENTRIES) { fclose(output_file); result = false; tprintf("WriteMetadata failed in TessdataManager!\n"); } else if (fclose(output_file)) { result = false; tprintf("WriteMetadata failed to close file!\n"); } else { tprintf("TessdataManager combined tesseract data files.\n"); for (int i = 0; i < TESSDATA_NUM_ENTRIES; ++i) { tprintf("Offset for type %2d (%s%-22s) is %lld\n", i, language_data_path_prefix, kTessdataFileSuffixes[i], offset_table[i]); } } return result; } bool TessdataManager::CombineDataFiles( const char *language_data_path_prefix, const char *output_filename) { int i; inT64 offset_table[TESSDATA_NUM_ENTRIES]; for (i = 0; i < TESSDATA_NUM_ENTRIES; ++i) offset_table[i] = -1; FILE *output_file = fopen(output_filename, "wb"); if (output_file == NULL) { tprintf("Error opening %s for writing\n", output_filename); return false; } // Leave some space for recording the offset_table. if (fseek(output_file, sizeof(inT32) + sizeof(inT64) * TESSDATA_NUM_ENTRIES, SEEK_SET)) { tprintf("Error seeking %s\n", output_filename); return false; } TessdataType type = TESSDATA_NUM_ENTRIES; bool text_file = false; FILE *file_ptr[TESSDATA_NUM_ENTRIES]; // Load individual tessdata components from files. for (i = 0; i < TESSDATA_NUM_ENTRIES; ++i) { ASSERT_HOST(TessdataTypeFromFileSuffix( kTessdataFileSuffixes[i], &type, &text_file)); STRING filename = language_data_path_prefix; filename += kTessdataFileSuffixes[i]; file_ptr[i] = fopen(filename.string(), "rb"); if (file_ptr[i] != NULL) { offset_table[type] = ftell(output_file); CopyFile(file_ptr[i], output_file, text_file, -1); fclose(file_ptr[i]); } } // Make sure that the required components are present. if (file_ptr[TESSDATA_UNICHARSET] == NULL) { tprintf("Error opening %sunicharset file\n", language_data_path_prefix); fclose(output_file); return false; } if (file_ptr[TESSDATA_INTTEMP] != NULL && (file_ptr[TESSDATA_PFFMTABLE] == NULL || file_ptr[TESSDATA_NORMPROTO] == NULL)) { tprintf("Error opening %spffmtable and/or %snormproto files" " while %sinttemp file was present\n", language_data_path_prefix, language_data_path_prefix, language_data_path_prefix); fclose(output_file); return false; } return WriteMetadata(offset_table, language_data_path_prefix, output_file); } bool TessdataManager::OverwriteComponents( const char *new_traineddata_filename, char **component_filenames, int num_new_components) { int i; inT64 offset_table[TESSDATA_NUM_ENTRIES]; TessdataType type = TESSDATA_NUM_ENTRIES; bool text_file = false; FILE *file_ptr[TESSDATA_NUM_ENTRIES]; for (i = 0; i < TESSDATA_NUM_ENTRIES; ++i) { offset_table[i] = -1; file_ptr[i] = NULL; } FILE *output_file = fopen(new_traineddata_filename, "wb"); if (output_file == NULL) { tprintf("Error opening %s for writing\n", new_traineddata_filename); return false; } // Leave some space for recording the offset_table. if (fseek(output_file, sizeof(inT32) + sizeof(inT64) * TESSDATA_NUM_ENTRIES, SEEK_SET)) { fclose(output_file); tprintf("Error seeking %s\n", new_traineddata_filename); return false; } // Open the files with the new components. for (i = 0; i < num_new_components; ++i) { if (TessdataTypeFromFileName(component_filenames[i], &type, &text_file)) file_ptr[type] = fopen(component_filenames[i], "rb"); } // Write updated data to the output traineddata file. for (i = 0; i < TESSDATA_NUM_ENTRIES; ++i) { if (file_ptr[i] != NULL) { // Get the data from the opened component file. offset_table[i] = ftell(output_file); CopyFile(file_ptr[i], output_file, kTessdataFileIsText[i], -1); fclose(file_ptr[i]); } else { // Get this data component from the loaded data file. if (SeekToStart(static_cast<TessdataType>(i))) { offset_table[i] = ftell(output_file); CopyFile(data_file_, output_file, kTessdataFileIsText[i], GetEndOffset(static_cast<TessdataType>(i)) - ftell(data_file_) + 1); } } } const char *language_data_path_prefix = strchr(new_traineddata_filename, '.'); return WriteMetadata(offset_table, language_data_path_prefix, output_file); } bool TessdataManager::TessdataTypeFromFileSuffix( const char *suffix, TessdataType *type, bool *text_file) { for (int i = 0; i < TESSDATA_NUM_ENTRIES; ++i) { if (strcmp(kTessdataFileSuffixes[i], suffix) == 0) { *type = static_cast<TessdataType>(i); *text_file = kTessdataFileIsText[i]; return true; } } tprintf("TessdataManager can't determine which tessdata" " component is represented by %s\n", suffix); return false; } bool TessdataManager::TessdataTypeFromFileName( const char *filename, TessdataType *type, bool *text_file) { // Get the file suffix (extension) const char *suffix = strrchr(filename, '.'); if (suffix == NULL || *(++suffix) == '\0') return false; return TessdataTypeFromFileSuffix(suffix, type, text_file); } bool TessdataManager::ExtractToFile(const char *filename) { TessdataType type = TESSDATA_NUM_ENTRIES; bool text_file = false; ASSERT_HOST(tesseract::TessdataManager::TessdataTypeFromFileName( filename, &type, &text_file)); if (!SeekToStart(type)) return false; FILE *output_file = fopen(filename, "wb"); if (output_file == NULL) { tprintf("Error opening %s\n", filename); exit(1); } inT64 begin_offset = ftell(GetDataFilePtr()); inT64 end_offset = GetEndOffset(type); tesseract::TessdataManager::CopyFile( GetDataFilePtr(), output_file, text_file, end_offset - begin_offset + 1); fclose(output_file); return true; } } // namespace tesseract
C++
/********************************************************************** * File: basedir.c (Formerly getpath.c) * Description: Find the directory location of the current executable using PATH. * Author: Ray Smith * Created: Mon Jul 09 09:06:39 BST 1990 * * (C) Copyright 1990, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "basedir.h" #include <stdlib.h> // Assuming that code_path is the name of some file in a desired directory, // returns the given code_path stripped back to the last slash, leaving // the last slash in place. If there is no slash, returns ./ assuming that // the input was the name of something in the current directory. // Useful for getting to the directory of argv[0], but does not search // any paths. TESS_API void truncate_path(const char *code_path, STRING* trunc_path) { int trunc_index = -1; if (code_path != NULL) { const char* last_slash = strrchr(code_path, '/'); if (last_slash != NULL && last_slash + 1 - code_path > trunc_index) trunc_index = last_slash + 1 - code_path; last_slash = strrchr(code_path, '\\'); if (last_slash != NULL && last_slash + 1 - code_path > trunc_index) trunc_index = last_slash + 1 - code_path; } *trunc_path = code_path; if (trunc_index >= 0) trunc_path->truncate_at(trunc_index); else *trunc_path = "./"; }
C++
/********************************************************************** * File: errcode.h (Formerly error.h) * Description: Header file for generic error handler class * Author: Ray Smith * Created: Tue May 1 16:23:36 BST 1990 * * (C) Copyright 1990, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef ERRCODE_H #define ERRCODE_H #include "host.h" /*Control parameters for error()*/ enum TessErrorLogCode { DBG = -1, /*log without alert */ TESSLOG = 0, /*alert user */ TESSEXIT = 1, /*exit after erro */ ABORT = 2 /*abort after error */ }; /* Explicit Error Abort codes */ #define NO_ABORT_CODE 0 #define LIST_ABORT 1 #define MEMORY_ABORT 2 #define FILE_ABORT 3 /* Location of code at error codes Reserve 0..2 (status codes 0..23 for UNLV)*/ #define LOC_UNUSED0 0 #define LOC_UNUSED1 1 #define LOC_UNUSED2 2 #define LOC_INIT 3 #define LOC_EDGE_PROG 4 #define LOC_TEXT_ORD_ROWS 5 #define LOC_TEXT_ORD_WORDS 6 #define LOC_PASS1 7 #define LOC_PASS2 8 /* Reserve up to 8..13 for adding subloc 0/3 plus subsubloc 0/1/2 */ #define LOC_FUZZY_SPACE 14 /* Reserve up to 14..20 for adding subloc 0/3 plus subsubloc 0/1/2 */ #define LOC_MM_ADAPT 21 #define LOC_DOC_BLK_REJ 22 #define LOC_WRITE_RESULTS 23 #define LOC_ADAPTIVE 24 /* DONT DEFINE ANY LOCATION > 31 !!! */ /* Sub locatation determines whether pass2 was in normal mode or fix xht mode*/ #define SUBLOC_NORM 0 #define SUBLOC_FIX_XHT 3 /* Sub Sub locatation determines whether match_word_pass2 was in Tess matcher, NN matcher or somewhere else */ #define SUBSUBLOC_OTHER 0 #define SUBSUBLOC_TESS 1 #define SUBSUBLOC_NN 2 class TESS_API ERRCODE { // error handler class const char *message; // error message public: void error( // error print function const char *caller, // function location TessErrorLogCode action, // action to take const char *format, ... // fprintf format ) const; ERRCODE(const char *string) { message = string; } // initialize with string }; const ERRCODE ASSERT_FAILED = "Assert failed"; #define ASSERT_HOST(x) if (!(x)) \ { \ ASSERT_FAILED.error(#x, ABORT, "in file %s, line %d", \ __FILE__, __LINE__); \ } #ifdef _MSC_VER #define ASSERT_HOST_MSG(x, msg, ...) if (!(x)) \ { \ tprintf(msg); \ ASSERT_FAILED.error(#x, ABORT, "in file %s, line %d", \ __FILE__, __LINE__); \ } #else #define ASSERT_HOST_MSG(x, msg...) if (!(x)) \ { \ tprintf(msg); \ ASSERT_FAILED.error(#x, ABORT, "in file %s, line %d", \ __FILE__, __LINE__); \ } #endif void signal_exit(int signal_code); void set_global_loc_code(int loc_code); void set_global_subloc_code(int loc_code); void set_global_subsubloc_code(int loc_code); #endif
C++
/////////////////////////////////////////////////////////////////////// // File: universalambigs.h // Description: Data for a universal ambigs file that is useful for // any language. // Author: Ray Smith // Created: Mon Mar 18 11:26:00 PDT 2013 // // (C) Copyright 2013, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// namespace tesseract { extern const char kUniversalAmbigsFile[]; extern const int ksizeofUniversalAmbigsFile; } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: unicharmap.cpp // Description: Unicode character/ligature to integer id class. // Author: Thomas Kielbus // Created: Wed Jun 28 17:05:01 PDT 2006 // // (C) Copyright 2006, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include <assert.h> #include "unichar.h" #include "host.h" #include "unicharmap.h" UNICHARMAP::UNICHARMAP() : nodes(0) { } UNICHARMAP::~UNICHARMAP() { if (nodes != 0) delete[] nodes; } // Search the given unichar representation in the tree. Each character in the // string is interpreted as an index in an array of nodes. UNICHAR_ID UNICHARMAP::unichar_to_id(const char* const unichar_repr) const { const char* current_char = unichar_repr; UNICHARMAP_NODE* current_nodes = nodes; assert(*unichar_repr != '\0'); do { if (*(current_char + 1) == '\0') return current_nodes[static_cast<unsigned char>(*current_char)].id; current_nodes = current_nodes[static_cast<unsigned char>(*current_char)].children; ++current_char; } while (true); } // Search the given unichar representation in the tree, using length characters // from it maximum. Each character in the string is interpreted as an index in // an array of nodes. UNICHAR_ID UNICHARMAP::unichar_to_id(const char* const unichar_repr, int length) const { const char* current_char = unichar_repr; UNICHARMAP_NODE* current_nodes = nodes; assert(*unichar_repr != '\0'); assert(length > 0 && length <= UNICHAR_LEN); do { if (length == 1 || *(current_char + 1) == '\0') return current_nodes[static_cast<unsigned char>(*current_char)].id; current_nodes = current_nodes[static_cast<unsigned char>(*current_char)].children; ++current_char; --length; } while (true); } // Search the given unichar representation in the tree, creating the possibly // missing nodes. Once the right place has been found, insert the given id and // update the inserted flag to keep track of the insert. Each character in the // string is interpreted as an index in an array of nodes. void UNICHARMAP::insert(const char* const unichar_repr, UNICHAR_ID id) { const char* current_char = unichar_repr; UNICHARMAP_NODE** current_nodes_pointer = &nodes; assert(*unichar_repr != '\0'); assert(id >= 0); do { if (*current_nodes_pointer == 0) *current_nodes_pointer = new UNICHARMAP_NODE[256]; if (*(current_char + 1) == '\0') { (*current_nodes_pointer) [static_cast<unsigned char>(*current_char)].id = id; return; } current_nodes_pointer = &((*current_nodes_pointer) [static_cast<unsigned char>(*current_char)].children); ++current_char; } while (true); } // Search the given unichar representation in the tree. Each character in the // string is interpreted as an index in an array of nodes. Stop once the tree // does not have anymore nodes or once we found the right unichar_repr. bool UNICHARMAP::contains(const char* const unichar_repr) const { if (unichar_repr == NULL || *unichar_repr == '\0') return false; const char* current_char = unichar_repr; UNICHARMAP_NODE* current_nodes = nodes; while (current_nodes != 0 && *(current_char + 1) != '\0') { current_nodes = current_nodes[static_cast<unsigned char>(*current_char)].children; ++current_char; } return current_nodes != 0 && *(current_char + 1) == '\0' && current_nodes[static_cast<unsigned char>(*current_char)].id >= 0; } // Search the given unichar representation in the tree, using length characters // from it maximum. Each character in the string is interpreted as an index in // an array of nodes. Stop once the tree does not have anymore nodes or once we // found the right unichar_repr. bool UNICHARMAP::contains(const char* const unichar_repr, int length) const { if (unichar_repr == NULL || *unichar_repr == '\0') return false; if (length <= 0 || length > UNICHAR_LEN) return false; const char* current_char = unichar_repr; UNICHARMAP_NODE* current_nodes = nodes; while (current_nodes != 0 && (length > 1 && *(current_char + 1) != '\0')) { current_nodes = current_nodes[static_cast<unsigned char>(*current_char)].children; --length; ++current_char; } return current_nodes != 0 && (length == 1 || *(current_char + 1) == '\0') && current_nodes[static_cast<unsigned char>(*current_char)].id >= 0; } // Return the minimum number of characters that must be used from this string // to obtain a match in the UNICHARMAP. int UNICHARMAP::minmatch(const char* const unichar_repr) const { const char* current_char = unichar_repr; UNICHARMAP_NODE* current_nodes = nodes; while (current_nodes != NULL && *current_char != '\0') { if (current_nodes[static_cast<unsigned char>(*current_char)].id >= 0) return current_char + 1 - unichar_repr; current_nodes = current_nodes[static_cast<unsigned char>(*current_char)].children; ++current_char; } return 0; } void UNICHARMAP::clear() { if (nodes != 0) { delete[] nodes; nodes = 0; } } UNICHARMAP::UNICHARMAP_NODE::UNICHARMAP_NODE() : children(0), id(-1) { } // Recursively delete the children UNICHARMAP::UNICHARMAP_NODE::~UNICHARMAP_NODE() { if (children != 0) { delete[] children; } }
C++
/********************************************************************** * File: clst.c (Formerly clist.c) * Description: CONS cell list handling code which is not in the include file. * Author: Phil Cheatle * Created: Mon Jan 28 08:33:13 GMT 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include <stdlib.h> #include "clst.h" /*********************************************************************** * MEMBER FUNCTIONS OF CLASS: CLIST * ================================ **********************************************************************/ /*********************************************************************** * CLIST::internal_deep_clear * * Used by the "deep_clear" member function of derived list * classes to destroy all the elements on the list. * The calling function passes a "zapper" function which can be called to * delete each data element of the list, regardless of its class. This * technique permits a generic clear function to destroy elements of * different derived types correctly, without requiring virtual functions and * the consequential memory overhead. **********************************************************************/ void CLIST::internal_deep_clear ( //destroy all links void (*zapper) (void *)) { //ptr to zapper functn CLIST_LINK *ptr; CLIST_LINK *next; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST::internal_deep_clear", ABORT, NULL); #endif if (!empty ()) { ptr = last->next; //set to first last->next = NULL; //break circle last = NULL; //set list empty while (ptr) { next = ptr->next; zapper (ptr->data); delete(ptr); ptr = next; } } } /*********************************************************************** * CLIST::shallow_clear * * Used by the destructor and the "shallow_clear" member function of derived * list classes to destroy the list. * The data elements are NOT destroyed. * **********************************************************************/ void CLIST::shallow_clear() { //destroy all links CLIST_LINK *ptr; CLIST_LINK *next; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST::shallow_clear", ABORT, NULL); #endif if (!empty ()) { ptr = last->next; //set to first last->next = NULL; //break circle last = NULL; //set list empty while (ptr) { next = ptr->next; delete(ptr); ptr = next; } } } /*********************************************************************** * CLIST::assign_to_sublist * * The list is set to a sublist of another list. "This" list must be empty * before this function is invoked. The two iterators passed must refer to * the same list, different from "this" one. The sublist removed is the * inclusive list from start_it's current position to end_it's current * position. If this range passes over the end of the source list then the * source list has its end set to the previous element of start_it. The * extracted sublist is unaffected by the end point of the source list, its * end point is always the end_it position. **********************************************************************/ void CLIST::assign_to_sublist( //to this list CLIST_ITERATOR *start_it, //from list start CLIST_ITERATOR *end_it) { //from list end const ERRCODE LIST_NOT_EMPTY = "Destination list must be empty before extracting a sublist"; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST::assign_to_sublist", ABORT, NULL); #endif if (!empty ()) LIST_NOT_EMPTY.error ("CLIST.assign_to_sublist", ABORT, NULL); last = start_it->extract_sublist (end_it); } /*********************************************************************** * CLIST::length * * Return count of elements on list **********************************************************************/ inT32 CLIST::length() const { //count elements CLIST_ITERATOR it(const_cast<CLIST*>(this)); inT32 count = 0; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST::length", ABORT, NULL); #endif for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) count++; return count; } /*********************************************************************** * CLIST::sort * * Sort elements on list **********************************************************************/ void CLIST::sort ( //sort elements int comparator ( //comparison routine const void *, const void *)) { CLIST_ITERATOR it(this); inT32 count; void **base; //ptr array to sort void **current; inT32 i; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST::sort", ABORT, NULL); #endif /* Allocate an array of pointers, one per list element */ count = length (); base = (void **) malloc (count * sizeof (void *)); /* Extract all elements, putting the pointers in the array */ current = base; for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) { *current = it.extract (); current++; } /* Sort the pointer array */ qsort ((char *) base, count, sizeof (*base), comparator); /* Rebuild the list from the sorted pointers */ current = base; for (i = 0; i < count; i++) { it.add_to_end (*current); current++; } free(base); } // Assuming list has been sorted already, insert new_data to // keep the list sorted according to the same comparison function. // Comparision function is the same as used by sort, i.e. uses double // indirection. Time is O(1) to add to beginning or end. // Time is linear to add pre-sorted items to an empty list. // If unique, then don't add duplicate entries. // Returns true if the element was added to the list. bool CLIST::add_sorted(int comparator(const void*, const void*), bool unique, void* new_data) { // Check for adding at the end. if (last == NULL || comparator(&last->data, &new_data) < 0) { CLIST_LINK* new_element = new CLIST_LINK; new_element->data = new_data; if (last == NULL) { new_element->next = new_element; } else { new_element->next = last->next; last->next = new_element; } last = new_element; return true; } else if (!unique || last->data != new_data) { // Need to use an iterator. CLIST_ITERATOR it(this); for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) { void* data = it.data(); if (data == new_data && unique) return false; if (comparator(&data, &new_data) > 0) break; } if (it.cycled_list()) it.add_to_end(new_data); else it.add_before_then_move(new_data); return true; } return false; } // Assuming that the minuend and subtrahend are already sorted with // the same comparison function, shallow clears this and then copies // the set difference minuend - subtrahend to this, being the elements // of minuend that do not compare equal to anything in subtrahend. // If unique is true, any duplicates in minuend are also eliminated. void CLIST::set_subtract(int comparator(const void*, const void*), bool unique, CLIST* minuend, CLIST* subtrahend) { shallow_clear(); CLIST_ITERATOR m_it(minuend); CLIST_ITERATOR s_it(subtrahend); // Since both lists are sorted, finding the subtras that are not // minus is a case of a parallel iteration. for (m_it.mark_cycle_pt(); !m_it.cycled_list(); m_it.forward()) { void* minu = m_it.data(); void* subtra = NULL; if (!s_it.empty()) { subtra = s_it.data(); while (!s_it.at_last() && comparator(&subtra, &minu) < 0) { s_it.forward(); subtra = s_it.data(); } } if (subtra == NULL || comparator(&subtra, &minu) != 0) add_sorted(comparator, unique, minu); } } /*********************************************************************** * MEMBER FUNCTIONS OF CLASS: CLIST_ITERATOR * ========================================= **********************************************************************/ /*********************************************************************** * CLIST_ITERATOR::forward * * Move the iterator to the next element of the list. * REMEMBER: ALL LISTS ARE CIRCULAR. **********************************************************************/ void *CLIST_ITERATOR::forward() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::forward", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::forward", ABORT, NULL); #endif if (list->empty ()) return NULL; if (current) { //not removed so //set previous prev = current; started_cycling = TRUE; // In case next is deleted by another iterator, get next from current. current = current->next; } else { if (ex_current_was_cycle_pt) cycle_pt = next; current = next; } next = current->next; #ifndef NDEBUG if (!current) NULL_DATA.error ("CLIST_ITERATOR::forward", ABORT, NULL); if (!next) NULL_NEXT.error ("CLIST_ITERATOR::forward", ABORT, "This is: %p Current is: %p", this, current); #endif return current->data; } /*********************************************************************** * CLIST_ITERATOR::data_relative * * Return the data pointer to the element "offset" elements from current. * "offset" must not be less than -1. * (This function can't be INLINEd because it contains a loop) **********************************************************************/ void *CLIST_ITERATOR::data_relative( //get data + or - ... inT8 offset) { //offset from current CLIST_LINK *ptr; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::data_relative", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::data_relative", ABORT, NULL); if (list->empty ()) EMPTY_LIST.error ("CLIST_ITERATOR::data_relative", ABORT, NULL); if (offset < -1) BAD_PARAMETER.error ("CLIST_ITERATOR::data_relative", ABORT, "offset < -l"); #endif if (offset == -1) ptr = prev; else for (ptr = current ? current : prev; offset-- > 0; ptr = ptr->next); #ifndef NDEBUG if (!ptr) NULL_DATA.error ("CLIST_ITERATOR::data_relative", ABORT, NULL); #endif return ptr->data; } /*********************************************************************** * CLIST_ITERATOR::move_to_last() * * Move current so that it is set to the end of the list. * Return data just in case anyone wants it. * (This function can't be INLINEd because it contains a loop) **********************************************************************/ void *CLIST_ITERATOR::move_to_last() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::move_to_last", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::move_to_last", ABORT, NULL); #endif while (current != list->last) forward(); if (current == NULL) return NULL; else return current->data; } /*********************************************************************** * CLIST_ITERATOR::exchange() * * Given another iterator, whose current element is a different element on * the same list list OR an element of another list, exchange the two current * elements. On return, each iterator points to the element which was the * other iterators current on entry. * (This function hasn't been in-lined because its a bit big!) **********************************************************************/ void CLIST_ITERATOR::exchange( //positions of 2 links CLIST_ITERATOR *other_it) { //other iterator const ERRCODE DONT_EXCHANGE_DELETED = "Can't exchange deleted elements of lists"; CLIST_LINK *old_current; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::exchange", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::exchange", ABORT, NULL); if (!other_it) BAD_PARAMETER.error ("CLIST_ITERATOR::exchange", ABORT, "other_it NULL"); if (!(other_it->list)) NO_LIST.error ("CLIST_ITERATOR::exchange", ABORT, "other_it"); #endif /* Do nothing if either list is empty or if both iterators reference the same link */ if ((list->empty ()) || (other_it->list->empty ()) || (current == other_it->current)) return; /* Error if either current element is deleted */ if (!current || !other_it->current) DONT_EXCHANGE_DELETED.error ("CLIST_ITERATOR.exchange", ABORT, NULL); /* Now handle the 4 cases: doubleton list; non-doubleton adjacent elements (other before this); non-doubleton adjacent elements (this before other); non-adjacent elements. */ //adjacent links if ((next == other_it->current) || (other_it->next == current)) { //doubleton list if ((next == other_it->current) && (other_it->next == current)) { prev = next = current; other_it->prev = other_it->next = other_it->current; } else { //non-doubleton with //adjacent links //other before this if (other_it->next == current) { other_it->prev->next = current; other_it->current->next = next; current->next = other_it->current; other_it->next = other_it->current; prev = current; } else { //this before other prev->next = other_it->current; current->next = other_it->next; other_it->current->next = current; next = current; other_it->prev = other_it->current; } } } else { //no overlap prev->next = other_it->current; current->next = other_it->next; other_it->prev->next = current; other_it->current->next = next; } /* update end of list pointer when necessary (remember that the 2 iterators may iterate over different lists!) */ if (list->last == current) list->last = other_it->current; if (other_it->list->last == other_it->current) other_it->list->last = current; if (current == cycle_pt) cycle_pt = other_it->cycle_pt; if (other_it->current == other_it->cycle_pt) other_it->cycle_pt = cycle_pt; /* The actual exchange - in all cases*/ old_current = current; current = other_it->current; other_it->current = old_current; } /*********************************************************************** * CLIST_ITERATOR::extract_sublist() * * This is a private member, used only by CLIST::assign_to_sublist. * Given another iterator for the same list, extract the links from THIS to * OTHER inclusive, link them into a new circular list, and return a * pointer to the last element. * (Can't inline this function because it contains a loop) **********************************************************************/ CLIST_LINK *CLIST_ITERATOR::extract_sublist( //from this current CLIST_ITERATOR *other_it) { //to other current CLIST_ITERATOR temp_it = *this; CLIST_LINK *end_of_new_list; const ERRCODE BAD_SUBLIST = "Can't find sublist end point in original list"; #ifndef NDEBUG const ERRCODE BAD_EXTRACTION_PTS = "Can't extract sublist from points on different lists"; const ERRCODE DONT_EXTRACT_DELETED = "Can't extract a sublist marked by deleted points"; if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::extract_sublist", ABORT, NULL); if (!other_it) BAD_PARAMETER.error ("CLIST_ITERATOR::extract_sublist", ABORT, "other_it NULL"); if (!list) NO_LIST.error ("CLIST_ITERATOR::extract_sublist", ABORT, NULL); if (list != other_it->list) BAD_EXTRACTION_PTS.error ("CLIST_ITERATOR.extract_sublist", ABORT, NULL); if (list->empty ()) EMPTY_LIST.error ("CLIST_ITERATOR::extract_sublist", ABORT, NULL); if (!current || !other_it->current) DONT_EXTRACT_DELETED.error ("CLIST_ITERATOR.extract_sublist", ABORT, NULL); #endif ex_current_was_last = other_it->ex_current_was_last = FALSE; ex_current_was_cycle_pt = FALSE; other_it->ex_current_was_cycle_pt = FALSE; temp_it.mark_cycle_pt (); do { //walk sublist if (temp_it.cycled_list ()) //cant find end pt BAD_SUBLIST.error ("CLIST_ITERATOR.extract_sublist", ABORT, NULL); if (temp_it.at_last ()) { list->last = prev; ex_current_was_last = other_it->ex_current_was_last = TRUE; } if (temp_it.current == cycle_pt) ex_current_was_cycle_pt = TRUE; if (temp_it.current == other_it->cycle_pt) other_it->ex_current_was_cycle_pt = TRUE; temp_it.forward (); } while (temp_it.prev != other_it->current); //circularise sublist other_it->current->next = current; end_of_new_list = other_it->current; //sublist = whole list if (prev == other_it->current) { list->last = NULL; prev = current = next = NULL; other_it->prev = other_it->current = other_it->next = NULL; } else { prev->next = other_it->next; current = other_it->current = NULL; next = other_it->next; other_it->prev = prev; } return end_of_new_list; }
C++
// Copyright 2006 Google Inc. // All Rights Reserved. // Author: renn // // The fscanf, vfscanf and creat functions are implemented so that their // functionality is mostly like their stdio counterparts. However, currently // these functions do not use any buffering, making them rather slow. // File streams are thus processed one character at a time. // Although the implementations of the scanf functions do lack a few minor // features, they should be sufficient for their use in tesseract. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include <ctype.h> #include <math.h> #include <stdarg.h> #include <stddef.h> #include <string.h> #include <limits.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include "scanutils.h" #include "tprintf.h" // workaround for "'off_t' was not declared in this scope" with -std=c++11 #if !defined(off_t) && !defined(__APPLE__) && !defined(__CYGWIN__) typedef long off_t; #endif // off_t enum Flags { FL_SPLAT = 0x01, // Drop the value, do not assign FL_INV = 0x02, // Character-set with inverse FL_WIDTH = 0x04, // Field width specified FL_MINUS = 0x08, // Negative number }; enum Ranks { RANK_CHAR = -2, RANK_SHORT = -1, RANK_INT = 0, RANK_LONG = 1, RANK_LONGLONG = 2, RANK_PTR = INT_MAX // Special value used for pointers }; const enum Ranks kMinRank = RANK_CHAR; const enum Ranks kMaxRank = RANK_LONGLONG; const enum Ranks kIntMaxRank = RANK_LONGLONG; const enum Ranks kSizeTRank = RANK_LONG; const enum Ranks kPtrDiffRank = RANK_LONG; enum Bail { BAIL_NONE = 0, // No error condition BAIL_EOF, // Hit EOF BAIL_ERR // Conversion mismatch }; // Helper functions ------------------------------------------------------------ inline size_t LongBit() { return CHAR_BIT * sizeof(long); } static inline int SkipSpace(FILE *s) { int p; while (isspace(p = fgetc(s))); ungetc(p, s); // Make sure next char is available for reading return p; } static inline void SetBit(unsigned long *bitmap, unsigned int bit) { bitmap[bit/LongBit()] |= 1UL << (bit%LongBit()); } static inline int TestBit(unsigned long *bitmap, unsigned int bit) { return static_cast<int>(bitmap[bit/LongBit()] >> (bit%LongBit())) & 1; } static inline int DigitValue(int ch, int base) { if (ch >= '0' && ch <= '9') { if (base >= 10 || ch <= '7') return ch-'0'; } else if (ch >= 'A' && ch <= 'Z' && base == 16) { return ch-'A'+10; } else if (ch >= 'a' && ch <= 'z' && base == 16) { return ch-'a'+10; } return -1; } // IO (re-)implementations ----------------------------------------------------- uintmax_t streamtoumax(FILE* s, int base) { int minus = 0; uintmax_t v = 0; int d, c = 0; for (c = fgetc(s); isspace(static_cast<unsigned char>(c)) && (c != EOF); c = fgetc(s)) {} // Single optional + or - if (c == '-' || c == '+') { minus = (c == '-'); c = fgetc(s); } // Assign correct base if (base == 0) { if (c == '0') { c = fgetc(s); if (c == 'x' || c == 'X') { base = 16; c = fgetc(s); } else { base = 8; } } } else if (base == 16) { if (c == '0') { c = fgetc(s); if (c == 'x' || c == 'X') c = fgetc(s); } } // Actual number parsing for (; (c != EOF) && (d = DigitValue(c, base)) >= 0; c = fgetc(s)) v = v*base + d; ungetc(c, s); return minus ? -v : v; } double streamtofloat(FILE* s) { int minus = 0; int v = 0; int d, c = 0; int k = 1; int w = 0; for (c = fgetc(s); isspace(static_cast<unsigned char>(c)) && (c != EOF); c = fgetc(s)); // Single optional + or - if (c == '-' || c == '+') { minus = (c == '-'); c = fgetc(s); } // Actual number parsing for (; c != EOF && (d = DigitValue(c, 10)) >= 0; c = fgetc(s)) v = v*10 + d; if (c == '.') { for (c = fgetc(s); c != EOF && (d = DigitValue(c, 10)) >= 0; c = fgetc(s)) { w = w*10 + d; k *= 10; } } double f = static_cast<double>(v) + static_cast<double>(w) / static_cast<double>(k); if (c == 'e' || c == 'E') { c = fgetc(s); int expsign = 1; if (c == '-' || c == '+') { expsign = (c == '-') ? -1 : 1; c = fgetc(s); } int exponent = 0; for (; (c != EOF) && (d = DigitValue(c, 10)) >= 0; c = fgetc(s)) { exponent = exponent * 10 + d; } exponent *= expsign; f *= pow(10.0, static_cast<double>(exponent)); } ungetc(c, s); return minus ? -f : f; } double strtofloat(const char* s) { int minus = 0; int v = 0; int d; int k = 1; int w = 0; while(*s && isspace(static_cast<unsigned char>(*s))) s++; // Single optional + or - if (*s == '-' || *s == '+') { minus = (*s == '-'); s++; } // Actual number parsing for (; *s && (d = DigitValue(*s, 10)) >= 0; s++) v = v*10 + d; if (*s == '.') { for (++s; *s && (d = DigitValue(*s, 10)) >= 0; s++) { w = w*10 + d; k *= 10; } } if (*s == 'e' || *s == 'E') tprintf("WARNING: Scientific Notation not supported!"); double f = static_cast<double>(v) + static_cast<double>(w) / static_cast<double>(k); return minus ? -f : f; } static int tvfscanf(FILE* stream, const char *format, va_list ap); int tfscanf(FILE* stream, const char *format, ...) { va_list ap; int rv; va_start(ap, format); rv = tvfscanf(stream, format, ap); va_end(ap); return rv; } #ifdef EMBEDDED int fscanf(FILE* stream, const char *format, ...) { va_list ap; int rv; va_start(ap, format); rv = tvfscanf(stream, format, ap); va_end(ap); return rv; } int vfscanf(FILE* stream, const char *format, ...) { va_list ap; int rv; va_start(ap, format); rv = tvfscanf(stream, format, ap); va_end(ap); return rv; } #endif static int tvfscanf(FILE* stream, const char *format, va_list ap) { const char *p = format; char ch; int q = 0; uintmax_t val = 0; int rank = RANK_INT; // Default rank unsigned int width = UINT_MAX; int base; int flags = 0; enum { ST_NORMAL, // Ground state ST_FLAGS, // Special flags ST_WIDTH, // Field width ST_MODIFIERS, // Length or conversion modifiers ST_MATCH_INIT, // Initial state of %[ sequence ST_MATCH, // Main state of %[ sequence ST_MATCH_RANGE, // After - in a %[ sequence } state = ST_NORMAL; char *sarg = NULL; // %s %c or %[ string argument enum Bail bail = BAIL_NONE; int sign; int converted = 0; // Successful conversions unsigned long matchmap[((1 << CHAR_BIT)+(CHAR_BIT * sizeof(long) - 1)) / (CHAR_BIT * sizeof(long))]; int matchinv = 0; // Is match map inverted? unsigned char range_start = 0; off_t start_off = ftell(stream); // Skip leading spaces SkipSpace(stream); while ((ch = *p++) && !bail) { switch (state) { case ST_NORMAL: if (ch == '%') { state = ST_FLAGS; flags = 0; rank = RANK_INT; width = UINT_MAX; } else if (isspace(static_cast<unsigned char>(ch))) { SkipSpace(stream); } else { if (fgetc(stream) != ch) bail = BAIL_ERR; // Match failure } break; case ST_FLAGS: if (ch == '*') { flags |= FL_SPLAT; } else if ('0' <= ch && ch <= '9') { width = (ch-'0'); state = ST_WIDTH; flags |= FL_WIDTH; } else { state = ST_MODIFIERS; p--; // Process this character again } break; case ST_WIDTH: if (ch >= '0' && ch <= '9') { width = width*10+(ch-'0'); } else { state = ST_MODIFIERS; p--; // Process this character again } break; case ST_MODIFIERS: switch (ch) { // Length modifiers - nonterminal sequences case 'h': rank--; // Shorter rank break; case 'l': rank++; // Longer rank break; case 'j': rank = kIntMaxRank; break; case 'z': rank = kSizeTRank; break; case 't': rank = kPtrDiffRank; break; case 'L': case 'q': rank = RANK_LONGLONG; // long double/long long break; default: // Output modifiers - terminal sequences state = ST_NORMAL; // Next state will be normal if (rank < kMinRank) // Canonicalize rank rank = kMinRank; else if (rank > kMaxRank) rank = kMaxRank; switch (ch) { case 'P': // Upper case pointer case 'p': // Pointer rank = RANK_PTR; base = 0; sign = 0; goto scan_int; case 'i': // Base-independent integer base = 0; sign = 1; goto scan_int; case 'd': // Decimal integer base = 10; sign = 1; goto scan_int; case 'o': // Octal integer base = 8; sign = 0; goto scan_int; case 'u': // Unsigned decimal integer base = 10; sign = 0; goto scan_int; case 'x': // Hexadecimal integer case 'X': base = 16; sign = 0; goto scan_int; case 'n': // Number of characters consumed val = ftell(stream) - start_off; goto set_integer; scan_int: q = SkipSpace(stream); if ( q <= 0 ) { bail = BAIL_EOF; break; } val = streamtoumax(stream, base); // fall through set_integer: if (!(flags & FL_SPLAT)) { converted++; switch(rank) { case RANK_CHAR: *va_arg(ap, unsigned char *) = static_cast<unsigned char>(val); break; case RANK_SHORT: *va_arg(ap, unsigned short *) = static_cast<unsigned short>(val); break; case RANK_INT: *va_arg(ap, unsigned int *) = static_cast<unsigned int>(val); break; case RANK_LONG: *va_arg(ap, unsigned long *) = static_cast<unsigned long>(val); break; case RANK_LONGLONG: *va_arg(ap, unsigned long long *) = static_cast<unsigned long long>(val); break; case RANK_PTR: *va_arg(ap, void **) = reinterpret_cast<void *>(static_cast<uintptr_t>(val)); break; } } break; case 'f': // Preliminary float value parsing case 'g': case 'G': case 'e': case 'E': q = SkipSpace(stream); if (q <= 0) { bail = BAIL_EOF; break; } { double fval = streamtofloat(stream); if (!(flags & FL_SPLAT)) { if (rank == RANK_INT) *va_arg(ap, float *) = static_cast<float>(fval); else if (rank == RANK_LONG) *va_arg(ap, double *) = static_cast<double>(fval); converted++; } } break; case 'c': // Character width = (flags & FL_WIDTH) ? width : 1; // Default width == 1 sarg = va_arg(ap, char *); while (width--) { if ((q = fgetc(stream)) <= 0) { bail = BAIL_EOF; break; } if (!(flags & FL_SPLAT)) { *sarg++ = q; converted++; } } break; case 's': // String { char *sp; sp = sarg = va_arg(ap, char *); while (width--) { q = fgetc(stream); if (isspace(static_cast<unsigned char>(q)) || q <= 0) { ungetc(q, stream); break; } if (!(flags & FL_SPLAT)) *sp = q; sp++; } if (sarg == sp) { bail = BAIL_EOF; } else if (!(flags & FL_SPLAT)) { *sp = '\0'; // Terminate output converted++; } else { } } break; case '[': // Character range sarg = va_arg(ap, char *); state = ST_MATCH_INIT; matchinv = 0; memset(matchmap, 0, sizeof matchmap); break; case '%': // %% sequence if (fgetc(stream) != '%' ) bail = BAIL_ERR; break; default: // Anything else bail = BAIL_ERR; // Unknown sequence break; } } break; case ST_MATCH_INIT: // Initial state for %[ match if (ch == '^' && !(flags & FL_INV)) { matchinv = 1; } else { SetBit(matchmap, static_cast<unsigned char>(ch)); state = ST_MATCH; } break; case ST_MATCH: // Main state for %[ match if (ch == ']') { goto match_run; } else if (ch == '-') { range_start = static_cast<unsigned char>(ch); state = ST_MATCH_RANGE; } else { SetBit(matchmap, static_cast<unsigned char>(ch)); } break; case ST_MATCH_RANGE: // %[ match after - if (ch == ']') { SetBit(matchmap, static_cast<unsigned char>('-')); goto match_run; } else { int i; for (i = range_start ; i < (static_cast<unsigned char>(ch)) ; i++) SetBit(matchmap, i); state = ST_MATCH; } break; match_run: // Match expression finished char* oarg = sarg; while (width) { q = fgetc(stream); unsigned char qc = static_cast<unsigned char>(q); if (q <= 0 || !(TestBit(matchmap, qc)^matchinv)) { ungetc(q, stream); break; } if (!(flags & FL_SPLAT)) *sarg = q; sarg++; } if (oarg == sarg) { bail = (q <= 0) ? BAIL_EOF : BAIL_ERR; } else if (!(flags & FL_SPLAT)) { *sarg = '\0'; converted++; } break; } } if (bail == BAIL_EOF && !converted) converted = -1; // Return EOF (-1) return converted; } #ifdef EMBEDDED int creat(const char *pathname, mode_t mode) { return open(pathname, O_CREAT | O_TRUNC | O_WRONLY, mode); } #endif // EMBEDDED
C++
/////////////////////////////////////////////////////////////////////// // File: universalambigs.cpp // Description: Data for a universal ambigs file that is useful for // any language. // Author: Ray Smith // Created: Mon Mar 18 11:26:00 PDT 2013 // // (C) Copyright 2013, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// namespace tesseract { extern const char kUniversalAmbigsFile[] = { '\166', '\062', '\012', '\047', '\047', '\040', '\042', '\040', '\061', '\012', '\140', '\047', '\040', '\042', '\040', '\061', '\012', '\047', '\140', '\040', '\042', '\040', '\061', '\012', '\342', '\200', '\230', '\047', '\040', '\042', '\040', '\061', '\012', '\047', '\342', '\200', '\230', '\040', '\042', '\040', '\061', '\012', '\342', '\200', '\231', '\047', '\040', '\042', '\040', '\061', '\012', '\047', '\342', '\200', '\231', '\040', '\042', '\040', '\061', '\012', '\140', '\140', '\040', '\042', '\040', '\061', '\012', '\140', '\342', '\200', '\230', '\040', '\042', '\040', '\061', '\012', '\342', '\200', '\230', '\140', '\040', '\042', '\040', '\061', '\012', '\140', '\342', '\200', '\231', '\040', '\042', '\040', '\061', '\012', '\342', '\200', '\231', '\140', '\040', '\042', '\040', '\061', '\012', '\342', '\200', '\230', '\342', '\200', '\230', '\040', '\342', '\200', '\234', '\040', '\061', '\012', '\342', '\200', '\230', '\342', '\200', '\231', '\040', '\042', '\040', '\061', '\012', '\342', '\200', '\231', '\342', '\200', '\230', '\040', '\042', '\040', '\061', '\012', '\342', '\200', '\231', '\342', '\200', '\231', '\040', '\342', '\200', '\235', '\040', '\061', '\012', '\054', '\054', '\040', '\342', '\200', '\236', '\040', '\061', '\012', '\155', '\040', '\162', '\156', '\040', '\060', '\012', '\162', '\156', '\040', '\155', '\040', '\060', '\012', '\155', '\040', '\151', '\156', '\040', '\060', '\012', '\151', '\156', '\040', '\155', '\040', '\060', '\012', '\144', '\040', '\143', '\154', '\040', '\060', '\012', '\143', '\154', '\040', '\144', '\040', '\060', '\012', '\156', '\156', '\040', '\162', '\155', '\040', '\060', '\012', '\162', '\155', '\040', '\156', '\156', '\040', '\060', '\012', '\156', '\040', '\162', '\151', '\040', '\060', '\012', '\162', '\151', '\040', '\156', '\040', '\060', '\012', '\154', '\151', '\040', '\150', '\040', '\060', '\012', '\154', '\162', '\040', '\150', '\040', '\060', '\012', '\151', '\151', '\040', '\165', '\040', '\060', '\012', '\151', '\151', '\040', '\156', '\040', '\060', '\012', '\156', '\151', '\040', '\155', '\040', '\060', '\012', '\151', '\151', '\151', '\040', '\155', '\040', '\060', '\012', '\154', '\154', '\040', '\110', '\040', '\060', '\012', '\111', '\055', '\111', '\040', '\110', '\040', '\060', '\012', '\166', '\166', '\040', '\167', '\040', '\060', '\012', '\126', '\126', '\040', '\127', '\040', '\060', '\012', '\164', '\040', '\146', '\040', '\060', '\012', '\146', '\040', '\164', '\040', '\060', '\012', '\141', '\040', '\157', '\040', '\060', '\012', '\157', '\040', '\141', '\040', '\060', '\012', '\145', '\040', '\143', '\040', '\060', '\012', '\143', '\040', '\145', '\040', '\060', '\012', '\162', '\162', '\040', '\156', '\040', '\060', '\012', '\105', '\040', '\146', '\151', '\040', '\060', '\012', '\154', '\074', '\040', '\153', '\040', '\060', '\012', '\154', '\144', '\040', '\153', '\151', '\040', '\060', '\012', '\154', '\170', '\040', '\150', '\040', '\060', '\012', '\170', '\156', '\040', '\155', '\040', '\060', '\012', '\165', '\170', '\040', '\151', '\156', '\040', '\060', '\012', '\162', '\040', '\164', '\040', '\060', '\012', '\144', '\040', '\164', '\154', '\040', '\060', '\012', '\144', '\151', '\040', '\164', '\150', '\040', '\060', '\012', '\165', '\162', '\040', '\151', '\156', '\040', '\060', '\012', '\165', '\156', '\040', '\151', '\155', '\040', '\060', '\012', '\165', '\040', '\141', '\040', '\060', '\012', '\157', '\040', '\303', '\263', '\040', '\060', '\012', '\303', '\263', '\040', '\157', '\040', '\060', '\012', '\151', '\040', '\303', '\255', '\040', '\060', '\012', '\303', '\255', '\040', '\151', '\040', '\060', '\012', '\141', '\040', '\303', '\241', '\040', '\060', '\012', '\303', '\241', '\040', '\141', '\040', '\060', '\012', '\145', '\040', '\303', '\251', '\040', '\060', '\012', '\303', '\251', '\040', '\145', '\040', '\060', '\012', '\165', '\040', '\303', '\272', '\040', '\060', '\012', '\303', '\272', '\040', '\165', '\040', '\060', '\012', '\156', '\040', '\303', '\261', '\040', '\060', '\012', '\303', '\261', '\040', '\156', '\040', '\060', '\012', '\060', '\040', '\157', '\040', '\060', '\012', '\144', '\040', '\164', '\162', '\040', '\060', '\012', '\156', '\040', '\164', '\162', '\040', '\060', '\012', '\303', '\261', '\040', '\146', '\151', '\040', '\060', '\012', '\165', '\040', '\164', '\151', '\040', '\060', '\012', '\303', '\261', '\040', '\164', '\151', '\040', '\060', '\012', '\144', '\040', '\164', '\151', '\040', '\060', '\012', '\144', '\040', '\164', '\303', '\255', '\040', '\060', '\012', '\144', '\040', '\162', '\303', '\255', '\040', '\060', '\012', '\141', '\040', '\303', '\240', '\040', '\060', '\012', '\145', '\040', '\303', '\250', '\040', '\060', '\012', '\156', '\040', '\151', '\152', '\040', '\060', '\012', '\147', '\040', '\151', '\152', '\040', '\060', '\012', '\157', '\040', '\303', '\262', '\040', '\060', '\012', '\105', '\040', '\303', '\211', '\040', '\060', '\012', '\105', '\040', '\303', '\210', '\040', '\060', '\012', '\165', '\040', '\303', '\274', '\040', '\060', '\012', '\170', '\156', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\131', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\164', '\105', '\040', '\156', '\164', '\040', '\061', '\012', '\124', '\154', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\170', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\152', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\160', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\162', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\141', '\161', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\166', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\142', '\114', '\040', '\142', '\145', '\040', '\061', '\012', '\116', '\166', '\153', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\112', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\170', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\165', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\172', '\164', '\040', '\164', '\141', '\040', '\061', '\012', '\161', '\113', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\143', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\130', '\160', '\040', '\160', '\157', '\040', '\061', '\012', '\126', '\161', '\151', '\040', '\164', '\151', '\040', '\061', '\012', '\125', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\112', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\153', '\144', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\160', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\102', '\166', '\040', '\164', '\151', '\040', '\061', '\012', '\172', '\122', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\124', '\155', '\040', '\155', '\151', '\040', '\061', '\012', '\155', '\113', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\164', '\160', '\040', '\164', '\151', '\040', '\061', '\012', '\155', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\104', '\161', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\170', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\102', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\166', '\143', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\103', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\101', '\157', '\040', '\166', '\157', '\040', '\061', '\012', '\161', '\165', '\102', '\040', '\164', '\165', '\040', '\061', '\012', '\142', '\164', '\126', '\040', '\164', '\151', '\040', '\061', '\012', '\114', '\155', '\143', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\126', '\167', '\040', '\164', '\151', '\040', '\061', '\012', '\131', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\110', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\120', '\152', '\040', '\164', '\165', '\040', '\061', '\012', '\146', '\124', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\122', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\144', '\101', '\040', '\144', '\151', '\040', '\061', '\012', '\152', '\172', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\170', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\166', '\147', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\165', '\126', '\040', '\164', '\165', '\040', '\061', '\012', '\163', '\127', '\153', '\040', '\153', '\165', '\040', '\061', '\012', '\120', '\147', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\110', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\153', '\125', '\040', '\153', '\165', '\040', '\061', '\012', '\147', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\144', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\126', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\147', '\144', '\040', '\144', '\151', '\040', '\061', '\012', '\172', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\161', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\163', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\146', '\116', '\040', '\144', '\151', '\040', '\061', '\012', '\144', '\147', '\127', '\040', '\144', '\151', '\040', '\061', '\012', '\167', '\116', '\162', '\040', '\162', '\151', '\040', '\061', '\012', '\172', '\166', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\131', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\110', '\171', '\040', '\164', '\165', '\040', '\061', '\012', '\164', '\116', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\170', '\112', '\040', '\154', '\151', '\040', '\061', '\012', '\110', '\142', '\153', '\040', '\153', '\165', '\040', '\061', '\012', '\170', '\163', '\107', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\123', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\106', '\142', '\040', '\142', '\165', '\040', '\061', '\012', '\116', '\164', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\102', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\153', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\152', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\132', '\146', '\040', '\164', '\157', '\040', '\061', '\012', '\153', '\143', '\125', '\040', '\153', '\157', '\040', '\061', '\012', '\146', '\106', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\161', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\122', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\166', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\156', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\170', '\115', '\040', '\160', '\157', '\040', '\061', '\012', '\145', '\102', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\112', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\156', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\103', '\161', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\110', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\146', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\161', '\156', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\123', '\163', '\040', '\151', '\163', '\040', '\061', '\012', '\163', '\102', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\106', '\150', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\116', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\115', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\170', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\144', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\162', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\105', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\126', '\143', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\124', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\101', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\154', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\142', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\126', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\121', '\154', '\040', '\164', '\145', '\040', '\061', '\012', '\163', '\127', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\102', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\130', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\125', '\143', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\117', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\110', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\116', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\106', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\154', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\155', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\146', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\170', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\131', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\146', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\144', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\144', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\116', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\152', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\120', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\126', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\112', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\160', '\110', '\040', '\160', '\157', '\040', '\061', '\012', '\170', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\102', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\155', '\102', '\040', '\156', '\164', '\040', '\061', '\012', '\172', '\143', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\146', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\146', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\132', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\122', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\165', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\142', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\166', '\152', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\147', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\103', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\167', '\127', '\040', '\167', '\141', '\040', '\061', '\012', '\112', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\107', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\142', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\103', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\157', '\121', '\040', '\160', '\157', '\040', '\061', '\012', '\161', '\164', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\166', '\147', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\101', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\146', '\127', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\147', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\146', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\160', '\113', '\040', '\160', '\162', '\040', '\061', '\012', '\112', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\121', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\152', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\170', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\120', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\116', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\107', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\165', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\131', '\145', '\040', '\164', '\145', '\040', '\061', '\012', '\146', '\132', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\131', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\131', '\040', '\146', '\157', '\040', '\061', '\012', '\171', '\120', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\107', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\155', '\124', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\146', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\170', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\172', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\141', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\153', '\126', '\144', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\152', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\153', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\121', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\166', '\152', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\142', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\160', '\116', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\153', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\112', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\167', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\162', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\147', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\124', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\155', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\150', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\103', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\167', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\107', '\146', '\040', '\156', '\164', '\040', '\061', '\012', '\152', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\127', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\170', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\115', '\161', '\156', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\144', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\116', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\117', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\102', '\171', '\040', '\146', '\157', '\040', '\061', '\012', '\156', '\125', '\152', '\040', '\156', '\164', '\040', '\061', '\012', '\154', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\154', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\130', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\126', '\167', '\040', '\166', '\145', '\040', '\061', '\012', '\172', '\127', '\156', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\112', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\115', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\155', '\113', '\040', '\155', '\145', '\040', '\061', '\012', '\123', '\163', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\127', '\154', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\152', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\113', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\143', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\153', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\125', '\145', '\040', '\164', '\145', '\040', '\061', '\012', '\154', '\125', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\102', '\147', '\040', '\156', '\164', '\040', '\061', '\012', '\144', '\110', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\160', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\102', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\124', '\144', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\146', '\126', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\147', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\153', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\121', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\160', '\106', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\102', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\155', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\127', '\146', '\040', '\166', '\145', '\040', '\061', '\012', '\152', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\171', '\111', '\040', '\156', '\171', '\040', '\061', '\012', '\132', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\117', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\153', '\112', '\040', '\153', '\157', '\040', '\061', '\012', '\144', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\142', '\127', '\040', '\151', '\163', '\040', '\061', '\012', '\172', '\115', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\112', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\115', '\143', '\040', '\153', '\157', '\040', '\061', '\012', '\172', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\121', '\153', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\106', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\107', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\132', '\170', '\040', '\170', '\145', '\040', '\061', '\012', '\161', '\166', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\127', '\162', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\152', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\152', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\114', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\167', '\111', '\040', '\167', '\141', '\040', '\061', '\012', '\151', '\104', '\167', '\040', '\164', '\151', '\040', '\061', '\012', '\102', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\120', '\172', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\106', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\121', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\102', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\166', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\152', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\172', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\164', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\146', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\110', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\142', '\115', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\127', '\147', '\040', '\156', '\164', '\040', '\061', '\012', '\131', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\170', '\113', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\142', '\121', '\040', '\142', '\145', '\040', '\061', '\012', '\127', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\164', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\156', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\166', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\152', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\171', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\106', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\157', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\162', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\167', '\132', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\156', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\142', '\167', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\156', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\160', '\116', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\172', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\160', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\124', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\120', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\144', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\167', '\130', '\040', '\167', '\141', '\040', '\061', '\012', '\125', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\113', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\144', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\172', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\152', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\124', '\156', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\164', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\147', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\144', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\172', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\155', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\144', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\142', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\163', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\170', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\170', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\121', '\164', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\170', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\144', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\167', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\155', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\126', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\166', '\154', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\110', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\115', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\117', '\141', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\131', '\160', '\040', '\164', '\151', '\040', '\061', '\012', '\166', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\157', '\126', '\040', '\162', '\157', '\040', '\061', '\012', '\146', '\132', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\161', '\121', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\144', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\127', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\167', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\147', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\163', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\141', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\152', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\156', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\171', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\122', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\165', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\152', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\162', '\124', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\167', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\126', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\132', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\162', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\163', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\166', '\163', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\103', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\166', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\167', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\167', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\107', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\127', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\113', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\127', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\155', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\160', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\172', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\155', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\116', '\153', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\160', '\115', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\167', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\110', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\172', '\103', '\040', '\152', '\157', '\040', '\061', '\012', '\157', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\130', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\105', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\165', '\127', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\166', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\163', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\123', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\113', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\171', '\145', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\110', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\103', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\155', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\165', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\144', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\116', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\172', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\152', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\160', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\114', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\142', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\170', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\126', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\120', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\121', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\117', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\155', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\106', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\141', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\124', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\166', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\116', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\116', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\120', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\167', '\131', '\040', '\164', '\151', '\040', '\061', '\012', '\116', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\124', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\172', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\152', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\166', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\114', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\127', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\166', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\114', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\161', '\172', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\172', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\132', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\125', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\113', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\151', '\107', '\170', '\040', '\164', '\151', '\040', '\061', '\012', '\170', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\170', '\101', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\152', '\110', '\040', '\163', '\164', '\040', '\061', '\012', '\107', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\147', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\156', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\146', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\165', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\132', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\104', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\163', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\126', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\104', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\101', '\157', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\172', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\155', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\127', '\156', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\122', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\166', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\151', '\131', '\040', '\164', '\151', '\040', '\061', '\012', '\170', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\144', '\156', '\040', '\144', '\145', '\040', '\061', '\012', '\116', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\170', '\132', '\040', '\170', '\145', '\040', '\061', '\012', '\130', '\144', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\116', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\156', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\127', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\121', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\167', '\107', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\155', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\107', '\171', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\172', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\107', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\152', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\126', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\167', '\124', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\150', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\116', '\155', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\156', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\127', '\143', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\117', '\156', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\154', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\156', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\164', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\127', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\101', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\132', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\116', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\124', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\131', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\110', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\167', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\121', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\126', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\154', '\125', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\102', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\111', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\172', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\121', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\107', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\142', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\125', '\157', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\126', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\144', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\161', '\103', '\040', '\166', '\157', '\040', '\061', '\012', '\152', '\153', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\166', '\172', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\120', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\103', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\146', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\167', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\166', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\124', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\154', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\172', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\164', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\114', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\122', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\152', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\121', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\166', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\147', '\145', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\112', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\167', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\116', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\167', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\113', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\147', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\131', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\152', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\101', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\155', '\113', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\152', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\156', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\107', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\153', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\126', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\127', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\160', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\154', '\106', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\167', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\127', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\152', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\111', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\142', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\161', '\143', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\145', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\120', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\167', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\110', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\167', '\120', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\166', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\123', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\131', '\160', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\104', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\102', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\116', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\125', '\142', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\122', '\154', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\102', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\154', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\167', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\101', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\104', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\152', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\102', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\146', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\157', '\116', '\040', '\157', '\156', '\040', '\061', '\012', '\131', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\126', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\162', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\120', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\165', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\156', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\147', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\170', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\130', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\146', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\127', '\144', '\040', '\144', '\157', '\040', '\061', '\012', '\170', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\117', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\153', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\153', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\155', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\101', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\110', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\120', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\113', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\115', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\101', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\110', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\170', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\111', '\171', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\157', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\115', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\141', '\120', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\167', '\107', '\040', '\167', '\141', '\040', '\061', '\012', '\103', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\125', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\172', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\157', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\121', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\161', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\120', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\124', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\156', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\146', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\171', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\114', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\152', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\155', '\122', '\040', '\155', '\145', '\040', '\061', '\012', '\145', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\171', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\163', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\167', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\156', '\162', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\103', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\160', '\102', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\160', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\112', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\117', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\106', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\142', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\113', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\110', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\162', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\114', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\141', '\131', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\103', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\167', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\114', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\115', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\113', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\115', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\143', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\115', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\170', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\132', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\167', '\104', '\040', '\167', '\141', '\040', '\061', '\012', '\154', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\146', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\170', '\120', '\040', '\154', '\145', '\040', '\061', '\012', '\131', '\171', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\120', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\122', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\147', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\101', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\113', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\103', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\167', '\110', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\166', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\125', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\120', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\164', '\152', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\102', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\160', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\172', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\132', '\163', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\113', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\143', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\146', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\126', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\127', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\130', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\114', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\144', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\113', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\147', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\132', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\112', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\153', '\146', '\115', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\113', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\115', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\147', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\107', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\122', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\117', '\141', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\167', '\104', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\130', '\163', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\154', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\155', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\170', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\127', '\155', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\126', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\152', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\120', '\170', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\166', '\163', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\172', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\152', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\126', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\170', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\120', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\170', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\146', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\120', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\160', '\103', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\106', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\167', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\117', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\132', '\162', '\040', '\151', '\156', '\040', '\061', '\012', '\126', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\114', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\106', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\115', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\171', '\125', '\040', '\156', '\171', '\040', '\061', '\012', '\155', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\112', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\113', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\115', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\111', '\152', '\040', '\164', '\145', '\040', '\061', '\012', '\126', '\144', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\103', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\125', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\132', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\131', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\104', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\156', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\163', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\110', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\102', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\152', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\117', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\152', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\146', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\117', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\130', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\103', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\115', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\111', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\120', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\167', '\127', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\115', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\124', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\111', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\154', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\152', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\120', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\172', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\154', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\131', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\126', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\160', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\122', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\144', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\114', '\153', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\144', '\105', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\102', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\162', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\124', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\131', '\160', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\115', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\143', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\103', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\146', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\120', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\160', '\125', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\153', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\142', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\170', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\123', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\105', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\130', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\155', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\153', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\167', '\130', '\040', '\167', '\141', '\040', '\061', '\012', '\125', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\146', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\160', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\124', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\132', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\102', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\107', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\103', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\116', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\161', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\130', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\123', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\130', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\147', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\143', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\155', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\166', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\170', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\106', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\162', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\121', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\116', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\170', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\167', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\144', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\101', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\114', '\164', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\160', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\111', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\120', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\160', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\104', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\146', '\112', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\102', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\110', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\101', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\116', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\152', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\123', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\115', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\113', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\155', '\112', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\172', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\110', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\112', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\127', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\166', '\153', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\153', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\105', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\125', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\155', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\114', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\107', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\107', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\106', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\106', '\171', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\146', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\123', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\130', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\110', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\165', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\112', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\127', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\160', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\161', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\162', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\147', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\171', '\120', '\040', '\156', '\171', '\040', '\061', '\012', '\132', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\106', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\154', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\156', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\120', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\152', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\132', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\106', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\160', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\146', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\156', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\104', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\162', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\146', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\106', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\107', '\153', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\122', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\127', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\131', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\105', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\110', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\106', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\104', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\114', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\113', '\163', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\167', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\126', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\165', '\111', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\154', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\167', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\127', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\120', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\122', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\146', '\104', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\103', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\112', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\103', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\142', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\103', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\155', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\145', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\156', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\167', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\111', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\152', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\167', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\112', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\156', '\101', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\102', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\106', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\147', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\125', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\104', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\110', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\130', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\171', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\153', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\114', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\170', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\115', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\154', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\167', '\132', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\146', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\164', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\124', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\103', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\103', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\146', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\160', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\111', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\167', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\116', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\167', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\132', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\107', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\126', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\124', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\115', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\110', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\152', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\167', '\117', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\154', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\113', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\146', '\107', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\146', '\102', '\040', '\167', '\141', '\040', '\061', '\012', '\112', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\167', '\113', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\125', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\153', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\155', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\155', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\164', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\171', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\171', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\122', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\115', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\167', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\143', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\120', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\167', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\171', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\130', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\163', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\102', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\156', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\124', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\155', '\120', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\160', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\115', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\152', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\102', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\165', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\172', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\114', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\146', '\116', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\125', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\103', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\103', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\125', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\102', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\155', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\164', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\121', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\172', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\162', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\166', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\172', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\170', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\131', '\153', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\153', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\120', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\165', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\120', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\167', '\127', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\167', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\170', '\120', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\155', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\141', '\167', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\126', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\142', '\167', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\131', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\103', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\146', '\121', '\040', '\156', '\171', '\040', '\061', '\012', '\172', '\107', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\166', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\103', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\120', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\130', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\150', '\166', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\172', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\146', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\162', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\131', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\116', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\101', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\170', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\124', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\117', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\167', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\121', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\127', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\170', '\105', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\130', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\166', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\130', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\103', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\172', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\122', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\156', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\141', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\110', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\114', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\172', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\120', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\152', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\132', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\156', '\161', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\126', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\110', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\112', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\156', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\153', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\124', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\153', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\167', '\132', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\155', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\146', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\155', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\117', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\165', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\104', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\126', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\122', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\155', '\115', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\170', '\102', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\164', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\106', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\126', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\144', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\115', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\167', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\153', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\122', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\166', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\167', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\167', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\121', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\162', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\125', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\167', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\147', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\160', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\110', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\121', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\132', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\171', '\113', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\105', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\130', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\114', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\170', '\125', '\040', '\156', '\171', '\040', '\061', '\012', '\147', '\166', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\163', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\142', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\115', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\153', '\130', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\162', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\117', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\107', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\107', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\103', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\161', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\104', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\147', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\105', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\132', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\131', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\120', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\147', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\170', '\113', '\040', '\146', '\157', '\040', '\061', '\012', '\110', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\122', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\155', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\170', '\122', '\040', '\142', '\145', '\040', '\061', '\012', '\114', '\163', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\122', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\167', '\121', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\146', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\167', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\106', '\143', '\040', '\164', '\151', '\040', '\061', '\012', '\167', '\172', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\142', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\146', '\123', '\040', '\146', '\157', '\040', '\061', '\012', '\120', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\131', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\172', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\104', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\103', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\170', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\115', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\143', '\147', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\161', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\156', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\160', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\164', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\125', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\156', '\116', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\124', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\163', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\112', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\155', '\115', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\152', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\170', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\144', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\101', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\125', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\130', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\102', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\147', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\132', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\112', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\155', '\124', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\131', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\167', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\131', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\110', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\154', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\103', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\104', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\103', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\170', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\145', '\130', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\153', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\122', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\156', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\167', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\121', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\162', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\106', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\145', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\114', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\167', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\167', '\104', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\160', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\165', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\162', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\163', '\156', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\120', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\153', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\122', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\152', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\143', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\104', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\145', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\143', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\106', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\142', '\127', '\040', '\142', '\145', '\040', '\061', '\012', '\165', '\125', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\164', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\160', '\124', '\040', '\151', '\156', '\040', '\061', '\012', '\130', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\167', '\116', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\130', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\114', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\146', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\116', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\106', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\114', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\142', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\155', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\156', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\116', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\160', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\154', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\110', '\161', '\040', '\151', '\156', '\040', '\061', '\012', '\163', '\167', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\152', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\120', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\122', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\112', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\132', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\126', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\166', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\120', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\103', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\116', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\155', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\154', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\151', '\130', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\154', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\146', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\170', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\167', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\144', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\132', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\146', '\112', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\121', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\101', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\161', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\114', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\152', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\132', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\131', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\126', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\167', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\167', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\167', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\145', '\107', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\123', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\163', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\155', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\146', '\121', '\040', '\146', '\157', '\040', '\061', '\012', '\126', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\155', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\101', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\142', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\112', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\170', '\112', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\142', '\103', '\040', '\142', '\145', '\040', '\061', '\012', '\122', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\112', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\171', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\153', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\157', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\132', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\120', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\107', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\122', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\114', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\146', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\170', '\126', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\131', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\143', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\167', '\160', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\124', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\146', '\107', '\040', '\156', '\171', '\040', '\061', '\012', '\160', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\152', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\144', '\147', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\156', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\167', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\165', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\152', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\124', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\115', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\113', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\122', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\131', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\123', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\164', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\147', '\154', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\125', '\165', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\117', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\102', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\122', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\127', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\116', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\110', '\144', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\146', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\162', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\127', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\152', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\170', '\107', '\040', '\156', '\171', '\040', '\061', '\012', '\146', '\160', '\127', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\172', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\102', '\153', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\170', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\111', '\152', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\105', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\106', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\111', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\106', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\172', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\111', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\153', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\146', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\153', '\111', '\040', '\153', '\165', '\040', '\061', '\012', '\146', '\111', '\157', '\040', '\162', '\157', '\040', '\061', '\012', '\154', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\101', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\162', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\104', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\157', '\110', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\112', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\103', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\166', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\114', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\132', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\116', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\124', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\126', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\106', '\144', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\167', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\103', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\113', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\107', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\165', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\172', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\106', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\124', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\110', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\121', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\104', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\153', '\116', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\102', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\102', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\155', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\144', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\153', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\123', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\144', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\147', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\144', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\116', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\146', '\101', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\172', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\170', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\170', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\121', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\167', '\124', '\040', '\160', '\162', '\040', '\061', '\012', '\114', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\170', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\167', '\122', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\111', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\172', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\161', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\154', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\115', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\160', '\122', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\117', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\153', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\152', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\165', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\155', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\165', '\112', '\040', '\157', '\165', '\040', '\061', '\012', '\171', '\127', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\150', '\125', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\172', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\123', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\147', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\152', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\123', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\146', '\101', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\110', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\153', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\144', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\142', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\102', '\155', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\170', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\155', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\111', '\161', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\147', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\122', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\166', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\160', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\106', '\167', '\040', '\166', '\157', '\040', '\061', '\012', '\146', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\167', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\112', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\170', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\132', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\110', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\165', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\160', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\121', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\106', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\107', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\163', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\167', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\171', '\121', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\113', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\155', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\102', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\132', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\111', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\171', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\104', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\112', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\111', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\103', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\152', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\144', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\102', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\167', '\142', '\040', '\157', '\167', '\040', '\061', '\012', '\126', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\152', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\104', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\107', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\102', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\160', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\113', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\131', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\170', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\150', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\160', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\104', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\152', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\116', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\106', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\122', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\115', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\152', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\160', '\104', '\040', '\160', '\162', '\040', '\061', '\012', '\104', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\171', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\113', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\153', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\167', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\104', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\155', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\144', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\112', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\125', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\124', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\110', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\113', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\155', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\106', '\150', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\163', '\122', '\040', '\163', '\164', '\040', '\061', '\012', '\151', '\127', '\147', '\040', '\151', '\156', '\040', '\061', '\012', '\130', '\171', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\172', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\126', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\111', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\156', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\104', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\146', '\125', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\157', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\113', '\143', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\127', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\102', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\121', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\145', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\172', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\152', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\124', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\122', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\144', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\142', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\121', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\111', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\170', '\116', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\103', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\144', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\113', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\124', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\155', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\124', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\114', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\111', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\164', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\143', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\147', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\165', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\163', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\103', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\161', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\152', '\172', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\151', '\130', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\156', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\155', '\116', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\142', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\153', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\172', '\103', '\040', '\160', '\157', '\040', '\061', '\012', '\154', '\146', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\102', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\155', '\114', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\155', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\152', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\111', '\165', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\146', '\104', '\040', '\156', '\171', '\040', '\061', '\012', '\143', '\154', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\144', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\124', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\130', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\160', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\155', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\153', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\125', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\103', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\170', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\131', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\124', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\132', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\126', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\146', '\104', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\120', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\155', '\172', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\130', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\105', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\104', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\142', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\157', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\153', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\142', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\160', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\146', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\104', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\115', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\172', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\155', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\152', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\153', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\144', '\105', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\150', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\142', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\156', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\170', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\131', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\150', '\112', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\156', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\114', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\102', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\144', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\145', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\167', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\120', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\111', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\142', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\144', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\115', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\170', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\106', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\167', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\162', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\164', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\131', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\162', '\126', '\143', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\122', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\160', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\116', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\113', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\166', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\167', '\120', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\171', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\102', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\123', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\115', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\152', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\131', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\106', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\153', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\167', '\116', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\152', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\121', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\115', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\112', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\124', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\155', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\154', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\131', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\112', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\124', '\153', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\146', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\170', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\121', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\122', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\142', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\170', '\102', '\040', '\167', '\141', '\040', '\061', '\012', '\114', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\153', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\167', '\117', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\166', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\166', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\130', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\153', '\106', '\040', '\153', '\165', '\040', '\061', '\012', '\151', '\171', '\124', '\040', '\151', '\156', '\040', '\061', '\012', '\125', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\156', '\172', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\142', '\110', '\040', '\142', '\165', '\040', '\061', '\012', '\154', '\123', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\125', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\171', '\106', '\040', '\156', '\171', '\040', '\061', '\012', '\146', '\170', '\120', '\040', '\146', '\157', '\040', '\061', '\012', '\152', '\131', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\170', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\167', '\111', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\125', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\163', '\106', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\144', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\131', '\163', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\111', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\146', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\122', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\160', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\170', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\142', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\153', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\113', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\121', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\127', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\167', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\143', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\146', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\130', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\147', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\167', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\152', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\153', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\122', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\107', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\142', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\160', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\115', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\167', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\170', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\116', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\103', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\154', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\102', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\106', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\104', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\146', '\103', '\040', '\160', '\162', '\040', '\061', '\012', '\114', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\106', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\170', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\147', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\106', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\170', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\152', '\172', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\156', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\166', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\171', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\106', '\150', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\107', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\114', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\114', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\113', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\112', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\121', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\160', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\151', '\117', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\117', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\150', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\144', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\172', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\152', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\126', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\166', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\164', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\111', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\121', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\171', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\160', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\170', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\142', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\166', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\152', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\160', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\156', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\153', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\147', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\146', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\110', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\144', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\124', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\147', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\170', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\120', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\160', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\170', '\127', '\040', '\156', '\171', '\040', '\061', '\012', '\110', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\116', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\110', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\166', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\147', '\156', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\142', '\123', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\161', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\171', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\122', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\146', '\101', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\130', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\155', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\121', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\163', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\111', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\154', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\115', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\160', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\155', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\115', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\121', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\153', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\104', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\131', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\153', '\106', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\106', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\156', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\171', '\112', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\111', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\131', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\144', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\142', '\116', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\167', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\164', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\121', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\112', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\110', '\147', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\170', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\115', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\146', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\144', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\153', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\110', '\155', '\040', '\157', '\156', '\040', '\061', '\012', '\141', '\112', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\172', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\127', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\155', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\102', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\116', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\144', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\101', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\110', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\122', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\127', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\131', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\124', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\170', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\113', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\121', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\124', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\156', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\144', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\157', '\145', '\117', '\040', '\157', '\156', '\040', '\061', '\012', '\156', '\103', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\130', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\101', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\107', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\170', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\110', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\122', '\172', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\124', '\163', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\110', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\114', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\116', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\113', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\107', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\131', '\171', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\104', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\172', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\105', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\142', '\106', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\163', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\156', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\113', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\165', '\121', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\170', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\113', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\143', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\146', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\162', '\102', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\112', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\131', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\123', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\121', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\160', '\106', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\146', '\113', '\040', '\156', '\171', '\040', '\061', '\012', '\152', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\147', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\120', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\120', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\165', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\130', '\162', '\040', '\151', '\156', '\040', '\061', '\012', '\160', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\152', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\172', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\155', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\112', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\111', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\130', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\146', '\127', '\040', '\167', '\141', '\040', '\061', '\012', '\126', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\112', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\114', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\172', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\167', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\167', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\106', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\110', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\127', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\114', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\153', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\160', '\101', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\170', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\146', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\115', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\120', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\115', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\144', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\167', '\122', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\115', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\120', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\172', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\146', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\106', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\113', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\153', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\107', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\132', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\153', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\122', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\154', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\116', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\131', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\132', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\164', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\120', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\127', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\130', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\146', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\105', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\107', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\152', '\172', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\144', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\154', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\170', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\154', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\131', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\110', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\153', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\115', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\115', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\122', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\114', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\106', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\116', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\106', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\113', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\112', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\172', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\113', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\170', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\167', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\120', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\172', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\110', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\106', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\166', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\130', '\145', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\146', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\111', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\142', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\132', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\113', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\160', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\113', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\121', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\106', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\127', '\166', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\172', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\153', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\152', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\146', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\144', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\115', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\142', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\167', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\127', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\123', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\162', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\166', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\161', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\142', '\107', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\110', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\172', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\106', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\160', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\170', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\141', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\124', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\102', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\126', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\144', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\146', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\170', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\110', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\126', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\147', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\115', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\121', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\167', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\110', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\172', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\146', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\146', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\127', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\161', '\105', '\040', '\151', '\156', '\040', '\061', '\012', '\147', '\160', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\127', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\154', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\131', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\103', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\166', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\146', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\142', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\166', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\110', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\160', '\132', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\146', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\145', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\142', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\127', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\144', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\166', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\115', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\167', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\144', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\115', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\143', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\162', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\164', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\160', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\153', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\165', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\172', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\142', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\123', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\132', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\143', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\155', '\107', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\141', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\167', '\110', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\104', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\107', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\150', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\153', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\114', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\146', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\155', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\156', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\115', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\131', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\167', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\170', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\113', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\142', '\123', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\162', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\112', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\167', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\130', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\104', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\160', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\103', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\147', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\141', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\162', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\112', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\115', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\143', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\153', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\116', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\162', '\132', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\170', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\147', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\166', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\126', '\155', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\142', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\123', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\112', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\121', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\126', '\167', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\124', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\162', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\112', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\114', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\153', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\106', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\142', '\121', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\153', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\160', '\105', '\040', '\153', '\141', '\040', '\061', '\012', '\107', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\132', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\111', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\167', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\103', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\162', '\163', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\155', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\146', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\102', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\142', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\144', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\102', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\121', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\154', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\164', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\122', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\162', '\161', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\155', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\127', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\172', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\115', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\107', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\127', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\126', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\153', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\172', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\165', '\120', '\040', '\165', '\156', '\040', '\061', '\012', '\144', '\110', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\147', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\164', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\115', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\110', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\132', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\132', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\153', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\116', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\115', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\160', '\106', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\152', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\170', '\126', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\147', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\153', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\115', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\107', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\142', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\114', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\162', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\165', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\153', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\170', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\126', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\113', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\154', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\102', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\121', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\131', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\166', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\107', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\164', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\166', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\152', '\172', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\167', '\165', '\040', '\153', '\165', '\040', '\061', '\012', '\121', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\155', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\111', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\132', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\114', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\115', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\120', '\155', '\040', '\165', '\155', '\040', '\061', '\012', '\160', '\115', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\172', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\172', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\142', '\117', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\166', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\143', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\155', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\106', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\170', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\102', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\126', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\157', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\157', '\110', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\127', '\147', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\131', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\104', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\167', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\104', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\144', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\113', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\166', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\165', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\103', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\144', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\124', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\142', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\142', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\142', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\146', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\142', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\144', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\142', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\165', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\103', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\122', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\127', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\132', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\112', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\132', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\142', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\112', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\126', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\167', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\167', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\146', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\154', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\164', '\130', '\040', '\164', '\151', '\040', '\061', '\012', '\144', '\113', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\121', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\104', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\160', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\153', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\144', '\104', '\040', '\144', '\151', '\040', '\061', '\012', '\146', '\121', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\150', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\102', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\105', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\146', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\132', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\164', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\170', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\102', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\143', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\122', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\126', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\102', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\117', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\107', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\166', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\147', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\162', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\106', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\126', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\146', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\144', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\107', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\156', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\144', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\172', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\101', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\147', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\101', '\167', '\040', '\153', '\157', '\040', '\061', '\012', '\170', '\102', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\116', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\160', '\144', '\040', '\144', '\151', '\040', '\061', '\012', '\157', '\125', '\171', '\040', '\153', '\157', '\040', '\061', '\012', '\146', '\160', '\104', '\040', '\160', '\162', '\040', '\061', '\012', '\122', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\154', '\130', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\127', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\127', '\166', '\040', '\166', '\151', '\040', '\061', '\012', '\106', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\147', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\127', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\130', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\144', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\126', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\120', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\167', '\101', '\040', '\144', '\145', '\040', '\061', '\012', '\117', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\151', '\132', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\172', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\167', '\114', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\127', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\124', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\142', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\165', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\165', '\117', '\040', '\151', '\156', '\040', '\061', '\012', '\121', '\144', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\165', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\163', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\111', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\163', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\147', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\123', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\170', '\121', '\040', '\146', '\157', '\040', '\061', '\012', '\150', '\143', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\142', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\122', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\132', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\154', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\103', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\155', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\132', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\104', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\125', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\147', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\142', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\123', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\126', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\121', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\115', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\165', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\103', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\156', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\166', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\146', '\112', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\103', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\163', '\121', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\165', '\103', '\040', '\165', '\156', '\040', '\061', '\012', '\103', '\164', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\120', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\152', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\155', '\103', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\130', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\163', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\142', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\167', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\170', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\150', '\151', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\113', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\151', '\161', '\116', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\153', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\116', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\154', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\154', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\167', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\107', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\162', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\153', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\122', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\112', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\161', '\106', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\170', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\163', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\146', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\162', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\130', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\126', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\115', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\110', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\144', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\113', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\111', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\116', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\167', '\114', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\132', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\130', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\117', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\162', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\125', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\160', '\155', '\103', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\172', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\166', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\170', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\104', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\123', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\110', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\116', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\171', '\157', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\143', '\123', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\111', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\146', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\172', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\102', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\102', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\112', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\152', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\141', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\104', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\114', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\121', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\112', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\122', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\142', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\112', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\153', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\142', '\101', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\102', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\126', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\131', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\126', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\172', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\113', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\120', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\170', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\142', '\124', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\166', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\155', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\170', '\114', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\123', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\116', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\124', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\114', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\166', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\106', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\147', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\104', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\117', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\146', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\120', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\160', '\117', '\040', '\160', '\162', '\040', '\061', '\012', '\103', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\170', '\117', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\126', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\106', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\156', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\170', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\167', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\144', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\127', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\124', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\155', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\172', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\166', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\153', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\103', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\164', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\110', '\150', '\040', '\154', '\157', '\040', '\061', '\012', '\131', '\166', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\126', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\146', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\127', '\155', '\040', '\157', '\156', '\040', '\061', '\012', '\164', '\115', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\131', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\106', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\121', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\113', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\114', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\111', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\147', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\142', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\152', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\106', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\144', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\170', '\125', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\152', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\120', '\147', '\040', '\151', '\156', '\040', '\061', '\012', '\130', '\156', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\153', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\146', '\120', '\040', '\160', '\162', '\040', '\061', '\012', '\104', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\172', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\167', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\142', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\167', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\132', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\146', '\130', '\040', '\167', '\141', '\040', '\061', '\012', '\126', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\125', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\172', '\124', '\040', '\152', '\157', '\040', '\061', '\012', '\153', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\155', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\127', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\142', '\124', '\040', '\160', '\162', '\040', '\061', '\012', '\141', '\102', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\101', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\144', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\102', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\130', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\155', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\171', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\107', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\104', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\112', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\155', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\142', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\167', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\101', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\121', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\157', '\132', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\120', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\171', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\130', '\152', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\167', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\156', '\101', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\113', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\142', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\107', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\127', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\131', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\104', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\121', '\155', '\040', '\157', '\156', '\040', '\061', '\012', '\121', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\142', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\165', '\122', '\040', '\165', '\156', '\040', '\061', '\012', '\143', '\115', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\130', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\116', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\110', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\124', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\112', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\103', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\117', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\155', '\122', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\160', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\131', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\146', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\162', '\123', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\155', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\167', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\130', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\131', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\126', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\103', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\115', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\160', '\113', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\126', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\117', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\114', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\131', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\160', '\106', '\040', '\157', '\156', '\040', '\061', '\012', '\162', '\127', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\143', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\132', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\131', '\142', '\040', '\146', '\157', '\040', '\061', '\012', '\172', '\142', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\102', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\111', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\167', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\164', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\122', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\171', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\155', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\111', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\111', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\142', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\146', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\127', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\127', '\160', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\115', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\123', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\154', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\103', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\172', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\144', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\144', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\146', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\117', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\146', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\107', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\101', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\146', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\104', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\106', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\124', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\116', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\113', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\155', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\146', '\122', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\125', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\151', '\125', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\163', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\164', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\120', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\163', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\170', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\151', '\125', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\141', '\104', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\170', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\141', '\107', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\120', '\147', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\144', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\142', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\126', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\170', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\126', '\144', '\040', '\157', '\156', '\040', '\061', '\012', '\110', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\101', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\111', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\155', '\127', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\155', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\154', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\153', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\156', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\166', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\161', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\114', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\121', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\167', '\127', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\171', '\122', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\171', '\111', '\040', '\156', '\171', '\040', '\061', '\012', '\152', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\147', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\156', '\162', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\121', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\152', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\160', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\172', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\111', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\121', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\130', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\160', '\106', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\172', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\153', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\153', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\155', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\162', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\124', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\142', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\160', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\103', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\106', '\155', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\121', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\152', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\165', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\153', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\126', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\152', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\105', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\161', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\154', '\131', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\107', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\104', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\117', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\162', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\155', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\146', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\120', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\126', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\126', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\143', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\142', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\122', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\170', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\104', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\147', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\167', '\120', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\162', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\126', '\161', '\040', '\144', '\151', '\040', '\061', '\012', '\170', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\147', '\103', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\117', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\166', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\116', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\130', '\161', '\040', '\151', '\156', '\040', '\061', '\012', '\121', '\156', '\154', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\120', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\111', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\120', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\166', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\161', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\167', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\167', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\155', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\122', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\170', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\142', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\146', '\116', '\040', '\156', '\171', '\040', '\061', '\012', '\171', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\160', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\155', '\127', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\113', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\142', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\116', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\154', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\102', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\141', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\146', '\115', '\040', '\146', '\157', '\040', '\061', '\012', '\162', '\132', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\121', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\166', '\121', '\040', '\151', '\156', '\040', '\061', '\012', '\125', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\160', '\126', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\120', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\107', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\106', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\165', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\155', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\102', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\111', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\102', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\125', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\162', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\154', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\172', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\132', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\126', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\170', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\143', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\111', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\142', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\102', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\113', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\171', '\130', '\040', '\142', '\145', '\040', '\061', '\012', '\157', '\102', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\127', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\146', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\141', '\121', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\146', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\130', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\112', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\141', '\123', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\122', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\115', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\170', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\107', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\163', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\142', '\115', '\040', '\167', '\141', '\040', '\061', '\012', '\165', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\166', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\156', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\172', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\150', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\142', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\132', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\171', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\125', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\102', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\152', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\130', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\124', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\162', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\116', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\150', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\126', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\124', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\150', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\121', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\124', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\170', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\103', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\167', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\126', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\122', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\117', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\131', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\154', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\110', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\152', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\121', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\116', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\154', '\167', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\155', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\160', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\106', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\110', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\105', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\167', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\127', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\146', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\160', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\166', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\130', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\112', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\105', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\116', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\115', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\171', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\160', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\157', '\101', '\040', '\157', '\156', '\040', '\061', '\012', '\147', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\154', '\120', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\170', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\164', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\114', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\125', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\106', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\163', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\166', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\106', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\156', '\101', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\142', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\120', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\163', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\146', '\120', '\040', '\156', '\171', '\040', '\061', '\012', '\147', '\131', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\146', '\103', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\115', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\154', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\152', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\121', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\124', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\125', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\154', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\167', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\115', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\172', '\153', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\154', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\141', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\113', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\126', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\156', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\170', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\172', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\172', '\170', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\166', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\167', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\105', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\172', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\120', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\101', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\172', '\106', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\146', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\147', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\163', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\121', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\153', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\117', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\131', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\115', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\152', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\105', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\145', '\121', '\171', '\040', '\145', '\162', '\040', '\061', '\012', '\123', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\125', '\170', '\040', '\155', '\142', '\040', '\061', '\012', '\172', '\144', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\160', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\122', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\147', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\146', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\154', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\142', '\126', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\155', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\131', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\155', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\154', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\116', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\166', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\166', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\114', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\161', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\170', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\161', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\166', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\110', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\146', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\163', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\122', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\142', '\132', '\040', '\167', '\141', '\040', '\061', '\012', '\110', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\125', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\143', '\131', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\144', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\153', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\142', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\166', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\115', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\156', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\142', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\120', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\160', '\111', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\167', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\117', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\120', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\101', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\153', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\153', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\120', '\156', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\116', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\130', '\162', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\155', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\125', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\163', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\160', '\127', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\145', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\122', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\112', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\163', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\167', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\120', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\101', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\167', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\152', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\132', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\104', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\123', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\121', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\102', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\114', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\132', '\162', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\120', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\110', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\130', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\154', '\142', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\116', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\112', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\112', '\144', '\040', '\157', '\156', '\040', '\061', '\012', '\122', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\166', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\166', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\167', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\110', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\124', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\104', '\154', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\150', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\117', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\155', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\155', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\121', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\166', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\147', '\146', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\167', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\130', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\154', '\101', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\170', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\167', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\166', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\102', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\146', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\101', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\150', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\115', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\110', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\120', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\131', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\112', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\127', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\126', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\125', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\146', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\106', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\112', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\127', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\166', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\111', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\112', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\106', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\170', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\114', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\122', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\122', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\170', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\152', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\112', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\106', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\105', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\122', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\146', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\167', '\126', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\146', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\127', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\152', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\106', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\126', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\165', '\107', '\040', '\165', '\156', '\040', '\061', '\012', '\154', '\103', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\170', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\107', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\166', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\131', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\131', '\162', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\160', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\113', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\160', '\115', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\114', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\127', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\162', '\123', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\126', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\116', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\120', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\144', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\125', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\164', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\107', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\104', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\146', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\155', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\110', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\146', '\107', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\115', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\152', '\123', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\154', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\143', '\161', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\127', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\165', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\146', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\160', '\132', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\171', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\162', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\110', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\171', '\116', '\040', '\156', '\171', '\040', '\061', '\012', '\121', '\162', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\113', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\146', '\125', '\040', '\142', '\145', '\040', '\061', '\012', '\121', '\146', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\117', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\152', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\146', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\130', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\142', '\126', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\112', '\155', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\127', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\167', '\124', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\132', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\106', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\160', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\146', '\114', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\167', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\160', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\147', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\114', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\170', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\127', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\112', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\162', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\132', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\114', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\116', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\115', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\146', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\125', '\165', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\107', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\160', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\127', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\152', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\165', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\163', '\111', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\144', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\162', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\153', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\127', '\165', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\111', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\155', '\116', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\112', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\115', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\123', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\172', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\166', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\155', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\156', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\160', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\114', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\165', '\171', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\145', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\105', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\155', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\152', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\115', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\131', '\167', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\161', '\115', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\144', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\166', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\122', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\142', '\120', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\115', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\165', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\170', '\130', '\040', '\146', '\157', '\040', '\061', '\012', '\150', '\166', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\120', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\155', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\172', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\116', '\163', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\146', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\121', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\167', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\167', '\146', '\040', '\157', '\167', '\040', '\061', '\012', '\154', '\152', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\166', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\110', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\142', '\102', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\122', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\154', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\132', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\123', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\126', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\127', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\170', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\103', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\167', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\105', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\125', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\143', '\165', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\104', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\152', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\154', '\125', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\171', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\142', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\117', '\141', '\145', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\142', '\103', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\172', '\125', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\131', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\102', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\122', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\152', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\142', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\120', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\166', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\107', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\116', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\125', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\152', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\115', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\155', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\105', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\150', '\110', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\107', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\146', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\132', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\171', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\144', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\141', '\157', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\123', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\101', '\157', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\114', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\103', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\153', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\144', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\131', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\153', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\147', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\127', '\172', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\114', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\160', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\107', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\144', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\115', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\167', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\154', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\147', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\142', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\147', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\161', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\106', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\102', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\127', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\116', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\115', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\155', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\146', '\103', '\040', '\156', '\171', '\040', '\061', '\012', '\105', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\152', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\125', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\147', '\157', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\102', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\146', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\170', '\124', '\040', '\167', '\141', '\040', '\061', '\012', '\126', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\126', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\127', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\123', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\167', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\126', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\154', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\170', '\120', '\040', '\156', '\171', '\040', '\061', '\012', '\131', '\171', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\120', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\102', '\147', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\117', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\121', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\106', '\040', '\146', '\157', '\040', '\061', '\012', '\144', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\164', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\152', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\160', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\147', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\113', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\167', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\131', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\123', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\101', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\105', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\113', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\155', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\130', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\130', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\121', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\157', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\122', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\171', '\114', '\040', '\156', '\171', '\040', '\061', '\012', '\153', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\171', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\155', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\111', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\115', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\130', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\121', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\115', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\127', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\127', '\172', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\127', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\116', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\142', '\132', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\124', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\113', '\144', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\146', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\103', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\146', '\132', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\156', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\126', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\124', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\166', '\166', '\040', '\166', '\151', '\040', '\061', '\012', '\120', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\110', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\142', '\122', '\040', '\142', '\145', '\040', '\061', '\012', '\143', '\106', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\167', '\120', '\040', '\167', '\141', '\040', '\061', '\012', '\126', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\106', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\102', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\142', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\112', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\162', '\123', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\153', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\113', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\120', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\114', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\162', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\166', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\127', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\127', '\165', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\161', '\111', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\160', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\120', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\155', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\166', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\144', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\131', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\104', '\167', '\142', '\040', '\157', '\167', '\040', '\061', '\012', '\127', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\166', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\104', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\107', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\167', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\124', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\103', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\167', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\160', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\165', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\103', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\164', '\170', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\146', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\167', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\144', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\153', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\147', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\166', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\144', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\170', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\163', '\166', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\165', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\106', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\126', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\132', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\112', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\147', '\111', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\167', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\113', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\167', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\121', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\142', '\126', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\160', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\125', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\172', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\141', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\154', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\147', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\127', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\155', '\123', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\132', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\152', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\154', '\120', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\167', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\122', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\105', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\160', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\112', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\117', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\160', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\120', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\124', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\146', '\161', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\132', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\110', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\143', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\126', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\116', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\131', '\171', '\040', '\157', '\156', '\040', '\061', '\012', '\106', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\167', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\167', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\130', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\130', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\153', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\162', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\147', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\167', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\144', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\110', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\166', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\151', '\101', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\171', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\171', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\157', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\121', '\153', '\172', '\040', '\153', '\141', '\040', '\061', '\012', '\114', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\122', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\106', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\132', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\103', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\154', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\113', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\142', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\142', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\146', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\126', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\132', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\132', '\142', '\040', '\147', '\141', '\040', '\061', '\012', '\167', '\164', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\106', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\127', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\104', '\164', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\113', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\153', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\123', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\171', '\103', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\126', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\110', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\120', '\154', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\160', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\105', '\167', '\040', '\150', '\141', '\040', '\061', '\012', '\172', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\111', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\172', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\163', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\142', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\171', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\167', '\122', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\121', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\154', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\126', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\144', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\117', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\153', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\160', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\162', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\152', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\102', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\103', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\107', '\155', '\040', '\155', '\141', '\040', '\061', '\012', '\160', '\141', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\125', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\114', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\146', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\167', '\110', '\040', '\167', '\141', '\040', '\061', '\012', '\120', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\170', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\142', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\143', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\161', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\172', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\161', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\171', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\172', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\132', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\142', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\166', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\154', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\171', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\110', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\164', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\107', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\110', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\106', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\144', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\103', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\152', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\154', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\111', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\130', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\142', '\105', '\040', '\142', '\145', '\040', '\061', '\012', '\110', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\142', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\125', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\153', '\145', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\110', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\157', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\103', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\114', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\147', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\117', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\117', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\167', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\127', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\116', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\146', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\126', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\172', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\146', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\162', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\104', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\117', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\167', '\132', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\121', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\156', '\161', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\166', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\163', '\104', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\144', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\121', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\115', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\142', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\152', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\142', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\116', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\132', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\103', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\110', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\115', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\120', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\111', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\154', '\110', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\156', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\105', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\112', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\122', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\112', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\106', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\110', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\167', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\121', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\126', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\112', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\162', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\115', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\104', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\115', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\144', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\117', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\113', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\162', '\124', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\114', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\172', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\162', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\155', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\170', '\105', '\040', '\160', '\162', '\040', '\061', '\012', '\103', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\130', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\142', '\125', '\040', '\142', '\145', '\040', '\061', '\012', '\141', '\145', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\166', '\126', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\122', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\170', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\121', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\130', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\112', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\166', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\126', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\127', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\130', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\102', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\153', '\115', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\110', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\142', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\122', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\166', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\102', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\157', '\120', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\164', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\167', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\106', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\153', '\114', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\157', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\103', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\166', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\131', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\152', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\127', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\142', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\165', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\112', '\153', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\144', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\154', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\146', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\142', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\131', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\164', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\144', '\124', '\040', '\144', '\141', '\040', '\061', '\012', '\166', '\124', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\116', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\142', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\125', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\130', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\122', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\141', '\161', '\101', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\117', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\104', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\130', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\112', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\163', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\145', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\105', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\155', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\111', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\172', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\156', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\132', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\151', '\167', '\122', '\040', '\151', '\156', '\040', '\061', '\012', '\157', '\112', '\166', '\040', '\153', '\157', '\040', '\061', '\012', '\165', '\146', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\113', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\127', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\103', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\171', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\165', '\126', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\113', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\130', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\112', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\105', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\112', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\105', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\161', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\126', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\120', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\127', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\143', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\153', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\141', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\126', '\163', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\123', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\122', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\142', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\167', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\146', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\147', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\167', '\127', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\153', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\172', '\112', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\131', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\121', '\154', '\040', '\151', '\156', '\040', '\061', '\012', '\121', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\154', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\106', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\156', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\131', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\111', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\130', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\162', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\152', '\111', '\040', '\163', '\164', '\040', '\061', '\012', '\151', '\171', '\130', '\040', '\151', '\156', '\040', '\061', '\012', '\132', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\164', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\132', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\130', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\112', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\142', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\165', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\113', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\101', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\157', '\125', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\156', '\127', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\167', '\125', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\150', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\167', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\156', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\152', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\171', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\127', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\111', '\157', '\171', '\040', '\157', '\156', '\040', '\061', '\012', '\130', '\160', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\112', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\166', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\144', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\126', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\152', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\142', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\113', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\163', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\153', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\142', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\147', '\114', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\166', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\113', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\132', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\162', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\122', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\115', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\125', '\170', '\040', '\141', '\162', '\040', '\061', '\012', '\161', '\110', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\153', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\170', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\122', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\172', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\161', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\172', '\127', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\155', '\102', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\172', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\111', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\157', '\113', '\040', '\157', '\156', '\040', '\061', '\012', '\107', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\107', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\132', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\120', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\167', '\107', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\146', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\111', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\105', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\114', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\122', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\132', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\153', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\107', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\166', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\161', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\160', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\167', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\126', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\103', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\171', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\147', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\114', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\116', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\112', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\130', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\114', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\167', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\166', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\160', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\126', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\144', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\142', '\105', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\121', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\144', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\111', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\110', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\163', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\127', '\166', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\146', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\114', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\172', '\153', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\152', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\151', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\114', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\112', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\117', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\127', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\101', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\111', '\171', '\040', '\151', '\156', '\040', '\061', '\012', '\160', '\112', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\114', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\122', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\114', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\146', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\127', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\171', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\160', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\111', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\107', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\152', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\143', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\170', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\115', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\147', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\155', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\104', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\157', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\102', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\127', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\155', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\131', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\125', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\126', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\165', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\120', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\165', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\114', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\147', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\153', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\112', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\115', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\146', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\117', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\153', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\161', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\112', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\171', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\155', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\163', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\144', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\156', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\102', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\115', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\155', '\112', '\040', '\155', '\145', '\040', '\061', '\012', '\115', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\142', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\104', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\152', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\144', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\125', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\152', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\127', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\107', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\165', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\103', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\144', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\164', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\112', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\146', '\130', '\040', '\146', '\157', '\040', '\061', '\012', '\116', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\102', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\172', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\125', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\142', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\171', '\126', '\040', '\167', '\141', '\040', '\061', '\012', '\130', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\146', '\127', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\146', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\154', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\111', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\167', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\113', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\124', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\121', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\155', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\160', '\105', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\123', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\147', '\151', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\111', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\167', '\106', '\040', '\153', '\141', '\040', '\061', '\012', '\117', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\167', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\104', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\163', '\120', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\132', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\154', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\116', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\170', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\132', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\171', '\123', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\132', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\154', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\152', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\171', '\106', '\040', '\151', '\156', '\040', '\061', '\012', '\103', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\167', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\146', '\126', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\142', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\165', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\154', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\114', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\155', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\131', '\157', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\162', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\171', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\165', '\171', '\127', '\040', '\165', '\156', '\040', '\061', '\012', '\153', '\107', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\167', '\113', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\153', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\130', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\103', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\121', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\120', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\102', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\102', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\105', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\105', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\110', '\167', '\040', '\165', '\163', '\040', '\061', '\012', '\106', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\153', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\151', '\131', '\040', '\151', '\156', '\040', '\061', '\012', '\163', '\120', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\121', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\125', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\114', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\122', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\153', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\131', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\167', '\131', '\040', '\151', '\163', '\040', '\061', '\012', '\162', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\110', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\127', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\157', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\146', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\104', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\142', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\126', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\152', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\101', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\160', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\170', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\160', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\157', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\122', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\131', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\125', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\113', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\104', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\104', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\172', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\107', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\146', '\122', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\122', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\146', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\162', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\132', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\123', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\120', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\154', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\147', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\115', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\127', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\111', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\113', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\164', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\122', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\163', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\142', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\103', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\172', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\162', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\166', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\146', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\161', '\130', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\116', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\143', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\155', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\127', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\141', '\111', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\155', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\155', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\171', '\116', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\132', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\125', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\103', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\153', '\162', '\040', '\162', '\151', '\040', '\061', '\012', '\146', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\122', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\103', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\142', '\103', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\104', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\115', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\120', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\152', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\171', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\145', '\130', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\126', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\104', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\103', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\164', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\143', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\113', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\146', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\142', '\132', '\040', '\151', '\156', '\040', '\061', '\012', '\116', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\130', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\126', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\170', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\170', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\130', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\115', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\160', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\132', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\130', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\166', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\126', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\103', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\146', '\112', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\121', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\146', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\121', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\126', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\107', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\115', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\170', '\166', '\167', '\040', '\167', '\151', '\040', '\061', '\012', '\172', '\111', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\146', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\127', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\155', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\132', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\147', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\141', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\123', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\124', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\130', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\123', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\104', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\167', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\167', '\166', '\040', '\167', '\151', '\040', '\061', '\012', '\162', '\160', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\120', '\163', '\040', '\151', '\163', '\040', '\061', '\012', '\113', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\104', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\162', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\142', '\121', '\040', '\142', '\145', '\040', '\061', '\012', '\121', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\131', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\170', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\163', '\125', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\130', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\167', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\163', '\122', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\146', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\111', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\144', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\103', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\172', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\121', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\157', '\152', '\130', '\040', '\157', '\156', '\040', '\061', '\012', '\126', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\127', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\153', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\112', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\122', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\130', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\145', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\125', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\131', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\170', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\132', '\162', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\146', '\126', '\040', '\165', '\163', '\040', '\061', '\012', '\162', '\130', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\132', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\124', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\154', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\161', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\127', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\152', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\146', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\170', '\115', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\152', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\115', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\153', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\155', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\131', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\166', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\167', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\167', '\127', '\040', '\167', '\141', '\040', '\061', '\012', '\121', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\130', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\117', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\105', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\112', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\110', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\150', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\110', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\170', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\160', '\110', '\040', '\160', '\162', '\040', '\061', '\012', '\111', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\155', '\105', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\123', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\146', '\130', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\106', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\156', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\153', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\152', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\157', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\127', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\115', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\115', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\142', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\103', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\112', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\104', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\152', '\114', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\151', '\107', '\040', '\151', '\156', '\040', '\061', '\012', '\132', '\154', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\126', '\163', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\106', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\155', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\104', '\170', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\162', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\114', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\144', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\142', '\115', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\156', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\164', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\163', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\161', '\154', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\112', '\171', '\040', '\157', '\156', '\040', '\061', '\012', '\107', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\157', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\163', '\111', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\106', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\131', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\105', '\157', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\143', '\115', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\167', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\153', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\164', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\110', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\145', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\165', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\167', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\131', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\107', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\166', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\102', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\130', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\165', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\163', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\113', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\123', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\142', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\141', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\164', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\142', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\110', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\131', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\160', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\152', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\107', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\172', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\121', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\154', '\112', '\040', '\154', '\151', '\040', '\061', '\012', '\143', '\161', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\131', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\121', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\145', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\102', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\142', '\124', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\121', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\106', '\155', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\164', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\104', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\146', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\123', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\112', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\170', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\113', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\143', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\156', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\142', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\116', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\145', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\130', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\113', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\103', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\147', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\115', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\113', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\161', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\144', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\172', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\152', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\152', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\147', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\157', '\111', '\040', '\157', '\156', '\040', '\061', '\012', '\131', '\171', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\146', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\162', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\121', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\164', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\142', '\130', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\155', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\142', '\106', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\147', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\127', '\165', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\170', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\116', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\146', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\162', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\157', '\130', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\152', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\114', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\152', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\143', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\147', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\113', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\151', '\132', '\040', '\151', '\156', '\040', '\061', '\012', '\162', '\130', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\166', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\124', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\132', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\126', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\123', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\172', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\161', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\121', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\167', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\163', '\116', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\105', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\163', '\104', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\114', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\124', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\162', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\111', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\111', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\114', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\161', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\127', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\131', '\143', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\152', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\130', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\161', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\170', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\154', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\151', '\104', '\170', '\040', '\154', '\151', '\040', '\061', '\012', '\132', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\142', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\122', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\154', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\123', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\172', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\141', '\145', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\113', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\127', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\160', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\105', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\163', '\113', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\115', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\146', '\132', '\040', '\153', '\165', '\040', '\061', '\012', '\127', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\172', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\153', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\172', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\166', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\155', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\116', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\102', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\103', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\156', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\167', '\116', '\040', '\151', '\156', '\040', '\061', '\012', '\160', '\146', '\116', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\103', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\165', '\110', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\167', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\152', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\155', '\126', '\040', '\144', '\151', '\040', '\061', '\012', '\143', '\103', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\130', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\155', '\122', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\170', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\162', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\152', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\170', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\154', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\103', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\146', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\107', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\142', '\105', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\127', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\170', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\157', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\122', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\147', '\151', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\104', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\127', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\127', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\122', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\164', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\167', '\127', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\162', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\146', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\146', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\113', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\127', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\165', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\153', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\131', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\166', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\101', '\157', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\122', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\127', '\144', '\040', '\151', '\156', '\040', '\061', '\012', '\147', '\107', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\143', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\143', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\103', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\155', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\121', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\127', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\124', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\141', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\167', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\166', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\113', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\160', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\154', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\154', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\114', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\163', '\114', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\106', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\155', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\143', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\142', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\154', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\170', '\101', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\106', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\146', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\160', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\104', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\124', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\127', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\123', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\160', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\124', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\153', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\102', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\156', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\161', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\167', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\154', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\152', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\122', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\126', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\165', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\162', '\102', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\171', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\120', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\106', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\155', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\120', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\112', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\147', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\162', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\102', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\124', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\167', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\127', '\147', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\117', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\142', '\102', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\157', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\152', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\166', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\142', '\106', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\127', '\165', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\152', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\142', '\130', '\040', '\142', '\145', '\040', '\061', '\012', '\145', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\155', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\130', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\110', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\146', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\167', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\110', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\160', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\107', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\167', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\115', '\154', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\112', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\156', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\107', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\153', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\142', '\113', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\124', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\106', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\127', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\172', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\167', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\110', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\161', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\124', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\120', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\120', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\144', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\166', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\141', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\167', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\122', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\154', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\154', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\114', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\172', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\171', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\130', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\161', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\147', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\160', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\153', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\146', '\102', '\040', '\142', '\145', '\040', '\061', '\012', '\127', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\164', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\130', '\145', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\130', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\170', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\170', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\142', '\142', '\130', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\120', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\103', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\151', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\107', '\160', '\040', '\160', '\157', '\040', '\061', '\012', '\150', '\120', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\111', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\103', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\172', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\110', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\167', '\110', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\103', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\170', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\160', '\117', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\121', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\142', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\130', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\153', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\171', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\107', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\172', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\166', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\130', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\130', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\171', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\155', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\142', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\171', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\155', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\116', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\161', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\107', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\131', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\160', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\171', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\116', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\101', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\102', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\160', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\130', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\115', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\147', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\114', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\106', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\166', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\144', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\170', '\113', '\040', '\142', '\145', '\040', '\061', '\012', '\102', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\160', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\112', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\113', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\110', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\112', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\113', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\132', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\156', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\112', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\170', '\131', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\125', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\160', '\166', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\111', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\132', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\160', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\155', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\146', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\127', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\142', '\116', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\104', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\144', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\167', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\143', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\172', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\105', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\170', '\110', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\153', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\130', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\103', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\172', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\122', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\147', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\147', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\125', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\112', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\123', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\153', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\112', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\162', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\165', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\126', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\164', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\147', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\171', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\112', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\170', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\146', '\131', '\040', '\146', '\157', '\040', '\061', '\012', '\130', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\147', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\171', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\142', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\124', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\163', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\154', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\160', '\121', '\040', '\160', '\157', '\040', '\061', '\012', '\161', '\112', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\150', '\131', '\151', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\154', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\166', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\163', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\116', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\113', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\113', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\110', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\125', '\171', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\170', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\111', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\124', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\146', '\120', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\170', '\111', '\040', '\146', '\157', '\040', '\061', '\012', '\166', '\121', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\166', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\167', '\116', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\141', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\170', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\160', '\117', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\157', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\160', '\124', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\116', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\114', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\113', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\125', '\171', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\146', '\130', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\163', '\126', '\040', '\163', '\164', '\040', '\061', '\012', '\130', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\155', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\121', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\132', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\117', '\141', '\171', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\142', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\125', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\170', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\103', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\146', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\166', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\111', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\104', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\121', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\112', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\102', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\126', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\106', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\152', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\165', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\167', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\103', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\112', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\144', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\161', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\127', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\163', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\114', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\144', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\147', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\131', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\132', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\146', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\166', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\126', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\115', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\121', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\125', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\107', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\166', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\162', '\101', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\162', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\115', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\171', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\114', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\105', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\130', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\110', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\157', '\120', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\111', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\103', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\104', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\107', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\103', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\166', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\120', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\162', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\150', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\154', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\104', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\154', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\121', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\144', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\121', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\121', '\171', '\040', '\157', '\156', '\040', '\061', '\012', '\164', '\167', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\144', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\156', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\151', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\163', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\113', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\153', '\105', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\132', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\142', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\142', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\111', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\107', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\160', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\155', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\141', '\112', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\146', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\103', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\107', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\170', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\107', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\152', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\146', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\160', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\146', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\124', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\132', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\105', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\131', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\122', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\123', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\172', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\112', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\103', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\166', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\167', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\155', '\122', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\164', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\124', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\153', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\111', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\163', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\123', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\126', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\155', '\111', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\127', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\113', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\157', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\147', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\167', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\146', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\150', '\153', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\167', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\121', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\125', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\113', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\121', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\126', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\167', '\124', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\154', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\115', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\113', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\160', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\153', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\142', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\132', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\147', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\124', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\167', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\162', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\167', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\167', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\172', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\162', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\107', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\132', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\106', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\166', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\111', '\171', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\104', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\131', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\162', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\105', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\144', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\107', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\107', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\155', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\104', '\155', '\040', '\160', '\157', '\040', '\061', '\012', '\161', '\155', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\126', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\101', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\105', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\110', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\141', '\161', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\120', '\166', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\104', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\144', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\172', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\102', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\124', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\132', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\146', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\152', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\153', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\123', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\104', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\112', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\114', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\106', '\163', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\155', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\166', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\131', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\116', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\112', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\146', '\115', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\155', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\107', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\153', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\144', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\111', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\111', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\102', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\102', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\171', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\167', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\120', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\124', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\172', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\160', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\132', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\142', '\101', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\124', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\170', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\106', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\116', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\115', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\117', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\170', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\163', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\157', '\152', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\143', '\105', '\157', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\167', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\152', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\124', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\172', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\146', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\143', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\167', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\151', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\167', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\121', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\106', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\166', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\131', '\145', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\167', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\153', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\110', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\170', '\102', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\111', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\146', '\105', '\040', '\142', '\145', '\040', '\061', '\012', '\147', '\122', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\170', '\116', '\040', '\142', '\145', '\040', '\061', '\012', '\153', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\103', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\170', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\103', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\114', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\142', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\170', '\132', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\120', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\151', '\131', '\172', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\124', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\126', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\167', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\124', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\105', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\160', '\120', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\152', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\171', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\117', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\147', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\115', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\167', '\101', '\040', '\160', '\162', '\040', '\061', '\012', '\114', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\153', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\111', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\146', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\163', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\125', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\152', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\114', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\153', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\171', '\110', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\172', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\167', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\103', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\144', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\144', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\124', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\154', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\171', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\171', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\127', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\115', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\110', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\126', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\172', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\144', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\115', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\152', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\155', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\160', '\115', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\154', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\121', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\102', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\160', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\130', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\121', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\164', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\142', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\160', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\155', '\130', '\163', '\040', '\155', '\145', '\040', '\061', '\012', '\132', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\153', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\155', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\155', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\167', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\154', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\142', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\160', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\122', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\171', '\104', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\120', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\144', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\142', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\170', '\121', '\040', '\170', '\145', '\040', '\061', '\012', '\104', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\153', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\103', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\155', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\162', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\167', '\113', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\167', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\121', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\155', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\152', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\172', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\131', '\162', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\170', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\125', '\170', '\040', '\170', '\145', '\040', '\061', '\012', '\167', '\155', '\124', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\131', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\126', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\131', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\116', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\164', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\114', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\153', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\127', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\147', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\120', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\147', '\161', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\157', '\125', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\167', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\167', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\155', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\167', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\113', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\113', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\154', '\122', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\110', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\112', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\155', '\111', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\103', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\131', '\144', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\146', '\131', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\142', '\131', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\155', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\110', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\152', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\131', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\160', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\170', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\144', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\152', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\160', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\106', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\123', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\104', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\162', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\131', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\144', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\166', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\153', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\110', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\126', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\153', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\106', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\127', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\160', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\116', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\115', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\132', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\116', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\142', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\113', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\132', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\163', '\152', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\152', '\131', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\164', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\110', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\147', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\117', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\130', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\113', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\123', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\111', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\113', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\146', '\103', '\040', '\146', '\157', '\040', '\061', '\012', '\150', '\113', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\123', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\121', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\151', '\107', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\120', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\172', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\153', '\114', '\040', '\153', '\141', '\040', '\061', '\012', '\110', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\130', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\155', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\126', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\170', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\121', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\166', '\114', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\110', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\170', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\112', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\115', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\103', '\171', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\160', '\130', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\114', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\124', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\130', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\111', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\152', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\170', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\104', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\130', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\152', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\172', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\147', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\156', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\126', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\142', '\111', '\040', '\142', '\145', '\040', '\061', '\012', '\132', '\160', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\146', '\117', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\123', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\141', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\130', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\166', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\123', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\144', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\124', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\113', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\164', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\107', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\157', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\113', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\121', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\114', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\107', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\155', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\144', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\116', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\130', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\104', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\115', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\112', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\144', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\142', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\106', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\103', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\130', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\161', '\124', '\040', '\165', '\156', '\040', '\061', '\012', '\102', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\102', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\107', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\130', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\142', '\106', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\164', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\126', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\164', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\120', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\120', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\157', '\110', '\040', '\157', '\156', '\040', '\061', '\012', '\130', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\130', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\124', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\167', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\132', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\125', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\103', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\115', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\142', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\107', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\107', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\167', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\124', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\172', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\153', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\172', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\170', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\126', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\155', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\124', '\156', '\162', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\152', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\164', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\104', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\146', '\121', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\170', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\170', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\121', '\156', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\153', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\167', '\104', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\106', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\142', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\110', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\126', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\117', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\127', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\115', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\167', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\156', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\121', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\122', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\113', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\152', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\160', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\153', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\142', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\153', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\113', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\113', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\161', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\120', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\131', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\107', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\111', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\125', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\161', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\146', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\146', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\106', '\143', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\112', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\130', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\161', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\102', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\124', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\144', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\144', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\152', '\112', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\132', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\172', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\146', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\102', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\125', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\144', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\112', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\170', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\160', '\107', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\154', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\104', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\122', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\166', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\162', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\171', '\131', '\040', '\156', '\171', '\040', '\061', '\012', '\171', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\141', '\120', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\167', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\171', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\124', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\102', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\113', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\126', '\164', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\101', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\170', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\166', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\150', '\155', '\040', '\155', '\141', '\040', '\061', '\012', '\132', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\166', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\144', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\167', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\131', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\130', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\126', '\170', '\040', '\166', '\151', '\040', '\061', '\012', '\122', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\104', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\171', '\166', '\040', '\166', '\151', '\040', '\061', '\012', '\103', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\122', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\121', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\142', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\154', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\131', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\167', '\123', '\040', '\160', '\162', '\040', '\061', '\012', '\113', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\144', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\160', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\166', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\167', '\107', '\040', '\151', '\156', '\040', '\061', '\012', '\162', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\102', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\131', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\105', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\163', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\166', '\103', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\153', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\151', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\107', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\101', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\126', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\170', '\124', '\040', '\142', '\145', '\040', '\061', '\012', '\121', '\150', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\154', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\142', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\145', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\113', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\124', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\153', '\167', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\106', '\161', '\040', '\151', '\156', '\040', '\061', '\012', '\155', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\114', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\163', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\104', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\144', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\170', '\116', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\107', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\112', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\103', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\104', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\121', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\110', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\127', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\115', '\153', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\156', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\117', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\146', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\115', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\131', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\153', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\131', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\161', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\107', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\113', '\147', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\111', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\112', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\104', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\146', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\146', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\124', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\125', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\171', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\124', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\170', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\144', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\147', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\162', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\131', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\115', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\113', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\115', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\110', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\146', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\147', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\155', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\167', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\150', '\143', '\040', '\151', '\143', '\040', '\061', '\012', '\170', '\111', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\146', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\106', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\121', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\147', '\162', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\147', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\111', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\170', '\116', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\121', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\101', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\103', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\126', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\157', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\130', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\121', '\164', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\156', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\127', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\130', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\127', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\166', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\145', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\112', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\155', '\120', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\154', '\122', '\040', '\151', '\163', '\040', '\061', '\012', '\125', '\141', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\142', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\116', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\126', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\167', '\125', '\040', '\151', '\156', '\040', '\061', '\012', '\103', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\130', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\107', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\142', '\131', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\172', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\127', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\115', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\172', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\145', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\170', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\121', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\166', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\124', '\155', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\167', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\146', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\145', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\102', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\123', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\171', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\152', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\164', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\164', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\167', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\157', '\127', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\170', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\110', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\143', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\102', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\153', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\144', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\166', '\107', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\107', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\155', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\107', '\154', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\155', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\121', '\167', '\040', '\167', '\151', '\040', '\061', '\012', '\170', '\141', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\146', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\107', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\166', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\167', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\155', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\112', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\110', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\121', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\102', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\160', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\125', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\144', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\115', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\106', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\101', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\167', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\120', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\104', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\132', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\102', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\121', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\121', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\157', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\131', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\163', '\104', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\165', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\122', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\104', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\146', '\170', '\101', '\040', '\146', '\157', '\040', '\061', '\012', '\170', '\120', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\112', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\160', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\170', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\114', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\123', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\125', '\153', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\127', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\113', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\131', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\152', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\153', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\167', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\120', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\130', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\101', '\157', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\166', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\117', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\155', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\153', '\111', '\040', '\153', '\165', '\040', '\061', '\012', '\160', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\144', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\104', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\122', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\111', '\165', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\105', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\146', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\165', '\112', '\040', '\165', '\156', '\040', '\061', '\012', '\156', '\122', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\170', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\146', '\132', '\040', '\156', '\171', '\040', '\061', '\012', '\157', '\161', '\124', '\040', '\150', '\157', '\040', '\061', '\012', '\143', '\147', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\142', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\130', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\126', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\146', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\167', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\120', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\103', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\172', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\154', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\147', '\152', '\040', '\152', '\157', '\040', '\061', '\012', '\107', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\107', '\040', '\146', '\157', '\040', '\061', '\012', '\155', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\144', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\110', '\153', '\040', '\151', '\156', '\040', '\061', '\012', '\107', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\104', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\172', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\106', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\164', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\142', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\166', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\144', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\113', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\103', '\154', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\162', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\155', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\130', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\117', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\172', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\160', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\132', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\106', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\156', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\130', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\142', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\120', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\132', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\160', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\144', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\153', '\117', '\040', '\153', '\157', '\040', '\061', '\012', '\147', '\163', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\107', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\153', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\160', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\167', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\165', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\156', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\127', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\170', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\156', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\124', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\126', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\152', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\161', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\166', '\105', '\040', '\163', '\164', '\040', '\061', '\012', '\127', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\110', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\101', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\146', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\115', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\167', '\117', '\040', '\160', '\162', '\040', '\061', '\012', '\131', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\142', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\152', '\132', '\040', '\157', '\156', '\040', '\061', '\012', '\163', '\165', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\170', '\107', '\040', '\160', '\162', '\040', '\061', '\012', '\162', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\171', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\124', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\126', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\105', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\117', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\124', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\152', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\127', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\110', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\102', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\167', '\123', '\040', '\167', '\141', '\040', '\061', '\012', '\103', '\142', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\167', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\156', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\111', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\107', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\152', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\147', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\171', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\143', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\170', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\166', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\156', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\154', '\162', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\103', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\105', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\114', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\166', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\154', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\166', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\142', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\116', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\172', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\131', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\146', '\107', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\146', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\102', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\162', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\165', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\171', '\112', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\155', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\130', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\131', '\155', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\170', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\116', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\172', '\125', '\040', '\146', '\157', '\040', '\061', '\012', '\122', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\154', '\111', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\115', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\150', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\167', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\116', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\155', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\125', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\110', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\123', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\153', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\164', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\102', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\112', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\144', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\124', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\130', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\167', '\102', '\040', '\157', '\167', '\040', '\061', '\012', '\153', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\146', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\132', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\132', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\155', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\114', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\113', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\161', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\113', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\146', '\122', '\040', '\142', '\145', '\040', '\061', '\012', '\122', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\116', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\144', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\160', '\122', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\127', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\101', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\162', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\155', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\114', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\167', '\102', '\040', '\151', '\156', '\040', '\061', '\012', '\145', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\157', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\142', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\160', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\172', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\127', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\152', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\167', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\113', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\110', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\166', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\127', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\162', '\163', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\164', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\171', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\123', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\153', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\167', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\157', '\107', '\142', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\102', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\127', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\155', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\107', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\112', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\152', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\116', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\104', '\144', '\040', '\167', '\141', '\040', '\061', '\012', '\154', '\162', '\102', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\113', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\161', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\112', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\102', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\165', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\104', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\147', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\144', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\171', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\117', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\121', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\110', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\111', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\121', '\153', '\040', '\153', '\157', '\040', '\061', '\012', '\107', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\132', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\166', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\167', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\115', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\152', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\102', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\102', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\143', '\165', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\121', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\160', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\155', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\146', '\110', '\040', '\146', '\157', '\040', '\061', '\012', '\160', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\164', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\127', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\170', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\155', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\144', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\132', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\116', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\142', '\116', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\153', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\126', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\112', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\147', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\170', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\166', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\101', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\155', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\116', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\113', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\122', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\154', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\121', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\155', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\142', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\126', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\146', '\105', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\126', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\113', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\143', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\124', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\166', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\107', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\166', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\147', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\160', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\172', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\170', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\147', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\115', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\152', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\146', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\152', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\150', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\125', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\127', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\107', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\167', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\165', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\104', '\154', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\171', '\116', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\155', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\130', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\155', '\167', '\127', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\111', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\107', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\131', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\126', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\156', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\155', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\121', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\113', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\125', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\123', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\126', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\152', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\172', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\146', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\147', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\116', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\124', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\102', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\167', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\121', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\104', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\124', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\127', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\152', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\152', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\103', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\171', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\127', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\156', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\102', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\111', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\162', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\132', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\116', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\106', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\127', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\142', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\163', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\154', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\127', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\103', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\146', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\126', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\143', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\104', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\124', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\147', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\165', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\146', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\102', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\142', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\126', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\146', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\120', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\132', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\122', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\103', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\152', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\154', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\155', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\161', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\147', '\165', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\110', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\145', '\121', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\154', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\107', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\111', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\132', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\170', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\121', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\117', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\112', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\172', '\142', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\153', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\112', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\155', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\143', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\167', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\132', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\162', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\130', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\143', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\167', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\111', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\165', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\104', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\110', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\121', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\166', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\110', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\170', '\111', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\117', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\160', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\155', '\103', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\152', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\127', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\107', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\123', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\132', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\113', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\122', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\150', '\167', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\160', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\155', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\150', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\110', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\127', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\146', '\113', '\040', '\142', '\145', '\040', '\061', '\012', '\112', '\147', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\124', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\113', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\153', '\172', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\167', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\164', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\130', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\172', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\154', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\146', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\122', '\172', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\163', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\103', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\106', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\151', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\107', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\123', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\131', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\104', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\161', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\110', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\144', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\156', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\165', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\146', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\171', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\112', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\170', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\103', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\113', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\167', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\110', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\142', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\125', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\147', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\171', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\160', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\152', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\154', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\167', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\126', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\163', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\156', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\160', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\172', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\104', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\120', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\151', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\153', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\165', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\157', '\110', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\167', '\110', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\102', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\157', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\170', '\120', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\167', '\122', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\112', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\156', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\115', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\170', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\172', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\160', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\103', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\124', '\144', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\163', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\167', '\115', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\130', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\146', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\123', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\170', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\113', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\127', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\162', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\155', '\107', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\143', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\111', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\123', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\145', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\132', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\107', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\154', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\155', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\154', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\167', '\103', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\152', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\102', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\102', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\130', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\107', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\130', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\165', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\157', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\151', '\126', '\164', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\132', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\166', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\103', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\121', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\154', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\103', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\166', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\126', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\120', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\146', '\110', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\142', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\157', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\123', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\122', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\110', '\143', '\165', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\170', '\112', '\040', '\156', '\171', '\040', '\061', '\012', '\154', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\131', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\127', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\162', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\107', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\172', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\147', '\126', '\040', '\147', '\151', '\040', '\061', '\012', '\122', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\106', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\121', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\116', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\146', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\102', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\147', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\123', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\103', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\155', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\166', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\112', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\141', '\104', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\107', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\152', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\124', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\115', '\144', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\160', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\142', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\110', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\132', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\121', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\153', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\132', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\171', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\155', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\146', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\167', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\166', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\115', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\160', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\113', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\154', '\111', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\155', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\132', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\122', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\125', '\146', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\160', '\106', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\167', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\107', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\122', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\153', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\125', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\152', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\113', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\160', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\157', '\125', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\152', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\122', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\150', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\164', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\152', '\161', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\167', '\125', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\171', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\122', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\106', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\105', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\120', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\146', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\115', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\113', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\110', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\106', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\160', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\116', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\104', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\160', '\131', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\156', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\146', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\172', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\116', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\102', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\120', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\143', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\115', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\112', '\152', '\040', '\162', '\151', '\040', '\061', '\012', '\141', '\130', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\163', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\121', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\113', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\166', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\107', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\103', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\122', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\130', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\151', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\106', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\105', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\112', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\172', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\104', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\170', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\107', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\166', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\160', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\170', '\104', '\040', '\160', '\162', '\040', '\061', '\012', '\132', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\157', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\166', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\115', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\107', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\116', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\131', '\143', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\111', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\114', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\122', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\156', '\162', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\171', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\143', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\155', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\105', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\123', '\156', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\162', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\126', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\166', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\144', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\155', '\124', '\040', '\155', '\145', '\040', '\061', '\012', '\114', '\142', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\160', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\167', '\126', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\125', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\144', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\132', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\167', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\142', '\115', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\147', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\113', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\112', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\130', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\160', '\126', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\161', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\125', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\124', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\115', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\152', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\141', '\126', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\110', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\126', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\154', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\162', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\114', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\124', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\166', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\145', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\116', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\172', '\142', '\040', '\142', '\151', '\040', '\061', '\012', '\127', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\142', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\156', '\143', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\126', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\123', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\166', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\161', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\104', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\171', '\111', '\040', '\151', '\156', '\040', '\061', '\012', '\145', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\161', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\163', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\124', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\155', '\103', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\106', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\156', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\127', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\172', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\121', '\145', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\165', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\154', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\107', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\147', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\115', '\040', '\146', '\157', '\040', '\061', '\012', '\152', '\123', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\147', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\114', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\166', '\132', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\155', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\146', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\103', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\165', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\132', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\111', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\132', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\155', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\170', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\144', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\102', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\131', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\171', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\107', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\116', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\106', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\166', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\106', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\167', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\166', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\122', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\172', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\160', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\143', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\120', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\171', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\155', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\154', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\105', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\144', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\114', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\101', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\172', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\117', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\144', '\163', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\166', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\120', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\132', '\162', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\103', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\146', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\146', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\165', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\146', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\154', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\164', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\127', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\121', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\126', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\155', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\144', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\155', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\121', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\150', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\166', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\104', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\144', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\166', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\166', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\166', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\171', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\112', '\146', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\141', '\102', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\127', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\107', '\142', '\040', '\142', '\151', '\040', '\061', '\012', '\147', '\152', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\162', '\124', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\152', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\166', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\113', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\124', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\127', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\127', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\113', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\115', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\153', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\167', '\130', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\167', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\167', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\114', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\115', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\160', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\166', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\143', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\152', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\126', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\126', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\172', '\156', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\171', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\113', '\154', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\144', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\105', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\160', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\104', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\165', '\113', '\040', '\165', '\156', '\040', '\061', '\012', '\166', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\127', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\120', '\156', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\114', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\160', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\114', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\160', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\104', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\167', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\102', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\107', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\146', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\154', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\125', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\146', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\121', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\107', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\102', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\112', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\104', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\115', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\146', '\115', '\040', '\156', '\171', '\040', '\061', '\012', '\107', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\172', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\116', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\162', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\146', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\124', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\166', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\120', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\167', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\115', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\170', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\132', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\106', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\110', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\163', '\114', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\122', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\163', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\102', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\144', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\127', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\153', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\103', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\161', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\153', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\144', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\170', '\114', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\130', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\152', '\113', '\040', '\151', '\156', '\040', '\061', '\012', '\163', '\106', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\110', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\120', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\102', '\144', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\164', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\171', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\156', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\112', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\127', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\153', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\164', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\172', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\170', '\116', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\153', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\155', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\160', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\107', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\152', '\170', '\040', '\172', '\152', '\040', '\061', '\012', '\164', '\166', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\104', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\171', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\116', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\166', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\120', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\167', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\160', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\104', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\105', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\132', '\143', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\152', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\104', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\127', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\166', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\164', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\151', '\121', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\106', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\125', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\146', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\123', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\155', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\106', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\120', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\151', '\161', '\121', '\040', '\164', '\151', '\040', '\061', '\012', '\155', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\170', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\166', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\144', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\154', '\101', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\106', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\146', '\132', '\040', '\146', '\157', '\040', '\061', '\012', '\152', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\116', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\164', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\110', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\103', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\143', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\104', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\130', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\115', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\107', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\103', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\132', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\157', '\121', '\144', '\040', '\157', '\156', '\040', '\061', '\012', '\106', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\167', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\157', '\111', '\040', '\157', '\156', '\040', '\061', '\012', '\163', '\112', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\113', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\164', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\126', '\146', '\040', '\147', '\151', '\040', '\061', '\012', '\160', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\107', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\172', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\166', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\130', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\115', '\154', '\040', '\154', '\151', '\040', '\061', '\012', '\142', '\131', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\172', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\113', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\146', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\154', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\120', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\164', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\154', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\110', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\121', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\114', '\144', '\143', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\125', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\112', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\115', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\141', '\167', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\164', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\172', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\172', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\102', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\163', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\125', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\163', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\163', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\130', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\154', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\126', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\146', '\101', '\040', '\153', '\141', '\040', '\061', '\012', '\126', '\155', '\153', '\040', '\155', '\107', '\040', '\061', '\012', '\152', '\113', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\120', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\120', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\131', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\163', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\170', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\153', '\106', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\127', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\143', '\165', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\132', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\142', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\141', '\121', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\172', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\153', '\114', '\040', '\153', '\141', '\040', '\061', '\012', '\104', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\153', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\114', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\116', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\142', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\145', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\132', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\166', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\103', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\172', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\154', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\112', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\106', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\115', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\153', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\146', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\110', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\170', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\112', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\172', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\127', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\130', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\162', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\170', '\132', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\130', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\101', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\151', '\107', '\153', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\105', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\164', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\121', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\112', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\153', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\156', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\167', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\127', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\160', '\124', '\040', '\160', '\162', '\040', '\061', '\012', '\112', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\116', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\167', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\145', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\144', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\127', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\154', '\111', '\040', '\154', '\145', '\040', '\061', '\012', '\102', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\146', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\164', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\115', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\117', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\104', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\155', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\152', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\163', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\170', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\163', '\107', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\130', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\145', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\106', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\130', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\101', '\157', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\153', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\106', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\142', '\130', '\040', '\142', '\145', '\040', '\061', '\012', '\157', '\103', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\131', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\116', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\156', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\167', '\112', '\040', '\143', '\155', '\040', '\061', '\012', '\161', '\112', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\116', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\167', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\143', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\102', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\114', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\162', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\111', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\102', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\172', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\152', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\170', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\144', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\146', '\115', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\121', '\155', '\040', '\121', '\117', '\040', '\061', '\012', '\172', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\142', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\125', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\152', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\152', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\131', '\151', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\141', '\116', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\116', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\144', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\102', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\132', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\107', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\103', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\167', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\142', '\126', '\040', '\167', '\141', '\040', '\061', '\012', '\105', '\161', '\164', '\040', '\145', '\161', '\040', '\061', '\012', '\130', '\150', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\125', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\170', '\116', '\040', '\163', '\164', '\040', '\061', '\012', '\117', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\103', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\147', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\152', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\163', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\107', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\115', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\153', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\122', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\167', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\112', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\126', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\131', '\154', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\154', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\104', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\113', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\120', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\131', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\146', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\146', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\113', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\111', '\171', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\165', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\113', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\132', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\160', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\146', '\114', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\152', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\130', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\167', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\131', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\131', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\161', '\131', '\040', '\145', '\161', '\040', '\061', '\012', '\165', '\111', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\107', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\167', '\106', '\040', '\163', '\164', '\040', '\061', '\012', '\110', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\164', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\146', '\127', '\040', '\150', '\127', '\040', '\061', '\012', '\151', '\171', '\107', '\040', '\151', '\156', '\040', '\061', '\012', '\172', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\113', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\145', '\106', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\152', '\151', '\040', '\152', '\123', '\040', '\061', '\012', '\155', '\164', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\110', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\170', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\164', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\127', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\123', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\172', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\160', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\166', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\131', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\123', '\161', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\147', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\107', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\125', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\107', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\131', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\122', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\124', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\132', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\117', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\152', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\120', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\167', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\167', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\107', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\160', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\124', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\117', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\160', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\131', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\152', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\172', '\156', '\040', '\114', '\107', '\040', '\061', '\012', '\131', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\131', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\130', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\111', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\112', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\146', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\170', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\104', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\163', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\152', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\125', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\144', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\154', '\125', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\102', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\142', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\154', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\162', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\166', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\103', '\160', '\040', '\107', '\103', '\040', '\061', '\012', '\156', '\126', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\142', '\107', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\144', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\172', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\125', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\132', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\132', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\122', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\167', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\167', '\123', '\040', '\163', '\164', '\040', '\061', '\012', '\105', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\105', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\153', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\152', '\127', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\130', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\166', '\131', '\040', '\166', '\113', '\040', '\061', '\012', '\154', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\170', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\126', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\171', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\113', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\167', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\160', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\147', '\145', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\104', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\160', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\155', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\125', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\127', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\162', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\132', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\152', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\121', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\107', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\167', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\160', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\113', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\115', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\164', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\160', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\104', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\113', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\143', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\107', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\170', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\120', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\155', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\155', '\124', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\170', '\103', '\040', '\107', '\103', '\040', '\061', '\012', '\154', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\153', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\154', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\120', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\166', '\121', '\040', '\121', '\117', '\040', '\061', '\012', '\152', '\107', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\115', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\117', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\144', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\166', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\142', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\146', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\160', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\170', '\106', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\132', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\107', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\120', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\107', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\142', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\152', '\103', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\123', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\111', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\111', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\160', '\106', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\125', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\125', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\144', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\167', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\110', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\152', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\120', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\127', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\162', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\157', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\131', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\117', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\126', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\106', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\154', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\166', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\142', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\120', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\121', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\105', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\163', '\102', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\155', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\164', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\144', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\167', '\111', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\160', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\130', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\131', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\106', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\164', '\102', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\103', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\162', '\171', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\113', '\144', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\116', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\122', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\143', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\141', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\141', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\170', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\125', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\117', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\120', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\146', '\116', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\154', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\132', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\105', '\161', '\040', '\166', '\113', '\040', '\061', '\012', '\130', '\166', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\120', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\143', '\132', '\040', '\143', '\155', '\040', '\061', '\012', '\154', '\104', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\167', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\162', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\113', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\115', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\144', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\146', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\144', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\166', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\120', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\172', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\106', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\122', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\130', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\110', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\145', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\153', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\132', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\124', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\110', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\154', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\113', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\142', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\142', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\165', '\106', '\040', '\165', '\156', '\040', '\061', '\012', '\161', '\172', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\141', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\155', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\141', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\153', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\157', '\103', '\161', '\040', '\107', '\103', '\040', '\061', '\012', '\161', '\121', '\150', '\040', '\121', '\117', '\040', '\061', '\012', '\143', '\167', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\115', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\113', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\113', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\161', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\107', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\130', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\115', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\132', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\171', '\171', '\105', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\125', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\126', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\115', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\127', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\132', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\157', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\122', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\120', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\161', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\160', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\131', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\145', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\152', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\161', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\166', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\106', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\110', '\144', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\132', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\124', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\162', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\104', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\145', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\172', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\172', '\143', '\040', '\143', '\155', '\040', '\061', '\012', '\170', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\167', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\170', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\126', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\143', '\147', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\152', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\132', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\172', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\110', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\116', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\154', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\160', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\164', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\121', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\113', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\122', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\160', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\126', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\121', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\121', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\162', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\161', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\112', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\170', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\146', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\126', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\102', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\130', '\154', '\040', '\130', '\155', '\040', '\061', '\012', '\150', '\167', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\162', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\154', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\117', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\103', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\106', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\127', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\123', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\102', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\166', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\146', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\113', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\153', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\111', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\101', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\146', '\110', '\040', '\160', '\162', '\040', '\061', '\012', '\121', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\142', '\125', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\104', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\154', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\110', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\126', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\147', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\162', '\113', '\040', '\110', '\113', '\040', '\061', '\012', '\127', '\170', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\126', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\142', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\152', '\143', '\040', '\152', '\123', '\040', '\061', '\012', '\152', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\164', '\166', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\171', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\146', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\142', '\114', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\153', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\166', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\107', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\114', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\120', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\170', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\146', '\125', '\040', '\146', '\157', '\040', '\061', '\012', '\151', '\116', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\120', '\142', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\151', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\122', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\142', '\102', '\040', '\142', '\145', '\040', '\061', '\012', '\163', '\132', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\170', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\115', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\170', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\142', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\141', '\157', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\147', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\155', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\151', '\117', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\117', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\142', '\146', '\123', '\040', '\142', '\145', '\040', '\061', '\012', '\121', '\150', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\155', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\131', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\145', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\164', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\115', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\123', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\146', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\123', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\123', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\103', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\167', '\103', '\040', '\160', '\162', '\040', '\061', '\012', '\107', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\153', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\102', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\163', '\127', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\132', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\167', '\116', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\115', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\110', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\163', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\127', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\170', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\126', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\162', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\142', '\125', '\040', '\160', '\162', '\040', '\061', '\012', '\124', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\162', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\130', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\112', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\132', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\125', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\106', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\142', '\116', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\156', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\115', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\123', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\113', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\170', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\152', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\162', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\166', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\170', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\166', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\106', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\163', '\146', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\111', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\170', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\111', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\110', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\130', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\127', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\145', '\113', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\142', '\126', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\130', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\131', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\167', '\130', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\166', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\142', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\125', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\155', '\127', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\170', '\126', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\152', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\155', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\161', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\161', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\112', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\144', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\122', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\126', '\143', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\111', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\155', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\121', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\146', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\142', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\106', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\127', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\156', '\110', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\156', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\170', '\132', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\155', '\110', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\172', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\155', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\166', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\121', '\163', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\110', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\110', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\172', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\115', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\167', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\146', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\106', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\106', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\130', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\126', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\110', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\127', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\125', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\107', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\167', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\172', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\164', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\167', '\115', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\162', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\155', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\155', '\120', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\151', '\131', '\040', '\151', '\156', '\040', '\061', '\012', '\160', '\124', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\160', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\150', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\117', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\146', '\106', '\040', '\146', '\157', '\040', '\061', '\012', '\143', '\124', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\160', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\147', '\167', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\103', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\115', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\124', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\155', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\170', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\101', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\110', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\147', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\146', '\125', '\040', '\160', '\162', '\040', '\061', '\012', '\157', '\111', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\104', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\151', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\146', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\170', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\155', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\155', '\115', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\126', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\146', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\171', '\121', '\040', '\156', '\171', '\040', '\061', '\012', '\155', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\121', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\106', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\150', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\143', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\167', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\127', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\112', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\157', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\171', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\152', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\142', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\163', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\131', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\120', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\103', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\126', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\170', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\152', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\132', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\164', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\142', '\111', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\101', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\167', '\146', '\124', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\146', '\113', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\165', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\112', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\160', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\161', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\154', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\162', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\170', '\127', '\040', '\146', '\157', '\040', '\061', '\012', '\123', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\166', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\116', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\130', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\104', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\113', '\172', '\040', '\165', '\163', '\040', '\061', '\012', '\161', '\152', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\153', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\106', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\115', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\121', '\145', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\131', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\164', '\142', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\142', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\126', '\153', '\040', '\156', '\144', '\040', '\061', '\012', '\142', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\144', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\161', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\123', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\172', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\121', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\107', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\127', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\130', '\162', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\112', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\127', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\142', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\167', '\120', '\040', '\151', '\156', '\040', '\061', '\012', '\154', '\127', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\124', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\110', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\143', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\144', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\115', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\156', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\171', '\131', '\040', '\156', '\171', '\040', '\061', '\012', '\141', '\106', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\131', '\171', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\142', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\152', '\101', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\156', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\154', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\155', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\121', '\157', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\164', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\170', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\164', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\122', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\116', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\151', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\131', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\153', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\170', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\152', '\101', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\103', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\143', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\102', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\131', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\110', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\166', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\112', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\121', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\142', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\170', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\170', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\155', '\106', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\102', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\110', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\126', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\146', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\166', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\115', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\156', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\121', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\157', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\153', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\110', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\165', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\167', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\160', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\125', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\170', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\126', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\112', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\102', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\155', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\113', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\156', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\103', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\125', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\115', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\107', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\152', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\110', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\132', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\166', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\154', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\155', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\106', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\166', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\164', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\161', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\166', '\116', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\143', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\153', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\105', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\167', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\147', '\130', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\123', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\167', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\124', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\172', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\144', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\162', '\123', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\110', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\142', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\146', '\132', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\167', '\102', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\155', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\172', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\126', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\167', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\111', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\160', '\125', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\167', '\115', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\153', '\101', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\125', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\113', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\170', '\123', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\141', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\146', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\132', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\130', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\104', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\146', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\141', '\121', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\152', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\160', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\115', '\155', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\113', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\146', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\167', '\116', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\160', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\170', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\115', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\167', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\102', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\101', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\123', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\127', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\142', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\157', '\124', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\154', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\144', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\166', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\111', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\172', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\172', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\153', '\121', '\040', '\153', '\165', '\040', '\061', '\012', '\154', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\167', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\107', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\122', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\117', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\165', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\132', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\142', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\104', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\155', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\167', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\117', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\167', '\111', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\152', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\117', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\146', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\161', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\104', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\155', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\126', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\127', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\165', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\146', '\116', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\146', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\142', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\152', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\170', '\125', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\130', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\172', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\125', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\171', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\111', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\166', '\116', '\040', '\163', '\164', '\040', '\061', '\012', '\112', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\126', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\144', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\142', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\146', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\107', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\117', '\166', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\152', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\120', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\160', '\124', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\163', '\102', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\170', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\106', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\157', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\155', '\104', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\142', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\106', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\154', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\171', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\152', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\131', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\165', '\112', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\145', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\162', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\102', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\156', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\155', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\166', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\155', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\172', '\117', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\121', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\120', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\131', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\120', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\127', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\103', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\145', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\132', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\103', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\166', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\122', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\142', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\172', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\154', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\127', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\132', '\170', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\113', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\143', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\103', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\101', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\125', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\115', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\125', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\132', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\167', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\164', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\122', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\166', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\102', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\147', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\127', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\167', '\120', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\166', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\111', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\167', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\114', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\151', '\130', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\161', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\163', '\114', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\165', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\105', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\107', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\125', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\155', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\153', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\167', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\155', '\123', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\171', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\142', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\127', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\167', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\156', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\104', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\123', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\121', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\162', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\107', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\162', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\154', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\142', '\106', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\116', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\121', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\126', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\160', '\120', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\154', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\153', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\106', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\121', '\157', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\154', '\125', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\154', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\155', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\127', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\155', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\114', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\154', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\161', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\147', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\107', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\167', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\167', '\155', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\142', '\105', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\153', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\117', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\167', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\146', '\125', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\146', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\116', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\104', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\142', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\153', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\101', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\106', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\167', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\125', '\157', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\104', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\107', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\122', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\142', '\106', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\146', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\146', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\104', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\106', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\163', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\152', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\112', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\126', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\166', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\116', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\122', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\107', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\132', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\164', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\132', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\115', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\120', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\172', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\152', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\172', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\103', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\146', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\167', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\153', '\115', '\040', '\153', '\157', '\040', '\061', '\012', '\166', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\120', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\112', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\155', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\115', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\116', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\162', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\163', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\123', '\144', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\106', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\127', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\152', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\167', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\152', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\132', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\113', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\144', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\166', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\160', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\164', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\171', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\130', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\113', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\126', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\120', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\106', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\170', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\131', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\167', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\121', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\142', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\131', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\170', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\122', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\160', '\122', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\142', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\121', '\171', '\040', '\164', '\157', '\040', '\061', '\012', '\166', '\170', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\160', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\120', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\156', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\153', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\110', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\146', '\123', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\103', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\147', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\106', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\104', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\111', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\164', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\122', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\103', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\152', '\124', '\040', '\162', '\157', '\040', '\061', '\012', '\162', '\152', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\160', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\101', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\164', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\114', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\152', '\123', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\126', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\105', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\107', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\117', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\106', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\120', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\163', '\113', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\114', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\153', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\103', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\116', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\124', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\120', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\106', '\166', '\040', '\162', '\157', '\040', '\061', '\012', '\122', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\161', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\155', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\165', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\147', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\144', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\101', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\167', '\117', '\040', '\167', '\141', '\040', '\061', '\012', '\145', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\160', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\121', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\141', '\106', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\146', '\102', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\160', '\101', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\107', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\127', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\172', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\163', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\121', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\146', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\142', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\113', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\130', '\141', '\040', '\141', '\162', '\040', '\061', '\012', '\167', '\152', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\127', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\152', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\122', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\147', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\172', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\145', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\152', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\155', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\107', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\113', '\144', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\121', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\127', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\103', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\113', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\157', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\171', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\112', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\107', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\152', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\123', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\106', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\155', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\144', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\124', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\152', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\110', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\122', '\156', '\040', '\141', '\162', '\040', '\061', '\012', '\130', '\154', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\116', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\106', '\172', '\040', '\151', '\156', '\040', '\061', '\012', '\116', '\154', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\120', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\172', '\112', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\111', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\123', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\167', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\127', '\147', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\114', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\111', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\157', '\113', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\114', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\110', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\170', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\127', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\107', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\152', '\115', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\146', '\103', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\132', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\157', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\147', '\170', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\131', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\132', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\121', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\130', '\154', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\121', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\142', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\105', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\116', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\162', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\170', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\121', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\160', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\116', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\142', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\147', '\115', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\145', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\126', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\126', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\115', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\124', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\120', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\103', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\166', '\125', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\115', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\152', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\155', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\154', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\110', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\163', '\116', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\117', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\167', '\126', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\120', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\122', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\147', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\106', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\170', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\110', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\113', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\160', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\103', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\131', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\170', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\157', '\153', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\160', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\144', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\122', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\104', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\147', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\113', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\104', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\167', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\104', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\147', '\146', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\125', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\142', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\153', '\106', '\040', '\153', '\157', '\040', '\061', '\012', '\120', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\142', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\123', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\167', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\146', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\167', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\172', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\121', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\114', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\125', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\112', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\122', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\130', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\114', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\115', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\166', '\107', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\164', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\170', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\147', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\154', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\143', '\117', '\040', '\152', '\141', '\040', '\061', '\012', '\163', '\103', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\102', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\132', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\117', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\112', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\152', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\103', '\167', '\040', '\155', '\141', '\040', '\061', '\012', '\150', '\170', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\124', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\155', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\144', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\115', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\166', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\151', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\167', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\164', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\103', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\130', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\167', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\111', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\131', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\146', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\121', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\130', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\105', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\120', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\142', '\127', '\040', '\142', '\145', '\040', '\061', '\012', '\153', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\110', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\130', '\157', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\170', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\170', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\127', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\132', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\117', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\124', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\162', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\104', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\116', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\105', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\112', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\110', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\160', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\104', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\170', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\154', '\126', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\113', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\163', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\166', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\146', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\170', '\132', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\126', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\121', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\130', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\150', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\153', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\150', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\120', '\163', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\104', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\114', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\154', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\124', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\144', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\110', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\104', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\120', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\122', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\110', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\160', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\120', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\116', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\171', '\125', '\040', '\160', '\162', '\040', '\061', '\012', '\123', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\121', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\144', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\146', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\155', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\107', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\106', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\113', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\121', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\157', '\116', '\155', '\040', '\157', '\156', '\040', '\061', '\012', '\165', '\130', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\146', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\111', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\153', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\116', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\165', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\120', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\113', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\141', '\114', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\120', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\160', '\132', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\152', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\170', '\102', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\144', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\143', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\126', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\155', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\152', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\172', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\164', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\113', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\166', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\130', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\122', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\147', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\160', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\127', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\167', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\170', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\132', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\172', '\115', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\142', '\112', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\160', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\145', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\156', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\146', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\170', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\164', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\102', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\164', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\146', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\102', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\127', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\123', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\124', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\162', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\112', '\142', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\130', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\156', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\163', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\126', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\111', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\126', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\122', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\150', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\124', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\160', '\131', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\130', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\131', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\132', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\167', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\106', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\167', '\122', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\111', '\157', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\167', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\106', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\127', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\105', '\141', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\153', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\154', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\160', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\156', '\162', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\146', '\105', '\040', '\153', '\141', '\040', '\061', '\012', '\111', '\171', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\162', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\120', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\120', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\121', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\121', '\156', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\144', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\103', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\132', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\127', '\154', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\125', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\142', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\142', '\124', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\170', '\115', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\110', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\122', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\153', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\142', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\152', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\130', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\116', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\112', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\171', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\104', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\125', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\127', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\120', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\116', '\142', '\040', '\153', '\157', '\040', '\061', '\012', '\127', '\144', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\152', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\112', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\155', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\124', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\163', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\155', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\121', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\120', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\170', '\172', '\040', '\172', '\145', '\040', '\061', '\012', '\104', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\162', '\115', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\115', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\112', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\146', '\116', '\040', '\146', '\157', '\040', '\061', '\012', '\144', '\121', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\165', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\120', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\146', '\115', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\167', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\141', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\155', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\146', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\155', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\113', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\152', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\162', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\170', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\170', '\110', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\122', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\152', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\123', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\155', '\110', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\146', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\112', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\167', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\122', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\161', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\172', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\156', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\154', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\142', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\160', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\101', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\113', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\124', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\120', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\171', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\164', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\102', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\152', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\111', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\104', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\112', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\101', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\106', '\163', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\104', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\144', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\167', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\131', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\172', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\155', '\107', '\040', '\155', '\145', '\040', '\061', '\012', '\113', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\164', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\112', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\152', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\167', '\122', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\126', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\115', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\170', '\121', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\112', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\156', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\146', '\123', '\040', '\156', '\171', '\040', '\061', '\012', '\115', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\163', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\112', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\167', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\170', '\103', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\112', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\107', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\123', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\112', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\154', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\105', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\161', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\112', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\127', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\127', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\166', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\152', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\153', '\106', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\166', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\171', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\116', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\114', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\162', '\126', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\117', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\170', '\114', '\040', '\146', '\157', '\040', '\061', '\012', '\163', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\124', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\126', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\132', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\126', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\167', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\123', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\116', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\146', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\143', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\124', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\141', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\152', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\115', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\164', '\102', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\146', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\170', '\117', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\172', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\132', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\103', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\160', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\130', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\153', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\113', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\160', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\116', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\160', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\130', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\146', '\113', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\160', '\127', '\040', '\160', '\162', '\040', '\061', '\012', '\165', '\167', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\156', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\166', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\107', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\132', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\142', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\166', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\154', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\167', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\154', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\124', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\116', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\146', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\103', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\127', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\166', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\167', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\107', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\166', '\123', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\122', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\121', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\153', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\155', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\172', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\104', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\125', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\130', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\130', '\171', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\142', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\131', '\144', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\157', '\130', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\165', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\147', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\121', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\156', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\132', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\153', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\126', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\171', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\102', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\170', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\120', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\127', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\111', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\156', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\167', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\142', '\120', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\101', '\157', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\146', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\163', '\110', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\115', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\122', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\152', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\155', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\117', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\167', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\114', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\120', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\103', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\162', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\104', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\106', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\160', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\155', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\103', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\106', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\160', '\117', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\146', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\132', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\122', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\104', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\120', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\166', '\120', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\153', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\116', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\113', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\121', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\170', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\151', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\166', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\107', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\152', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\151', '\106', '\040', '\164', '\151', '\040', '\061', '\012', '\132', '\172', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\131', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\152', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\167', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\153', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\103', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\171', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\151', '\171', '\102', '\040', '\151', '\156', '\040', '\061', '\012', '\150', '\121', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\160', '\121', '\040', '\151', '\156', '\040', '\061', '\012', '\125', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\153', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\160', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\156', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\167', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\144', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\121', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\167', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\170', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\104', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\130', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\144', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\105', '\157', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\141', '\166', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\172', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\110', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\106', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\116', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\102', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\122', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\154', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\172', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\131', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\155', '\122', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\130', '\171', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\171', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\130', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\112', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\172', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\152', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\172', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\161', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\167', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\152', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\146', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\151', '\122', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\147', '\144', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\101', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\153', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\116', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\116', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\155', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\146', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\107', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\163', '\110', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\167', '\106', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\120', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\104', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\121', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\111', '\167', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\103', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\106', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\112', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\151', '\111', '\040', '\151', '\156', '\040', '\061', '\012', '\122', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\116', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\126', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\120', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\113', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\104', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\106', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\126', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\146', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\164', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\116', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\141', '\123', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\167', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\167', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\111', '\157', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\150', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\102', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\107', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\132', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\142', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\106', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\132', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\172', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\104', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\146', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\161', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\172', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\123', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\170', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\130', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\142', '\124', '\040', '\142', '\145', '\040', '\061', '\012', '\163', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\120', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\113', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\124', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\113', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\125', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\104', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\125', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\171', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\103', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\130', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\107', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\156', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\120', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\146', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\126', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\167', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\104', '\172', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\146', '\107', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\147', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\130', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\147', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\165', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\170', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\141', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\130', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\166', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\121', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\166', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\170', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\112', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\123', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\122', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\103', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\107', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\147', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\116', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\110', '\153', '\040', '\157', '\156', '\040', '\061', '\012', '\127', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\166', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\153', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\131', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\157', '\132', '\040', '\157', '\156', '\040', '\061', '\012', '\156', '\107', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\155', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\155', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\103', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\130', '\172', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\113', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\105', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\167', '\123', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\171', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\121', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\127', '\160', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\144', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\155', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\144', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\162', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\102', '\160', '\040', '\160', '\157', '\040', '\061', '\012', '\146', '\153', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\145', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\107', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\146', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\123', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\121', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\160', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\155', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\115', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\141', '\161', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\153', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\127', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\171', '\112', '\040', '\156', '\171', '\040', '\061', '\012', '\167', '\166', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\131', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\162', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\113', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\104', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\113', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\172', '\163', '\124', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\111', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\146', '\125', '\040', '\146', '\157', '\040', '\061', '\012', '\127', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\127', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\116', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\146', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\162', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\126', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\126', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\152', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\171', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\163', '\105', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\103', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\167', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\146', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\105', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\114', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\117', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\160', '\123', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\111', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\164', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\107', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\166', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\116', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\146', '\113', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\131', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\115', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\157', '\102', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\163', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\155', '\111', '\040', '\155', '\145', '\040', '\061', '\012', '\164', '\155', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\124', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\116', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\125', '\165', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\152', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\117', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\166', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\107', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\110', '\160', '\040', '\141', '\154', '\040', '\061', '\012', '\161', '\147', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\142', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\121', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\161', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\167', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\153', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\150', '\104', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\121', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\112', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\121', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\112', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\115', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\152', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\153', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\116', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\157', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\152', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\106', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\152', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\156', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\112', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\132', '\162', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\167', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\111', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\167', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\102', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\167', '\106', '\040', '\151', '\156', '\040', '\061', '\012', '\162', '\110', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\123', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\113', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\102', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\155', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\131', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\107', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\121', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\166', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\170', '\115', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\116', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\154', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\144', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\154', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\142', '\104', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\101', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\110', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\170', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\126', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\160', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\152', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\107', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\151', '\171', '\120', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\155', '\113', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\155', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\102', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\105', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\103', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\172', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\111', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\131', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\161', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\155', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\132', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\123', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\113', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\127', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\143', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\166', '\102', '\040', '\160', '\157', '\040', '\061', '\012', '\164', '\147', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\106', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\125', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\132', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\144', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\157', '\111', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\167', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\112', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\170', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\111', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\171', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\142', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\153', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\145', '\157', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\130', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\106', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\112', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\163', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\115', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\156', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\161', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\103', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\117', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\154', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\142', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\152', '\116', '\040', '\163', '\164', '\040', '\061', '\012', '\125', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\126', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\127', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\155', '\115', '\040', '\155', '\145', '\040', '\061', '\012', '\126', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\132', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\116', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\142', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\155', '\112', '\040', '\155', '\145', '\040', '\061', '\012', '\106', '\143', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\123', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\155', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\144', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\156', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\171', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\172', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\147', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\126', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\144', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\150', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\127', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\164', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\111', '\157', '\040', '\150', '\157', '\040', '\061', '\012', '\153', '\146', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\112', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\145', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\165', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\142', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\130', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\124', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\172', '\114', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\146', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\153', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\105', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\167', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\104', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\164', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\164', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\167', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\130', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\146', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\116', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\102', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\154', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\146', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\125', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\124', '\144', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\131', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\143', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\102', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\112', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\162', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\131', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\114', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\156', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\106', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\120', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\116', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\154', '\120', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\114', '\170', '\040', '\152', '\157', '\040', '\061', '\012', '\152', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\167', '\124', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\107', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\164', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\156', '\127', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\153', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\111', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\132', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\117', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\110', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\152', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\144', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\142', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\153', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\172', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\127', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\170', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\160', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\164', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\163', '\110', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\111', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\106', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\107', '\153', '\040', '\157', '\156', '\040', '\061', '\012', '\110', '\156', '\143', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\122', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\107', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\131', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\121', '\157', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\116', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\144', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\107', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\162', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\166', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\132', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\104', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\120', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\147', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\127', '\167', '\040', '\157', '\167', '\040', '\061', '\012', '\155', '\112', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\130', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\131', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\110', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\144', '\120', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\106', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\163', '\107', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\101', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\154', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\171', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\126', '\162', '\040', '\151', '\156', '\040', '\061', '\012', '\172', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\104', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\102', '\144', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\161', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\153', '\163', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\120', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\146', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\132', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\104', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\112', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\127', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\120', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\170', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\120', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\162', '\152', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\167', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\163', '\125', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\127', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\102', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\142', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\160', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\155', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\131', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\142', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\171', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\102', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\107', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\170', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\146', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\142', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\153', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\127', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\117', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\120', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\163', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\157', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\167', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\164', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\162', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\126', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\164', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\110', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\147', '\163', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\154', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\152', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\166', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\111', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\110', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\115', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\131', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\126', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\156', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\155', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\152', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\121', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\116', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\146', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\152', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\102', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\112', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\107', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\132', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\107', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\127', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\163', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\170', '\123', '\040', '\156', '\171', '\040', '\061', '\012', '\162', '\170', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\116', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\116', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\172', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\160', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\130', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\154', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\152', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\164', '\112', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\167', '\130', '\040', '\151', '\156', '\040', '\061', '\012', '\156', '\126', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\172', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\167', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\161', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\116', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\165', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\113', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\111', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\115', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\127', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\115', '\143', '\040', '\156', '\144', '\040', '\061', '\012', '\132', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\154', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\125', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\110', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\124', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\152', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\170', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\116', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\114', '\147', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\144', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\112', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\130', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\167', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\145', '\166', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\160', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\101', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\142', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\146', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\130', '\144', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\101', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\142', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\155', '\122', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\172', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\147', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\112', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\132', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\146', '\101', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\155', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\116', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\126', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\122', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\132', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\147', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\152', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\152', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\155', '\111', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\115', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\153', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\101', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\113', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\102', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\105', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\170', '\110', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\166', '\101', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\143', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\170', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\123', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\102', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\127', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\167', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\153', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\116', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\125', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\146', '\120', '\040', '\146', '\157', '\040', '\061', '\012', '\142', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\170', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\166', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\125', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\170', '\103', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\120', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\170', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\105', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\142', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\167', '\123', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\114', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\115', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\106', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\146', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\122', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\156', '\161', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\160', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\110', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\124', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\152', '\107', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\141', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\120', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\154', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\172', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\102', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\170', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\166', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\103', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\115', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\122', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\153', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\120', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\107', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\114', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\107', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\107', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\144', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\152', '\110', '\040', '\151', '\156', '\040', '\061', '\012', '\155', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\116', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\115', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\102', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\127', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\142', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\107', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\145', '\170', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\127', '\152', '\040', '\152', '\157', '\040', '\061', '\012', '\160', '\121', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\143', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\117', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\164', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\162', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\130', '\160', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\125', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\113', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\127', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\161', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\112', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\125', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\112', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\166', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\141', '\120', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\111', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\146', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\132', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\155', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\155', '\122', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\103', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\106', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\113', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\166', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\142', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\142', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\121', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\121', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\131', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\120', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\117', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\116', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\110', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\144', '\105', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\126', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\120', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\122', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\157', '\105', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\156', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\166', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\157', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\155', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\104', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\104', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\153', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\170', '\124', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\131', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\124', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\125', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\154', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\163', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\146', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\142', '\107', '\040', '\142', '\145', '\040', '\061', '\012', '\112', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\127', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\104', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\127', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\130', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\166', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\166', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\104', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\155', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\146', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\101', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\146', '\123', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\171', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\121', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\160', '\130', '\040', '\160', '\162', '\040', '\061', '\012', '\132', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\105', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\121', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\160', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\132', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\167', '\125', '\040', '\167', '\141', '\040', '\061', '\012', '\122', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\151', '\127', '\040', '\151', '\156', '\040', '\061', '\012', '\150', '\161', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\102', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\160', '\127', '\040', '\160', '\162', '\040', '\061', '\012', '\162', '\110', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\150', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\115', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\127', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\107', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\152', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\166', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\166', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\155', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\103', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\153', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\115', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\116', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\172', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\147', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\167', '\102', '\040', '\160', '\162', '\040', '\061', '\012', '\112', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\131', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\124', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\112', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\172', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\171', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\171', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\102', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\166', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\142', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\142', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\167', '\125', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\112', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\111', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\166', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\122', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\117', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\105', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\162', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\170', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\111', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\102', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\124', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\103', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\147', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\160', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\146', '\105', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\170', '\122', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\106', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\131', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\143', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\102', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\162', '\126', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\166', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\131', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\116', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\121', '\151', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\167', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\120', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\166', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\153', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\155', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\144', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\163', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\166', '\106', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\127', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\131', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\131', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\110', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\142', '\115', '\040', '\160', '\162', '\040', '\061', '\012', '\110', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\161', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\110', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\127', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\154', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\156', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\115', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\113', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\157', '\126', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\117', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\164', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\154', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\144', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\146', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\113', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\112', '\151', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\123', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\147', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\143', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\116', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\160', '\102', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\120', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\155', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\170', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\166', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\162', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\120', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\155', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\161', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\103', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\155', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\167', '\120', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\126', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\116', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\166', '\107', '\040', '\166', '\145', '\040', '\061', '\012', '\126', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\154', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\121', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\164', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\145', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\161', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\114', '\146', '\040', '\160', '\157', '\040', '\061', '\012', '\170', '\166', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\146', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\126', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\151', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\163', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\156', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\162', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\122', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\172', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\142', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\153', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\153', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\106', '\167', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\110', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\162', '\102', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\116', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\107', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\105', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\126', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\167', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\111', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\161', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\152', '\166', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\123', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\170', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\110', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\126', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\125', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\170', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\126', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\144', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\150', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\146', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\142', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\146', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\172', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\110', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\170', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\155', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\155', '\110', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\172', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\155', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\130', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\146', '\104', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\103', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\142', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\154', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\160', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\155', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\131', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\113', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\144', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\110', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\130', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\166', '\124', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\151', '\103', '\040', '\151', '\156', '\040', '\061', '\012', '\147', '\153', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\112', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\160', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\120', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\122', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\147', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\115', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\110', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\111', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\132', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\161', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\157', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\121', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\165', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\121', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\106', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\110', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\147', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\103', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\142', '\123', '\040', '\142', '\145', '\040', '\061', '\012', '\151', '\110', '\172', '\040', '\151', '\156', '\040', '\061', '\012', '\153', '\107', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\167', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\104', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\166', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\116', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\131', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\110', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\106', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\155', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\102', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\147', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\131', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\167', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\167', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\105', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\172', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\107', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\153', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\112', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\161', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\146', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\126', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\167', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\154', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\106', '\156', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\125', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\102', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\166', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\115', '\167', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\126', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\166', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\131', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\102', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\111', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\104', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\117', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\104', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\124', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\112', '\162', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\167', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\144', '\126', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\152', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\127', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\142', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\144', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\167', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\101', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\171', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\120', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\153', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\125', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\120', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\157', '\106', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\131', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\131', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\104', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\167', '\127', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\114', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\141', '\102', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\104', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\113', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\146', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\115', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\114', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\167', '\127', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\172', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\111', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\144', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\147', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\167', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\171', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\102', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\117', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\114', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\144', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\146', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\161', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\165', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\110', '\142', '\040', '\160', '\157', '\040', '\061', '\012', '\166', '\122', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\160', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\127', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\142', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\132', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\143', '\102', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\152', '\111', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\166', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\167', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\102', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\144', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\170', '\110', '\040', '\156', '\171', '\040', '\061', '\012', '\146', '\170', '\110', '\040', '\146', '\157', '\040', '\061', '\012', '\164', '\130', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\102', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\112', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\152', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\126', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\122', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\104', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\153', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\155', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\141', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\111', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\155', '\120', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\155', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\154', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\151', '\126', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\132', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\125', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\144', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\157', '\125', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\112', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\125', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\166', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\121', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\122', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\111', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\107', '\147', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\116', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\166', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\155', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\160', '\117', '\040', '\160', '\157', '\040', '\061', '\012', '\164', '\105', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\146', '\114', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\131', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\127', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\124', '\164', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\126', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\143', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\167', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\157', '\112', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\104', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\112', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\120', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\106', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\154', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\142', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\131', '\171', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\102', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\111', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\160', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\116', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\123', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\157', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\113', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\154', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\144', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\160', '\112', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\147', '\161', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\150', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\165', '\131', '\040', '\165', '\156', '\040', '\061', '\012', '\152', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\165', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\172', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\106', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\146', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\111', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\131', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\124', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\165', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\110', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\122', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\120', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\113', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\160', '\101', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\153', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\123', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\170', '\127', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\152', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\117', '\151', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\171', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\104', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\171', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\166', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\126', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\127', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\101', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\132', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\121', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\142', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\144', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\170', '\104', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\170', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\110', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\167', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\142', '\101', '\040', '\142', '\145', '\040', '\061', '\012', '\122', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\123', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\121', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\155', '\113', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\156', '\101', '\040', '\141', '\156', '\040', '\061', '\012', '\120', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\163', '\106', '\040', '\163', '\164', '\040', '\061', '\012', '\164', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\146', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\161', '\130', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\124', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\160', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\131', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\102', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\105', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\111', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\116', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\117', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\130', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\106', '\155', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\153', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\146', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\160', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\142', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\166', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\155', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\106', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\106', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\106', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\142', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\155', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\106', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\104', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\106', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\107', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\164', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\172', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\112', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\115', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\167', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\156', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\142', '\120', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\144', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\110', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\166', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\125', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\152', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\104', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\142', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\123', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\117', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\164', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\167', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\115', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\166', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\115', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\153', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\152', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\120', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\170', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\131', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\162', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\143', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\112', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\125', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\130', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\104', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\170', '\107', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\117', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\147', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\160', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\116', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\121', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\106', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\104', '\142', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\163', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\132', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\103', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\170', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\121', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\113', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\117', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\170', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\167', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\107', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\122', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\166', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\126', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\155', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\144', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\112', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\104', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\150', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\164', '\121', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\171', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\132', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\113', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\152', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\147', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\116', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\112', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\160', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\167', '\107', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\145', '\112', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\162', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\154', '\111', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\107', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\154', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\103', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\121', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\114', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\167', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\121', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\146', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\122', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\125', '\157', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\160', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\110', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\127', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\102', '\161', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\127', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\146', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\127', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\162', '\166', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\154', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\142', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\156', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\106', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\112', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\120', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\155', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\156', '\111', '\040', '\156', '\164', '\040', '\061', '\012', '\161', '\117', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\171', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\125', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\116', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\105', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\160', '\104', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\170', '\114', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\145', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\153', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\102', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\125', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\167', '\117', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\162', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\124', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\170', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\110', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\112', '\163', '\040', '\157', '\156', '\040', '\061', '\012', '\163', '\122', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\121', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\144', '\116', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\170', '\122', '\040', '\155', '\145', '\040', '\061', '\012', '\130', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\120', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\153', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\160', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\132', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\156', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\132', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\162', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\127', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\120', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\125', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\144', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\172', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\162', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\155', '\116', '\040', '\155', '\145', '\040', '\061', '\012', '\117', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\114', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\112', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\107', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\115', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\124', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\110', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\127', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\170', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\170', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\166', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\103', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\146', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\160', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\154', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\170', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\132', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\153', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\127', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\161', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\154', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\113', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\107', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\103', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\155', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\156', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\171', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\117', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\155', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\132', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\117', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\115', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\127', '\164', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\170', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\102', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\164', '\116', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\124', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\104', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\122', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\125', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\102', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\152', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\111', '\171', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\111', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\132', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\162', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\117', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\162', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\147', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\105', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\153', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\152', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\155', '\127', '\040', '\155', '\145', '\040', '\061', '\012', '\107', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\132', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\124', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\114', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\120', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\167', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\144', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\163', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\104', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\125', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\111', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\162', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\142', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\166', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\162', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\170', '\111', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\103', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\130', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\104', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\144', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\142', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\130', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\165', '\121', '\040', '\165', '\156', '\040', '\061', '\012', '\153', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\127', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\157', '\103', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\132', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\144', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\131', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\110', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\126', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\141', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\170', '\127', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\156', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\124', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\106', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\167', '\115', '\040', '\167', '\141', '\040', '\061', '\012', '\104', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\167', '\111', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\154', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\103', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\162', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\131', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\164', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\154', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\112', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\114', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\154', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\143', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\162', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\152', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\112', '\144', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\114', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\121', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\150', '\153', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\114', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\130', '\147', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\113', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\112', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\156', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\153', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\127', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\144', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\164', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\111', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\145', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\162', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\104', '\160', '\040', '\160', '\157', '\040', '\061', '\012', '\103', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\170', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\102', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\130', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\102', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\115', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\170', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\114', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\160', '\103', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\113', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\150', '\167', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\102', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\156', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\155', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\113', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\107', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\114', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\120', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\115', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\167', '\105', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\155', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\103', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\166', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\153', '\116', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\126', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\121', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\112', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\172', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\162', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\102', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\122', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\111', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\106', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\144', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\113', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\102', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\104', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\106', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\166', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\122', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\152', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\104', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\146', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\107', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\107', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\170', '\126', '\040', '\146', '\157', '\040', '\061', '\012', '\151', '\120', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\147', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\111', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\150', '\165', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\166', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\104', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\131', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\164', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\106', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\152', '\123', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\160', '\113', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\104', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\113', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\132', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\170', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\124', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\105', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\110', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\104', '\153', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\161', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\170', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\170', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\124', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\167', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\121', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\125', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\163', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\107', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\113', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\167', '\102', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\167', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\162', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\160', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\154', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\106', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\171', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\167', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\103', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\147', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\164', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\161', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\144', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\155', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\121', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\154', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\105', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\166', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\166', '\106', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\112', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\171', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\164', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\132', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\105', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\172', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\146', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\144', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\113', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\170', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\124', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\107', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\127', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\127', '\162', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\160', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\121', '\163', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\142', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\126', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\114', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\162', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\163', '\122', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\167', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\156', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\120', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\125', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\167', '\162', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\146', '\104', '\040', '\146', '\157', '\040', '\061', '\012', '\167', '\171', '\110', '\040', '\167', '\141', '\040', '\061', '\012', '\154', '\102', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\115', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\163', '\171', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\160', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\147', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\156', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\126', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\113', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\142', '\144', '\127', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\116', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\111', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\110', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\147', '\102', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\146', '\103', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\153', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\125', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\103', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\154', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\102', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\122', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\107', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\166', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\155', '\102', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\170', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\115', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\127', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\121', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\127', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\156', '\165', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\166', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\155', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\110', '\154', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\155', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\132', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\150', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\143', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\102', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\127', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\130', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\152', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\172', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\170', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\143', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\113', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\157', '\130', '\040', '\160', '\157', '\040', '\061', '\012', '\170', '\162', '\124', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\127', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\127', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\123', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\146', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\113', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\152', '\144', '\040', '\144', '\157', '\040', '\061', '\012', '\121', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\171', '\113', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\155', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\165', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\157', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\114', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\147', '\115', '\162', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\103', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\107', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\130', '\157', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\153', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\124', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\116', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\130', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\126', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\111', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\167', '\103', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\157', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\104', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\144', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\116', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\131', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\106', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\123', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\111', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\141', '\152', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\131', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\113', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\111', '\171', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\146', '\113', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\146', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\154', '\155', '\040', '\154', '\145', '\040', '\061', '\012', '\103', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\161', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\106', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\126', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\103', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\145', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\110', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\116', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\155', '\130', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\153', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\106', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\142', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\131', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\147', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\167', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\171', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\172', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\121', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\143', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\142', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\123', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\131', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\161', '\147', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\131', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\160', '\107', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\126', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\166', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\146', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\167', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\121', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\127', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\161', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\143', '\112', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\167', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\144', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\160', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\143', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\111', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\144', '\103', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\126', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\172', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\106', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\114', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\160', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\112', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\112', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\113', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\145', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\170', '\114', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\103', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\122', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\115', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\102', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\113', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\153', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\154', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\122', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\166', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\170', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\103', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\131', '\142', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\153', '\116', '\040', '\153', '\141', '\040', '\061', '\012', '\142', '\121', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\162', '\104', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\152', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\155', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\167', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\112', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\143', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\172', '\126', '\040', '\157', '\156', '\040', '\061', '\012', '\155', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\132', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\130', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\147', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\121', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\104', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\110', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\111', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\164', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\144', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\103', '\155', '\040', '\157', '\167', '\040', '\061', '\012', '\166', '\126', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\142', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\170', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\126', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\147', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\127', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\152', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\131', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\164', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\130', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\151', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\160', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\155', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\102', '\160', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\130', '\166', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\112', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\172', '\160', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\143', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\167', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\117', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\117', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\146', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\163', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\122', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\104', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\146', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\165', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\166', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\127', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\172', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\160', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\121', '\145', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\131', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\141', '\121', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\166', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\125', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\151', '\142', '\110', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\166', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\106', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\131', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\132', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\160', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\114', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\167', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\171', '\113', '\040', '\156', '\171', '\040', '\061', '\012', '\123', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\170', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\153', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\112', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\164', '\152', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\120', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\162', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\170', '\131', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\163', '\105', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\153', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\130', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\156', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\155', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\155', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\106', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\126', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\146', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\155', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\144', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\127', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\166', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\131', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\157', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\152', '\102', '\040', '\145', '\162', '\040', '\061', '\012', '\104', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\127', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\154', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\167', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\132', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\121', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\167', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\131', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\101', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\157', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\167', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\112', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\164', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\167', '\131', '\040', '\160', '\162', '\040', '\061', '\012', '\115', '\152', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\162', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\130', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\105', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\156', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\121', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\152', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\116', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\115', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\126', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\166', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\110', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\142', '\113', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\127', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\124', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\156', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\170', '\117', '\040', '\156', '\171', '\040', '\061', '\012', '\106', '\161', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\106', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\104', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\125', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\110', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\120', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\110', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\111', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\106', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\166', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\171', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\105', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\144', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\161', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\142', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\110', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\126', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\110', '\167', '\040', '\165', '\156', '\040', '\061', '\012', '\132', '\143', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\110', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\104', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\164', '\154', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\161', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\162', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\123', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\103', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\154', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\165', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\115', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\127', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\160', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\121', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\170', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\146', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\152', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\162', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\103', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\171', '\132', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\103', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\162', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\157', '\111', '\171', '\040', '\157', '\156', '\040', '\061', '\012', '\162', '\146', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\102', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\171', '\171', '\126', '\040', '\156', '\171', '\040', '\061', '\012', '\121', '\151', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\104', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\147', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\116', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\144', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\166', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\142', '\132', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\151', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\166', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\142', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\115', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\110', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\127', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\120', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\114', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\157', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\160', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\124', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\143', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\120', '\171', '\040', '\153', '\165', '\040', '\061', '\012', '\146', '\144', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\131', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\123', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\104', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\142', '\112', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\146', '\117', '\040', '\156', '\171', '\040', '\061', '\012', '\165', '\121', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\160', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\144', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\167', '\120', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\124', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\112', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\127', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\143', '\125', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\142', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\125', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\116', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\132', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\163', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\131', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\131', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\122', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\107', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\170', '\112', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\114', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\102', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\112', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\146', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\142', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\110', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\113', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\102', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\160', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\156', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\144', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\115', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\132', '\146', '\040', '\160', '\151', '\040', '\061', '\012', '\145', '\131', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\124', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\104', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\170', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\156', '\146', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\147', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\160', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\103', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\120', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\103', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\116', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\122', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\141', '\145', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\144', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\102', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\117', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\155', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\120', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\142', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\130', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\147', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\130', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\116', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\141', '\117', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\146', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\167', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\152', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\152', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\147', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\115', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\106', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\146', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\132', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\102', '\142', '\040', '\142', '\151', '\040', '\061', '\012', '\163', '\152', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\104', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\152', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\162', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\152', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\106', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\121', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\142', '\105', '\040', '\166', '\151', '\040', '\061', '\012', '\125', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\111', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\123', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\105', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\146', '\110', '\040', '\142', '\145', '\040', '\061', '\012', '\116', '\162', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\166', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\151', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\142', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\170', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\166', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\162', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\131', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\153', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\103', '\170', '\040', '\166', '\151', '\040', '\061', '\012', '\132', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\127', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\104', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\146', '\105', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\166', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\157', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\142', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\116', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\124', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\152', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\126', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\112', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\153', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\144', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\130', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\113', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\120', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\110', '\143', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\152', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\171', '\105', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\102', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\120', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\113', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\155', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\147', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\144', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\166', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\162', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\102', '\166', '\146', '\040', '\166', '\151', '\040', '\061', '\012', '\171', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\167', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\161', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\113', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\112', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\114', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\144', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\116', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\112', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\141', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\113', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\116', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\120', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\172', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\122', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\164', '\156', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\156', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\132', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\132', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\115', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\166', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\170', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\120', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\167', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\120', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\146', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\124', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\167', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\142', '\107', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\172', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\120', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\132', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\103', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\113', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\124', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\123', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\154', '\116', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\127', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\167', '\102', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\116', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\124', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\106', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\112', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\143', '\122', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\142', '\124', '\040', '\142', '\145', '\040', '\061', '\012', '\106', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\167', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\142', '\126', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\123', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\154', '\142', '\102', '\040', '\154', '\145', '\040', '\061', '\012', '\117', '\143', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\142', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\163', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\171', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\160', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\117', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\162', '\122', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\155', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\103', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\152', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\106', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\162', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\123', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\142', '\113', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\144', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\106', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\155', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\103', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\110', '\172', '\040', '\164', '\172', '\040', '\061', '\012', '\150', '\152', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\164', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\155', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\122', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\103', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\111', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\163', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\116', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\142', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\114', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\106', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\170', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\122', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\112', '\162', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\167', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\126', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\147', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\101', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\120', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\160', '\120', '\040', '\151', '\156', '\040', '\061', '\012', '\112', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\112', '\142', '\040', '\142', '\151', '\040', '\061', '\012', '\152', '\170', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\167', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\122', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\146', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\124', '\144', '\160', '\040', '\160', '\157', '\040', '\061', '\012', '\167', '\105', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\104', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\161', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\144', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\170', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\125', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\121', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\124', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\154', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\121', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\113', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\167', '\123', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\153', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\121', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\114', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\101', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\144', '\155', '\107', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\113', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\125', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\172', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\116', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\147', '\131', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\146', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\132', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\124', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\130', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\104', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\144', '\122', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\115', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\170', '\110', '\040', '\163', '\164', '\040', '\061', '\012', '\120', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\146', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\117', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\116', '\166', '\170', '\040', '\166', '\151', '\040', '\061', '\012', '\161', '\141', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\107', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\132', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\106', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\160', '\107', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\161', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\171', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\152', '\155', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\103', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\126', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\126', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\121', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\164', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\110', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\152', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\172', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\131', '\171', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\170', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\164', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\127', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\103', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\106', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\145', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\120', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\152', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\150', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\103', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\153', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\124', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\170', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\166', '\113', '\040', '\166', '\151', '\040', '\061', '\012', '\114', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\167', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\124', '\153', '\040', '\144', '\151', '\040', '\061', '\012', '\146', '\163', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\152', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\121', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\120', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\155', '\103', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\163', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\104', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\110', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\106', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\144', '\114', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\131', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\113', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\103', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\161', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\116', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\157', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\144', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\160', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\164', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\127', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\102', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\154', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\146', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\155', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\107', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\162', '\171', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\110', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\114', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\154', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\142', '\102', '\040', '\142', '\151', '\040', '\061', '\012', '\151', '\131', '\162', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\104', '\172', '\040', '\164', '\172', '\040', '\061', '\012', '\170', '\163', '\112', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\115', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\125', '\165', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\170', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\167', '\126', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\120', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\104', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\126', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\113', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\157', '\132', '\152', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\101', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\115', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\166', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\106', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\126', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\114', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\130', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\150', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\154', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\142', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\120', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\120', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\104', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\152', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\152', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\115', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\131', '\142', '\040', '\151', '\156', '\040', '\061', '\012', '\106', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\157', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\114', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\112', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\125', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\112', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\113', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\132', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\103', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\165', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\166', '\126', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\144', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\123', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\123', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\104', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\142', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\106', '\146', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\166', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\130', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\106', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\160', '\122', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\143', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\124', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\121', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\120', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\151', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\106', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\170', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\103', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\126', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\154', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\126', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\103', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\167', '\126', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\142', '\132', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\107', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\166', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\130', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\131', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\131', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\123', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\143', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\103', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\156', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\167', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\130', '\165', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\102', '\167', '\040', '\155', '\142', '\040', '\061', '\012', '\167', '\155', '\106', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\112', '\170', '\040', '\170', '\145', '\040', '\061', '\012', '\144', '\130', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\102', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\142', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\153', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\117', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\121', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\166', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\103', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\113', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\126', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\132', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\102', '\166', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\170', '\122', '\040', '\146', '\157', '\040', '\061', '\012', '\166', '\155', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\120', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\106', '\153', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\131', '\171', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\125', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\172', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\155', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\166', '\132', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\142', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\131', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\106', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\160', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\153', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\164', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\156', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\170', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\115', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\166', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\162', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\107', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\155', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\143', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\113', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\112', '\170', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\121', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\142', '\105', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\131', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\113', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\164', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\160', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\103', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\122', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\111', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\116', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\166', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\107', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\102', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\115', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\126', '\170', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\103', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\166', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\170', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\115', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\142', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\103', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\124', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\142', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\152', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\150', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\131', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\166', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\157', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\126', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\110', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\142', '\123', '\040', '\142', '\145', '\040', '\061', '\012', '\110', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\170', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\153', '\114', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\155', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\142', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\122', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\147', '\126', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\102', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\130', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\162', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\166', '\117', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\104', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\121', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\146', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\132', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\156', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\145', '\116', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\170', '\123', '\040', '\146', '\157', '\040', '\061', '\012', '\163', '\116', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\125', '\165', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\172', '\127', '\040', '\157', '\156', '\040', '\061', '\012', '\130', '\172', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\146', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\106', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\172', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\132', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\157', '\110', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\166', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\157', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\170', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\115', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\150', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\152', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\122', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\152', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\155', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\111', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\153', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\124', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\126', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\121', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\146', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\113', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\125', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\165', '\124', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\144', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\170', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\147', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\144', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\161', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\145', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\107', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\166', '\155', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\113', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\125', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\166', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\110', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\115', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\163', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\172', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\113', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\120', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\147', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\167', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\131', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\172', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\152', '\040', '\152', '\157', '\040', '\061', '\012', '\113', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\160', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\106', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\144', '\101', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\127', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\123', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\142', '\122', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\162', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\132', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\125', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\105', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\152', '\110', '\040', '\152', '\157', '\040', '\061', '\012', '\163', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\125', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\156', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\117', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\142', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\120', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\122', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\166', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\171', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\167', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\104', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\112', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\166', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\113', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\106', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\116', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\142', '\160', '\102', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\131', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\107', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\146', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\124', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\146', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\172', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\125', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\144', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\130', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\115', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\124', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\154', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\113', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\115', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\115', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\154', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\155', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\117', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\142', '\111', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\160', '\111', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\105', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\127', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\166', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\131', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\170', '\115', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\120', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\167', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\143', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\112', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\150', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\170', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\156', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\171', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\102', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\123', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\161', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\131', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\162', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\110', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\142', '\110', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\121', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\170', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\163', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\147', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\144', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\131', '\144', '\172', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\120', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\121', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\167', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\131', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\163', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\131', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\126', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\170', '\114', '\040', '\156', '\171', '\040', '\061', '\012', '\131', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\115', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\124', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\141', '\111', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\121', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\161', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\146', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\124', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\146', '\121', '\040', '\142', '\145', '\040', '\061', '\012', '\113', '\146', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\130', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\131', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\157', '\143', '\040', '\162', '\157', '\040', '\061', '\012', '\166', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\132', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\144', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\147', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\156', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\146', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\142', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\142', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\160', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\157', '\127', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\112', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\121', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\166', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\104', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\167', '\106', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\113', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\111', '\165', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\147', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\112', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\147', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\116', '\150', '\040', '\150', '\157', '\040', '\061', '\012', '\143', '\166', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\147', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\116', '\163', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\104', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\132', '\156', '\040', '\157', '\156', '\040', '\061', '\012', '\165', '\125', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\132', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\107', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\123', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\143', '\107', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\161', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\142', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\145', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\153', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\165', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\167', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\120', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\123', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\120', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\172', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\166', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\143', '\110', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\154', '\131', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\166', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\166', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\122', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\116', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\113', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\112', '\163', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\117', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\162', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\127', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\124', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\103', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\141', '\117', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\156', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\162', '\124', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\110', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\144', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\153', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\130', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\170', '\111', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\132', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\154', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\167', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\141', '\110', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\127', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\121', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\145', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\121', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\122', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\102', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\170', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\115', '\166', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\143', '\122', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\102', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\127', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\171', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\165', '\103', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\162', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\171', '\121', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\163', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\166', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\162', '\114', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\166', '\130', '\040', '\157', '\156', '\040', '\061', '\012', '\125', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\126', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\160', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\121', '\153', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\171', '\127', '\040', '\156', '\171', '\040', '\061', '\012', '\162', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\144', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\130', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\143', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\164', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\155', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\152', '\102', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\144', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\153', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\116', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\146', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\127', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\127', '\164', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\146', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\132', '\142', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\167', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\125', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\107', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\167', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\142', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\121', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\132', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\115', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\106', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\104', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\125', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\110', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\124', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\165', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\132', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\106', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\154', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\153', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\166', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\111', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\114', '\154', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\145', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\154', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\143', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\164', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\153', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\112', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\121', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\120', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\155', '\117', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\164', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\102', '\153', '\040', '\151', '\156', '\040', '\061', '\012', '\165', '\172', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\116', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\122', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\166', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\145', '\126', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\107', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\160', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\104', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\165', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\126', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\155', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\166', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\146', '\126', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\121', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\124', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\120', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\170', '\112', '\040', '\146', '\157', '\040', '\061', '\012', '\161', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\112', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\122', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\143', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\126', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\161', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\152', '\113', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\153', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\115', '\152', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\142', '\116', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\114', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\142', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\121', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\155', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\113', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\161', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\126', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\110', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\130', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\117', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\110', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\121', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\106', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\131', '\142', '\040', '\157', '\156', '\040', '\061', '\012', '\106', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\111', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\115', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\161', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\142', '\132', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\163', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\152', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\120', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\102', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\142', '\111', '\040', '\160', '\162', '\040', '\061', '\012', '\131', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\170', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\171', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\172', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\115', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\150', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\117', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\111', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\131', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\170', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\146', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\153', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\131', '\153', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\122', '\147', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\117', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\126', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\101', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\113', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\103', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\166', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\151', '\126', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\162', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\105', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\122', '\162', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\142', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\115', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\132', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\106', '\170', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\172', '\153', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\113', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\142', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\110', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\172', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\115', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\153', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\113', '\155', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\160', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\143', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\127', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\144', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\155', '\111', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\143', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\167', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\144', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\132', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\113', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\172', '\101', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\171', '\124', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\145', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\160', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\171', '\107', '\040', '\156', '\171', '\040', '\061', '\012', '\154', '\114', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\166', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\154', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\155', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\155', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\113', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\122', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\114', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\120', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\153', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\170', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\127', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\113', '\143', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\112', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\167', '\132', '\040', '\167', '\141', '\040', '\061', '\012', '\122', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\167', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\114', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\130', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\146', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\152', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\172', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\125', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\123', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\170', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\170', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\126', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\125', '\143', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\141', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\110', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\151', '\171', '\103', '\040', '\151', '\156', '\040', '\061', '\012', '\124', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\112', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\112', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\112', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\116', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\144', '\101', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\152', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\161', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\107', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\121', '\172', '\040', '\151', '\156', '\040', '\061', '\012', '\164', '\114', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\126', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\113', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\141', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\111', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\130', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\106', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\167', '\115', '\040', '\151', '\156', '\040', '\061', '\012', '\107', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\130', '\154', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\146', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\116', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\127', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\156', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\123', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\103', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\152', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\124', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\104', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\164', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\102', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\172', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\150', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\160', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\103', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\122', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\153', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\104', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\142', '\104', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\154', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\122', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\106', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\120', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\152', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\123', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\104', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\165', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\120', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\112', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\160', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\107', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\130', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\112', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\172', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\121', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\150', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\131', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\166', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\167', '\132', '\040', '\151', '\156', '\040', '\061', '\012', '\172', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\155', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\113', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\146', '\131', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\125', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\161', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\167', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\130', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\120', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\111', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\146', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\160', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\116', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\130', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\172', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\113', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\155', '\102', '\040', '\155', '\145', '\040', '\061', '\012', '\127', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\130', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\131', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\121', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\144', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\162', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\146', '\114', '\040', '\156', '\171', '\040', '\061', '\012', '\171', '\131', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\142', '\110', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\113', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\146', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\112', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\102', '\172', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\141', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\112', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\110', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\141', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\150', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\131', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\155', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\150', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\147', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\155', '\171', '\040', '\155', '\145', '\040', '\061', '\012', '\122', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\163', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\150', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\111', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\111', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\143', '\106', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\156', '\126', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\145', '\161', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\153', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\166', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\115', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\167', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\101', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\155', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\167', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\156', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\146', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\170', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\143', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\146', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\161', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\172', '\123', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\162', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\161', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\147', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\121', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\167', '\102', '\040', '\167', '\141', '\040', '\061', '\012', '\154', '\107', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\144', '\125', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\104', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\114', '\163', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\116', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\104', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\114', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\127', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\152', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\131', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\145', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\166', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\153', '\101', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\152', '\115', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\147', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\130', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\124', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\122', '\150', '\172', '\040', '\150', '\141', '\040', '\061', '\012', '\167', '\153', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\150', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\154', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\170', '\113', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\120', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\106', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\166', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\161', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\115', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\142', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\160', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\102', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\124', '\155', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\142', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\115', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\147', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\146', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\121', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\105', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\155', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\121', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\113', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\106', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\120', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\115', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\172', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\106', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\112', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\126', '\172', '\040', '\151', '\156', '\040', '\061', '\012', '\157', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\143', '\116', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\124', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\111', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\132', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\172', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\131', '\154', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\110', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\143', '\163', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\172', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\102', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\124', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\113', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\142', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\166', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\146', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\132', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\103', '\163', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\107', '\146', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\152', '\142', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\166', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\110', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\154', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\124', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\107', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\124', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\160', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\167', '\123', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\107', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\156', '\161', '\124', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\115', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\113', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\116', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\154', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\126', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\115', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\167', '\103', '\040', '\154', '\145', '\040', '\061', '\012', '\104', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\152', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\124', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\170', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\167', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\162', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\167', '\132', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\156', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\112', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\153', '\112', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\126', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\101', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\150', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\162', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\122', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\154', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\106', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\167', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\103', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\130', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\124', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\106', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\142', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\166', '\123', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\102', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\116', '\172', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\121', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\114', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\126', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\125', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\132', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\111', '\171', '\040', '\145', '\147', '\040', '\061', '\012', '\150', '\126', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\121', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\146', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\113', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\150', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\142', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\107', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\142', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\131', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\166', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\110', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\130', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\163', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\126', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\160', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\127', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\113', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\103', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\155', '\146', '\110', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\111', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\146', '\130', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\152', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\155', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\147', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\105', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\117', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\110', '\152', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\165', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\132', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\125', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\114', '\163', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\153', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\167', '\121', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\162', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\142', '\110', '\040', '\142', '\145', '\040', '\061', '\012', '\147', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\166', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\112', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\122', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\150', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\160', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\106', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\123', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\144', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\107', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\126', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\166', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\167', '\117', '\040', '\153', '\141', '\040', '\061', '\012', '\112', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\127', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\121', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\156', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\166', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\146', '\111', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\123', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\160', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\146', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\131', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\102', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\112', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\144', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\121', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\146', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\164', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\153', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\113', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\172', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\142', '\167', '\111', '\040', '\167', '\141', '\040', '\061', '\012', '\124', '\163', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\154', '\122', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\154', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\142', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\163', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\131', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\156', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\172', '\132', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\107', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\147', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\167', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\117', '\171', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\122', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\155', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\132', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\112', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\153', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\107', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\122', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\166', '\114', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\107', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\151', '\111', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\107', '\172', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\114', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\125', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\166', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\156', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\130', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\103', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\156', '\114', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\146', '\110', '\040', '\146', '\157', '\040', '\061', '\012', '\151', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\110', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\131', '\167', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\155', '\104', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\123', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\103', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\141', '\132', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\142', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\172', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\110', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\161', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\105', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\146', '\125', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\166', '\123', '\040', '\166', '\141', '\040', '\061', '\012', '\160', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\112', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\103', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\144', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\122', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\121', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\154', '\123', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\154', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\141', '\157', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\154', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\120', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\164', '\111', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\155', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\112', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\126', '\147', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\125', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\164', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\164', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\172', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\170', '\121', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\162', '\120', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\143', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\165', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\120', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\106', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\152', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\107', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\131', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\124', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\117', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\114', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\115', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\157', '\126', '\154', '\040', '\157', '\156', '\040', '\061', '\012', '\143', '\167', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\147', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\172', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\142', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\167', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\145', '\121', '\157', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\121', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\113', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\166', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\126', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\163', '\120', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\121', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\132', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\150', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\127', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\154', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\160', '\114', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\105', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\115', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\122', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\163', '\103', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\154', '\123', '\040', '\154', '\145', '\040', '\061', '\012', '\154', '\172', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\165', '\112', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\126', '\146', '\040', '\156', '\171', '\040', '\061', '\012', '\132', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\142', '\123', '\040', '\142', '\145', '\040', '\061', '\012', '\157', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\143', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\167', '\125', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\120', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\112', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\155', '\116', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\144', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\155', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\110', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\101', '\171', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\170', '\113', '\040', '\156', '\171', '\040', '\061', '\012', '\110', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\111', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\147', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\114', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\115', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\106', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\102', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\110', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\172', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\166', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\147', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\154', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\115', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\123', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\105', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\146', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\103', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\110', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\153', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\165', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\142', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\111', '\160', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\120', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\160', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\160', '\116', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\172', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\157', '\121', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\154', '\103', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\115', '\150', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\125', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\150', '\147', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\143', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\160', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\111', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\120', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\130', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\162', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\110', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\146', '\127', '\040', '\156', '\171', '\040', '\061', '\012', '\131', '\171', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\131', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\166', '\122', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\122', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\113', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\156', '\170', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\144', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\142', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\145', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\123', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\111', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\113', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\160', '\120', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\121', '\171', '\040', '\153', '\141', '\040', '\061', '\012', '\102', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\146', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\120', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\101', '\157', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\131', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\146', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\166', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\145', '\110', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\121', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\145', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\160', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\146', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\144', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\116', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\102', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\165', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\105', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\146', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\157', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\145', '\106', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\120', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\104', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\132', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\125', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\121', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\132', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\152', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\152', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\113', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\115', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\115', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\172', '\171', '\040', '\163', '\172', '\040', '\061', '\012', '\116', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\167', '\124', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\163', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\125', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\154', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\102', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\146', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\126', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\107', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\146', '\107', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\126', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\144', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\172', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\172', '\121', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\126', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\114', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\124', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\155', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\166', '\131', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\121', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\111', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\107', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\110', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\103', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\112', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\143', '\127', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\130', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\150', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\152', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\154', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\172', '\162', '\105', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\153', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\110', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\146', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\114', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\125', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\153', '\104', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\114', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\131', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\113', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\111', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\162', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\106', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\163', '\142', '\103', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\130', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\120', '\153', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\103', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\103', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\167', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\112', '\147', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\102', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\111', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\144', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\121', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\160', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\170', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\153', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\153', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\122', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\115', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\145', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\110', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\170', '\125', '\040', '\142', '\145', '\040', '\061', '\012', '\170', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\131', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\154', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\122', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\107', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\106', '\172', '\040', '\172', '\145', '\040', '\061', '\012', '\161', '\117', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\147', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\157', '\107', '\155', '\040', '\157', '\156', '\040', '\061', '\012', '\130', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\131', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\165', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\103', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\150', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\121', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\167', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\127', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\160', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\143', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\146', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\141', '\130', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\123', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\170', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\107', '\161', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\125', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\144', '\113', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\132', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\167', '\112', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\166', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\154', '\142', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\172', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\144', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\112', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\127', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\130', '\171', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\165', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\130', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\115', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\116', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\121', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\106', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\160', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\116', '\167', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\150', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\131', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\166', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\111', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\142', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\115', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\124', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\150', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\127', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\114', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\163', '\104', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\114', '\155', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\153', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\101', '\170', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\172', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\113', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\121', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\171', '\130', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\146', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\160', '\125', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\167', '\112', '\040', '\167', '\141', '\040', '\061', '\012', '\101', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\165', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\164', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\122', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\124', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\125', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\125', '\151', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\112', '\154', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\103', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\154', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\117', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\154', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\146', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\112', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\153', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\107', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\154', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\171', '\104', '\040', '\156', '\171', '\040', '\061', '\012', '\152', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\162', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\104', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\160', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\155', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\120', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\125', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\142', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\144', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\121', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\155', '\104', '\040', '\155', '\145', '\040', '\061', '\012', '\112', '\153', '\152', '\040', '\153', '\141', '\040', '\061', '\012', '\152', '\124', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\131', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\132', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\153', '\121', '\040', '\145', '\162', '\040', '\061', '\012', '\142', '\104', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\123', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\130', '\162', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\132', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\161', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\112', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\144', '\112', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\167', '\105', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\170', '\130', '\040', '\142', '\145', '\040', '\061', '\012', '\152', '\170', '\124', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\143', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\115', '\146', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\161', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\122', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\131', '\171', '\040', '\167', '\141', '\040', '\061', '\012', '\124', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\126', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\155', '\122', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\106', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\171', '\121', '\040', '\156', '\171', '\040', '\061', '\012', '\170', '\145', '\111', '\040', '\145', '\162', '\040', '\061', '\012', '\127', '\161', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\154', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\104', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\131', '\172', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\170', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\114', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\147', '\113', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\163', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\130', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\103', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\130', '\162', '\144', '\040', '\145', '\162', '\040', '\061', '\012', '\122', '\172', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\146', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\164', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\124', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\165', '\146', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\154', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\150', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\113', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\106', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\121', '\165', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\130', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\126', '\153', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\106', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\111', '\165', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\124', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\115', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\166', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\113', '\160', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\122', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\130', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\166', '\172', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\112', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\124', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\144', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\122', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\112', '\162', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\122', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\156', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\160', '\111', '\040', '\160', '\162', '\040', '\061', '\012', '\151', '\116', '\167', '\040', '\151', '\156', '\040', '\061', '\012', '\165', '\152', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\110', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\110', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\166', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\161', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\160', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\110', '\167', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\172', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\103', '\147', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\127', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\165', '\126', '\040', '\165', '\156', '\040', '\061', '\012', '\142', '\152', '\116', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\121', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\170', '\105', '\040', '\142', '\145', '\040', '\061', '\012', '\165', '\126', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\162', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\114', '\162', '\170', '\040', '\145', '\162', '\040', '\061', '\012', '\111', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\141', '\161', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\107', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\147', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\163', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\126', '\170', '\163', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\123', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\157', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\160', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\113', '\143', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\167', '\104', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\131', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\112', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\127', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\166', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\106', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\152', '\170', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\160', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\126', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\116', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\166', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\170', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\160', '\165', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\170', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\101', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\155', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\155', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\103', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\106', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\103', '\144', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\114', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\115', '\170', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\143', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\126', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\153', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\170', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\166', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\115', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\164', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\107', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\152', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\152', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\167', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\113', '\170', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\150', '\132', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\172', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\164', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\166', '\113', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\120', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\161', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\171', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\103', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\152', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\122', '\142', '\040', '\154', '\145', '\040', '\061', '\012', '\164', '\146', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\160', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\160', '\146', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\164', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\157', '\124', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\123', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\170', '\123', '\040', '\167', '\141', '\040', '\061', '\012', '\127', '\162', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\117', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\130', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\144', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\161', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\130', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\102', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\152', '\130', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\142', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\167', '\123', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\126', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\167', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\163', '\115', '\040', '\163', '\164', '\040', '\061', '\012', '\120', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\120', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\167', '\107', '\040', '\167', '\141', '\040', '\061', '\012', '\130', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\155', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\166', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\146', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\142', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\160', '\110', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\161', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\121', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\166', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\114', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\143', '\145', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\102', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\144', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\156', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\115', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\146', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\103', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\146', '\117', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\141', '\112', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\114', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\155', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\131', '\146', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\144', '\112', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\105', '\141', '\171', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\123', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\116', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\112', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\166', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\160', '\110', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\170', '\117', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\120', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\142', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\157', '\105', '\040', '\157', '\156', '\040', '\061', '\012', '\147', '\164', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\146', '\106', '\040', '\142', '\145', '\040', '\061', '\012', '\155', '\166', '\127', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\163', '\115', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\167', '\110', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\103', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\114', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\153', '\130', '\167', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\126', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\150', '\103', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\125', '\153', '\040', '\157', '\156', '\040', '\061', '\012', '\172', '\143', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\115', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\162', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\146', '\117', '\040', '\167', '\141', '\040', '\061', '\012', '\171', '\106', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\130', '\141', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\115', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\146', '\103', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\167', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\157', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\145', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\152', '\107', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\107', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\155', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\131', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\153', '\111', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\166', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\160', '\116', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\116', '\162', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\153', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\111', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\146', '\116', '\040', '\167', '\141', '\040', '\061', '\012', '\126', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\153', '\121', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\111', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\161', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\163', '\170', '\125', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\161', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\146', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\171', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\166', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\123', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\131', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\147', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\130', '\141', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\102', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\131', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\152', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\152', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\141', '\152', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\130', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\150', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\107', '\155', '\040', '\145', '\162', '\040', '\061', '\012', '\121', '\164', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\120', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\122', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\117', '\147', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\114', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\121', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\150', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\170', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\156', '\160', '\111', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\156', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\103', '\144', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\146', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\142', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\167', '\116', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\114', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\127', '\143', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\126', '\166', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\153', '\170', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\155', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\107', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\112', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\106', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\103', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\166', '\127', '\040', '\154', '\145', '\040', '\061', '\012', '\123', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\132', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\111', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\124', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\104', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\124', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\160', '\103', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\121', '\153', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\160', '\131', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\121', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\151', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\121', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\125', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\152', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\130', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\130', '\146', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\147', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\162', '\112', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\167', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\164', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\110', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\110', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\142', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\146', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\122', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\155', '\131', '\040', '\155', '\145', '\040', '\061', '\012', '\167', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\106', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\127', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\171', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\147', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\155', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\146', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\172', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\147', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\165', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\163', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\157', '\127', '\170', '\040', '\157', '\156', '\040', '\061', '\012', '\120', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\144', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\130', '\155', '\160', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\147', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\103', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\164', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\104', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\142', '\121', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\165', '\115', '\040', '\165', '\156', '\040', '\061', '\012', '\146', '\114', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\150', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\156', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\144', '\123', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\106', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\106', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\127', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\161', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\155', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\142', '\153', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\121', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\120', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\171', '\114', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\170', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\162', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\172', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\146', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\153', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\156', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\125', '\161', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\165', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\125', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\102', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\116', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\150', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\127', '\160', '\040', '\144', '\145', '\040', '\061', '\012', '\131', '\166', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\122', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\172', '\107', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\165', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\152', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\132', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\112', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\156', '\117', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\143', '\101', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\146', '\113', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\152', '\123', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\146', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\163', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\144', '\130', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\122', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\105', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\107', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\110', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\166', '\101', '\040', '\166', '\141', '\040', '\061', '\012', '\102', '\146', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\163', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\126', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\130', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\151', '\113', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\141', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\103', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\115', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\147', '\101', '\040', '\156', '\147', '\040', '\061', '\012', '\151', '\167', '\112', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\107', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\164', '\146', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\152', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\172', '\107', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\155', '\113', '\040', '\155', '\145', '\040', '\061', '\012', '\156', '\125', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\107', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\126', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\123', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\161', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\156', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\126', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\126', '\163', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\116', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\116', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\156', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\112', '\163', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\166', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\154', '\115', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\172', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\143', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\126', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\127', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\110', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\117', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\125', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\127', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\161', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\156', '\103', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\126', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\164', '\115', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\150', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\164', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\143', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\167', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\144', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\163', '\117', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\122', '\156', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\155', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\164', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\107', '\166', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\126', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\144', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\144', '\105', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\132', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\102', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\110', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\153', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\170', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\154', '\162', '\101', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\162', '\124', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\152', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\142', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\124', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\155', '\126', '\040', '\155', '\145', '\040', '\061', '\012', '\162', '\104', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\144', '\116', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\141', '\126', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\116', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\130', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\162', '\107', '\163', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\141', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\162', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\112', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\170', '\105', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\166', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\122', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\160', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\112', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\142', '\121', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\172', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\106', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\167', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\141', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\163', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\147', '\155', '\117', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\107', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\122', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\101', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\104', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\107', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\124', '\166', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\155', '\116', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\164', '\105', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\172', '\120', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\163', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\107', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\171', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\170', '\106', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\132', '\040', '\146', '\157', '\040', '\061', '\012', '\163', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\155', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\110', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\150', '\155', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\144', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\167', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\165', '\112', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\120', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\130', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\125', '\161', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\106', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\116', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\170', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\123', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\122', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\167', '\113', '\040', '\167', '\141', '\040', '\061', '\012', '\146', '\155', '\102', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\123', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\120', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\110', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\115', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\153', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\130', '\144', '\163', '\040', '\144', '\145', '\040', '\061', '\012', '\171', '\142', '\102', '\040', '\142', '\145', '\040', '\061', '\012', '\147', '\160', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\170', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\147', '\120', '\155', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\160', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\160', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\154', '\112', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\153', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\171', '\160', '\120', '\040', '\160', '\162', '\040', '\061', '\012', '\116', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\147', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\105', '\161', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\122', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\125', '\142', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\112', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\166', '\116', '\040', '\166', '\141', '\040', '\061', '\012', '\121', '\146', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\104', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\163', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\153', '\130', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\160', '\122', '\040', '\160', '\162', '\040', '\061', '\012', '\160', '\152', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\153', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\115', '\146', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\163', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\117', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\104', '\161', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\156', '\142', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\166', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\106', '\156', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\160', '\126', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\164', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\105', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\150', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\130', '\171', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\144', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\155', '\104', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\151', '\126', '\153', '\040', '\151', '\156', '\040', '\061', '\012', '\110', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\160', '\132', '\040', '\160', '\157', '\040', '\061', '\012', '\141', '\145', '\125', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\152', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\163', '\107', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\127', '\161', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\161', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\120', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\130', '\172', '\040', '\163', '\164', '\040', '\061', '\012', '\170', '\166', '\120', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\142', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\152', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\150', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\161', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\131', '\146', '\040', '\144', '\145', '\040', '\061', '\012', '\160', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\163', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\150', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\154', '\105', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\161', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\156', '\162', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\144', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\110', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\110', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\161', '\112', '\040', '\141', '\156', '\040', '\061', '\012', '\157', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\142', '\171', '\040', '\142', '\145', '\040', '\061', '\012', '\164', '\142', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\123', '\146', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\110', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\160', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\121', '\172', '\160', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\151', '\125', '\040', '\151', '\156', '\040', '\061', '\012', '\162', '\152', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\164', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\131', '\147', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\121', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\127', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\126', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\121', '\170', '\040', '\160', '\162', '\040', '\061', '\012', '\114', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\127', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\110', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\166', '\160', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\170', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\110', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\166', '\125', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\161', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\126', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\132', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\165', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\170', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\110', '\154', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\104', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\144', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\166', '\115', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\127', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\151', '\117', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\104', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\110', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\120', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\130', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\146', '\114', '\040', '\146', '\157', '\040', '\061', '\012', '\171', '\107', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\102', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\103', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\114', '\154', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\115', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\162', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\144', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\170', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\155', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\122', '\172', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\102', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\127', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\165', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\171', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\126', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\106', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\122', '\155', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\126', '\146', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\113', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\114', '\150', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\123', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\162', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\102', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\103', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\171', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\130', '\165', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\146', '\115', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\144', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\143', '\130', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\152', '\111', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\147', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\167', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\172', '\125', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\132', '\162', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\112', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\104', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\125', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\170', '\105', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\170', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\143', '\167', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\160', '\103', '\040', '\160', '\162', '\040', '\061', '\012', '\163', '\122', '\167', '\040', '\163', '\164', '\040', '\061', '\012', '\113', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\170', '\101', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\121', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\120', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\110', '\167', '\165', '\040', '\153', '\165', '\040', '\061', '\012', '\163', '\165', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\161', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\170', '\127', '\040', '\163', '\164', '\040', '\061', '\012', '\141', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\142', '\132', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\161', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\164', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\115', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\107', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\162', '\153', '\040', '\145', '\162', '\040', '\061', '\012', '\117', '\143', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\113', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\162', '\101', '\040', '\145', '\162', '\040', '\061', '\012', '\147', '\170', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\127', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\170', '\121', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\130', '\157', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\155', '\120', '\040', '\155', '\145', '\040', '\061', '\012', '\153', '\144', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\102', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\160', '\101', '\040', '\160', '\162', '\040', '\061', '\012', '\156', '\115', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\110', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\123', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\155', '\130', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\143', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\162', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\141', '\130', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\144', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\163', '\142', '\131', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\146', '\132', '\040', '\160', '\162', '\040', '\061', '\012', '\126', '\155', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\132', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\114', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\161', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\160', '\113', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\146', '\107', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\152', '\122', '\040', '\151', '\156', '\040', '\061', '\012', '\151', '\112', '\171', '\040', '\151', '\156', '\040', '\061', '\012', '\161', '\146', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\162', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\147', '\124', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\117', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\156', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\127', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\144', '\117', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\131', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\162', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\155', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\110', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\172', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\105', '\171', '\040', '\156', '\171', '\040', '\061', '\012', '\150', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\160', '\121', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\131', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\144', '\170', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\146', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\142', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\142', '\117', '\040', '\142', '\145', '\040', '\061', '\012', '\130', '\143', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\103', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\155', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\112', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\104', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\172', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\162', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\163', '\170', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\113', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\123', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\114', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\144', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\172', '\127', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\167', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\115', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\142', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\163', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\110', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\132', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\164', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\161', '\160', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\154', '\104', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\166', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\132', '\146', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\164', '\150', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\164', '\114', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\117', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\111', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\150', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\166', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\152', '\103', '\040', '\151', '\152', '\040', '\061', '\012', '\117', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\166', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\110', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\170', '\112', '\040', '\151', '\152', '\040', '\061', '\012', '\107', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\121', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\104', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\121', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\112', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\172', '\142', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\122', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\105', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\141', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\152', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\123', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\112', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\127', '\162', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\113', '\160', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\141', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\103', '\166', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\142', '\122', '\040', '\142', '\145', '\040', '\061', '\012', '\160', '\124', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\144', '\111', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\146', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\122', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\142', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\172', '\106', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\167', '\117', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\162', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\164', '\167', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\114', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\156', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\165', '\123', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\111', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\124', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\113', '\144', '\040', '\141', '\156', '\040', '\061', '\012', '\104', '\153', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\102', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\117', '\172', '\040', '\153', '\141', '\040', '\061', '\012', '\172', '\117', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\172', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\115', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\146', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\147', '\104', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\164', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\152', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\142', '\130', '\040', '\142', '\145', '\040', '\061', '\012', '\172', '\146', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\167', '\110', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\121', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\163', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\114', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\155', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\116', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\115', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\107', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\103', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\160', '\166', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\116', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\160', '\120', '\040', '\160', '\162', '\040', '\061', '\012', '\154', '\130', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\114', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\144', '\130', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\172', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\170', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\166', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\162', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\105', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\131', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\163', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\146', '\153', '\103', '\040', '\153', '\141', '\040', '\061', '\012', '\155', '\170', '\113', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\155', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\102', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\103', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\163', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\152', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\164', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\102', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\152', '\106', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\147', '\125', '\040', '\164', '\150', '\040', '\061', '\012', '\127', '\162', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\106', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\143', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\145', '\161', '\101', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\142', '\107', '\040', '\160', '\162', '\040', '\061', '\012', '\103', '\167', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\104', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\124', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\162', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\121', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\167', '\115', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\103', '\156', '\040', '\156', '\144', '\040', '\061', '\012', '\145', '\107', '\160', '\040', '\145', '\162', '\040', '\061', '\012', '\165', '\120', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\151', '\111', '\040', '\151', '\156', '\040', '\061', '\012', '\162', '\161', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\152', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\167', '\113', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\152', '\121', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\111', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\170', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\107', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\114', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\122', '\144', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\171', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\122', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\113', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\150', '\142', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\161', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\155', '\106', '\040', '\155', '\145', '\040', '\061', '\012', '\166', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\161', '\116', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\114', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\166', '\112', '\040', '\166', '\141', '\040', '\061', '\012', '\142', '\147', '\112', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\166', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\110', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\126', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\150', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\154', '\114', '\040', '\154', '\145', '\040', '\061', '\012', '\153', '\144', '\110', '\040', '\144', '\145', '\040', '\061', '\012', '\113', '\146', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\104', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\103', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\121', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\127', '\156', '\172', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\112', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\167', '\122', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\160', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\163', '\120', '\152', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\160', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\143', '\154', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\103', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\162', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\103', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\141', '\102', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\165', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\132', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\107', '\164', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\142', '\127', '\040', '\167', '\141', '\040', '\061', '\012', '\166', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\127', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\142', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\127', '\155', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\170', '\131', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\121', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\116', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\144', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\131', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\154', '\130', '\040', '\154', '\145', '\040', '\061', '\012', '\162', '\167', '\106', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\132', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\142', '\112', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\141', '\102', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\126', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\125', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\146', '\103', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\170', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\124', '\142', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\157', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\124', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\102', '\153', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\121', '\145', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\102', '\145', '\040', '\144', '\145', '\040', '\061', '\012', '\144', '\160', '\103', '\040', '\144', '\145', '\040', '\061', '\012', '\153', '\160', '\127', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\167', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\162', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\165', '\130', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\157', '\171', '\040', '\157', '\156', '\040', '\061', '\012', '\132', '\146', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\113', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\150', '\123', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\142', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\143', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\102', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\147', '\132', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\120', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\102', '\146', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\162', '\170', '\103', '\040', '\145', '\162', '\040', '\061', '\012', '\163', '\114', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\150', '\107', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\166', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\122', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\116', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\104', '\146', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\156', '\122', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\150', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\116', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\167', '\101', '\040', '\167', '\141', '\040', '\061', '\012', '\167', '\115', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\123', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\146', '\104', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\107', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\130', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\121', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\117', '\171', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\166', '\102', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\126', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\110', '\143', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\163', '\142', '\125', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\106', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\153', '\146', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\162', '\166', '\127', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\106', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\114', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\157', '\121', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\146', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\162', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\112', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\120', '\156', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\116', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\146', '\105', '\040', '\156', '\171', '\040', '\061', '\012', '\153', '\155', '\111', '\040', '\153', '\141', '\040', '\061', '\012', '\107', '\155', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\170', '\123', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\165', '\125', '\040', '\165', '\156', '\040', '\061', '\012', '\161', '\131', '\146', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\113', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\150', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\157', '\146', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\160', '\162', '\110', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\130', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\121', '\155', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\127', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\172', '\103', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\131', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\141', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\147', '\142', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\123', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\162', '\121', '\172', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\153', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\126', '\156', '\154', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\164', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\115', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\171', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\161', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\156', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\106', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\153', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\127', '\143', '\153', '\040', '\143', '\150', '\040', '\061', '\012', '\146', '\115', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\172', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\112', '\172', '\040', '\157', '\156', '\040', '\061', '\012', '\170', '\166', '\110', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\121', '\171', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\131', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\170', '\104', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\104', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\112', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\120', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\162', '\110', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\171', '\115', '\040', '\151', '\156', '\040', '\061', '\012', '\171', '\170', '\104', '\040', '\156', '\171', '\040', '\061', '\012', '\153', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\130', '\166', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\155', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\153', '\116', '\040', '\153', '\141', '\040', '\061', '\012', '\154', '\106', '\152', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\155', '\125', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\132', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\101', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\102', '\143', '\171', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\161', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\122', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\162', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\101', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\132', '\152', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\170', '\106', '\040', '\156', '\171', '\040', '\061', '\012', '\166', '\132', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\120', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\103', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\131', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\102', '\160', '\040', '\164', '\150', '\040', '\061', '\012', '\112', '\142', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\147', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\146', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\155', '\142', '\112', '\040', '\155', '\145', '\040', '\061', '\012', '\146', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\167', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\165', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\131', '\172', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\104', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\110', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\155', '\111', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\150', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\165', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\130', '\146', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\120', '\171', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\120', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\117', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\116', '\155', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\104', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\103', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\152', '\120', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\162', '\105', '\040', '\141', '\156', '\040', '\061', '\012', '\113', '\155', '\167', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\147', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\172', '\122', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\125', '\151', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\156', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\132', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\123', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\101', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\132', '\166', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\160', '\122', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\126', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\116', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\102', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\115', '\152', '\171', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\152', '\132', '\040', '\151', '\152', '\040', '\061', '\012', '\164', '\114', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\131', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\167', '\142', '\117', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\130', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\113', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\165', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\154', '\121', '\040', '\154', '\145', '\040', '\061', '\012', '\171', '\146', '\102', '\040', '\156', '\171', '\040', '\061', '\012', '\121', '\163', '\153', '\040', '\163', '\164', '\040', '\061', '\012', '\125', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\132', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\155', '\131', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\130', '\167', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\126', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\111', '\167', '\040', '\156', '\147', '\040', '\061', '\012', '\110', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\120', '\147', '\171', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\121', '\166', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\156', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\170', '\164', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\143', '\145', '\040', '\143', '\150', '\040', '\061', '\012', '\116', '\152', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\107', '\164', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\112', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\104', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\114', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\157', '\145', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\166', '\131', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\142', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\124', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\141', '\124', '\160', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\144', '\124', '\040', '\144', '\145', '\040', '\061', '\012', '\127', '\153', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\170', '\101', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\104', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\146', '\104', '\040', '\163', '\164', '\040', '\061', '\012', '\162', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\110', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\126', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\115', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\126', '\155', '\040', '\163', '\164', '\040', '\061', '\012', '\156', '\172', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\166', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\132', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\156', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\132', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\120', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\116', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\162', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\114', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\126', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\105', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\161', '\103', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\132', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\116', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\106', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\170', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\120', '\152', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\131', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\106', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\166', '\114', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\112', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\126', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\143', '\132', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\143', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\114', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\171', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\150', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\164', '\113', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\122', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\103', '\170', '\040', '\142', '\145', '\040', '\061', '\012', '\156', '\112', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\152', '\167', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\120', '\144', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\170', '\105', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\154', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\114', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\172', '\126', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\107', '\161', '\040', '\154', '\145', '\040', '\061', '\012', '\121', '\142', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\142', '\131', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\123', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\160', '\122', '\040', '\160', '\162', '\040', '\061', '\012', '\147', '\103', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\151', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\146', '\170', '\040', '\146', '\157', '\040', '\061', '\012', '\156', '\152', '\111', '\040', '\156', '\144', '\040', '\061', '\012', '\131', '\160', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\154', '\170', '\124', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\126', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\112', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\170', '\101', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\104', '\154', '\040', '\156', '\147', '\040', '\061', '\012', '\105', '\141', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\143', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\107', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\114', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\153', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\142', '\113', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\116', '\170', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\161', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\122', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\162', '\125', '\040', '\145', '\162', '\040', '\061', '\012', '\146', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\172', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\143', '\156', '\040', '\143', '\150', '\040', '\061', '\012', '\161', '\142', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\126', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\166', '\106', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\112', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\170', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\151', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\115', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\142', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\147', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\155', '\123', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\132', '\152', '\155', '\040', '\151', '\152', '\040', '\061', '\012', '\116', '\152', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\144', '\161', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\131', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\113', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\170', '\125', '\040', '\143', '\150', '\040', '\061', '\012', '\103', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\146', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\164', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\162', '\120', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\105', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\170', '\117', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\132', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\142', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\130', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\143', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\153', '\117', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\116', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\130', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\126', '\153', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\166', '\106', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\106', '\170', '\040', '\170', '\145', '\040', '\061', '\012', '\144', '\123', '\152', '\040', '\144', '\145', '\040', '\061', '\012', '\170', '\120', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\157', '\106', '\160', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\101', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\107', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\172', '\103', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\111', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\114', '\150', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\167', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\160', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\101', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\102', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\113', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\120', '\146', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\165', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\124', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\164', '\127', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\144', '\116', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\162', '\116', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\154', '\123', '\040', '\154', '\145', '\040', '\061', '\012', '\161', '\105', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\161', '\122', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\156', '\155', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\130', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\116', '\040', '\146', '\157', '\040', '\061', '\012', '\142', '\166', '\114', '\040', '\166', '\141', '\040', '\061', '\012', '\157', '\107', '\146', '\040', '\157', '\156', '\040', '\061', '\012', '\150', '\132', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\146', '\110', '\040', '\156', '\171', '\040', '\061', '\012', '\144', '\143', '\105', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\147', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\167', '\162', '\102', '\040', '\145', '\162', '\040', '\061', '\012', '\153', '\127', '\155', '\040', '\153', '\141', '\040', '\061', '\012', '\123', '\150', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\167', '\120', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\166', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\121', '\147', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\112', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\116', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\110', '\160', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\154', '\106', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\161', '\172', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\147', '\107', '\040', '\156', '\147', '\040', '\061', '\012', '\153', '\144', '\132', '\040', '\144', '\145', '\040', '\061', '\012', '\145', '\152', '\130', '\040', '\145', '\162', '\040', '\061', '\012', '\120', '\170', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\166', '\124', '\040', '\166', '\141', '\040', '\061', '\012', '\113', '\161', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\155', '\142', '\040', '\155', '\145', '\040', '\061', '\012', '\170', '\106', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\121', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\120', '\147', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\160', '\114', '\040', '\160', '\162', '\040', '\061', '\012', '\142', '\167', '\105', '\040', '\167', '\141', '\040', '\061', '\012', '\170', '\110', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\155', '\106', '\040', '\151', '\152', '\040', '\061', '\012', '\111', '\170', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\171', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\126', '\166', '\040', '\145', '\162', '\040', '\061', '\012', '\131', '\164', '\167', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\160', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\160', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\152', '\130', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\150', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\146', '\126', '\040', '\161', '\165', '\040', '\061', '\012', '\112', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\124', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\102', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\152', '\122', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\147', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\155', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\103', '\142', '\040', '\153', '\141', '\040', '\061', '\012', '\160', '\131', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\166', '\153', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\166', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\126', '\146', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\154', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\116', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\142', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\104', '\161', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\162', '\104', '\040', '\145', '\162', '\040', '\061', '\012', '\154', '\142', '\107', '\040', '\154', '\145', '\040', '\061', '\012', '\170', '\150', '\106', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\170', '\132', '\040', '\153', '\141', '\040', '\061', '\012', '\111', '\165', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\106', '\170', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\126', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\143', '\107', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\127', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\102', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\171', '\112', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\143', '\172', '\114', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\125', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\160', '\132', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\164', '\127', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\170', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\144', '\131', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\151', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\167', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\146', '\104', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\126', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\146', '\121', '\040', '\166', '\141', '\040', '\061', '\012', '\150', '\166', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\144', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\110', '\172', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\131', '\163', '\040', '\143', '\150', '\040', '\061', '\012', '\106', '\164', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\160', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\114', '\154', '\144', '\040', '\154', '\145', '\040', '\061', '\012', '\107', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\144', '\122', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\130', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\163', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\116', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\152', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\126', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\112', '\155', '\170', '\040', '\155', '\145', '\040', '\061', '\012', '\160', '\104', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\151', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\114', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\156', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\124', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\116', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\125', '\141', '\167', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\172', '\116', '\040', '\163', '\172', '\040', '\061', '\012', '\147', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\152', '\115', '\040', '\151', '\152', '\040', '\061', '\012', '\154', '\156', '\113', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\170', '\142', '\040', '\163', '\172', '\040', '\061', '\012', '\153', '\143', '\123', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\152', '\115', '\040', '\141', '\156', '\040', '\061', '\012', '\107', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\154', '\156', '\132', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\150', '\113', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\160', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\161', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\152', '\130', '\040', '\151', '\156', '\040', '\061', '\012', '\152', '\107', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\142', '\170', '\111', '\040', '\142', '\145', '\040', '\061', '\012', '\166', '\130', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\162', '\167', '\040', '\145', '\162', '\040', '\061', '\012', '\103', '\167', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\156', '\102', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\166', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\170', '\102', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\126', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\103', '\172', '\170', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\171', '\126', '\040', '\156', '\171', '\040', '\061', '\012', '\143', '\130', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\121', '\156', '\146', '\040', '\141', '\156', '\040', '\061', '\012', '\131', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\161', '\110', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\142', '\131', '\040', '\144', '\145', '\040', '\061', '\012', '\123', '\161', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\113', '\161', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\160', '\112', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\142', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\106', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\113', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\162', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\156', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\146', '\161', '\116', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\146', '\101', '\040', '\164', '\150', '\040', '\061', '\012', '\161', '\157', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\117', '\167', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\156', '\154', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\111', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\161', '\162', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\167', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\161', '\141', '\127', '\040', '\141', '\156', '\040', '\061', '\012', '\150', '\143', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\153', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\116', '\144', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\172', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\170', '\102', '\040', '\156', '\147', '\040', '\061', '\012', '\102', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\124', '\146', '\040', '\166', '\141', '\040', '\061', '\012', '\152', '\106', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\115', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\165', '\146', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\160', '\107', '\040', '\141', '\156', '\040', '\061', '\012', '\165', '\132', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\124', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\107', '\154', '\167', '\040', '\154', '\145', '\040', '\061', '\012', '\113', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\103', '\170', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\152', '\132', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\123', '\161', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\171', '\120', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\145', '\121', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\111', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\104', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\111', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\116', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\117', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\153', '\115', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\106', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\143', '\146', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\113', '\152', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\153', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\112', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\120', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\157', '\172', '\121', '\040', '\157', '\156', '\040', '\061', '\012', '\104', '\154', '\153', '\040', '\154', '\145', '\040', '\061', '\012', '\166', '\130', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\153', '\164', '\131', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\127', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\121', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\124', '\160', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\150', '\143', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\165', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\156', '\142', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\121', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\147', '\132', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\165', '\127', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\115', '\146', '\040', '\155', '\145', '\040', '\061', '\012', '\132', '\143', '\144', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\102', '\160', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\172', '\131', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\167', '\103', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\103', '\161', '\171', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\152', '\106', '\040', '\143', '\150', '\040', '\061', '\012', '\107', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\155', '\143', '\127', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\161', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\165', '\112', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\125', '\152', '\040', '\151', '\156', '\040', '\061', '\012', '\166', '\153', '\122', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\147', '\111', '\040', '\156', '\147', '\040', '\061', '\012', '\166', '\125', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\144', '\156', '\040', '\144', '\145', '\040', '\061', '\012', '\163', '\152', '\106', '\040', '\163', '\164', '\040', '\061', '\012', '\164', '\120', '\166', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\122', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\154', '\126', '\040', '\154', '\145', '\040', '\061', '\012', '\163', '\142', '\115', '\040', '\163', '\164', '\040', '\061', '\012', '\155', '\146', '\124', '\040', '\155', '\145', '\040', '\061', '\012', '\144', '\142', '\126', '\040', '\144', '\145', '\040', '\061', '\012', '\106', '\155', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\147', '\146', '\125', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\142', '\102', '\040', '\143', '\150', '\040', '\061', '\012', '\131', '\170', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\104', '\167', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\167', '\147', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\163', '\120', '\166', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\110', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\156', '\142', '\110', '\040', '\141', '\156', '\040', '\061', '\012', '\143', '\106', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\161', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\106', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\105', '\142', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\106', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\105', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\143', '\111', '\040', '\143', '\150', '\040', '\061', '\012', '\142', '\115', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\132', '\167', '\040', '\163', '\172', '\040', '\061', '\012', '\150', '\152', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\113', '\170', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\147', '\103', '\040', '\156', '\147', '\040', '\061', '\012', '\143', '\156', '\114', '\040', '\141', '\156', '\040', '\061', '\012', '\106', '\144', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\107', '\146', '\040', '\142', '\145', '\040', '\061', '\012', '\123', '\152', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\142', '\115', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\130', '\167', '\040', '\166', '\141', '\040', '\061', '\012', '\107', '\146', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\103', '\167', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\163', '\121', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\154', '\120', '\146', '\040', '\154', '\145', '\040', '\061', '\012', '\156', '\155', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\126', '\144', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\143', '\130', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\152', '\124', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\167', '\105', '\040', '\155', '\145', '\040', '\061', '\012', '\161', '\114', '\155', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\110', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\164', '\156', '\040', '\164', '\150', '\040', '\061', '\012', '\116', '\164', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\147', '\127', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\120', '\161', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\160', '\120', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\122', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\160', '\114', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\156', '\104', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\160', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\144', '\172', '\123', '\040', '\163', '\172', '\040', '\061', '\012', '\164', '\132', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\171', '\147', '\115', '\040', '\156', '\147', '\040', '\061', '\012', '\142', '\170', '\103', '\040', '\142', '\145', '\040', '\061', '\012', '\144', '\146', '\125', '\040', '\144', '\145', '\040', '\061', '\012', '\142', '\155', '\102', '\040', '\155', '\145', '\040', '\061', '\012', '\154', '\102', '\172', '\040', '\154', '\145', '\040', '\061', '\012', '\147', '\112', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\131', '\153', '\166', '\040', '\153', '\141', '\040', '\061', '\012', '\132', '\144', '\153', '\040', '\144', '\145', '\040', '\061', '\012', '\167', '\156', '\121', '\040', '\141', '\156', '\040', '\061', '\012', '\164', '\132', '\152', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\146', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\115', '\167', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\162', '\125', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\161', '\167', '\160', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\143', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\146', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\165', '\157', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\103', '\167', '\040', '\167', '\141', '\040', '\061', '\012', '\151', '\121', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\102', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\126', '\142', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\152', '\125', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\160', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\166', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\132', '\160', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\160', '\151', '\126', '\040', '\151', '\156', '\040', '\061', '\012', '\153', '\142', '\120', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\161', '\115', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\126', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\161', '\132', '\162', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\170', '\117', '\040', '\164', '\150', '\040', '\061', '\012', '\167', '\124', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\112', '\172', '\146', '\040', '\163', '\172', '\040', '\061', '\012', '\121', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\165', '\131', '\166', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\167', '\113', '\040', '\160', '\162', '\040', '\061', '\012', '\150', '\166', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\104', '\161', '\145', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\146', '\111', '\040', '\160', '\162', '\040', '\061', '\012', '\155', '\150', '\126', '\040', '\164', '\150', '\040', '\061', '\012', '\152', '\147', '\105', '\040', '\156', '\147', '\040', '\061', '\012', '\162', '\143', '\121', '\040', '\143', '\150', '\040', '\061', '\012', '\153', '\155', '\124', '\040', '\153', '\141', '\040', '\061', '\012', '\127', '\172', '\152', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\116', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\120', '\142', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\172', '\166', '\102', '\040', '\163', '\172', '\040', '\061', '\012', '\170', '\150', '\112', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\166', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\116', '\166', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\163', '\167', '\132', '\040', '\163', '\164', '\040', '\061', '\012', '\152', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\155', '\146', '\114', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\153', '\114', '\040', '\163', '\172', '\040', '\061', '\012', '\152', '\126', '\160', '\040', '\151', '\152', '\040', '\061', '\012', '\104', '\153', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\170', '\165', '\131', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\110', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\123', '\146', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\172', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\154', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\115', '\144', '\040', '\161', '\165', '\040', '\061', '\012', '\121', '\147', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\146', '\170', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\164', '\122', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\106', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\105', '\157', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\157', '\131', '\040', '\157', '\156', '\040', '\061', '\012', '\101', '\167', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\124', '\170', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\143', '\111', '\147', '\040', '\143', '\150', '\040', '\061', '\012', '\170', '\125', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\122', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\170', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\151', '\120', '\146', '\040', '\151', '\156', '\040', '\061', '\012', '\145', '\152', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\130', '\164', '\163', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\146', '\124', '\040', '\160', '\162', '\040', '\061', '\012', '\120', '\161', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\163', '\126', '\040', '\163', '\164', '\040', '\061', '\012', '\171', '\160', '\103', '\040', '\160', '\162', '\040', '\061', '\012', '\167', '\115', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\105', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\170', '\131', '\040', '\166', '\141', '\040', '\061', '\012', '\146', '\125', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\104', '\146', '\146', '\040', '\146', '\157', '\040', '\061', '\012', '\147', '\161', '\121', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\115', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\166', '\112', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\146', '\120', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\114', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\144', '\115', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\116', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\141', '\107', '\166', '\040', '\141', '\156', '\040', '\061', '\012', '\166', '\166', '\104', '\040', '\166', '\141', '\040', '\061', '\012', '\144', '\112', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\170', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\127', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\120', '\166', '\170', '\040', '\166', '\141', '\040', '\061', '\012', '\162', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\122', '\144', '\040', '\163', '\172', '\040', '\061', '\012', '\113', '\147', '\166', '\040', '\156', '\147', '\040', '\061', '\012', '\130', '\166', '\171', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\132', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\153', '\160', '\113', '\040', '\153', '\141', '\040', '\061', '\012', '\120', '\146', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\167', '\125', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\167', '\127', '\170', '\040', '\167', '\141', '\040', '\061', '\012', '\152', '\120', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\147', '\114', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\112', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\147', '\120', '\170', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\110', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\166', '\112', '\142', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\150', '\102', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\121', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\105', '\157', '\141', '\040', '\141', '\156', '\040', '\061', '\012', '\160', '\152', '\117', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\106', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\163', '\130', '\157', '\040', '\157', '\156', '\040', '\061', '\012', '\167', '\142', '\131', '\040', '\167', '\141', '\040', '\061', '\012', '\143', '\152', '\117', '\040', '\143', '\150', '\040', '\061', '\012', '\155', '\154', '\132', '\040', '\154', '\145', '\040', '\061', '\012', '\142', '\116', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\153', '\152', '\120', '\040', '\151', '\152', '\040', '\061', '\012', '\171', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\126', '\152', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\116', '\166', '\040', '\166', '\141', '\040', '\061', '\012', '\147', '\152', '\127', '\040', '\156', '\147', '\040', '\061', '\012', '\156', '\130', '\152', '\040', '\141', '\156', '\040', '\061', '\012', '\144', '\161', '\112', '\040', '\161', '\165', '\040', '\061', '\012', '\110', '\156', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\171', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\153', '\166', '\102', '\040', '\153', '\141', '\040', '\061', '\012', '\161', '\171', '\102', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\104', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\172', '\147', '\120', '\040', '\156', '\147', '\040', '\061', '\012', '\132', '\172', '\153', '\040', '\163', '\172', '\040', '\061', '\012', '\146', '\115', '\153', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\172', '\131', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\142', '\124', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\117', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\163', '\101', '\040', '\163', '\164', '\040', '\061', '\012', '\147', '\114', '\152', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\170', '\110', '\040', '\163', '\172', '\040', '\061', '\012', '\143', '\114', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\104', '\156', '\153', '\040', '\141', '\156', '\040', '\061', '\012', '\172', '\111', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\153', '\160', '\112', '\040', '\153', '\141', '\040', '\061', '\012', '\170', '\162', '\113', '\040', '\145', '\162', '\040', '\061', '\012', '\145', '\111', '\142', '\040', '\145', '\162', '\040', '\061', '\012', '\112', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\102', '\161', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\130', '\147', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\152', '\153', '\040', '\151', '\152', '\040', '\061', '\012', '\144', '\122', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\164', '\152', '\132', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\121', '\154', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\171', '\127', '\040', '\151', '\156', '\040', '\061', '\012', '\112', '\167', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\112', '\160', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\102', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\172', '\162', '\107', '\040', '\145', '\162', '\040', '\061', '\012', '\150', '\127', '\146', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\144', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\161', '\163', '\132', '\040', '\161', '\165', '\040', '\061', '\012', '\143', '\121', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\143', '\143', '\116', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\167', '\115', '\040', '\167', '\141', '\040', '\061', '\012', '\147', '\142', '\130', '\040', '\156', '\147', '\040', '\061', '\012', '\164', '\146', '\124', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\167', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\121', '\142', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\171', '\145', '\131', '\040', '\145', '\162', '\040', '\061', '\012', '\141', '\125', '\142', '\040', '\141', '\156', '\040', '\061', '\012', '\161', '\110', '\167', '\040', '\161', '\165', '\040', '\061', '\012', '\106', '\150', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\106', '\156', '\147', '\040', '\141', '\156', '\040', '\061', '\012', '\154', '\166', '\111', '\040', '\154', '\145', '\040', '\061', '\012', '\152', '\103', '\146', '\040', '\151', '\152', '\040', '\061', '\012', '\150', '\161', '\110', '\040', '\164', '\150', '\040', '\061', '\012', '\164', '\124', '\161', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\146', '\111', '\040', '\163', '\164', '\040', '\061', '\012', '\166', '\163', '\115', '\040', '\163', '\164', '\040', '\061', '\012', '\154', '\104', '\160', '\040', '\154', '\145', '\040', '\061', '\012', '\167', '\112', '\142', '\040', '\167', '\141', '\040', '\061', '\012', '\142', '\150', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\122', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\164', '\123', '\040', '\164', '\150', '\040', '\061', '\012', '\132', '\167', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\112', '\142', '\150', '\040', '\164', '\150', '\040', '\061', '\012', '\150', '\110', '\142', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\104', '\171', '\040', '\160', '\162', '\040', '\061', '\012', '\163', '\152', '\104', '\040', '\163', '\164', '\040', '\061', '\012', '\117', '\171', '\160', '\040', '\160', '\162', '\040', '\061', '\012', '\161', '\167', '\104', '\040', '\161', '\165', '\040', '\061', '\012', '\152', '\142', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\160', '\107', '\040', '\166', '\141', '\040', '\061', '\012', '\127', '\152', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\160', '\102', '\040', '\166', '\141', '\040', '\061', '\012', '\141', '\130', '\161', '\040', '\141', '\156', '\040', '\061', '\012', '\155', '\127', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\110', '\151', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\171', '\116', '\040', '\156', '\171', '\040', '\061', '\012', '\155', '\142', '\121', '\040', '\155', '\145', '\040', '\061', '\012', '\171', '\167', '\103', '\040', '\167', '\141', '\040', '\061', '\012', '\157', '\126', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\170', '\155', '\132', '\040', '\155', '\145', '\040', '\061', '\012', '\163', '\154', '\117', '\040', '\154', '\145', '\040', '\061', '\012', '\146', '\130', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\153', '\131', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\160', '\126', '\165', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\153', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\102', '\162', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\103', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\143', '\170', '\040', '\143', '\150', '\040', '\061', '\012', '\172', '\115', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\122', '\167', '\040', '\143', '\150', '\040', '\061', '\012', '\147', '\172', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\142', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\152', '\165', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\170', '\123', '\172', '\040', '\163', '\172', '\040', '\061', '\012', '\126', '\147', '\172', '\040', '\156', '\147', '\040', '\061', '\012', '\157', '\115', '\167', '\040', '\157', '\156', '\040', '\061', '\012', '\146', '\160', '\105', '\040', '\160', '\162', '\040', '\061', '\012', '\170', '\152', '\130', '\040', '\151', '\152', '\040', '\061', '\012', '\161', '\103', '\147', '\040', '\161', '\165', '\040', '\061', '\012', '\172', '\167', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\165', '\121', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\161', '\120', '\153', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\152', '\104', '\040', '\151', '\152', '\040', '\061', '\012', '\121', '\172', '\155', '\040', '\163', '\172', '\040', '\061', '\012', '\163', '\111', '\160', '\040', '\163', '\164', '\040', '\061', '\012', '\165', '\157', '\107', '\040', '\161', '\165', '\040', '\061', '\012', '\162', '\126', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\143', '\142', '\113', '\040', '\143', '\150', '\040', '\061', '\012', '\150', '\130', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\113', '\163', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\153', '\142', '\106', '\040', '\153', '\141', '\040', '\061', '\012', '\167', '\102', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\151', '\131', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\163', '\147', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\107', '\172', '\166', '\040', '\163', '\172', '\040', '\061', '\012', '\171', '\166', '\105', '\040', '\166', '\141', '\040', '\061', '\012', '\170', '\113', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\127', '\146', '\040', '\163', '\164', '\040', '\061', '\012', '\172', '\102', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\171', '\153', '\110', '\040', '\153', '\141', '\040', '\061', '\012', '\166', '\152', '\110', '\040', '\151', '\152', '\040', '\061', '\012', '\167', '\150', '\111', '\040', '\164', '\150', '\040', '\061', '\012', '\166', '\120', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\132', '\150', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\151', '\112', '\170', '\040', '\151', '\156', '\040', '\061', '\012', '\143', '\132', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\115', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\143', '\125', '\152', '\040', '\143', '\150', '\040', '\061', '\012', '\166', '\115', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\143', '\112', '\040', '\143', '\150', '\040', '\061', '\012', '\102', '\143', '\155', '\040', '\143', '\150', '\040', '\061', '\012', '\152', '\130', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\170', '\157', '\111', '\040', '\157', '\156', '\040', '\061', '\012', '\132', '\153', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\130', '\172', '\162', '\040', '\145', '\162', '\040', '\061', '\012', '\171', '\172', '\115', '\040', '\163', '\172', '\040', '\061', '\012', '\161', '\152', '\130', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\116', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\150', '\160', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\164', '\130', '\144', '\040', '\164', '\150', '\040', '\061', '\012', '\130', '\153', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\110', '\163', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\142', '\161', '\125', '\040', '\161', '\165', '\040', '\061', '\012', '\163', '\147', '\106', '\040', '\156', '\147', '\040', '\061', '\012', '\144', '\120', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\112', '\170', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\125', '\147', '\160', '\040', '\156', '\147', '\040', '\061', '\012', '\122', '\170', '\151', '\040', '\151', '\156', '\040', '\061', '\012', '\113', '\167', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\172', '\153', '\104', '\040', '\163', '\172', '\040', '\061', '\012', '\122', '\161', '\154', '\040', '\161', '\165', '\040', '\061', '\012', '\160', '\112', '\142', '\040', '\160', '\162', '\040', '\061', '\012', '\146', '\143', '\126', '\040', '\143', '\150', '\040', '\061', '\012', '\151', '\126', '\144', '\040', '\151', '\156', '\040', '\061', '\012', '\142', '\102', '\160', '\040', '\142', '\145', '\040', '\061', '\012', '\117', '\152', '\167', '\040', '\151', '\152', '\040', '\061', '\012', '\166', '\132', '\154', '\040', '\154', '\145', '\040', '\061', '\012', '\111', '\171', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\146', '\153', '\125', '\040', '\153', '\141', '\040', '\061', '\012', '\113', '\143', '\161', '\040', '\143', '\150', '\040', '\061', '\012', '\144', '\102', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\115', '\161', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\151', '\115', '\147', '\040', '\156', '\147', '\040', '\061', '\012', '\127', '\167', '\163', '\040', '\163', '\164', '\040', '\061', '\012', '\164', '\161', '\130', '\040', '\164', '\150', '\040', '\061', '\012', '\170', '\150', '\104', '\040', '\164', '\150', '\040', '\061', '\012', '\162', '\116', '\154', '\040', '\145', '\162', '\040', '\061', '\012', '\160', '\127', '\144', '\040', '\144', '\145', '\040', '\061', '\012', '\152', '\162', '\126', '\040', '\145', '\162', '\040', '\061', '\012', '\102', '\155', '\152', '\040', '\151', '\152', '\040', '\061', '\012', '\110', '\155', '\161', '\040', '\161', '\165', '\040', '\061', '\012', '\166', '\154', '\110', '\040', '\154', '\145', '\040', '\061', '\012', '\115', '\170', '\142', '\040', '\142', '\145', '\040', '\061', '\012', '\171', '\171', '\123', '\040', '\156', '\171', '\040', '\061', '\012', '\161', '\166', '\127', '\040', '\161', '\165', '\040', '\061', '\012', '\146', '\166', '\130', '\040', '\166', '\141', '\040', '\061', '\012', '\126', '\146', '\145', '\040', '\145', '\162', '\040', '\061', '\012', '\103', '\144', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\113', '\147', '\145', '\040', '\156', '\147', '\040', '\061', '\012', '\121', '\145', '\152', '\040', '\145', '\162', '\040', '\061', '\012', '\162', '\166', '\132', '\040', '\145', '\162', '\040', '\061', '\012', '\166', '\172', '\111', '\040', '\163', '\172', '\040', '\061', '\012', '\144', '\104', '\156', '\040', '\141', '\156', '\040', '\061', '\012', '\156', '\167', '\123', '\040', '\141', '\156', '\040', '\061', '\012', '\121', '\143', '\142', '\040', '\143', '\150', '\040', '\061', '\012', '\167', '\153', '\126', '\040', '\153', '\141', '\040', '\061', '\012', '\165', '\103', '\170', '\040', '\161', '\165', '\040', '\061', '\012', '\111', '\147', '\153', '\040', '\156', '\147', '\040', '\061', '\012', '\126', '\160', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\150', '\102', '\155', '\040', '\164', '\150', '\040', '\061', '\012', '\160', '\144', '\121', '\040', '\144', '\145', '\040', '\061', '\012', '\146', '\147', '\121', '\040', '\156', '\147', '\040', '\061', '\012', '\171', '\121', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\147', '\170', '\110', '\040', '\156', '\147', '\040', '\061', '\012', '\160', '\161', '\113', '\040', '\161', '\165', '\040', '\061', '\012', '\154', '\122', '\143', '\040', '\143', '\150', '\040', '\061', '\012', '\130', '\144', '\166', '\040', '\144', '\145', '\040', '\061', '\012', '\150', '\104', '\172', '\040', '\164', '\150', '\040', '\061', '\012', '\144', '\106', '\167', '\040', '\144', '\145', '\040', '\061', '\012', '\161', '\121', '\165', '\040', '\165', '\156', '\040', '\061', '\012', '\170', '\142', '\104', '\040', '\142', '\145', '\040', '\061', '\012', '\161', '\155', '\105', '\040', '\161', '\165', '\040', '\061', '\012', '\155', '\127', '\155', '\040', '\155', '\145', '\040', '\061', '\012', '\152', '\102', '\142', '\040', '\151', '\152', '\040', '\061', '\012', '\152', '\130', '\164', '\040', '\164', '\150', '\040', '\061', '\012', '\146', '\170', '\125', '\040', '\146', }; extern const int ksizeofUniversalAmbigsFile = sizeof(kUniversalAmbigsFile); } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: genericvector.h // Description: Generic vector class // Author: Daria Antonova // Created: Mon Jun 23 11:26:43 PDT 2008 // // (C) Copyright 2007, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// // #ifndef TESSERACT_CCUTIL_GENERICVECTOR_H_ #define TESSERACT_CCUTIL_GENERICVECTOR_H_ #include <assert.h> #include <stdio.h> #include <stdlib.h> #include "tesscallback.h" #include "errcode.h" #include "helpers.h" #include "ndminx.h" #include "serialis.h" #include "strngs.h" // Use PointerVector<T> below in preference to GenericVector<T*>, as that // provides automatic deletion of pointers, [De]Serialize that works, and // sort that works. template <typename T> class GenericVector { public: GenericVector() { init(kDefaultVectorSize); } GenericVector(int size, T init_val) { init(size); init_to_size(size, init_val); } // Copy GenericVector(const GenericVector& other) { this->init(other.size()); this->operator+=(other); } GenericVector<T> &operator+=(const GenericVector& other); GenericVector<T> &operator=(const GenericVector& other); ~GenericVector(); // Reserve some memory. void reserve(int size); // Double the size of the internal array. void double_the_size(); // Resizes to size and sets all values to t. void init_to_size(int size, T t); // Resizes to size without any initialization. void resize_no_init(int size) { reserve(size); size_used_ = size; } // Return the size used. int size() const { return size_used_; } int size_reserved() const { return size_reserved_; } int length() const { return size_used_; } // Return true if empty. bool empty() const { return size_used_ == 0; } // Return the object from an index. T &get(int index) const; T &back() const; T &operator[](int index) const; // Returns the last object and removes it. T pop_back(); // Return the index of the T object. // This method NEEDS a compare_callback to be passed to // set_compare_callback. int get_index(T object) const; // Return true if T is in the array bool contains(T object) const; // Return true if the index is valid T contains_index(int index) const; // Push an element in the end of the array int push_back(T object); void operator+=(T t); // Push an element in the end of the array if the same // element is not already contained in the array. int push_back_new(T object); // Push an element in the front of the array // Note: This function is O(n) int push_front(T object); // Set the value at the given index void set(T t, int index); // Insert t at the given index, push other elements to the right. void insert(T t, int index); // Removes an element at the given index and // shifts the remaining elements to the left. void remove(int index); // Truncates the array to the given size by removing the end. // If the current size is less, the array is not expanded. void truncate(int size) { if (size < size_used_) size_used_ = size; } // Add a callback to be called to delete the elements when the array took // their ownership. void set_clear_callback(TessCallback1<T>* cb); // Add a callback to be called to compare the elements when needed (contains, // get_id, ...) void set_compare_callback(TessResultCallback2<bool, T const &, T const &>* cb); // Clear the array, calling the clear callback function if any. // All the owned callbacks are also deleted. // If you don't want the callbacks to be deleted, before calling clear, set // the callback to NULL. void clear(); // Delete objects pointed to by data_[i] void delete_data_pointers(); // This method clears the current object, then, does a shallow copy of // its argument, and finally invalidates its argument. // Callbacks are moved to the current object; void move(GenericVector<T>* from); // Read/Write the array to a file. This does _NOT_ read/write the callbacks. // The callback given must be permanent since they will be called more than // once. The given callback will be deleted at the end. // If the callbacks are NULL, then the data is simply read/written using // fread (and swapping)/fwrite. // Returns false on error or if the callback returns false. // DEPRECATED. Use [De]Serialize[Classes] instead. bool write(FILE* f, TessResultCallback2<bool, FILE*, T const &>* cb) const; bool read(FILE* f, TessResultCallback3<bool, FILE*, T*, bool>* cb, bool swap); // Writes a vector of simple types to the given file. Assumes that bitwise // read/write of T will work. Returns false in case of error. // TODO(rays) Change all callers to use TFile and remove deprecated methods. bool Serialize(FILE* fp) const; bool Serialize(tesseract::TFile* fp) const; // Reads a vector of simple types from the given file. Assumes that bitwise // read/write will work with ReverseN according to sizeof(T). // Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool DeSerialize(bool swap, FILE* fp); bool DeSerialize(bool swap, tesseract::TFile* fp); // Writes a vector of classes to the given file. Assumes the existence of // bool T::Serialize(FILE* fp) const that returns false in case of error. // Returns false in case of error. bool SerializeClasses(FILE* fp) const; bool SerializeClasses(tesseract::TFile* fp) const; // Reads a vector of classes from the given file. Assumes the existence of // bool T::Deserialize(bool swap, FILE* fp) that returns false in case of // error. Also needs T::T() and T::T(constT&), as init_to_size is used in // this function. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool DeSerializeClasses(bool swap, FILE* fp); bool DeSerializeClasses(bool swap, tesseract::TFile* fp); // Allocates a new array of double the current_size, copies over the // information from data to the new location, deletes data and returns // the pointed to the new larger array. // This function uses memcpy to copy the data, instead of invoking // operator=() for each element like double_the_size() does. static T *double_the_size_memcpy(int current_size, T *data) { T *data_new = new T[current_size * 2]; memcpy(data_new, data, sizeof(T) * current_size); delete[] data; return data_new; } // Reverses the elements of the vector. void reverse() { for (int i = 0; i < size_used_ / 2; ++i) Swap(&data_[i], &data_[size_used_ - 1 - i]); } // Sorts the members of this vector using the less than comparator (cmp_lt), // which compares the values. Useful for GenericVectors to primitive types. // Will not work so great for pointers (unless you just want to sort some // pointers). You need to provide a specialization to sort_cmp to use // your type. void sort(); // Sort the array into the order defined by the qsort function comparator. // The comparator function is as defined by qsort, ie. it receives pointers // to two Ts and returns negative if the first element is to appear earlier // in the result and positive if it is to appear later, with 0 for equal. void sort(int (*comparator)(const void*, const void*)) { qsort(data_, size_used_, sizeof(*data_), comparator); } // Searches the array (assuming sorted in ascending order, using sort()) for // an element equal to target and returns true if it is present. // Use binary_search to get the index of target, or its nearest candidate. bool bool_binary_search(const T& target) const { int index = binary_search(target); if (index >= size_used_) return false; return data_[index] == target; } // Searches the array (assuming sorted in ascending order, using sort()) for // an element equal to target and returns the index of the best candidate. // The return value is conceptually the largest index i such that // data_[i] <= target or 0 if target < the whole vector. // NOTE that this function uses operator> so really the return value is // the largest index i such that data_[i] > target is false. int binary_search(const T& target) const { int bottom = 0; int top = size_used_; do { int middle = (bottom + top) / 2; if (data_[middle] > target) top = middle; else bottom = middle; } while (top - bottom > 1); return bottom; } // Compact the vector by deleting elements using operator!= on basic types. // The vector must be sorted. void compact_sorted() { if (size_used_ == 0) return; // First element is in no matter what, hence the i = 1. int last_write = 0; for (int i = 1; i < size_used_; ++i) { // Finds next unique item and writes it. if (data_[last_write] != data_[i]) data_[++last_write] = data_[i]; } // last_write is the index of a valid data cell, so add 1. size_used_ = last_write + 1; } // Compact the vector by deleting elements for which delete_cb returns // true. delete_cb is a permanent callback and will be deleted. void compact(TessResultCallback1<bool, int>* delete_cb) { int new_size = 0; int old_index = 0; // Until the callback returns true, the elements stay the same. while (old_index < size_used_ && !delete_cb->Run(old_index++)) ++new_size; // Now just copy anything else that gets false from delete_cb. for (; old_index < size_used_; ++old_index) { if (!delete_cb->Run(old_index)) { data_[new_size++] = data_[old_index]; } } size_used_ = new_size; delete delete_cb; } T dot_product(const GenericVector<T>& other) const { T result = static_cast<T>(0); for (int i = MIN(size_used_, other.size_used_) - 1; i >= 0; --i) result += data_[i] * other.data_[i]; return result; } // Returns the index of what would be the target_index_th item in the array // if the members were sorted, without actually sorting. Members are // shuffled around, but it takes O(n) time. // NOTE: uses operator< and operator== on the members. int choose_nth_item(int target_index) { // Make sure target_index is legal. if (target_index < 0) target_index = 0; // ensure legal else if (target_index >= size_used_) target_index = size_used_ - 1; unsigned int seed = 1; return choose_nth_item(target_index, 0, size_used_, &seed); } // Swaps the elements with the given indices. void swap(int index1, int index2) { if (index1 != index2) { T tmp = data_[index1]; data_[index1] = data_[index2]; data_[index2] = tmp; } } // Returns true if all elements of *this are within the given range. // Only uses operator< bool WithinBounds(const T& rangemin, const T& rangemax) const { for (int i = 0; i < size_used_; ++i) { if (data_[i] < rangemin || rangemax < data_[i]) return false; } return true; } protected: // Internal recursive version of choose_nth_item. int choose_nth_item(int target_index, int start, int end, unsigned int* seed); // Init the object, allocating size memory. void init(int size); // We are assuming that the object generally placed in thie // vector are small enough that for efficiency it makes sence // to start with a larger initial size. static const int kDefaultVectorSize = 4; inT32 size_used_; inT32 size_reserved_; T* data_; TessCallback1<T>* clear_cb_; // Mutable because Run method is not const mutable TessResultCallback2<bool, T const &, T const &>* compare_cb_; }; namespace tesseract { // Function to read a GenericVector<char> from a whole file. // Returns false on failure. typedef bool (*FileReader)(const STRING& filename, GenericVector<char>* data); // Function to write a GenericVector<char> to a whole file. // Returns false on failure. typedef bool (*FileWriter)(const GenericVector<char>& data, const STRING& filename); // The default FileReader loads the whole file into the vector of char, // returning false on error. inline bool LoadDataFromFile(const STRING& filename, GenericVector<char>* data) { FILE* fp = fopen(filename.string(), "rb"); if (fp == NULL) return false; fseek(fp, 0, SEEK_END); size_t size = ftell(fp); fseek(fp, 0, SEEK_SET); // Pad with a 0, just in case we treat the result as a string. data->init_to_size(size + 1, 0); bool result = fread(&(*data)[0], 1, size, fp) == size; fclose(fp); return result; } // The default FileWriter writes the vector of char to the filename file, // returning false on error. inline bool SaveDataToFile(const GenericVector<char>& data, const STRING& filename) { FILE* fp = fopen(filename.string(), "wb"); if (fp == NULL) return false; bool result = static_cast<int>(fwrite(&data[0], 1, data.size(), fp)) == data.size(); fclose(fp); return result; } template <typename T> bool cmp_eq(T const & t1, T const & t2) { return t1 == t2; } // Used by sort() // return < 0 if t1 < t2 // return 0 if t1 == t2 // return > 0 if t1 > t2 template <typename T> int sort_cmp(const void* t1, const void* t2) { const T* a = static_cast<const T *> (t1); const T* b = static_cast<const T *> (t2); if (*a < *b) { return -1; } else if (*b < *a) { return 1; } else { return 0; } } // Used by PointerVector::sort() // return < 0 if t1 < t2 // return 0 if t1 == t2 // return > 0 if t1 > t2 template <typename T> int sort_ptr_cmp(const void* t1, const void* t2) { const T* a = *reinterpret_cast<T * const *>(t1); const T* b = *reinterpret_cast<T * const *>(t2); if (*a < *b) { return -1; } else if (*b < *a) { return 1; } else { return 0; } } // Subclass for a vector of pointers. Use in preference to GenericVector<T*> // as it provides automatic deletion and correct serialization, with the // corollary that all copy operations are deep copies of the pointed-to objects. template<typename T> class PointerVector : public GenericVector<T*> { public: PointerVector() : GenericVector<T*>() { } explicit PointerVector(int size) : GenericVector<T*>(size) { } ~PointerVector() { // Clear must be called here, even though it is called again by the base, // as the base will call the wrong clear. clear(); } // Copy must be deep, as the pointers will be automatically deleted on // destruction. PointerVector(const PointerVector& other) { this->init(other.size()); this->operator+=(other); } PointerVector<T>& operator+=(const PointerVector& other) { this->reserve(this->size_used_ + other.size_used_); for (int i = 0; i < other.size(); ++i) { this->push_back(new T(*other.data_[i])); } return *this; } PointerVector<T>& operator=(const PointerVector& other) { this->truncate(0); this->operator+=(other); return *this; } // Removes an element at the given index and // shifts the remaining elements to the left. void remove(int index) { delete GenericVector<T*>::data_[index]; GenericVector<T*>::remove(index); } // Truncates the array to the given size by removing the end. // If the current size is less, the array is not expanded. void truncate(int size) { for (int i = size; i < GenericVector<T*>::size_used_; ++i) delete GenericVector<T*>::data_[i]; GenericVector<T*>::truncate(size); } // Compact the vector by deleting elements for which delete_cb returns // true. delete_cb is a permanent callback and will be deleted. void compact(TessResultCallback1<bool, const T*>* delete_cb) { int new_size = 0; int old_index = 0; // Until the callback returns true, the elements stay the same. while (old_index < GenericVector<T*>::size_used_ && !delete_cb->Run(GenericVector<T*>::data_[old_index++])) ++new_size; // Now just copy anything else that gets false from delete_cb. for (; old_index < GenericVector<T*>::size_used_; ++old_index) { if (!delete_cb->Run(GenericVector<T*>::data_[old_index])) { GenericVector<T*>::data_[new_size++] = GenericVector<T*>::data_[old_index]; } else { delete GenericVector<T*>::data_[old_index]; } } GenericVector<T*>::size_used_ = new_size; delete delete_cb; } // Clear the array, calling the clear callback function if any. // All the owned callbacks are also deleted. // If you don't want the callbacks to be deleted, before calling clear, set // the callback to NULL. void clear() { GenericVector<T*>::delete_data_pointers(); GenericVector<T*>::clear(); } // Writes a vector of (pointers to) classes to the given file. Assumes the // existence of bool T::Serialize(FILE*) const that returns false in case of // error. There is no Serialize for simple types, as you would have a // normal GenericVector of those. // Returns false in case of error. bool Serialize(FILE* fp) const { inT32 used = GenericVector<T*>::size_used_; if (fwrite(&used, sizeof(used), 1, fp) != 1) return false; for (int i = 0; i < used; ++i) { inT8 non_null = GenericVector<T*>::data_[i] != NULL; if (fwrite(&non_null, sizeof(non_null), 1, fp) != 1) return false; if (non_null && !GenericVector<T*>::data_[i]->Serialize(fp)) return false; } return true; } bool Serialize(TFile* fp) const { inT32 used = GenericVector<T*>::size_used_; if (fp->FWrite(&used, sizeof(used), 1) != 1) return false; for (int i = 0; i < used; ++i) { inT8 non_null = GenericVector<T*>::data_[i] != NULL; if (fp->FWrite(&non_null, sizeof(non_null), 1) != 1) return false; if (non_null && !GenericVector<T*>::data_[i]->Serialize(fp)) return false; } return true; } // Reads a vector of (pointers to) classes to the given file. Assumes the // existence of bool T::DeSerialize(bool, Tfile*) const that returns false in // case of error. There is no Serialize for simple types, as you would have a // normal GenericVector of those. // If swap is true, assumes a big/little-endian swap is needed. // Also needs T::T(), as new T is used in this function. // Returns false in case of error. bool DeSerialize(bool swap, FILE* fp) { inT32 reserved; if (fread(&reserved, sizeof(reserved), 1, fp) != 1) return false; if (swap) Reverse32(&reserved); GenericVector<T*>::reserve(reserved); truncate(0); for (int i = 0; i < reserved; ++i) { inT8 non_null; if (fread(&non_null, sizeof(non_null), 1, fp) != 1) return false; T* item = NULL; if (non_null) { item = new T; if (!item->DeSerialize(swap, fp)) { delete item; return false; } this->push_back(item); } else { // Null elements should keep their place in the vector. this->push_back(NULL); } } return true; } bool DeSerialize(bool swap, TFile* fp) { inT32 reserved; if (fp->FRead(&reserved, sizeof(reserved), 1) != 1) return false; if (swap) Reverse32(&reserved); GenericVector<T*>::reserve(reserved); truncate(0); for (int i = 0; i < reserved; ++i) { inT8 non_null; if (fp->FRead(&non_null, sizeof(non_null), 1) != 1) return false; T* item = NULL; if (non_null) { item = new T; if (!item->DeSerialize(swap, fp)) { delete item; return false; } this->push_back(item); } else { // Null elements should keep their place in the vector. this->push_back(NULL); } } return true; } // Sorts the items pointed to by the members of this vector using // t::operator<(). void sort() { sort(&sort_ptr_cmp<T>); } }; } // namespace tesseract // A useful vector that uses operator== to do comparisons. template <typename T> class GenericVectorEqEq : public GenericVector<T> { public: GenericVectorEqEq() { GenericVector<T>::set_compare_callback( NewPermanentTessCallback(tesseract::cmp_eq<T>)); } GenericVectorEqEq(int size) : GenericVector<T>(size) { GenericVector<T>::set_compare_callback( NewPermanentTessCallback(tesseract::cmp_eq<T>)); } }; template <typename T> void GenericVector<T>::init(int size) { size_used_ = 0; size_reserved_ = 0; data_ = 0; clear_cb_ = 0; compare_cb_ = 0; reserve(size); } template <typename T> GenericVector<T>::~GenericVector() { clear(); } // Reserve some memory. If the internal array contains elements, they are // copied. template <typename T> void GenericVector<T>::reserve(int size) { if (size_reserved_ >= size || size <= 0) return; T* new_array = new T[size]; for (int i = 0; i < size_used_; ++i) new_array[i] = data_[i]; if (data_ != NULL) delete[] data_; data_ = new_array; size_reserved_ = size; } template <typename T> void GenericVector<T>::double_the_size() { if (size_reserved_ == 0) { reserve(kDefaultVectorSize); } else { reserve(2 * size_reserved_); } } // Resizes to size and sets all values to t. template <typename T> void GenericVector<T>::init_to_size(int size, T t) { reserve(size); size_used_ = size; for (int i = 0; i < size; ++i) data_[i] = t; } // Return the object from an index. template <typename T> T &GenericVector<T>::get(int index) const { ASSERT_HOST(index >= 0 && index < size_used_); return data_[index]; } template <typename T> T &GenericVector<T>::operator[](int index) const { assert(index >= 0 && index < size_used_); return data_[index]; } template <typename T> T &GenericVector<T>::back() const { ASSERT_HOST(size_used_ > 0); return data_[size_used_ - 1]; } // Returns the last object and removes it. template <typename T> T GenericVector<T>::pop_back() { ASSERT_HOST(size_used_ > 0); return data_[--size_used_]; } // Return the object from an index. template <typename T> void GenericVector<T>::set(T t, int index) { ASSERT_HOST(index >= 0 && index < size_used_); data_[index] = t; } // Shifts the rest of the elements to the right to make // space for the new elements and inserts the given element // at the specified index. template <typename T> void GenericVector<T>::insert(T t, int index) { ASSERT_HOST(index >= 0 && index <= size_used_); if (size_reserved_ == size_used_) double_the_size(); for (int i = size_used_; i > index; --i) { data_[i] = data_[i-1]; } data_[index] = t; size_used_++; } // Removes an element at the given index and // shifts the remaining elements to the left. template <typename T> void GenericVector<T>::remove(int index) { ASSERT_HOST(index >= 0 && index < size_used_); for (int i = index; i < size_used_ - 1; ++i) { data_[i] = data_[i+1]; } size_used_--; } // Return true if the index is valindex template <typename T> T GenericVector<T>::contains_index(int index) const { return index >= 0 && index < size_used_; } // Return the index of the T object. template <typename T> int GenericVector<T>::get_index(T object) const { for (int i = 0; i < size_used_; ++i) { ASSERT_HOST(compare_cb_ != NULL); if (compare_cb_->Run(object, data_[i])) return i; } return -1; } // Return true if T is in the array template <typename T> bool GenericVector<T>::contains(T object) const { return get_index(object) != -1; } // Add an element in the array template <typename T> int GenericVector<T>::push_back(T object) { int index = 0; if (size_used_ == size_reserved_) double_the_size(); index = size_used_++; data_[index] = object; return index; } template <typename T> int GenericVector<T>::push_back_new(T object) { int index = get_index(object); if (index >= 0) return index; return push_back(object); } // Add an element in the array (front) template <typename T> int GenericVector<T>::push_front(T object) { if (size_used_ == size_reserved_) double_the_size(); for (int i = size_used_; i > 0; --i) data_[i] = data_[i-1]; data_[0] = object; ++size_used_; return 0; } template <typename T> void GenericVector<T>::operator+=(T t) { push_back(t); } template <typename T> GenericVector<T> &GenericVector<T>::operator+=(const GenericVector& other) { this->reserve(size_used_ + other.size_used_); for (int i = 0; i < other.size(); ++i) { this->operator+=(other.data_[i]); } return *this; } template <typename T> GenericVector<T> &GenericVector<T>::operator=(const GenericVector& other) { this->truncate(0); this->operator+=(other); return *this; } // Add a callback to be called to delete the elements when the array took // their ownership. template <typename T> void GenericVector<T>::set_clear_callback(TessCallback1<T>* cb) { clear_cb_ = cb; } // Add a callback to be called to delete the elements when the array took // their ownership. template <typename T> void GenericVector<T>::set_compare_callback( TessResultCallback2<bool, T const &, T const &>* cb) { compare_cb_ = cb; } // Clear the array, calling the callback function if any. template <typename T> void GenericVector<T>::clear() { if (size_reserved_ > 0) { if (clear_cb_ != NULL) for (int i = 0; i < size_used_; ++i) clear_cb_->Run(data_[i]); delete[] data_; data_ = NULL; size_used_ = 0; size_reserved_ = 0; } if (clear_cb_ != NULL) { delete clear_cb_; clear_cb_ = NULL; } if (compare_cb_ != NULL) { delete compare_cb_; compare_cb_ = NULL; } } template <typename T> void GenericVector<T>::delete_data_pointers() { for (int i = 0; i < size_used_; ++i) if (data_[i]) { delete data_[i]; } } template <typename T> bool GenericVector<T>::write( FILE* f, TessResultCallback2<bool, FILE*, T const &>* cb) const { if (fwrite(&size_reserved_, sizeof(size_reserved_), 1, f) != 1) return false; if (fwrite(&size_used_, sizeof(size_used_), 1, f) != 1) return false; if (cb != NULL) { for (int i = 0; i < size_used_; ++i) { if (!cb->Run(f, data_[i])) { delete cb; return false; } } delete cb; } else { if (fwrite(data_, sizeof(T), size_used_, f) != size_used_) return false; } return true; } template <typename T> bool GenericVector<T>::read(FILE* f, TessResultCallback3<bool, FILE*, T*, bool>* cb, bool swap) { inT32 reserved; if (fread(&reserved, sizeof(reserved), 1, f) != 1) return false; if (swap) Reverse32(&reserved); reserve(reserved); if (fread(&size_used_, sizeof(size_used_), 1, f) != 1) return false; if (swap) Reverse32(&size_used_); if (cb != NULL) { for (int i = 0; i < size_used_; ++i) { if (!cb->Run(f, data_ + i, swap)) { delete cb; return false; } } delete cb; } else { if (fread(data_, sizeof(T), size_used_, f) != size_used_) return false; if (swap) { for (int i = 0; i < size_used_; ++i) ReverseN(&data_[i], sizeof(T)); } } return true; } // Writes a vector of simple types to the given file. Assumes that bitwise // read/write of T will work. Returns false in case of error. template <typename T> bool GenericVector<T>::Serialize(FILE* fp) const { if (fwrite(&size_used_, sizeof(size_used_), 1, fp) != 1) return false; if (fwrite(data_, sizeof(*data_), size_used_, fp) != size_used_) return false; return true; } template <typename T> bool GenericVector<T>::Serialize(tesseract::TFile* fp) const { if (fp->FWrite(&size_used_, sizeof(size_used_), 1) != 1) return false; if (fp->FWrite(data_, sizeof(*data_), size_used_) != size_used_) return false; return true; } // Reads a vector of simple types from the given file. Assumes that bitwise // read/write will work with ReverseN according to sizeof(T). // Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. template <typename T> bool GenericVector<T>::DeSerialize(bool swap, FILE* fp) { inT32 reserved; if (fread(&reserved, sizeof(reserved), 1, fp) != 1) return false; if (swap) Reverse32(&reserved); reserve(reserved); size_used_ = reserved; if (fread(data_, sizeof(T), size_used_, fp) != size_used_) return false; if (swap) { for (int i = 0; i < size_used_; ++i) ReverseN(&data_[i], sizeof(data_[i])); } return true; } template <typename T> bool GenericVector<T>::DeSerialize(bool swap, tesseract::TFile* fp) { inT32 reserved; if (fp->FRead(&reserved, sizeof(reserved), 1) != 1) return false; if (swap) Reverse32(&reserved); reserve(reserved); size_used_ = reserved; if (fp->FRead(data_, sizeof(T), size_used_) != size_used_) return false; if (swap) { for (int i = 0; i < size_used_; ++i) ReverseN(&data_[i], sizeof(data_[i])); } return true; } // Writes a vector of classes to the given file. Assumes the existence of // bool T::Serialize(FILE* fp) const that returns false in case of error. // Returns false in case of error. template <typename T> bool GenericVector<T>::SerializeClasses(FILE* fp) const { if (fwrite(&size_used_, sizeof(size_used_), 1, fp) != 1) return false; for (int i = 0; i < size_used_; ++i) { if (!data_[i].Serialize(fp)) return false; } return true; } template <typename T> bool GenericVector<T>::SerializeClasses(tesseract::TFile* fp) const { if (fp->FWrite(&size_used_, sizeof(size_used_), 1) != 1) return false; for (int i = 0; i < size_used_; ++i) { if (!data_[i].Serialize(fp)) return false; } return true; } // Reads a vector of classes from the given file. Assumes the existence of // bool T::Deserialize(bool swap, FILE* fp) that returns false in case of // error. Alse needs T::T() and T::T(constT&), as init_to_size is used in // this function. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. template <typename T> bool GenericVector<T>::DeSerializeClasses(bool swap, FILE* fp) { uinT32 reserved; if (fread(&reserved, sizeof(reserved), 1, fp) != 1) return false; if (swap) Reverse32(&reserved); T empty; init_to_size(reserved, empty); for (int i = 0; i < reserved; ++i) { if (!data_[i].DeSerialize(swap, fp)) return false; } return true; } template <typename T> bool GenericVector<T>::DeSerializeClasses(bool swap, tesseract::TFile* fp) { uinT32 reserved; if (fp->FRead(&reserved, sizeof(reserved), 1) != 1) return false; if (swap) Reverse32(&reserved); T empty; init_to_size(reserved, empty); for (int i = 0; i < reserved; ++i) { if (!data_[i].DeSerialize(swap, fp)) return false; } return true; } // This method clear the current object, then, does a shallow copy of // its argument, and finally invalidates its argument. template <typename T> void GenericVector<T>::move(GenericVector<T>* from) { this->clear(); this->data_ = from->data_; this->size_reserved_ = from->size_reserved_; this->size_used_ = from->size_used_; this->compare_cb_ = from->compare_cb_; this->clear_cb_ = from->clear_cb_; from->data_ = NULL; from->clear_cb_ = NULL; from->compare_cb_ = NULL; from->size_used_ = 0; from->size_reserved_ = 0; } template <typename T> void GenericVector<T>::sort() { sort(&tesseract::sort_cmp<T>); } // Internal recursive version of choose_nth_item. // The algorithm used comes from "Algorithms" by Sedgewick: // http://books.google.com/books/about/Algorithms.html?id=idUdqdDXqnAC // The principle is to choose a random pivot, and move everything less than // the pivot to its left, and everything greater than the pivot to the end // of the array, then recurse on the part that contains the desired index, or // just return the answer if it is in the equal section in the middle. // The random pivot guarantees average linear time for the same reason that // n times vector::push_back takes linear time on average. // target_index, start and and end are all indices into the full array. // Seed is a seed for rand_r for thread safety purposes. Its value is // unimportant as the random numbers do not affect the result except // between equal answers. template <typename T> int GenericVector<T>::choose_nth_item(int target_index, int start, int end, unsigned int* seed) { // Number of elements to process. int num_elements = end - start; // Trivial cases. if (num_elements <= 1) return start; if (num_elements == 2) { if (data_[start] < data_[start + 1]) { return target_index > start ? start + 1 : start; } else { return target_index > start ? start : start + 1; } } // Place the pivot at start. #ifndef rand_r // _MSC_VER, ANDROID srand(*seed); #define rand_r(seed) rand() #endif // _MSC_VER int pivot = rand_r(seed) % num_elements + start; swap(pivot, start); // The invariant condition here is that items [start, next_lesser) are less // than the pivot (which is at index next_lesser) and items // [prev_greater, end) are greater than the pivot, with items // [next_lesser, prev_greater) being equal to the pivot. int next_lesser = start; int prev_greater = end; for (int next_sample = start + 1; next_sample < prev_greater;) { if (data_[next_sample] < data_[next_lesser]) { swap(next_lesser++, next_sample++); } else if (data_[next_sample] == data_[next_lesser]) { ++next_sample; } else { swap(--prev_greater, next_sample); } } // Now the invariant is set up, we recurse on just the section that contains // the desired index. if (target_index < next_lesser) return choose_nth_item(target_index, start, next_lesser, seed); else if (target_index < prev_greater) return next_lesser; // In equal bracket. else return choose_nth_item(target_index, prev_greater, end, seed); } #endif // TESSERACT_CCUTIL_GENERICVECTOR_H_
C++
/********************************************************************** * File: clst.h (Formerly clist.h) * Description: CONS cell list module include file. * Author: Phil Cheatle * Created: Mon Jan 28 08:33:13 GMT 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef CLST_H #define CLST_H #include <stdio.h> #include "host.h" #include "serialis.h" #include "lsterr.h" class CLIST_ITERATOR; /********************************************************************** * CLASS - CLIST_LINK * * Generic link class for singly linked CONS cell lists * * Note: No destructor - elements are assumed to be destroyed EITHER after * they have been extracted from a list OR by the CLIST destructor which * walks the list. **********************************************************************/ class DLLSYM CLIST_LINK { friend class CLIST_ITERATOR; friend class CLIST; CLIST_LINK *next; void *data; public: CLIST_LINK() { //constructor data = next = NULL; } CLIST_LINK( //copy constructor const CLIST_LINK &) { //dont copy link data = next = NULL; } void operator= ( //dont copy links const CLIST_LINK &) { data = next = NULL; } }; /********************************************************************** * CLASS - CLIST * * Generic list class for singly linked CONS cell lists **********************************************************************/ class DLLSYM CLIST { friend class CLIST_ITERATOR; CLIST_LINK *last; //End of list //(Points to head) CLIST_LINK *First() { // return first return last != NULL ? last->next : NULL; } public: CLIST() { //constructor last = NULL; } ~CLIST () { //destructor shallow_clear(); } void internal_deep_clear ( //destroy all links void (*zapper) (void *)); //ptr to zapper functn void shallow_clear(); //clear list but dont //delete data elements bool empty() const { //is list empty? return !last; } bool singleton() const { return last != NULL ? (last == last->next) : false; } void shallow_copy( //dangerous!! CLIST *from_list) { //beware destructors!! last = from_list->last; } void assign_to_sublist( //to this list CLIST_ITERATOR *start_it, //from list start CLIST_ITERATOR *end_it); //from list end inT32 length() const; //# elements in list void sort ( //sort elements int comparator ( //comparison routine const void *, const void *)); // Assuming list has been sorted already, insert new_data to // keep the list sorted according to the same comparison function. // Comparision function is the same as used by sort, i.e. uses double // indirection. Time is O(1) to add to beginning or end. // Time is linear to add pre-sorted items to an empty list. // If unique, then don't add duplicate entries. // Returns true if the element was added to the list. bool add_sorted(int comparator(const void*, const void*), bool unique, void* new_data); // Assuming that the minuend and subtrahend are already sorted with // the same comparison function, shallow clears this and then copies // the set difference minuend - subtrahend to this, being the elements // of minuend that do not compare equal to anything in subtrahend. // If unique is true, any duplicates in minuend are also eliminated. void set_subtract(int comparator(const void*, const void*), bool unique, CLIST* minuend, CLIST* subtrahend); }; /*********************************************************************** * CLASS - CLIST_ITERATOR * * Generic iterator class for singly linked lists with embedded links **********************************************************************/ class DLLSYM CLIST_ITERATOR { friend void CLIST::assign_to_sublist(CLIST_ITERATOR *, CLIST_ITERATOR *); CLIST *list; //List being iterated CLIST_LINK *prev; //prev element CLIST_LINK *current; //current element CLIST_LINK *next; //next element BOOL8 ex_current_was_last; //current extracted //was end of list BOOL8 ex_current_was_cycle_pt; //current extracted //was cycle point CLIST_LINK *cycle_pt; //point we are cycling //the list to. BOOL8 started_cycling; //Have we moved off //the start? CLIST_LINK *extract_sublist( //from this current... CLIST_ITERATOR *other_it); //to other current public: CLIST_ITERATOR() { //constructor list = NULL; } //unassigned list CLIST_ITERATOR( //constructor CLIST *list_to_iterate); void set_to_list( //change list CLIST *list_to_iterate); void add_after_then_move( //add after current & void *new_data); //move to new void add_after_stay_put( //add after current & void *new_data); //stay at current void add_before_then_move( //add before current & void *new_data); //move to new void add_before_stay_put( //add before current & void *new_data); //stay at current void add_list_after( //add a list & CLIST *list_to_add); //stay at current void add_list_before( //add a list & CLIST *list_to_add); //move to it 1st item void *data() { //get current data #ifndef NDEBUG if (!list) NO_LIST.error ("CLIST_ITERATOR::data", ABORT, NULL); if (!current) NULL_DATA.error ("CLIST_ITERATOR::data", ABORT, NULL); #endif return current->data; } void *data_relative( //get data + or - ... inT8 offset); //offset from current void *forward(); //move to next element void *extract(); //remove from list void *move_to_first(); //go to start of list void *move_to_last(); //go to end of list void mark_cycle_pt(); //remember current BOOL8 empty() { //is list empty? #ifndef NDEBUG if (!list) NO_LIST.error ("CLIST_ITERATOR::empty", ABORT, NULL); #endif return list->empty (); } BOOL8 current_extracted() { //current extracted? return !current; } BOOL8 at_first(); //Current is first? BOOL8 at_last(); //Current is last? BOOL8 cycled_list(); //Completed a cycle? void add_to_end( //add at end & void *new_data); //dont move void exchange( //positions of 2 links CLIST_ITERATOR *other_it); //other iterator inT32 length(); //# elements in list void sort ( //sort elements int comparator ( //comparison routine const void *, const void *)); }; /*********************************************************************** * CLIST_ITERATOR::set_to_list * * (Re-)initialise the iterator to point to the start of the list_to_iterate * over. **********************************************************************/ inline void CLIST_ITERATOR::set_to_list( //change list CLIST *list_to_iterate) { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::set_to_list", ABORT, NULL); if (!list_to_iterate) BAD_PARAMETER.error ("CLIST_ITERATOR::set_to_list", ABORT, "list_to_iterate is NULL"); #endif list = list_to_iterate; prev = list->last; current = list->First (); next = current != NULL ? current->next : NULL; cycle_pt = NULL; //await explicit set started_cycling = FALSE; ex_current_was_last = FALSE; ex_current_was_cycle_pt = FALSE; } /*********************************************************************** * CLIST_ITERATOR::CLIST_ITERATOR * * CONSTRUCTOR - set iterator to specified list; **********************************************************************/ inline CLIST_ITERATOR::CLIST_ITERATOR(CLIST *list_to_iterate) { set_to_list(list_to_iterate); } /*********************************************************************** * CLIST_ITERATOR::add_after_then_move * * Add a new element to the list after the current element and move the * iterator to the new element. **********************************************************************/ inline void CLIST_ITERATOR::add_after_then_move( // element to add void *new_data) { CLIST_LINK *new_element; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::add_after_then_move", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::add_after_then_move", ABORT, NULL); if (!new_data) BAD_PARAMETER.error ("CLIST_ITERATOR::add_after_then_move", ABORT, "new_data is NULL"); #endif new_element = new CLIST_LINK; new_element->data = new_data; if (list->empty ()) { new_element->next = new_element; list->last = new_element; prev = next = new_element; } else { new_element->next = next; if (current) { //not extracted current->next = new_element; prev = current; if (current == list->last) list->last = new_element; } else { //current extracted prev->next = new_element; if (ex_current_was_last) list->last = new_element; if (ex_current_was_cycle_pt) cycle_pt = new_element; } } current = new_element; } /*********************************************************************** * CLIST_ITERATOR::add_after_stay_put * * Add a new element to the list after the current element but do not move * the iterator to the new element. **********************************************************************/ inline void CLIST_ITERATOR::add_after_stay_put( // element to add void *new_data) { CLIST_LINK *new_element; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::add_after_stay_put", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::add_after_stay_put", ABORT, NULL); if (!new_data) BAD_PARAMETER.error ("CLIST_ITERATOR::add_after_stay_put", ABORT, "new_data is NULL"); #endif new_element = new CLIST_LINK; new_element->data = new_data; if (list->empty ()) { new_element->next = new_element; list->last = new_element; prev = next = new_element; ex_current_was_last = FALSE; current = NULL; } else { new_element->next = next; if (current) { //not extracted current->next = new_element; if (prev == current) prev = new_element; if (current == list->last) list->last = new_element; } else { //current extracted prev->next = new_element; if (ex_current_was_last) { list->last = new_element; ex_current_was_last = FALSE; } } next = new_element; } } /*********************************************************************** * CLIST_ITERATOR::add_before_then_move * * Add a new element to the list before the current element and move the * iterator to the new element. **********************************************************************/ inline void CLIST_ITERATOR::add_before_then_move( // element to add void *new_data) { CLIST_LINK *new_element; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::add_before_then_move", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::add_before_then_move", ABORT, NULL); if (!new_data) BAD_PARAMETER.error ("CLIST_ITERATOR::add_before_then_move", ABORT, "new_data is NULL"); #endif new_element = new CLIST_LINK; new_element->data = new_data; if (list->empty ()) { new_element->next = new_element; list->last = new_element; prev = next = new_element; } else { prev->next = new_element; if (current) { //not extracted new_element->next = current; next = current; } else { //current extracted new_element->next = next; if (ex_current_was_last) list->last = new_element; if (ex_current_was_cycle_pt) cycle_pt = new_element; } } current = new_element; } /*********************************************************************** * CLIST_ITERATOR::add_before_stay_put * * Add a new element to the list before the current element but dont move the * iterator to the new element. **********************************************************************/ inline void CLIST_ITERATOR::add_before_stay_put( // element to add void *new_data) { CLIST_LINK *new_element; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::add_before_stay_put", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::add_before_stay_put", ABORT, NULL); if (!new_data) BAD_PARAMETER.error ("CLIST_ITERATOR::add_before_stay_put", ABORT, "new_data is NULL"); #endif new_element = new CLIST_LINK; new_element->data = new_data; if (list->empty ()) { new_element->next = new_element; list->last = new_element; prev = next = new_element; ex_current_was_last = TRUE; current = NULL; } else { prev->next = new_element; if (current) { //not extracted new_element->next = current; if (next == current) next = new_element; } else { //current extracted new_element->next = next; if (ex_current_was_last) list->last = new_element; } prev = new_element; } } /*********************************************************************** * CLIST_ITERATOR::add_list_after * * Insert another list to this list after the current element but dont move the * iterator. **********************************************************************/ inline void CLIST_ITERATOR::add_list_after(CLIST *list_to_add) { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::add_list_after", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::add_list_after", ABORT, NULL); if (!list_to_add) BAD_PARAMETER.error ("CLIST_ITERATOR::add_list_after", ABORT, "list_to_add is NULL"); #endif if (!list_to_add->empty ()) { if (list->empty ()) { list->last = list_to_add->last; prev = list->last; next = list->First (); ex_current_was_last = TRUE; current = NULL; } else { if (current) { //not extracted current->next = list_to_add->First (); if (current == list->last) list->last = list_to_add->last; list_to_add->last->next = next; next = current->next; } else { //current extracted prev->next = list_to_add->First (); if (ex_current_was_last) { list->last = list_to_add->last; ex_current_was_last = FALSE; } list_to_add->last->next = next; next = prev->next; } } list_to_add->last = NULL; } } /*********************************************************************** * CLIST_ITERATOR::add_list_before * * Insert another list to this list before the current element. Move the * iterator to the start of the inserted elements * iterator. **********************************************************************/ inline void CLIST_ITERATOR::add_list_before(CLIST *list_to_add) { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::add_list_before", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::add_list_before", ABORT, NULL); if (!list_to_add) BAD_PARAMETER.error ("CLIST_ITERATOR::add_list_before", ABORT, "list_to_add is NULL"); #endif if (!list_to_add->empty ()) { if (list->empty ()) { list->last = list_to_add->last; prev = list->last; current = list->First (); next = current->next; ex_current_was_last = FALSE; } else { prev->next = list_to_add->First (); if (current) { //not extracted list_to_add->last->next = current; } else { //current extracted list_to_add->last->next = next; if (ex_current_was_last) list->last = list_to_add->last; if (ex_current_was_cycle_pt) cycle_pt = prev->next; } current = prev->next; next = current->next; } list_to_add->last = NULL; } } /*********************************************************************** * CLIST_ITERATOR::extract * * Do extraction by removing current from the list, deleting the cons cell * and returning the data to the caller, but NOT updating the iterator. (So * that any calling loop can do this.) The iterator's current points to * NULL. If the data is to be deleted, this is the callers responsibility. **********************************************************************/ inline void *CLIST_ITERATOR::extract() { void *extracted_data; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::extract", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::extract", ABORT, NULL); if (!current) //list empty or //element extracted NULL_CURRENT.error ("CLIST_ITERATOR::extract", ABORT, NULL); #endif if (list->singleton()) { // Special case where we do need to change the iterator. prev = next = list->last = NULL; } else { prev->next = next; //remove from list if (current == list->last) { list->last = prev; ex_current_was_last = TRUE; } else { ex_current_was_last = FALSE; } } // Always set ex_current_was_cycle_pt so an add/forward will work in a loop. ex_current_was_cycle_pt = (current == cycle_pt) ? TRUE : FALSE; extracted_data = current->data; delete(current); //destroy CONS cell current = NULL; return extracted_data; } /*********************************************************************** * CLIST_ITERATOR::move_to_first() * * Move current so that it is set to the start of the list. * Return data just in case anyone wants it. **********************************************************************/ inline void *CLIST_ITERATOR::move_to_first() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::move_to_first", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::move_to_first", ABORT, NULL); #endif current = list->First (); prev = list->last; next = current != NULL ? current->next : NULL; return current != NULL ? current->data : NULL; } /*********************************************************************** * CLIST_ITERATOR::mark_cycle_pt() * * Remember the current location so that we can tell whether we've returned * to this point later. * * If the current point is deleted either now, or in the future, the cycle * point will be set to the next item which is set to current. This could be * by a forward, add_after_then_move or add_after_then_move. **********************************************************************/ inline void CLIST_ITERATOR::mark_cycle_pt() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::mark_cycle_pt", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::mark_cycle_pt", ABORT, NULL); #endif if (current) cycle_pt = current; else ex_current_was_cycle_pt = TRUE; started_cycling = FALSE; } /*********************************************************************** * CLIST_ITERATOR::at_first() * * Are we at the start of the list? * **********************************************************************/ inline BOOL8 CLIST_ITERATOR::at_first() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::at_first", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::at_first", ABORT, NULL); #endif //we're at a deleted return ((list->empty ()) || (current == list->First ()) || ((current == NULL) && (prev == list->last) && //NON-last pt between !ex_current_was_last)); //first and last } /*********************************************************************** * CLIST_ITERATOR::at_last() * * Are we at the end of the list? * **********************************************************************/ inline BOOL8 CLIST_ITERATOR::at_last() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::at_last", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::at_last", ABORT, NULL); #endif //we're at a deleted return ((list->empty ()) || (current == list->last) || ((current == NULL) && (prev == list->last) && //last point between ex_current_was_last)); //first and last } /*********************************************************************** * CLIST_ITERATOR::cycled_list() * * Have we returned to the cycle_pt since it was set? * **********************************************************************/ inline BOOL8 CLIST_ITERATOR::cycled_list() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::cycled_list", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::cycled_list", ABORT, NULL); #endif return ((list->empty ()) || ((current == cycle_pt) && started_cycling)); } /*********************************************************************** * CLIST_ITERATOR::length() * * Return the length of the list * **********************************************************************/ inline inT32 CLIST_ITERATOR::length() { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::length", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::length", ABORT, NULL); #endif return list->length (); } /*********************************************************************** * CLIST_ITERATOR::sort() * * Sort the elements of the list, then reposition at the start. * **********************************************************************/ inline void CLIST_ITERATOR::sort ( //sort elements int comparator ( //comparison routine const void *, const void *)) { #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::sort", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::sort", ABORT, NULL); #endif list->sort (comparator); move_to_first(); } /*********************************************************************** * CLIST_ITERATOR::add_to_end * * Add a new element to the end of the list without moving the iterator. * This is provided because a single linked list cannot move to the last as * the iterator couldn't set its prev pointer. Adding to the end is * essential for implementing queues. **********************************************************************/ inline void CLIST_ITERATOR::add_to_end( // element to add void *new_data) { CLIST_LINK *new_element; #ifndef NDEBUG if (!this) NULL_OBJECT.error ("CLIST_ITERATOR::add_to_end", ABORT, NULL); if (!list) NO_LIST.error ("CLIST_ITERATOR::add_to_end", ABORT, NULL); if (!new_data) BAD_PARAMETER.error ("CLIST_ITERATOR::add_to_end", ABORT, "new_data is NULL"); #endif if (this->at_last ()) { this->add_after_stay_put (new_data); } else { if (this->at_first ()) { this->add_before_stay_put (new_data); list->last = prev; } else { //Iteratr is elsewhere new_element = new CLIST_LINK; new_element->data = new_data; new_element->next = list->last->next; list->last->next = new_element; list->last = new_element; } } } /*********************************************************************** QUOTE_IT MACRO DEFINITION =========================== Replace <parm> with "<parm>". <parm> may be an arbitrary number of tokens ***********************************************************************/ #define QUOTE_IT( parm ) #parm /*********************************************************************** CLISTIZE( CLASSNAME ) MACRO DEFINITION ====================================== CLASSNAME is assumed to be the name of a class to be used in a CONS list NOTE: Because we dont use virtual functions in the list code, the list code will NOT work correctly for classes derived from this. The macro generates: - An element deletion function: CLASSNAME##_c1_zapper - An element copier function: CLASSNAME##_c1_copier - A CLIST subclass: CLASSNAME##_CLIST - A CLIST_ITERATOR subclass: CLASSNAME##_C_IT NOTE: Generated names do NOT clash with those generated by ELISTIZE, ELIST2ISE and CLIST2IZE Two macros are provided: CLISTIZE and CLISTIZEH The ...IZEH macros just define the class names for use in .h files The ...IZE macros define the code use in .c files ***********************************************************************/ /*********************************************************************** CLISTIZEH( CLASSNAME ) MACRO CLISTIZEH is a concatenation of 3 fragments CLISTIZEH_A, CLISTIZEH_B and CLISTIZEH_C. ***********************************************************************/ #define CLISTIZEH_A( CLASSNAME ) \ \ extern DLLSYM void CLASSNAME##_c1_zapper( /*delete a link*/ \ void* link); /*link to delete*/ \ \ extern DLLSYM void* CLASSNAME##_c1_copier( /*deep copy a link*/ \ void* old_element); /*source link */ #define CLISTIZEH_B( CLASSNAME ) \ \ /*********************************************************************** \ * CLASS - CLASSNAME##_CLIST \ * \ * List class for class CLASSNAME \ * \ **********************************************************************/ \ \ class DLLSYM CLASSNAME##_CLIST : public CLIST \ { \ public: \ CLASSNAME##_CLIST():CLIST() {} \ /* constructor */ \ \ CLASSNAME##_CLIST( /* dont construct */ \ const CLASSNAME##_CLIST&) /*by initial assign*/ \ { DONT_CONSTRUCT_LIST_BY_COPY.error( QUOTE_IT( CLASSNAME##_CLIST ), \ ABORT, NULL ); } \ \ void deep_clear() /* delete elements */ \ { CLIST::internal_deep_clear( &CLASSNAME##_c1_zapper ); } \ \ void operator=( /* prevent assign */ \ const CLASSNAME##_CLIST&) \ { DONT_ASSIGN_LISTS.error( QUOTE_IT( CLASSNAME##_CLIST ), \ ABORT, NULL ); } #define CLISTIZEH_C( CLASSNAME ) \ \ }; \ \ \ \ /*********************************************************************** \ * CLASS - CLASSNAME##_C_IT \ * \ * Iterator class for class CLASSNAME##_CLIST \ * \ * Note: We don't need to coerce pointers to member functions input \ * parameters as these are automatically converted to the type of the base \ * type. ("A ptr to a class may be converted to a pointer to a public base \ * class of that class") \ **********************************************************************/ \ \ class DLLSYM CLASSNAME##_C_IT : public CLIST_ITERATOR \ { \ public: \ CLASSNAME##_C_IT():CLIST_ITERATOR(){} \ \ CLASSNAME##_C_IT( \ CLASSNAME##_CLIST* list):CLIST_ITERATOR(list){} \ \ CLASSNAME* data() \ { return (CLASSNAME*) CLIST_ITERATOR::data(); } \ \ CLASSNAME* data_relative( \ inT8 offset) \ { return (CLASSNAME*) CLIST_ITERATOR::data_relative( offset ); } \ \ CLASSNAME* forward() \ { return (CLASSNAME*) CLIST_ITERATOR::forward(); } \ \ CLASSNAME* extract() \ { return (CLASSNAME*) CLIST_ITERATOR::extract(); } \ \ CLASSNAME* move_to_first() \ { return (CLASSNAME*) CLIST_ITERATOR::move_to_first(); } \ \ CLASSNAME* move_to_last() \ { return (CLASSNAME*) CLIST_ITERATOR::move_to_last(); } \ }; #define CLISTIZEH( CLASSNAME ) \ \ CLISTIZEH_A( CLASSNAME ) \ \ CLISTIZEH_B( CLASSNAME ) \ \ CLISTIZEH_C( CLASSNAME ) /*********************************************************************** CLISTIZE( CLASSNAME ) MACRO ***********************************************************************/ #define CLISTIZE( CLASSNAME ) \ \ /*********************************************************************** \ * CLASSNAME##_c1_zapper \ * \ * A function which can delete a CLASSNAME element. This is passed to the \ * generic deep_clear list member function so that when a list is cleared the \ * elements on the list are properly destroyed from the base class, even \ * though we dont use a virtual destructor function. \ **********************************************************************/ \ \ DLLSYM void CLASSNAME##_c1_zapper( /*delete a link*/ \ void* link) /*link to delete*/ \ { \ delete (CLASSNAME *) link; \ } \ #endif
C++
/////////////////////////////////////////////////////////////////////// // File: indexmapbidi.h // Description: Bi-directional mapping between a sparse and compact space. // Author: rays@google.com (Ray Smith) // Created: Tue Apr 06 11:33:59 PDT 2010 // // (C) Copyright 2010, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCUTIL_INDEXMAPBIDI_H_ #define TESSERACT_CCUTIL_INDEXMAPBIDI_H_ #include <stdio.h> #include "genericvector.h" namespace tesseract { class IndexMapBiDi; // Bidirectional one-to-one mapping between a sparse and a compact discrete // space. Many entries in the sparse space are unmapped, but those that are // mapped have a 1-1 mapping to (and from) the compact space, where all // values are used. This is useful for forming subsets of larger collections, // such as subsets of character sets, or subsets of binary feature spaces. // // This base class provides basic functionality with binary search for the // SparseToCompact mapping to save memory. // For a faster inverse mapping, or to allow a many-to-one mapping, use // IndexMapBiDi below. // NOTE: there are currently no methods to setup an IndexMap on its own! // It must be initialized by copying from an IndexMapBiDi or by DeSerialize. class IndexMap { public: virtual ~IndexMap() {} // SparseToCompact takes a sparse index to an index in the compact space. // Uses a binary search to find the result. For faster speed use // IndexMapBiDi, but that takes more memory. virtual int SparseToCompact(int sparse_index) const; // CompactToSparse takes a compact index to the corresponding index in the // sparse space. int CompactToSparse(int compact_index) const { return compact_map_[compact_index]; } // The size of the sparse space. virtual int SparseSize() const { return sparse_size_; } // The size of the compact space. int CompactSize() const { return compact_map_.size(); } // Copy from the input. void CopyFrom(const IndexMap& src); void CopyFrom(const IndexMapBiDi& src); // Writes to the given file. Returns false in case of error. bool Serialize(FILE* fp) const; // Reads from the given file. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool DeSerialize(bool swap, FILE* fp); protected: // The sparse space covers integers in the range [0, sparse_size_-1]. int sparse_size_; // The compact space covers integers in the range [0, compact_map_.size()-1]. // Each element contains the corresponding sparse index. GenericVector<inT32> compact_map_; }; // Bidirectional many-to-one mapping between a sparse and a compact discrete // space. As with IndexMap, many entries may be unmapped, but unlike IndexMap, // of those that are, many may be mapped to the same compact index. // If the map is many-to-one, it is not possible to directly obtain all the // sparse indices that map to a single compact index. // This map is time- rather than space-efficient. It stores the entire sparse // space. // IndexMapBiDi may be initialized in one of 3 ways: // 1. Init(size, true); // Setup(); // Sets a complete 1:1 mapping with no unmapped elements. // 2. Init(size, false); // for ... SetMap(index, true); // Setup(); // Specifies precisely which sparse indices are mapped. The mapping is 1:1. // 3. Either of the above, followed by: // for ... Merge(index1, index2); // CompleteMerges(); // Allows a many-to-one mapping by merging compact space indices. class IndexMapBiDi : public IndexMap { public: virtual ~IndexMapBiDi() {} // Top-level init function in a single call to initialize a map to select // a single contiguous subrange [start, end) of the sparse space to be mapped // 1 to 1 to the compact space, with all other elements of the sparse space // left unmapped. // No need to call Setup after this. void InitAndSetupRange(int sparse_size, int start, int end); // Initializes just the sparse_map_ to the given size with either all // forward indices mapped (all_mapped = true) or none (all_mapped = false). // Call Setup immediately after, or make calls to SetMap first to adjust the // mapping and then call Setup before using the map. void Init(int size, bool all_mapped); // Sets a given index in the sparse_map_ to be mapped or not. void SetMap(int sparse_index, bool mapped); // Sets up the sparse_map_ and compact_map_ properly after Init and // some calls to SetMap. Assumes an ordered 1-1 map from set indices // in the sparse space to the compact space. void Setup(); // Merges the two compact space indices. May be called many times, but // the merges must be concluded by a call to CompleteMerges. // Returns true if a merge was actually performed. bool Merge(int compact_index1, int compact_index2); // Returns true if the given compact index has been deleted. bool IsCompactDeleted(int index) const { return MasterCompactIndex(index) < 0; } // Completes one or more Merge operations by further compacting the // compact space. void CompleteMerges(); // SparseToCompact takes a sparse index to an index in the compact space. virtual int SparseToCompact(int sparse_index) const { return sparse_map_[sparse_index]; } // The size of the sparse space. virtual int SparseSize() const { return sparse_map_.size(); } // Copy from the input. void CopyFrom(const IndexMapBiDi& src); // Writes to the given file. Returns false in case of error. bool Serialize(FILE* fp) const; // Reads from the given file. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool DeSerialize(bool swap, FILE* fp); // Bulk calls to SparseToCompact. // Maps the given array of sparse indices to an array of compact indices. // Assumes the input is sorted. The output indices are sorted and uniqued. // Return value is the number of "missed" features, being features that // don't map to the compact feature space. int MapFeatures(const GenericVector<int>& sparse, GenericVector<int>* compact) const; private: // Returns the master compact index for a given compact index. // During a multiple merge operation, several compact indices may be // combined, so we need to be able to find the master of all. int MasterCompactIndex(int compact_index) const { while (compact_index >= 0 && sparse_map_[compact_map_[compact_index]] != compact_index) compact_index = sparse_map_[compact_map_[compact_index]]; return compact_index; } // Direct look-up of the compact index for each element in sparse space. GenericVector<inT32> sparse_map_; }; } // namespace tesseract. #endif // TESSERACT_CCUTIL_INDEXMAPBIDI_H_
C++
/********************************************************************** * File: bits16.h (Formerly bits8.h) * Description: Code for 8 bit field class. * Author: Phil Cheatle * Created: Thu Oct 17 10:10:05 BST 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef BITS16_H #define BITS16_H #include "host.h" class DLLSYM BITS16 { public: uinT16 val; BITS16() { val = 0; } // constructor BITS16( // constructor uinT16 init); // initial val void turn_on_bit( // flip specified bit uinT8 bit_num) { // bit to flip 0..7 val = val | 01 << bit_num; }; void turn_off_bit( // flip specified bit uinT8 bit_num) { // bit to flip 0..7 val = val & ~(01 << bit_num); }; void set_bit( // flip specified bit uinT8 bit_num, // bit to flip 0..7 BOOL8 value) { // value to flip to if (value) val = val | 01 << bit_num; else val = val & ~(01 << bit_num); }; BOOL8 bit( // access bit uinT8 bit_num) const { // bit to access return (val >> bit_num) & 01; }; }; #endif
C++
/********************************************************************** * File: unicodes.h * Description: Unicode related machinery * Author: David Eger * Created: Wed Jun 15 16:37:50 PST 2011 * * (C) Copyright 2011, Google, Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "unicodes.h" #include "host.h" // for NULL namespace tesseract { const char *kUTF8LineSeparator = "\u2028"; // "\xe2\x80\xa8"; const char *kUTF8ParagraphSeparator = "\u2029"; // "\xe2\x80\xa9"; const char *kLRM = "\u200E"; // Left-to-Right Mark const char *kRLM = "\u200F"; // Right-to-Left Mark const char *kRLE = "\u202A"; // Right-to-Left Embedding const char *kPDF = "\u202C"; // Pop Directional Formatting const char *kHyphenLikeUTF8[] = { "-", // ASCII hyphen-minus "\u05BE", // word hyphen in hybrew "\u2010", // hyphen "\u2011", // non-breaking hyphen "\u2012", // a hyphen the same width as digits "\u2013", // en dash "\u2014", // em dash "\u2015", // horizontal bar "\u2212", // arithmetic minus sign "\uFE58", // small em dash "\uFE63", // small hyphen-minus "\uFF0D", // fullwidth hyphen-minus NULL, // end of our list }; const char *kApostropheLikeUTF8[] = { "'", // ASCII apostrophe "`", // ASCII backtick "\u2018", // opening single quote "\u2019", // closing single quote "\u2032", // mathematical prime mark NULL, // end of our list. }; } // namespace
C++
/********************************************************************** * File: unicodes.h * Description: Unicode related machinery * Author: David Eger * Created: Wed Jun 15 16:37:50 PST 2011 * * (C) Copyright 2011, Google, Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef TESSERACT_CCUTIL_UNICODES_H__ #define TESSERACT_CCUTIL_UNICODES_H__ namespace tesseract { extern const char *kUTF8LineSeparator; extern const char *kUTF8ParagraphSeparator; extern const char *kLRM; // Left-to-Right Mark extern const char *kRLM; // Right-to-Left Mark extern const char *kRLE; // Right-to-Left Embedding extern const char *kPDF; // Pop Directional Formatting // The following are confusable internal word punctuation symbols // which we normalize to the first variant when matching in dawgs. extern const char *kHyphenLikeUTF8[]; extern const char *kApostropheLikeUTF8[]; } // namespace #endif // TESSERACT_CCUTIL_UNICODES_H__
C++
/********************************************************************** * File: mainblk.c (Formerly main.c) * Description: Function to call from main() to setup. * Author: Ray Smith * Created: Tue Oct 22 11:09:40 BST 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "fileerr.h" #ifdef __UNIX__ #include <unistd.h> #include <signal.h> #else #include <io.h> #endif #include <stdlib.h> #include "ccutil.h" #define VARDIR "configs/" /**< variables files */ #define EXTERN const ERRCODE NO_PATH = "Warning:explicit path for executable will not be used for configs"; static const ERRCODE USAGE = "Usage"; namespace tesseract { /********************************************************************** * main_setup * * Main for mithras demo program. Read the arguments and set up globals. **********************************************************************/ /** * @brief CCUtil::main_setup - set location of tessdata and name of image * * @param argv0 - paths to the directory with language files and config files. * An actual value of argv0 is used if not NULL, otherwise TESSDATA_PREFIX is * used if not NULL, next try to use compiled in -DTESSDATA_PREFIX. If previous * is not sucessul - use current directory. * @param basename - name of image */ void CCUtil::main_setup(const char *argv0, const char *basename) { imagebasename = basename; /**< name of image */ if (argv0 != NULL) { datadir = argv0; } else { if (getenv("TESSDATA_PREFIX")) { datadir = getenv("TESSDATA_PREFIX"); } else { #ifdef TESSDATA_PREFIX #define _STR(a) #a #define _XSTR(a) _STR(a) datadir = _XSTR(TESSDATA_PREFIX); #undef _XSTR #undef _STR #endif } } // datadir may still be empty: if (datadir.length() == 0) { datadir = "./"; } else { // Remove tessdata from the end if present, as we will add it back! int length = datadir.length(); if (length >= 8 && strcmp(&datadir[length - 8], "tessdata") == 0) datadir.truncate_at(length - 8); else if (length >= 9 && strcmp(&datadir[length - 9], "tessdata/") == 0) datadir.truncate_at(length - 9); } // check for missing directory separator const char *lastchar = datadir.string(); lastchar += datadir.length() - 1; if ((strcmp(lastchar, "/") != 0) && (strcmp(lastchar, "\\") != 0)) datadir += "/"; datadir += m_data_sub_dir; /**< data directory */ } } // namespace tesseract
C++
// Copyright 2008 Google Inc. All Rights Reserved. // Author: scharron@google.com (Samuel Charron) #include "ccutil.h" namespace tesseract { CCUtil::CCUtil() : params_(), STRING_INIT_MEMBER(m_data_sub_dir, "tessdata/", "Directory for data files", &params_), #ifdef _WIN32 STRING_INIT_MEMBER(tessedit_module_name, WINDLLNAME, "Module colocated with tessdata dir", &params_), #endif INT_INIT_MEMBER(ambigs_debug_level, 0, "Debug level for unichar ambiguities", &params_), BOOL_MEMBER(use_definite_ambigs_for_classifier, 0, "Use definite" " ambiguities when running character classifier", &params_), BOOL_MEMBER(use_ambigs_for_adaption, 0, "Use ambigs for deciding" " whether to adapt to a character", &params_) { } CCUtil::~CCUtil() { } CCUtilMutex::CCUtilMutex() { #ifdef _WIN32 mutex_ = CreateMutex(0, FALSE, 0); #else pthread_mutex_init(&mutex_, NULL); #endif } void CCUtilMutex::Lock() { #ifdef _WIN32 WaitForSingleObject(mutex_, INFINITE); #else pthread_mutex_lock(&mutex_); #endif } void CCUtilMutex::Unlock() { #ifdef _WIN32 ReleaseMutex(mutex_); #else pthread_mutex_unlock(&mutex_); #endif } CCUtilMutex tprintfMutex; // should remain global } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: unicharmap.h // Description: Unicode character/ligature to integer id class. // Author: Thomas Kielbus // Created: Wed Jun 28 17:05:01 PDT 2006 // // (C) Copyright 2006, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCUTIL_UNICHARMAP_H__ #define TESSERACT_CCUTIL_UNICHARMAP_H__ #include "unichar.h" // A UNICHARMAP stores unique unichars. Each of them is associated with one // UNICHAR_ID. class UNICHARMAP { public: // Create an empty UNICHARMAP UNICHARMAP(); ~UNICHARMAP(); // Insert the given unichar represention in the UNICHARMAP and associate it // with the given id. The length of the representation MUST be non-zero. void insert(const char* const unichar_repr, UNICHAR_ID id); // Return the id associated with the given unichar representation, // this representation MUST exist within the UNICHARMAP. // The length of the representation MUST be non-zero. UNICHAR_ID unichar_to_id(const char* const unichar_repr) const; // Return the id associated with the given unichar representation, // this representation MUST exist within the UNICHARMAP. The first // length characters (maximum) from unichar_repr are used. The length // MUST be non-zero. UNICHAR_ID unichar_to_id(const char* const unichar_repr, int length) const; // Return true if the given unichar representation is already present in the // UNICHARMAP. The length of the representation MUST be non-zero. bool contains(const char* const unichar_repr) const; // Return true if the given unichar representation is already present in the // UNICHARMAP. The first length characters (maximum) from unichar_repr are // used. The length MUST be non-zero. bool contains(const char* const unichar_repr, int length) const; // Return the minimum number of characters that must be used from this string // to obtain a match in the UNICHARMAP. int minmatch(const char* const unichar_repr) const; // Clear the UNICHARMAP. All previous data is lost. void clear(); private: // The UNICHARMAP is represented as a tree whose nodes are of type // UNICHARMAP_NODE. struct UNICHARMAP_NODE { UNICHARMAP_NODE(); ~UNICHARMAP_NODE(); UNICHARMAP_NODE* children; UNICHAR_ID id; }; UNICHARMAP_NODE* nodes; }; #endif // TESSERACT_CCUTIL_UNICHARMAP_H__
C++
// Copyright 2011 Google Inc. All Rights Reserved. // Author: rays@google.com (Ray Smith) /////////////////////////////////////////////////////////////////////// // File: bitvector.cpp // Description: Class replacement for BITVECTOR. // Author: Ray Smith // Created: Mon Jan 10 17:45:01 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "bitvector.h" #include <string.h> #include "helpers.h" #include "ndminx.h" namespace tesseract { // Fast lookup table to get the first least significant set bit in a byte. // For zero, the table has 255, but since it is a special case, most code // that uses this table will check for zero before looking up lsb_index_. const uinT8 BitVector::lsb_index_[256] = { 255, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 }; // Fast lookup table to get the residual bits after zeroing the first (lowest) // set bit in a byte. const uinT8 BitVector::lsb_eroded_[256] = { 0, 0, 0, 0x2, 0, 0x4, 0x4, 0x6, 0, 0x8, 0x8, 0x0a, 0x08, 0x0c, 0x0c, 0x0e, 0, 0x10, 0x10, 0x12, 0x10, 0x14, 0x14, 0x16, 0x10, 0x18, 0x18, 0x1a, 0x18, 0x1c, 0x1c, 0x1e, 0, 0x20, 0x20, 0x22, 0x20, 0x24, 0x24, 0x26, 0x20, 0x28, 0x28, 0x2a, 0x28, 0x2c, 0x2c, 0x2e, 0x20, 0x30, 0x30, 0x32, 0x30, 0x34, 0x34, 0x36, 0x30, 0x38, 0x38, 0x3a, 0x38, 0x3c, 0x3c, 0x3e, 0, 0x40, 0x40, 0x42, 0x40, 0x44, 0x44, 0x46, 0x40, 0x48, 0x48, 0x4a, 0x48, 0x4c, 0x4c, 0x4e, 0x40, 0x50, 0x50, 0x52, 0x50, 0x54, 0x54, 0x56, 0x50, 0x58, 0x58, 0x5a, 0x58, 0x5c, 0x5c, 0x5e, 0x40, 0x60, 0x60, 0x62, 0x60, 0x64, 0x64, 0x66, 0x60, 0x68, 0x68, 0x6a, 0x68, 0x6c, 0x6c, 0x6e, 0x60, 0x70, 0x70, 0x72, 0x70, 0x74, 0x74, 0x76, 0x70, 0x78, 0x78, 0x7a, 0x78, 0x7c, 0x7c, 0x7e, 0, 0x80, 0x80, 0x82, 0x80, 0x84, 0x84, 0x86, 0x80, 0x88, 0x88, 0x8a, 0x88, 0x8c, 0x8c, 0x8e, 0x80, 0x90, 0x90, 0x92, 0x90, 0x94, 0x94, 0x96, 0x90, 0x98, 0x98, 0x9a, 0x98, 0x9c, 0x9c, 0x9e, 0x80, 0xa0, 0xa0, 0xa2, 0xa0, 0xa4, 0xa4, 0xa6, 0xa0, 0xa8, 0xa8, 0xaa, 0xa8, 0xac, 0xac, 0xae, 0xa0, 0xb0, 0xb0, 0xb2, 0xb0, 0xb4, 0xb4, 0xb6, 0xb0, 0xb8, 0xb8, 0xba, 0xb8, 0xbc, 0xbc, 0xbe, 0x80, 0xc0, 0xc0, 0xc2, 0xc0, 0xc4, 0xc4, 0xc6, 0xc0, 0xc8, 0xc8, 0xca, 0xc8, 0xcc, 0xcc, 0xce, 0xc0, 0xd0, 0xd0, 0xd2, 0xd0, 0xd4, 0xd4, 0xd6, 0xd0, 0xd8, 0xd8, 0xda, 0xd8, 0xdc, 0xdc, 0xde, 0xc0, 0xe0, 0xe0, 0xe2, 0xe0, 0xe4, 0xe4, 0xe6, 0xe0, 0xe8, 0xe8, 0xea, 0xe8, 0xec, 0xec, 0xee, 0xe0, 0xf0, 0xf0, 0xf2, 0xf0, 0xf4, 0xf4, 0xf6, 0xf0, 0xf8, 0xf8, 0xfa, 0xf8, 0xfc, 0xfc, 0xfe }; // Fast lookup table to give the number of set bits in a byte. const int BitVector::hamming_table_[256] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 }; BitVector::BitVector() : bit_size_(0), array_(NULL) {} BitVector::BitVector(int length) : bit_size_(length) { array_ = new uinT32[WordLength()]; SetAllFalse(); } BitVector::BitVector(const BitVector& src) : bit_size_(src.bit_size_) { array_ = new uinT32[WordLength()]; memcpy(array_, src.array_, ByteLength()); } BitVector& BitVector::operator=(const BitVector& src) { Alloc(src.bit_size_); memcpy(array_, src.array_, ByteLength()); return *this; } BitVector::~BitVector() { delete [] array_; } // Initializes the array to length * false. void BitVector::Init(int length) { Alloc(length); SetAllFalse(); } // Writes to the given file. Returns false in case of error. bool BitVector::Serialize(FILE* fp) const { if (fwrite(&bit_size_, sizeof(bit_size_), 1, fp) != 1) return false; int wordlen = WordLength(); if (static_cast<int>(fwrite(array_, sizeof(*array_), wordlen, fp)) != wordlen) return false; return true; } // Reads from the given file. Returns false in case of error. // If swap is true, assumes a big/little-endian swap is needed. bool BitVector::DeSerialize(bool swap, FILE* fp) { uinT32 new_bit_size; if (fread(&new_bit_size, sizeof(new_bit_size), 1, fp) != 1) return false; if (swap) { ReverseN(&new_bit_size, sizeof(new_bit_size)); } Alloc(new_bit_size); int wordlen = WordLength(); if (static_cast<int>(fread(array_, sizeof(*array_), wordlen, fp)) != wordlen) return false; if (swap) { for (int i = 0; i < wordlen; ++i) ReverseN(&array_[i], sizeof(array_[i])); } return true; } void BitVector::SetAllFalse() { memset(array_, 0, ByteLength()); } void BitVector::SetAllTrue() { memset(array_, ~0, ByteLength()); } // Returns the index of the next set bit after the given index. // Useful for quickly iterating through the set bits in a sparse vector. int BitVector::NextSetBit(int prev_bit) const { // Move on to the next bit. int next_bit = prev_bit + 1; if (next_bit >= bit_size_) return -1; // Check the remains of the word containing the next_bit first. int next_word = WordIndex(next_bit); int bit_index = next_word * kBitFactor; int word_end = bit_index + kBitFactor; uinT32 word = array_[next_word]; uinT8 byte = word & 0xff; while (bit_index < word_end) { if (bit_index + 8 > next_bit && byte != 0) { while (bit_index + lsb_index_[byte] < next_bit && byte != 0) byte = lsb_eroded_[byte]; if (byte != 0) return bit_index + lsb_index_[byte]; } word >>= 8; bit_index += 8; byte = word & 0xff; } // next_word didn't contain a 1, so find the next word with set bit. ++next_word; int wordlen = WordLength(); while (next_word < wordlen && (word = array_[next_word]) == 0) { ++next_word; bit_index += kBitFactor; } if (bit_index >= bit_size_) return -1; // Find the first non-zero byte within the word. while ((word & 0xff) == 0) { word >>= 8; bit_index += 8; } return bit_index + lsb_index_[word & 0xff]; } // Returns the number of set bits in the vector. int BitVector::NumSetBits() const { int wordlen = WordLength(); int total_bits = 0; for (int w = 0; w < wordlen; ++w) { uinT32 word = array_[w]; for (int i = 0; i < 4; ++i) { total_bits += hamming_table_[word & 0xff]; word >>= 8; } } return total_bits; } // Logical in-place operations on whole bit vectors. Tries to do something // sensible if they aren't the same size, but they should be really. void BitVector::operator|=(const BitVector& other) { int length = MIN(WordLength(), other.WordLength()); for (int w = 0; w < length; ++w) array_[w] |= other.array_[w]; } void BitVector::operator&=(const BitVector& other) { int length = MIN(WordLength(), other.WordLength()); for (int w = 0; w < length; ++w) array_[w] &= other.array_[w]; for (int w = WordLength() - 1; w >= length; --w) array_[w] = 0; } void BitVector::operator^=(const BitVector& other) { int length = MIN(WordLength(), other.WordLength()); for (int w = 0; w < length; ++w) array_[w] ^= other.array_[w]; } // Set subtraction *this = v1 - v2. void BitVector::SetSubtract(const BitVector& v1, const BitVector& v2) { Alloc(v1.size()); int length = MIN(v1.WordLength(), v2.WordLength()); for (int w = 0; w < length; ++w) array_[w] = v1.array_[w] ^ (v1.array_[w] & v2.array_[w]); for (int w = WordLength() - 1; w >= length; --w) array_[w] = v1.array_[w]; } // Allocates memory for a vector of the given length. // Reallocates if the array is a different size, larger or smaller. void BitVector::Alloc(int length) { int initial_wordlength = WordLength(); bit_size_ = length; int new_wordlength = WordLength(); if (new_wordlength != initial_wordlength) { delete [] array_; array_ = new uinT32[new_wordlength]; } } } // namespace tesseract.
C++
/********************************************************************** * File: bits16.h (Formerly bits8.h) * Description: Code for 8 bit field class. * Author: Phil Cheatle * Created: Thu Oct 17 10:10:05 BST 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "bits16.h" /********************************************************************** * Constructor. Something to get it past the compiler as almost all inlined. * **********************************************************************/ BITS16::BITS16( // constructor uinT16 init) { // initial val val = init; }
C++
/********************************************************************** * File: hashfn.h (Formerly hash.h) * Description: Portability hacks for hash_map, hash_set and unique_ptr. * Author: Ray Smith * Created: Wed Jan 08 14:08:25 PST 2014 * * (C) Copyright 2014, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef HASHFN_H #define HASHFN_H #ifdef USE_STD_NAMESPACE #if (__cplusplus >= 201103L) || defined(_MSC_VER) // Visual Studio #include <unordered_map> #include <unordered_set> #define hash_map std::unordered_map #if (_MSC_VER >= 1500 && _MSC_VER < 1600) // Visual Studio 2008 using namespace std::tr1; #else // _MSC_VER using std::unordered_map; using std::unordered_set; #include <memory> #define SmartPtr std::unique_ptr #define HAVE_UNIQUE_PTR #endif // _MSC_VER #elif (defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ > 0)) || \ __GNUC__ >= 4)) // gcc // hash_set is deprecated in gcc #include <ext/hash_map> #include <ext/hash_set> using __gnu_cxx::hash_map; using __gnu_cxx::hash_set; #define unordered_map hash_map #define unordered_set hash_set #else #include <hash_map> #include <hash_set> #endif // gcc #else // USE_STD_NAMESPACE #include <hash_map> #include <hash_set> #define unordered_map hash_map #define unordered_set hash_set #endif // USE_STD_NAMESPACE #ifndef HAVE_UNIQUE_PTR // Trivial smart ptr. Expand to add features of std::unique_ptr as required. template<class T> class SmartPtr { public: SmartPtr() : ptr_(NULL) {} explicit SmartPtr(T* ptr) : ptr_(ptr) {} ~SmartPtr() { delete ptr_; } T* get() const { return ptr_; } void reset(T* ptr) { if (ptr_ != NULL) delete ptr_; ptr_ = ptr; } bool operator==(const T* ptr) const { return ptr_ == ptr; } T* operator->() const { return ptr_; } private: T* ptr_; }; #endif // HAVE_UNIQUE_PTR #endif // HASHFN_H
C++
/////////////////////////////////////////////////////////////////////// // File: unicharset.h // Description: Unicode character/ligature set class. // Author: Thomas Kielbus // Created: Wed Jun 28 17:05:01 PDT 2006 // // (C) Copyright 2006, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCUTIL_UNICHARSET_H__ #define TESSERACT_CCUTIL_UNICHARSET_H__ #include "errcode.h" #include "genericvector.h" #include "helpers.h" #include "serialis.h" #include "strngs.h" #include "tesscallback.h" #include "unichar.h" #include "unicharmap.h" // Enum holding special values of unichar_id. Every unicharset has these. // Warning! Keep in sync with kSpecialUnicharCodes. enum SpecialUnicharCodes { UNICHAR_SPACE, UNICHAR_JOINED, UNICHAR_BROKEN, SPECIAL_UNICHAR_CODES_COUNT }; class CHAR_FRAGMENT { public: // Minimum number of characters used for fragment representation. static const int kMinLen = 6; // Maximum number of characters used for fragment representation. static const int kMaxLen = 3 + UNICHAR_LEN + 2; // Maximum number of fragments per character. static const int kMaxChunks = 5; // Setters and Getters. inline void set_all(const char *unichar, int pos, int total, bool natural) { set_unichar(unichar); set_pos(pos); set_total(total); set_natural(natural); } inline void set_unichar(const char *uch) { strncpy(this->unichar, uch, UNICHAR_LEN); this->unichar[UNICHAR_LEN] = '\0'; } inline void set_pos(int p) { this->pos = p; } inline void set_total(int t) { this->total = t; } inline const char* get_unichar() const { return this->unichar; } inline int get_pos() const { return this->pos; } inline int get_total() const { return this->total; } // Returns the string that represents a fragment // with the given unichar, pos and total. static STRING to_string(const char *unichar, int pos, int total, bool natural); // Returns the string that represents this fragment. STRING to_string() const { return to_string(unichar, pos, total, natural); } // Checks whether a fragment has the same unichar, // position and total as the given inputs. inline bool equals(const char *other_unichar, int other_pos, int other_total) const { return (strcmp(this->unichar, other_unichar) == 0 && this->pos == other_pos && this->total == other_total); } inline bool equals(const CHAR_FRAGMENT *other) const { return this->equals(other->get_unichar(), other->get_pos(), other->get_total()); } // Checks whether a given fragment is a continuation of this fragment. // Assumes that the given fragment pointer is not NULL. inline bool is_continuation_of(const CHAR_FRAGMENT *fragment) const { return (strcmp(this->unichar, fragment->get_unichar()) == 0 && this->total == fragment->get_total() && this->pos == fragment->get_pos() + 1); } // Returns true if this fragment is a beginning fragment. inline bool is_beginning() const { return this->pos == 0; } // Returns true if this fragment is an ending fragment. inline bool is_ending() const { return this->pos == this->total-1; } // Returns true if the fragment was a separate component to begin with, // ie did not need chopping to be isolated, but may have been separated // out from a multi-outline blob. inline bool is_natural() const { return natural; } void set_natural(bool value) { natural = value; } // Parses the string to see whether it represents a character fragment // (rather than a regular character). If so, allocates memory for a new // CHAR_FRAGMENT instance and fills it in with the corresponding fragment // information. Fragments are of the form: // |m|1|2, meaning chunk 1 of 2 of character m, or // |:|1n2, meaning chunk 1 of 2 of character :, and no chopping was needed // to divide the parts, as they were already separate connected components. // // If parsing succeeded returns the pointer to the allocated CHAR_FRAGMENT // instance, otherwise (if the string does not represent a fragment or it // looks like it does, but parsing it as a fragment fails) returns NULL. // // Note: The caller is responsible for deallocating memory // associated with the returned pointer. static CHAR_FRAGMENT *parse_from_string(const char *str); private: char unichar[UNICHAR_LEN + 1]; // True if the fragment was a separate component to begin with, // ie did not need chopping to be isolated, but may have been separated // out from a multi-outline blob. bool natural; inT16 pos; // fragment position in the character inT16 total; // total number of fragments in the character }; // The UNICHARSET class is an utility class for Tesseract that holds the // set of characters that are used by the engine. Each character is identified // by a unique number, from 0 to (size - 1). class UNICHARSET { public: // Custom list of characters and their ligature forms (UTF8) // These map to unicode values in the private use area (PUC) and are supported // by only few font families (eg. Wyld, Adobe Caslon Pro). static const char* kCustomLigatures[][2]; // List of strings for the SpecialUnicharCodes. Keep in sync with the enum. static const char* kSpecialUnicharCodes[SPECIAL_UNICHAR_CODES_COUNT]; // ICU 2.0 UCharDirection enum (from third_party/icu/include/unicode/uchar.h) enum Direction { U_LEFT_TO_RIGHT = 0, U_RIGHT_TO_LEFT = 1, U_EUROPEAN_NUMBER = 2, U_EUROPEAN_NUMBER_SEPARATOR = 3, U_EUROPEAN_NUMBER_TERMINATOR = 4, U_ARABIC_NUMBER = 5, U_COMMON_NUMBER_SEPARATOR = 6, U_BLOCK_SEPARATOR = 7, U_SEGMENT_SEPARATOR = 8, U_WHITE_SPACE_NEUTRAL = 9, U_OTHER_NEUTRAL = 10, U_LEFT_TO_RIGHT_EMBEDDING = 11, U_LEFT_TO_RIGHT_OVERRIDE = 12, U_RIGHT_TO_LEFT_ARABIC = 13, U_RIGHT_TO_LEFT_EMBEDDING = 14, U_RIGHT_TO_LEFT_OVERRIDE = 15, U_POP_DIRECTIONAL_FORMAT = 16, U_DIR_NON_SPACING_MARK = 17, U_BOUNDARY_NEUTRAL = 18, U_CHAR_DIRECTION_COUNT }; // Create an empty UNICHARSET UNICHARSET(); ~UNICHARSET(); // Return the UNICHAR_ID of a given unichar representation within the // UNICHARSET. const UNICHAR_ID unichar_to_id(const char* const unichar_repr) const; // Return the UNICHAR_ID of a given unichar representation within the // UNICHARSET. Only the first length characters from unichar_repr are used. const UNICHAR_ID unichar_to_id(const char* const unichar_repr, int length) const; // Return the minimum number of bytes that matches a legal UNICHAR_ID, // while leaving the rest of the string encodable. Returns 0 if the // beginning of the string is not encodable. // WARNING: this function now encodes the whole string for precision. // Use encode_string in preference to repeatedly calling step. int step(const char* str) const; // As step except constraining the search to unichar-ids that are // self-normalized. Unlike step, does not encode the whole string, therefore // should be used on short strings (like those obtained from // get_normed_unichar.) int normed_step(const char* str) const; // Return whether the given UTF-8 string is encodable with this UNICHARSET. // If not encodable, write the first byte offset which cannot be converted // into the second (return) argument. bool encodable_string(const char *str, int *first_bad_position) const; // Encodes the given UTF-8 string with this UNICHARSET. // Any part of the string that cannot be encoded (because the utf8 can't // be broken up into pieces that are in the unicharset) then: // if give_up_on_failure, stops and returns a partial encoding, // else continues and inserts an INVALID_UNICHAR_ID in the returned encoding. // Returns true if the encoding succeeds completely, false if there is at // least one failure. // If lengths is not NULL, then it is filled with the corresponding // byte length of each encoded UNICHAR_ID. // If encoded_length is not NULL then on return it contains the length of // str that was encoded. (if give_up_on_failure the location of the first // failure, otherwise strlen(str).) bool encode_string(const char* str, bool give_up_on_failure, GenericVector<UNICHAR_ID>* encoding, GenericVector<char>* lengths, int* encoded_length) const; // Return the unichar representation corresponding to the given UNICHAR_ID // within the UNICHARSET. const char* const id_to_unichar(UNICHAR_ID id) const; // Return the UTF8 representation corresponding to the given UNICHAR_ID after // resolving any private encodings internal to Tesseract. This method is // preferrable to id_to_unichar for outputting text that will be visible to // external applications. const char* const id_to_unichar_ext(UNICHAR_ID id) const; // Return a STRING that reformats the utf8 str into the str followed // by its hex unicodes. static STRING debug_utf8_str(const char* str); // Return a STRING containing debug information on the unichar, including // the id_to_unichar, its hex unicodes and the properties. STRING debug_str(UNICHAR_ID id) const; STRING debug_str(const char * unichar_repr) const { return debug_str(unichar_to_id(unichar_repr)); } // Add a unichar representation to the set. void unichar_insert(const char* const unichar_repr); // Return true if the given unichar id exists within the set. // Relies on the fact that unichar ids are contiguous in the unicharset. bool contains_unichar_id(UNICHAR_ID unichar_id) const { return unichar_id != INVALID_UNICHAR_ID && unichar_id < size_used && unichar_id >= 0; } // Return true if the given unichar representation exists within the set. bool contains_unichar(const char* const unichar_repr) const; bool contains_unichar(const char* const unichar_repr, int length) const; // Return true if the given unichar representation corresponds to the given // UNICHAR_ID within the set. bool eq(UNICHAR_ID unichar_id, const char* const unichar_repr) const; // Delete CHAR_FRAGMENTs stored in properties of unichars array. void delete_pointers_in_unichars() { for (int i = 0; i < size_used; ++i) { if (unichars[i].properties.fragment != NULL) { delete unichars[i].properties.fragment; unichars[i].properties.fragment = NULL; } } } // Clear the UNICHARSET (all the previous data is lost). void clear() { if (script_table != NULL) { for (int i = 0; i < script_table_size_used; ++i) delete[] script_table[i]; delete[] script_table; script_table = NULL; script_table_size_used = 0; } if (unichars != NULL) { delete_pointers_in_unichars(); delete[] unichars; unichars = NULL; } script_table_size_reserved = 0; size_reserved = 0; size_used = 0; ids.clear(); top_bottom_set_ = false; script_has_upper_lower_ = false; script_has_xheight_ = false; null_sid_ = 0; common_sid_ = 0; latin_sid_ = 0; cyrillic_sid_ = 0; greek_sid_ = 0; han_sid_ = 0; hiragana_sid_ = 0; katakana_sid_ = 0; } // Return the size of the set (the number of different UNICHAR it holds). int size() const { return size_used; } // Reserve enough memory space for the given number of UNICHARS void reserve(int unichars_number); // Opens the file indicated by filename and saves unicharset to that file. // Returns true if the operation is successful. bool save_to_file(const char * const filename) const { FILE* file = fopen(filename, "w+b"); if (file == NULL) return false; bool result = save_to_file(file); fclose(file); return result; } // Saves the content of the UNICHARSET to the given file. // Returns true if the operation is successful. bool save_to_file(FILE *file) const { STRING str; if (!save_to_string(&str)) return false; if (fwrite(&str[0], str.length(), 1, file) != 1) return false; return true; } bool save_to_file(tesseract::TFile *file) const { STRING str; if (!save_to_string(&str)) return false; if (file->FWrite(&str[0], str.length(), 1) != 1) return false; return true; } // Saves the content of the UNICHARSET to the given STRING. // Returns true if the operation is successful. bool save_to_string(STRING *str) const; // Load a unicharset from a unicharset file that has been loaded into // the given memory buffer. // Returns true if the operation is successful. bool load_from_inmemory_file(const char* const memory, int mem_size, bool skip_fragments); // Returns true if the operation is successful. bool load_from_inmemory_file(const char* const memory, int mem_size) { return load_from_inmemory_file(memory, mem_size, false); } // Opens the file indicated by filename and loads the UNICHARSET // from the given file. The previous data is lost. // Returns true if the operation is successful. bool load_from_file(const char* const filename, bool skip_fragments) { FILE* file = fopen(filename, "rb"); if (file == NULL) return false; bool result = load_from_file(file, skip_fragments); fclose(file); return result; } // returns true if the operation is successful. bool load_from_file(const char* const filename) { return load_from_file(filename, false); } // Loads the UNICHARSET from the given file. The previous data is lost. // Returns true if the operation is successful. bool load_from_file(FILE *file, bool skip_fragments); bool load_from_file(FILE *file) { return load_from_file(file, false); } bool load_from_file(tesseract::TFile *file, bool skip_fragments); // Sets up internal data after loading the file, based on the char // properties. Called from load_from_file, but also needs to be run // during set_unicharset_properties. void post_load_setup(); // Returns true if right_to_left scripts are significant in the unicharset, // but without being so sensitive that "universal" unicharsets containing // characters from many scripts, like orientation and script detection, // look like they are right_to_left. bool major_right_to_left() const; // Set a whitelist and/or blacklist of characters to recognize. // An empty or NULL whitelist enables everything (minus any blacklist). // An empty or NULL blacklist disables nothing. // An empty or NULL unblacklist has no effect. // The blacklist overrides the whitelist. // The unblacklist overrides the blacklist. // Each list is a string of utf8 character strings. Boundaries between // unicharset units are worked out automatically, and characters not in // the unicharset are silently ignored. void set_black_and_whitelist(const char* blacklist, const char* whitelist, const char* unblacklist); // Set the isalpha property of the given unichar to the given value. void set_isalpha(UNICHAR_ID unichar_id, bool value) { unichars[unichar_id].properties.isalpha = value; } // Set the islower property of the given unichar to the given value. void set_islower(UNICHAR_ID unichar_id, bool value) { unichars[unichar_id].properties.islower = value; } // Set the isupper property of the given unichar to the given value. void set_isupper(UNICHAR_ID unichar_id, bool value) { unichars[unichar_id].properties.isupper = value; } // Set the isdigit property of the given unichar to the given value. void set_isdigit(UNICHAR_ID unichar_id, bool value) { unichars[unichar_id].properties.isdigit = value; } // Set the ispunctuation property of the given unichar to the given value. void set_ispunctuation(UNICHAR_ID unichar_id, bool value) { unichars[unichar_id].properties.ispunctuation = value; } // Set the isngram property of the given unichar to the given value. void set_isngram(UNICHAR_ID unichar_id, bool value) { unichars[unichar_id].properties.isngram = value; } // Set the script name of the given unichar to the given value. // Value is copied and thus can be a temporary; void set_script(UNICHAR_ID unichar_id, const char* value) { unichars[unichar_id].properties.script_id = add_script(value); } // Set other_case unichar id in the properties for the given unichar id. void set_other_case(UNICHAR_ID unichar_id, UNICHAR_ID other_case) { unichars[unichar_id].properties.other_case = other_case; } // Set the direction property of the given unichar to the given value. void set_direction(UNICHAR_ID unichar_id, UNICHARSET::Direction value) { unichars[unichar_id].properties.direction = value; } // Set mirror unichar id in the properties for the given unichar id. void set_mirror(UNICHAR_ID unichar_id, UNICHAR_ID mirror) { unichars[unichar_id].properties.mirror = mirror; } // Record normalized version of unichar with the given unichar_id. void set_normed(UNICHAR_ID unichar_id, const char* normed) { unichars[unichar_id].properties.normed = normed; unichars[unichar_id].properties.normed_ids.truncate(0); } // Sets the normed_ids vector from the normed string. normed_ids is not // stored in the file, and needs to be set when the UNICHARSET is loaded. void set_normed_ids(UNICHAR_ID unichar_id); // Return the isalpha property of the given unichar. bool get_isalpha(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return false; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.isalpha; } // Return the islower property of the given unichar. bool get_islower(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return false; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.islower; } // Return the isupper property of the given unichar. bool get_isupper(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return false; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.isupper; } // Return the isdigit property of the given unichar. bool get_isdigit(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return false; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.isdigit; } // Return the ispunctuation property of the given unichar. bool get_ispunctuation(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return false; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.ispunctuation; } // Return the isngram property of the given unichar. bool get_isngram(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return false; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.isngram; } // Returns whether the unichar id represents a unicode value in the private // use area. bool get_isprivate(UNICHAR_ID unichar_id) const; // Returns true if the ids have useful min/max top/bottom values. bool top_bottom_useful() const { return top_bottom_set_; } // Sets all ranges to empty, so they can be expanded to set the values. void set_ranges_empty(); // Sets all the properties for this unicharset given a src_unicharset with // everything set. The unicharsets don't have to be the same, and graphemes // are correctly accounted for. void SetPropertiesFromOther(const UNICHARSET& src) { PartialSetPropertiesFromOther(0, src); } // Sets properties from Other, starting only at the given index. void PartialSetPropertiesFromOther(int start_index, const UNICHARSET& src); // Expands the tops and bottoms and widths for this unicharset given a // src_unicharset with ranges in it. The unicharsets don't have to be the // same, and graphemes are correctly accounted for. void ExpandRangesFromOther(const UNICHARSET& src); // Makes this a copy of src. Clears this completely first, so the automattic // ids will not be present in this if not in src. void CopyFrom(const UNICHARSET& src); // For each id in src, if it does not occur in this, add it, as in // SetPropertiesFromOther, otherwise expand the ranges, as in // ExpandRangesFromOther. void AppendOtherUnicharset(const UNICHARSET& src); // Returns true if the acceptable ranges of the tops of the characters do // not overlap, making their x-height calculations distinct. bool SizesDistinct(UNICHAR_ID id1, UNICHAR_ID id2) const; // Returns the min and max bottom and top of the given unichar in // baseline-normalized coordinates, ie, where the baseline is // kBlnBaselineOffset and the meanline is kBlnBaselineOffset + kBlnXHeight // (See normalis.h for the definitions). void get_top_bottom(UNICHAR_ID unichar_id, int* min_bottom, int* max_bottom, int* min_top, int* max_top) const { if (INVALID_UNICHAR_ID == unichar_id) { *min_bottom = *min_top = 0; *max_bottom = *max_top = 256; // kBlnCellHeight return; } ASSERT_HOST(contains_unichar_id(unichar_id)); *min_bottom = unichars[unichar_id].properties.min_bottom; *max_bottom = unichars[unichar_id].properties.max_bottom; *min_top = unichars[unichar_id].properties.min_top; *max_top = unichars[unichar_id].properties.max_top; } void set_top_bottom(UNICHAR_ID unichar_id, int min_bottom, int max_bottom, int min_top, int max_top) { unichars[unichar_id].properties.min_bottom = static_cast<uinT8>(ClipToRange(min_bottom, 0, MAX_UINT8)); unichars[unichar_id].properties.max_bottom = static_cast<uinT8>(ClipToRange(max_bottom, 0, MAX_UINT8)); unichars[unichar_id].properties.min_top = static_cast<uinT8>(ClipToRange(min_top, 0, MAX_UINT8)); unichars[unichar_id].properties.max_top = static_cast<uinT8>(ClipToRange(max_top, 0, MAX_UINT8)); } // Returns the width range of the given unichar in baseline-normalized // coordinates, ie, where the baseline is kBlnBaselineOffset and the // meanline is kBlnBaselineOffset + kBlnXHeight. // (See normalis.h for the definitions). void get_width_range(UNICHAR_ID unichar_id, int* min_width, int* max_width) const { if (INVALID_UNICHAR_ID == unichar_id) { *min_width = 0; *max_width = 256; // kBlnCellHeight; return; } ASSERT_HOST(contains_unichar_id(unichar_id)); *min_width = unichars[unichar_id].properties.min_width; *max_width = unichars[unichar_id].properties.max_width; } void set_width_range(UNICHAR_ID unichar_id, int min_width, int max_width) { unichars[unichar_id].properties.min_width = static_cast<inT16>(ClipToRange(min_width, 0, MAX_INT16)); unichars[unichar_id].properties.max_width = static_cast<inT16>(ClipToRange(max_width, 0, MAX_INT16)); } // Returns the range of the x-bearing of the given unichar in // baseline-normalized coordinates, ie, where the baseline is // kBlnBaselineOffset and the meanline is kBlnBaselineOffset + kBlnXHeight. // (See normalis.h for the definitions). void get_bearing_range(UNICHAR_ID unichar_id, int* min_bearing, int* max_bearing) const { if (INVALID_UNICHAR_ID == unichar_id) { *min_bearing = *max_bearing = 0; return; } ASSERT_HOST(contains_unichar_id(unichar_id)); *min_bearing = unichars[unichar_id].properties.min_bearing; *max_bearing = unichars[unichar_id].properties.max_bearing; } void set_bearing_range(UNICHAR_ID unichar_id, int min_bearing, int max_bearing) { unichars[unichar_id].properties.min_bearing = static_cast<inT16>(ClipToRange(min_bearing, 0, MAX_INT16)); unichars[unichar_id].properties.max_bearing = static_cast<inT16>(ClipToRange(max_bearing, 0, MAX_INT16)); } // Returns the range of the x-advance of the given unichar in // baseline-normalized coordinates, ie, where the baseline is // kBlnBaselineOffset and the meanline is kBlnBaselineOffset + kBlnXHeight. // (See normalis.h for the definitions). void get_advance_range(UNICHAR_ID unichar_id, int* min_advance, int* max_advance) const { if (INVALID_UNICHAR_ID == unichar_id) { *min_advance = *max_advance = 0; return; } ASSERT_HOST(contains_unichar_id(unichar_id)); *min_advance = unichars[unichar_id].properties.min_advance; *max_advance = unichars[unichar_id].properties.max_advance; } void set_advance_range(UNICHAR_ID unichar_id, int min_advance, int max_advance) { unichars[unichar_id].properties.min_advance = static_cast<inT16>(ClipToRange(min_advance, 0, MAX_INT16)); unichars[unichar_id].properties.max_advance = static_cast<inT16>(ClipToRange(max_advance, 0, MAX_INT16)); } // Return the script name of the given unichar. // The returned pointer will always be the same for the same script, it's // managed by unicharset and thus MUST NOT be deleted int get_script(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return null_sid_; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.script_id; } // Return the character properties, eg. alpha/upper/lower/digit/punct, // as a bit field of unsigned int. unsigned int get_properties(UNICHAR_ID unichar_id) const; // Return the character property as a single char. If a character has // multiple attributes, the main property is defined by the following order: // upper_case : 'A' // lower_case : 'a' // alpha : 'x' // digit : '0' // punctuation: 'p' char get_chartype(UNICHAR_ID unichar_id) const; // Get other_case unichar id in the properties for the given unichar id. UNICHAR_ID get_other_case(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return INVALID_UNICHAR_ID; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.other_case; } // Returns the direction property of the given unichar. Direction get_direction(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return UNICHARSET::U_OTHER_NEUTRAL; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.direction; } // Get mirror unichar id in the properties for the given unichar id. UNICHAR_ID get_mirror(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return INVALID_UNICHAR_ID; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.mirror; } // Returns UNICHAR_ID of the corresponding lower-case unichar. UNICHAR_ID to_lower(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return INVALID_UNICHAR_ID; ASSERT_HOST(contains_unichar_id(unichar_id)); if (unichars[unichar_id].properties.islower) return unichar_id; return unichars[unichar_id].properties.other_case; } // Returns UNICHAR_ID of the corresponding upper-case unichar. UNICHAR_ID to_upper(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return INVALID_UNICHAR_ID; ASSERT_HOST(contains_unichar_id(unichar_id)); if (unichars[unichar_id].properties.isupper) return unichar_id; return unichars[unichar_id].properties.other_case; } // Returns true if this UNICHARSET has the special codes in // SpecialUnicharCodes available. If false then there are normal unichars // at these codes and they should not be used. bool has_special_codes() const { return get_fragment(UNICHAR_BROKEN) != NULL && strcmp(id_to_unichar(UNICHAR_BROKEN), kSpecialUnicharCodes[UNICHAR_BROKEN]) == 0; } // Return a pointer to the CHAR_FRAGMENT class if the given // unichar id represents a character fragment. const CHAR_FRAGMENT *get_fragment(UNICHAR_ID unichar_id) const { if (INVALID_UNICHAR_ID == unichar_id) return NULL; ASSERT_HOST(contains_unichar_id(unichar_id)); return unichars[unichar_id].properties.fragment; } // Return the isalpha property of the given unichar representation. bool get_isalpha(const char* const unichar_repr) const { return get_isalpha(unichar_to_id(unichar_repr)); } // Return the islower property of the given unichar representation. bool get_islower(const char* const unichar_repr) const { return get_islower(unichar_to_id(unichar_repr)); } // Return the isupper property of the given unichar representation. bool get_isupper(const char* const unichar_repr) const { return get_isupper(unichar_to_id(unichar_repr)); } // Return the isdigit property of the given unichar representation. bool get_isdigit(const char* const unichar_repr) const { return get_isdigit(unichar_to_id(unichar_repr)); } // Return the ispunctuation property of the given unichar representation. bool get_ispunctuation(const char* const unichar_repr) const { return get_ispunctuation(unichar_to_id(unichar_repr)); } // Return the character properties, eg. alpha/upper/lower/digit/punct, // of the given unichar representation unsigned int get_properties(const char* const unichar_repr) const { return get_properties(unichar_to_id(unichar_repr)); } char get_chartype(const char* const unichar_repr) const { return get_chartype(unichar_to_id(unichar_repr)); } // Return the script name of the given unichar representation. // The returned pointer will always be the same for the same script, it's // managed by unicharset and thus MUST NOT be deleted int get_script(const char* const unichar_repr) const { return get_script(unichar_to_id(unichar_repr)); } // Return a pointer to the CHAR_FRAGMENT class struct if the given // unichar representation represents a character fragment. const CHAR_FRAGMENT *get_fragment(const char* const unichar_repr) const { if (unichar_repr == NULL || unichar_repr[0] == '\0' || !ids.contains(unichar_repr)) { return NULL; } return get_fragment(unichar_to_id(unichar_repr)); } // Return the isalpha property of the given unichar representation. // Only the first length characters from unichar_repr are used. bool get_isalpha(const char* const unichar_repr, int length) const { return get_isalpha(unichar_to_id(unichar_repr, length)); } // Return the islower property of the given unichar representation. // Only the first length characters from unichar_repr are used. bool get_islower(const char* const unichar_repr, int length) const { return get_islower(unichar_to_id(unichar_repr, length)); } // Return the isupper property of the given unichar representation. // Only the first length characters from unichar_repr are used. bool get_isupper(const char* const unichar_repr, int length) const { return get_isupper(unichar_to_id(unichar_repr, length)); } // Return the isdigit property of the given unichar representation. // Only the first length characters from unichar_repr are used. bool get_isdigit(const char* const unichar_repr, int length) const { return get_isdigit(unichar_to_id(unichar_repr, length)); } // Return the ispunctuation property of the given unichar representation. // Only the first length characters from unichar_repr are used. bool get_ispunctuation(const char* const unichar_repr, int length) const { return get_ispunctuation(unichar_to_id(unichar_repr, length)); } // Returns normalized version of unichar with the given unichar_id. const char *get_normed_unichar(UNICHAR_ID unichar_id) const { return unichars[unichar_id].properties.normed.string(); } // Returns a vector of UNICHAR_IDs that represent the ids of the normalized // version of the given id. There may be more than one UNICHAR_ID in the // vector if unichar_id represents a ligature. const GenericVector<UNICHAR_ID>& normed_ids(UNICHAR_ID unichar_id) const { return unichars[unichar_id].properties.normed_ids; } // Return the script name of the given unichar representation. // Only the first length characters from unichar_repr are used. // The returned pointer will always be the same for the same script, it's // managed by unicharset and thus MUST NOT be deleted int get_script(const char* const unichar_repr, int length) const { return get_script(unichar_to_id(unichar_repr, length)); } // Return the (current) number of scripts in the script table int get_script_table_size() const { return script_table_size_used; } // Return the script string from its id const char* get_script_from_script_id(int id) const { if (id >= script_table_size_used || id < 0) return null_script; return script_table[id]; } // Returns the id from the name of the script, or 0 if script is not found. // Note that this is an expensive operation since it involves iteratively // comparing strings in the script table. To avoid dependency on STL, we // won't use a hash. Instead, the calling function can use this to lookup // and save the ID for relevant scripts for fast comparisons later. int get_script_id_from_name(const char* script_name) const; // Return true if the given script is the null script bool is_null_script(const char* script) const { return script == null_script; } // Uniquify the given script. For two scripts a and b, if strcmp(a, b) == 0, // then the returned pointer will be the same. // The script parameter is copied and thus can be a temporary. int add_script(const char* script); // Return the enabled property of the given unichar. bool get_enabled(UNICHAR_ID unichar_id) const { return unichars[unichar_id].properties.enabled; } int null_sid() const { return null_sid_; } int common_sid() const { return common_sid_; } int latin_sid() const { return latin_sid_; } int cyrillic_sid() const { return cyrillic_sid_; } int greek_sid() const { return greek_sid_; } int han_sid() const { return han_sid_; } int hiragana_sid() const { return hiragana_sid_; } int katakana_sid() const { return katakana_sid_; } int default_sid() const { return default_sid_; } // Returns true if the unicharset has the concept of upper/lower case. bool script_has_upper_lower() const { return script_has_upper_lower_; } // Returns true if the unicharset has the concept of x-height. // script_has_xheight can be true even if script_has_upper_lower is not, // when the script has a sufficiently predominant top line with ascenders, // such as Devanagari and Thai. bool script_has_xheight() const { return script_has_xheight_; } private: struct UNICHAR_PROPERTIES { UNICHAR_PROPERTIES(); // Initializes all properties to sensible default values. void Init(); // Sets all ranges wide open. Initialization default in case there are // no useful values available. void SetRangesOpen(); // Sets all ranges to empty. Used before expanding with font-based data. void SetRangesEmpty(); // Returns true if any of the top/bottom/width/bearing/advance ranges is // emtpy. bool AnyRangeEmpty() const; // Expands the ranges with the ranges from the src properties. void ExpandRangesFrom(const UNICHAR_PROPERTIES& src); // Copies the properties from src into this. void CopyFrom(const UNICHAR_PROPERTIES& src); bool isalpha; bool islower; bool isupper; bool isdigit; bool ispunctuation; bool isngram; bool enabled; // Possible limits of the top and bottom of the bounding box in // baseline-normalized coordinates, ie, where the baseline is // kBlnBaselineOffset and the meanline is kBlnBaselineOffset + kBlnXHeight // (See normalis.h for the definitions). uinT8 min_bottom; uinT8 max_bottom; uinT8 min_top; uinT8 max_top; // Limits on the widths of bounding box, also in baseline-normalized coords. inT16 min_width; inT16 max_width; // Limits on the x-bearing and advance, also in baseline-normalized coords. inT16 min_bearing; inT16 max_bearing; inT16 min_advance; inT16 max_advance; int script_id; UNICHAR_ID other_case; // id of the corresponding upper/lower case unichar Direction direction; // direction of this unichar // Mirror property is useful for reverse DAWG lookup for words in // right-to-left languages (e.g. "(word)" would be in // '[open paren]' 'w' 'o' 'r' 'd' '[close paren]' in a UTF8 string. // However, what we want in our DAWG is // '[open paren]', 'd', 'r', 'o', 'w', '[close paren]' not // '[close paren]', 'd', 'r', 'o', 'w', '[open paren]'. UNICHAR_ID mirror; // A string of unichar_ids that represent the corresponding normed string. // For awkward characters like em-dash, this gives hyphen. // For ligatures, this gives the string of normal unichars. GenericVector<UNICHAR_ID> normed_ids; STRING normed; // normalized version of this unichar // Contains meta information about the fragment if a unichar represents // a fragment of a character, otherwise should be set to NULL. // It is assumed that character fragments are added to the unicharset // after the corresponding 'base' characters. CHAR_FRAGMENT *fragment; }; struct UNICHAR_SLOT { char representation[UNICHAR_LEN + 1]; UNICHAR_PROPERTIES properties; }; // Internal recursive version of encode_string above. // str is the start of the whole string. // str_index is the current position in str. // str_length is the length of str. // encoding is a working encoding of str. // lengths is a working set of lengths of each element of encoding. // best_total_length is the longest length of str that has been successfully // encoded so far. // On return: // best_encoding contains the encoding that used the longest part of str. // best_lengths (may be null) contains the lengths of best_encoding. void encode_string(const char* str, int str_index, int str_length, GenericVector<UNICHAR_ID>* encoding, GenericVector<char>* lengths, int* best_total_length, GenericVector<UNICHAR_ID>* best_encoding, GenericVector<char>* best_lengths) const; // Gets the properties for a grapheme string, combining properties for // multiple characters in a meaningful way where possible. // Returns false if no valid match was found in the unicharset. // NOTE that script_id, mirror, and other_case refer to this unicharset on // return and will need redirecting if the target unicharset is different. bool GetStrProperties(const char* utf8_str, UNICHAR_PROPERTIES* props) const; // Load ourselves from a "file" where our only interface to the file is // an implementation of fgets(). This is the parsing primitive accessed by // the public routines load_from_file() and load_from_inmemory_file(). bool load_via_fgets(TessResultCallback2<char *, char *, int> *fgets_cb, bool skip_fragments); UNICHAR_SLOT* unichars; UNICHARMAP ids; int size_used; int size_reserved; char** script_table; int script_table_size_used; int script_table_size_reserved; const char* null_script; // True if the unichars have their tops/bottoms set. bool top_bottom_set_; // True if the unicharset has significant upper/lower case chars. bool script_has_upper_lower_; // True if the unicharset has a significant mean-line with significant // ascenders above that. bool script_has_xheight_; // A few convenient script name-to-id mapping without using hash. // These are initialized when unicharset file is loaded. Anything // missing from this list can be looked up using get_script_id_from_name. int null_sid_; int common_sid_; int latin_sid_; int cyrillic_sid_; int greek_sid_; int han_sid_; int hiragana_sid_; int katakana_sid_; // The most frequently occurring script in the charset. int default_sid_; }; #endif // TESSERACT_CCUTIL_UNICHARSET_H__
C++
/////////////////////////////////////////////////////////////////////// // File: associate.h // Description: Structs, classes, typedefs useful for the segmentation // search. Functions for scoring segmentation paths according // to their character widths, gap widths and seam cuts. // Author: Daria Antonova // Created: Mon Mar 8 11:26:43 PDT 2010 // // (C) Copyright 2010, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef ASSOCIATE_H #define ASSOCIATE_H #include "blobs.h" #include "elst.h" #include "ratngs.h" #include "seam.h" #include "split.h" class WERD_RES; namespace tesseract { // Statisitcs about character widths, gaps and seams. struct AssociateStats { AssociateStats() { Clear(); } void Clear() { shape_cost = 0.0f; bad_shape = false; full_wh_ratio = 0.0f; full_wh_ratio_total = 0.0f; full_wh_ratio_var = 0.0f; bad_fixed_pitch_right_gap = false; bad_fixed_pitch_wh_ratio = false; gap_sum = 0; } void Print() { tprintf("AssociateStats: w(%g %d) s(%g %d)\n", shape_cost, bad_shape); } float shape_cost; // cost of blob shape bool bad_shape; // true if the shape of the blob is unacceptable float full_wh_ratio; // width-to-hight ratio + gap on the right float full_wh_ratio_total; // sum of width-to-hight ratios // on the path terminating at this blob float full_wh_ratio_var; // variance of full_wh_ratios on the path bool bad_fixed_pitch_right_gap; // true if there is no gap before // the blob on the right bool bad_fixed_pitch_wh_ratio; // true if the blobs has width-to-hight // ratio > kMaxFixedPitchCharAspectRatio int gap_sum; // sum of gaps within the blob }; // Utility functions for scoring segmentation paths according to their // character widths, gap widths, seam characteristics. class AssociateUtils { public: static const float kMaxFixedPitchCharAspectRatio; static const float kMinGap; // Returns outline length of the given blob is computed as: // rating_cert_scale * rating / certainty // Since from Wordrec::SegSearch() in segsearch.cpp // rating_cert_scale = -1.0 * getDict().certainty_scale / rating_scale // And from Classify::ConvertMatchesToChoices() in adaptmatch.cpp // Rating = Certainty = next.rating // Rating *= rating_scale * Results->BlobLength // Certainty *= -(getDict().certainty_scale) static inline float ComputeOutlineLength(float rating_cert_scale, const BLOB_CHOICE &b) { return rating_cert_scale * b.rating() / b.certainty(); } static inline float ComputeRating(float rating_cert_scale, float cert, int width) { return static_cast<float>(width) * cert / rating_cert_scale; } // Computes character widths, gaps and seams stats given the // AssociateStats of the path so far, col, row of the blob that // is being added to the path, and WERD_RES containing information // about character widths, gaps and seams. // Fills associate_cost with the combined shape, gap and seam cost // of adding a unichar from (col, row) to the path (note that since // this function could be used to compute the prioritization for // pain points, (col, row) entry might not be classified yet; thus // information in the (col, row) entry of the ratings matrix is not used). // // Note: the function assumes that word_res, stats and // associate_cost pointers are not NULL. static void ComputeStats(int col, int row, const AssociateStats *parent_stats, int parent_path_length, bool fixed_pitch, float max_char_wh_ratio, WERD_RES *word_res, bool debug, AssociateStats *stats); // Returns the width cost for fixed-pitch text. static float FixedPitchWidthCost(float norm_width, float right_gap, bool end_pos, float max_char_wh_ratio); // Returns the gap cost for fixed-pitch text (penalizes vertically // overlapping components). static inline float FixedPitchGapCost(float norm_gap, bool end_pos) { return (norm_gap < 0.05 && !end_pos) ? 5.0f : 0.0f; } }; } // namespace tesseract #endif
C++
/////////////////////////////////////////////////////////////////////// // File: params_model.h // Description: Trained feature serialization for language parameter training. // Author: David Eger // Created: Mon Jun 11 11:26:42 PDT 2012 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_WORDREC_PARAMS_MODEL_H_ #define TESSERACT_WORDREC_PARAMS_MODEL_H_ #include "params_training_featdef.h" #include "ratngs.h" #include "strngs.h" namespace tesseract { // Represents the learned weights for a given language. class ParamsModel { public: // Enum for expressing OCR pass. enum PassEnum { PTRAIN_PASS1, PTRAIN_PASS2, PTRAIN_NUM_PASSES }; ParamsModel() : pass_(PTRAIN_PASS1) {} ParamsModel(const char *lang, const GenericVector<float> &weights) : lang_(lang), pass_(PTRAIN_PASS1) { weights_vec_[pass_] = weights; } inline bool Initialized() { return weights_vec_[pass_].size() == PTRAIN_NUM_FEATURE_TYPES; } // Prints out feature weights. void Print(); // Clears weights for all passes. void Clear() { for (int p = 0; p < PTRAIN_NUM_PASSES; ++p) weights_vec_[p].clear(); } // Copies the weights of the given params model. void Copy(const ParamsModel &other_model); // Applies params model weights to the given features. // Assumes that features is an array of size PTRAIN_NUM_FEATURE_TYPES. float ComputeCost(const float features[]) const; bool Equivalent(const ParamsModel &that) const; // Returns true on success. bool SaveToFile(const char *full_path) const; // Returns true on success. bool LoadFromFile(const char *lang, const char *full_path); bool LoadFromFp(const char *lang, FILE *fp, inT64 end_offset); const GenericVector<float>& weights() const { return weights_vec_[pass_]; } const GenericVector<float>& weights_for_pass(PassEnum pass) const { return weights_vec_[pass]; } void SetPass(PassEnum pass) { pass_ = pass; } private: bool ParseLine(char *line, char **key, float *val); STRING lang_; // Set to the current pass type and used to determine which set of weights // should be used for ComputeCost() and other functions. PassEnum pass_; // Several sets of weights for various OCR passes (e.g. pass1 with adaption, // pass2 without adaption, etc). GenericVector<float> weights_vec_[PTRAIN_NUM_PASSES]; }; } // namespace tesseract #endif // TESSERACT_WORDREC_PARAMS_MODEL_H_
C++
/////////////////////////////////////////////////////////////////////// // File: language_model.h // Description: Functions that utilize the knowledge about the properties, // structure and statistics of the language to help segmentation // search. // Author: Daria Antonova // Created: Mon Nov 11 11:26:43 PST 2009 // // (C) Copyright 2009, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_WORDREC_LANGUAGE_MODEL_H_ #define TESSERACT_WORDREC_LANGUAGE_MODEL_H_ #include "associate.h" #include "dawg.h" #include "dict.h" #include "fontinfo.h" #include "intproto.h" #include "lm_consistency.h" #include "lm_pain_points.h" #include "lm_state.h" #include "matrix.h" #include "params.h" #include "pageres.h" #include "params_model.h" namespace tesseract { // This class that contains the data structures and functions necessary // to represent and use the knowledge about the language. class LanguageModel { public: // Masks for keeping track of top choices that should not be pruned out. static const LanguageModelFlagsType kSmallestRatingFlag = 0x1; static const LanguageModelFlagsType kLowerCaseFlag = 0x2; static const LanguageModelFlagsType kUpperCaseFlag = 0x4; static const LanguageModelFlagsType kDigitFlag = 0x8; static const LanguageModelFlagsType kXhtConsistentFlag = 0x10; // Denominator for normalizing per-letter ngram cost when deriving // penalty adjustments. static const float kMaxAvgNgramCost; LanguageModel(const UnicityTable<FontInfo> *fontinfo_table, Dict *dict); ~LanguageModel(); // Fills the given floats array with features extracted from path represented // by the given ViterbiStateEntry. See ccstruct/params_training_featdef.h // for feature information. // Note: the function assumes that features points to an array of size // PTRAIN_NUM_FEATURE_TYPES. static void ExtractFeaturesFromPath(const ViterbiStateEntry &vse, float features[]); // Updates data structures that are used for the duration of the segmentation // search on the current word; void InitForWord(const WERD_CHOICE *prev_word, bool fixed_pitch, float max_char_wh_ratio, float rating_cert_scale); // Updates language model state of the given BLOB_CHOICE_LIST (from // the ratings matrix) a its parent. Updates pain_points if new // problematic points are found in the segmentation graph. // // At most language_model_viterbi_list_size are kept in each // LanguageModelState.viterbi_state_entries list. // At most language_model_viterbi_list_max_num_prunable of those are prunable // (non-dictionary) paths. // The entries that represent dictionary word paths are kept at the front // of the list. // The list ordered by cost that is computed collectively by several // language model components (currently dawg and ngram components). bool UpdateState( bool just_classified, int curr_col, int curr_row, BLOB_CHOICE_LIST *curr_list, LanguageModelState *parent_node, LMPainPoints *pain_points, WERD_RES *word_res, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle); // Returns true if an acceptable best choice was discovered. inline bool AcceptableChoiceFound() { return acceptable_choice_found_; } inline void SetAcceptableChoiceFound(bool val) { acceptable_choice_found_ = val; } // Returns the reference to ParamsModel. inline ParamsModel &getParamsModel() { return params_model_; } protected: inline float CertaintyScore(float cert) { if (language_model_use_sigmoidal_certainty) { // cert is assumed to be between 0 and -dict_->certainty_scale. // If you enable language_model_use_sigmoidal_certainty, you // need to adjust language_model_ngram_nonmatch_score as well. cert = -cert / dict_->certainty_scale; return 1.0f / (1.0f + exp(10.0f * cert)); } else { return (-1.0f / cert); } } inline float ComputeAdjustment(int num_problems, float penalty) { if (num_problems == 0) return 0.0f; if (num_problems == 1) return penalty; return (penalty + (language_model_penalty_increment * static_cast<float>(num_problems-1))); } // Computes the adjustment to the ratings sum based on the given // consistency_info. The paths with invalid punctuation, inconsistent // case and character type are penalized proportionally to the number // of inconsistencies on the path. inline float ComputeConsistencyAdjustment( const LanguageModelDawgInfo *dawg_info, const LMConsistencyInfo &consistency_info) { if (dawg_info != NULL) { return ComputeAdjustment(consistency_info.NumInconsistentCase(), language_model_penalty_case) + (consistency_info.inconsistent_script ? language_model_penalty_script : 0.0f); } return (ComputeAdjustment(consistency_info.NumInconsistentPunc(), language_model_penalty_punc) + ComputeAdjustment(consistency_info.NumInconsistentCase(), language_model_penalty_case) + ComputeAdjustment(consistency_info.NumInconsistentChartype(), language_model_penalty_chartype) + ComputeAdjustment(consistency_info.NumInconsistentSpaces(), language_model_penalty_spacing) + (consistency_info.inconsistent_script ? language_model_penalty_script : 0.0f) + (consistency_info.inconsistent_font ? language_model_penalty_font : 0.0f)); } // Returns an adjusted ratings sum that includes inconsistency penalties, // penalties for non-dictionary paths and paths with dips in ngram // probability. float ComputeAdjustedPathCost(ViterbiStateEntry *vse); // Finds the first lower and upper case letter and first digit in curr_list. // Uses the first character in the list in place of empty results. // Returns true if both alpha and digits are found. bool GetTopLowerUpperDigit(BLOB_CHOICE_LIST *curr_list, BLOB_CHOICE **first_lower, BLOB_CHOICE **first_upper, BLOB_CHOICE **first_digit) const; // Forces there to be at least one entry in the overall set of the // viterbi_state_entries of each element of parent_node that has the // top_choice_flag set for lower, upper and digit using the same rules as // GetTopLowerUpperDigit, setting the flag on the first found suitable // candidate, whether or not the flag is set on some other parent. // Returns 1 if both alpha and digits are found among the parents, -1 if no // parents are found at all (a legitimate case), and 0 otherwise. int SetTopParentLowerUpperDigit(LanguageModelState *parent_node) const; // Finds the next ViterbiStateEntry with which the given unichar_id can // combine sensibly, taking into account any mixed alnum/mixed case // situation, and whether this combination has been inspected before. ViterbiStateEntry* GetNextParentVSE( bool just_classified, bool mixed_alnum, const BLOB_CHOICE* bc, LanguageModelFlagsType blob_choice_flags, const UNICHARSET& unicharset, WERD_RES* word_res, ViterbiStateEntry_IT* vse_it, LanguageModelFlagsType* top_choice_flags) const; // Helper function that computes the cost of the path composed of the // path in the given parent ViterbiStateEntry and the given BLOB_CHOICE. // If the new path looks good enough, adds a new ViterbiStateEntry to the // list of viterbi entries in the given BLOB_CHOICE and returns true. bool AddViterbiStateEntry( LanguageModelFlagsType top_choice_flags, float denom, bool word_end, int curr_col, int curr_row, BLOB_CHOICE *b, LanguageModelState *curr_state, ViterbiStateEntry *parent_vse, LMPainPoints *pain_points, WERD_RES *word_res, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle); // Determines whether a potential entry is a true top choice and // updates changed accordingly. // // Note: The function assumes that b, top_choice_flags and changed // are not NULL. void GenerateTopChoiceInfo(ViterbiStateEntry *new_vse, const ViterbiStateEntry *parent_vse, LanguageModelState *lms); // Calls dict_->LetterIsOk() with DawgArgs initialized from parent_vse and // unichar from b.unichar_id(). Constructs and returns LanguageModelDawgInfo // with updated active dawgs, constraints and permuter. // // Note: the caller is responsible for deleting the returned pointer. LanguageModelDawgInfo *GenerateDawgInfo(bool word_end, int curr_col, int curr_row, const BLOB_CHOICE &b, const ViterbiStateEntry *parent_vse); // Computes p(unichar | parent context) and records it in ngram_cost. // If b.unichar_id() is an unlikely continuation of the parent context // sets found_small_prob to true and returns NULL. // Otherwise creates a new LanguageModelNgramInfo entry containing the // updated context (that includes b.unichar_id() at the end) and returns it. // // Note: the caller is responsible for deleting the returned pointer. LanguageModelNgramInfo *GenerateNgramInfo( const char *unichar, float certainty, float denom, int curr_col, int curr_row, float outline_length, const ViterbiStateEntry *parent_vse); // Computes -(log(prob(classifier)) + log(prob(ngram model))) // for the given unichar in the given context. If there are multiple // unichars at one position - takes the average of their probabilities. // UNICHAR::utf8_step() is used to separate out individual UTF8 characters, // since probability_in_context() can only handle one at a time (while // unicharset might contain ngrams and glyphs composed from multiple UTF8 // characters). float ComputeNgramCost(const char *unichar, float certainty, float denom, const char *context, int *unichar_step_len, bool *found_small_prob, float *ngram_prob); // Computes the normalization factors for the classifier confidences // (used by ComputeNgramCost()). float ComputeDenom(BLOB_CHOICE_LIST *curr_list); // Fills the given consistenty_info based on parent_vse.consistency_info // and on the consistency of the given unichar_id with parent_vse. void FillConsistencyInfo( int curr_col, bool word_end, BLOB_CHOICE *b, ViterbiStateEntry *parent_vse, WERD_RES *word_res, LMConsistencyInfo *consistency_info); // Constructs WERD_CHOICE by recording unichar_ids of the BLOB_CHOICEs // on the path represented by the given BLOB_CHOICE and language model // state entries (lmse, dse). The path is re-constructed by following // the parent pointers in the the lang model state entries). If the // constructed WERD_CHOICE is better than the best/raw choice recorded // in the best_choice_bundle, this function updates the corresponding // fields and sets best_choice_bunldle->updated to true. void UpdateBestChoice(ViterbiStateEntry *vse, LMPainPoints *pain_points, WERD_RES *word_res, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle); // Constructs a WERD_CHOICE by tracing parent pointers starting with // the given LanguageModelStateEntry. Returns the constructed word. // Updates best_char_choices, certainties and state if they are not // NULL (best_char_choices and certainties are assumed to have the // length equal to lmse->length). // The caller is responsible for freeing memory associated with the // returned WERD_CHOICE. WERD_CHOICE *ConstructWord(ViterbiStateEntry *vse, WERD_RES *word_res, DANGERR *fixpt, BlamerBundle *blamer_bundle, bool *truth_path); // Wrapper around AssociateUtils::ComputeStats(). inline void ComputeAssociateStats(int col, int row, float max_char_wh_ratio, ViterbiStateEntry *parent_vse, WERD_RES *word_res, AssociateStats *associate_stats) { AssociateUtils::ComputeStats( col, row, (parent_vse != NULL) ? &(parent_vse->associate_stats) : NULL, (parent_vse != NULL) ? parent_vse->length : 0, fixed_pitch_, max_char_wh_ratio, word_res, language_model_debug_level > 2, associate_stats); } // Returns true if the path with such top_choice_flags and dawg_info // could be pruned out (i.e. is neither a system/user/frequent dictionary // nor a top choice path). // In non-space delimited languages all paths can be "somewhat" dictionary // words. In such languages we can not do dictionary-driven path pruning, // so paths with non-empty dawg_info are considered prunable. inline bool PrunablePath(const ViterbiStateEntry &vse) { if (vse.top_choice_flags) return false; if (vse.dawg_info != NULL && (vse.dawg_info->permuter == SYSTEM_DAWG_PERM || vse.dawg_info->permuter == USER_DAWG_PERM || vse.dawg_info->permuter == FREQ_DAWG_PERM)) return false; return true; } // Returns true if the given ViterbiStateEntry represents an acceptable path. inline bool AcceptablePath(const ViterbiStateEntry &vse) { return (vse.dawg_info != NULL || vse.Consistent() || (vse.ngram_info != NULL && !vse.ngram_info->pruned)); } public: // Parameters. INT_VAR_H(language_model_debug_level, 0, "Language model debug level"); BOOL_VAR_H(language_model_ngram_on, false, "Turn on/off the use of character ngram model"); INT_VAR_H(language_model_ngram_order, 8, "Maximum order of the character ngram model"); INT_VAR_H(language_model_viterbi_list_max_num_prunable, 10, "Maximum number of prunable (those for which PrunablePath() is" " true) entries in each viterbi list recorded in BLOB_CHOICEs"); INT_VAR_H(language_model_viterbi_list_max_size, 500, "Maximum size of viterbi lists recorded in BLOB_CHOICEs"); double_VAR_H(language_model_ngram_small_prob, 0.000001, "To avoid overly small denominators use this as the floor" " of the probability returned by the ngram model"); double_VAR_H(language_model_ngram_nonmatch_score, -40.0, "Average classifier score of a non-matching unichar"); BOOL_VAR_H(language_model_ngram_use_only_first_uft8_step, false, "Use only the first UTF8 step of the given string" " when computing log probabilities"); double_VAR_H(language_model_ngram_scale_factor, 0.03, "Strength of the character ngram model relative to the" " character classifier "); double_VAR_H(language_model_ngram_rating_factor, 16.0, "Factor to bring log-probs into the same range as ratings" " when multiplied by outline length "); BOOL_VAR_H(language_model_ngram_space_delimited_language, true, "Words are delimited by space"); INT_VAR_H(language_model_min_compound_length, 3, "Minimum length of compound words"); // Penalties used for adjusting path costs and final word rating. double_VAR_H(language_model_penalty_non_freq_dict_word, 0.1, "Penalty for words not in the frequent word dictionary"); double_VAR_H(language_model_penalty_non_dict_word, 0.15, "Penalty for non-dictionary words"); double_VAR_H(language_model_penalty_punc, 0.2, "Penalty for inconsistent punctuation"); double_VAR_H(language_model_penalty_case, 0.1, "Penalty for inconsistent case"); double_VAR_H(language_model_penalty_script, 0.5, "Penalty for inconsistent script"); double_VAR_H(language_model_penalty_chartype, 0.3, "Penalty for inconsistent character type"); double_VAR_H(language_model_penalty_font, 0.00, "Penalty for inconsistent font"); double_VAR_H(language_model_penalty_spacing, 0.05, "Penalty for inconsistent spacing"); double_VAR_H(language_model_penalty_increment, 0.01, "Penalty increment"); INT_VAR_H(wordrec_display_segmentations, 0, "Display Segmentations"); BOOL_VAR_H(language_model_use_sigmoidal_certainty, false, "Use sigmoidal score for certainty"); protected: // Member Variables. // Temporary DawgArgs struct that is re-used across different words to // avoid dynamic memory re-allocation (should be cleared before each use). DawgArgs *dawg_args_; // Scaling for recovering blob outline length from rating and certainty. float rating_cert_scale_; // The following variables are set at construction time. // Pointer to fontinfo table (not owned by LanguageModel). const UnicityTable<FontInfo> *fontinfo_table_; // Pointer to Dict class, that is used for querying the dictionaries // (the pointer is not owned by LanguageModel). Dict *dict_; // TODO(daria): the following variables should become LanguageModel params // when the old code in bestfirst.cpp and heuristic.cpp is deprecated. // // Set to true if we are dealing with fixed pitch text // (set to assume_fixed_pitch_char_segment). bool fixed_pitch_; // Max char width-to-height ratio allowed // (set to segsearch_max_char_wh_ratio). float max_char_wh_ratio_; // The following variables are initialized with InitForWord(). // String representation of the classification of the previous word // (since this is only used by the character ngram model component, // only the last language_model_ngram_order of the word are stored). STRING prev_word_str_; int prev_word_unichar_step_len_; // Active dawg vector. DawgPositionVector *very_beginning_active_dawgs_; // includes continuation DawgPositionVector *beginning_active_dawgs_; // Set to true if acceptable choice was discovered. // Note: it would be nice to use this to terminate the search once an // acceptable choices is found. However we do not do that and once an // acceptable choice is found we finish looking for alternative choices // in the current segmentation graph and then exit the search (no more // classifications are done after an acceptable choice is found). // This is needed in order to let the search find the words very close to // the best choice in rating (e.g. what/What, Cat/cat, etc) and log these // choices. This way the stopper will know that the best choice is not // ambiguous (i.e. there are best choices in the best choice list that have // ratings close to the very best one) and will be less likely to mis-adapt. bool acceptable_choice_found_; // Set to true if a choice representing correct segmentation was explored. bool correct_segmentation_explored_; // Params models containing weights for for computing ViterbiStateEntry costs. ParamsModel params_model_; }; } // namespace tesseract #endif // TESSERACT_WORDREC_LANGUAGE_MODEL_H_
C++
/////////////////////////////////////////////////////////////////////// // File: lm_consistency.h // Description: Struct for recording consistency of the paths representing // OCR hypotheses. // Author: Rika Antonova // Created: Mon Jun 20 11:26:43 PST 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////// #include "dawg.h" #include "dict.h" #include "host.h" #include "ratngs.h" #ifndef TESSERACT_WORDREC_CONSISTENCY_H_ #define TESSERACT_WORDREC_CONSISTENCY_H_ namespace tesseract { static const char * const XHeightConsistencyEnumName[] = { "XH_GOOD", "XH_SUBNORMAL", "XH_INCONSISTENT", }; // Struct for keeping track of the consistency of the path. struct LMConsistencyInfo { enum ChartypeEnum { CT_NONE, CT_ALPHA, CT_DIGIT, CT_OTHER}; // How much do characters have to be shifted away from normal parameters // before we say they're not normal? static const int kShiftThresh = 1; // How much shifting from subscript to superscript and back // before we declare shenanigans? static const int kMaxEntropy = 1; // Script positions - order important for entropy calculation. static const int kSUB = 0, kNORM = 1, kSUP = 2; static const int kNumPos = 3; explicit LMConsistencyInfo(const LMConsistencyInfo* parent_info) { if (parent_info == NULL) { // Initialize from scratch. num_alphas = 0; num_digits = 0; num_punc = 0; num_other = 0; chartype = CT_NONE; punc_ref = NO_EDGE; invalid_punc = false; num_non_first_upper = 0; num_lower = 0; script_id = 0; inconsistent_script = false; num_inconsistent_spaces = 0; inconsistent_font = false; // Initialize XHeight stats. for (int i = 0; i < kNumPos; i++) { xht_count[i] = 0; xht_count_punc[i] = 0; xht_lo[i] = 0; xht_hi[i] = 256; // kBlnCellHeight } xht_sp = -1; // This invalid value indicates that there was no parent. xpos_entropy = 0; xht_decision = XH_GOOD; } else { // Copy parent info *this = *parent_info; } } inline int NumInconsistentPunc() const { return invalid_punc ? num_punc : 0; } inline int NumInconsistentCase() const { return (num_non_first_upper > num_lower) ? num_lower : num_non_first_upper; } inline int NumInconsistentChartype() const { return (NumInconsistentPunc() + num_other + ((num_alphas > num_digits) ? num_digits : num_alphas)); } inline bool Consistent() const { return (NumInconsistentPunc() == 0 && NumInconsistentCase() == 0 && NumInconsistentChartype() == 0 && !inconsistent_script && !inconsistent_font && !InconsistentXHeight()); } inline int NumInconsistentSpaces() const { return num_inconsistent_spaces; } inline int InconsistentXHeight() const { return xht_decision == XH_INCONSISTENT; } void ComputeXheightConsistency(const BLOB_CHOICE *b, bool is_punc); float BodyMinXHeight() const { if (InconsistentXHeight()) return 0.0f; return xht_lo[kNORM]; } float BodyMaxXHeight() const { if (InconsistentXHeight()) return static_cast<float>(MAX_INT16); return xht_hi[kNORM]; } int num_alphas; int num_digits; int num_punc; int num_other; ChartypeEnum chartype; EDGE_REF punc_ref; bool invalid_punc; int num_non_first_upper; int num_lower; int script_id; bool inconsistent_script; int num_inconsistent_spaces; bool inconsistent_font; // Metrics clumped by position. float xht_lo[kNumPos]; float xht_hi[kNumPos]; inT16 xht_count[kNumPos]; inT16 xht_count_punc[kNumPos]; inT16 xht_sp; inT16 xpos_entropy; XHeightConsistencyEnum xht_decision; }; } // namespace tesseract #endif // TESSERACT_WORDREC_CONSISTENCY_H_
C++
/////////////////////////////////////////////////////////////////////// // File: wordrec.cpp // Description: wordrec class. // Author: Samuel Charron // // (C) Copyright 2006, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "wordrec.h" #include "language_model.h" #include "params.h" namespace tesseract { Wordrec::Wordrec() : // control parameters BOOL_MEMBER(merge_fragments_in_matrix, TRUE, "Merge the fragments in the ratings matrix and delete them" " after merging", params()), BOOL_MEMBER(wordrec_no_block, FALSE, "Don't output block information", params()), BOOL_MEMBER(wordrec_enable_assoc, TRUE, "Associator Enable", params()), BOOL_MEMBER(force_word_assoc, FALSE, "force associator to run regardless of what enable_assoc is." "This is used for CJK where component grouping is necessary.", CCUtil::params()), double_MEMBER(wordrec_worst_state, 1.0, "Worst segmentation state", params()), BOOL_MEMBER(fragments_guide_chopper, FALSE, "Use information from fragments to guide chopping process", params()), INT_MEMBER(repair_unchopped_blobs, 1, "Fix blobs that aren't chopped", params()), double_MEMBER(tessedit_certainty_threshold, -2.25, "Good blob limit", params()), INT_MEMBER(chop_debug, 0, "Chop debug", params()), BOOL_MEMBER(chop_enable, 1, "Chop enable", params()), BOOL_MEMBER(chop_vertical_creep, 0, "Vertical creep", params()), INT_MEMBER(chop_split_length, 10000, "Split Length", params()), INT_MEMBER(chop_same_distance, 2, "Same distance", params()), INT_MEMBER(chop_min_outline_points, 6, "Min Number of Points on Outline", params()), INT_MEMBER(chop_seam_pile_size, 150, "Max number of seams in seam_pile", params()), BOOL_MEMBER(chop_new_seam_pile, 1, "Use new seam_pile", params()), INT_MEMBER(chop_inside_angle, -50, "Min Inside Angle Bend", params()), INT_MEMBER(chop_min_outline_area, 2000, "Min Outline Area", params()), double_MEMBER(chop_split_dist_knob, 0.5, "Split length adjustment", params()), double_MEMBER(chop_overlap_knob, 0.9, "Split overlap adjustment", params()), double_MEMBER(chop_center_knob, 0.15, "Split center adjustment", params()), INT_MEMBER(chop_centered_maxwidth, 90, "Width of (smaller) chopped blobs " "above which we don't care that a chop is not near the center.", params()), double_MEMBER(chop_sharpness_knob, 0.06, "Split sharpness adjustment", params()), double_MEMBER(chop_width_change_knob, 5.0, "Width change adjustment", params()), double_MEMBER(chop_ok_split, 100.0, "OK split limit", params()), double_MEMBER(chop_good_split, 50.0, "Good split limit", params()), INT_MEMBER(chop_x_y_weight, 3, "X / Y length weight", params()), INT_MEMBER(segment_adjust_debug, 0, "Segmentation adjustment debug", params()), BOOL_MEMBER(assume_fixed_pitch_char_segment, FALSE, "include fixed-pitch heuristics in char segmentation", params()), INT_MEMBER(wordrec_debug_level, 0, "Debug level for wordrec", params()), INT_MEMBER(wordrec_max_join_chunks, 4, "Max number of broken pieces to associate", params()), BOOL_MEMBER(wordrec_skip_no_truth_words, false, "Only run OCR for words that had truth recorded in BlamerBundle", params()), BOOL_MEMBER(wordrec_debug_blamer, false, "Print blamer debug messages", params()), BOOL_MEMBER(wordrec_run_blamer, false, "Try to set the blame for errors", params()), INT_MEMBER(segsearch_debug_level, 0, "SegSearch debug level", params()), INT_MEMBER(segsearch_max_pain_points, 2000, "Maximum number of pain points stored in the queue", params()), INT_MEMBER(segsearch_max_futile_classifications, 20, "Maximum number of pain point classifications per chunk that" "did not result in finding a better word choice.", params()), double_MEMBER(segsearch_max_char_wh_ratio, 2.0, "Maximum character width-to-height ratio", params()), BOOL_MEMBER(save_alt_choices, true, "Save alternative paths found during chopping" " and segmentation search", params()) { prev_word_best_choice_ = NULL; language_model_ = new LanguageModel(&get_fontinfo_table(), &(getDict())); fill_lattice_ = NULL; } Wordrec::~Wordrec() { delete language_model_; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: lm_state.h // Description: Structures and functionality for capturing the state of // segmentation search guided by the language model. // // Author: Rika Antonova // Created: Mon Jun 20 11:26:43 PST 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_WORDREC_LANGUAGE_MODEL_DEFS_H_ #define TESSERACT_WORDREC_LANGUAGE_MODEL_DEFS_H_ #include "associate.h" #include "elst.h" #include "dawg.h" #include "lm_consistency.h" #include "matrix.h" #include "ratngs.h" #include "stopper.h" #include "strngs.h" namespace tesseract { // Used for expressing various language model flags. typedef unsigned char LanguageModelFlagsType; // The following structs are used for storing the state of the language model // in the segmentation search graph. In this graph the nodes are BLOB_CHOICEs // and the links are the relationships between the underlying blobs (see // segsearch.h for a more detailed description). // Each of the BLOB_CHOICEs contains LanguageModelState struct, which has // a list of N best paths (list of ViterbiStateEntry) explored by the Viterbi // search leading up to and including this BLOB_CHOICE. // Each ViterbiStateEntry contains information from various components of the // language model: dawgs in which the path is found, character ngram model // probability of the path, script/chartype/font consistency info, state for // language-specific heuristics (e.g. hyphenated and compound words, lower/upper // case preferences, etc). // Each ViterbiStateEntry also contains the parent pointer, so that the path // that it represents (WERD_CHOICE) can be constructed by following these // parent pointers. // Struct for storing additional information used by Dawg language model // component. It stores the set of active dawgs in which the sequence of // letters on a path can be found. struct LanguageModelDawgInfo { LanguageModelDawgInfo(DawgPositionVector *a, PermuterType pt) : permuter(pt) { active_dawgs = new DawgPositionVector(*a); } ~LanguageModelDawgInfo() { delete active_dawgs; } DawgPositionVector *active_dawgs; PermuterType permuter; }; // Struct for storing additional information used by Ngram language model // component. struct LanguageModelNgramInfo { LanguageModelNgramInfo(const char *c, int l, bool p, float nc, float ncc) : context(c), context_unichar_step_len(l), pruned(p), ngram_cost(nc), ngram_and_classifier_cost(ncc) {} STRING context; // context string // Length of the context measured by advancing using UNICHAR::utf8_step() // (should be at most the order of the character ngram model used). int context_unichar_step_len; // The paths with pruned set are pruned out from the perspective of the // character ngram model. They are explored further because they represent // a dictionary match or a top choice. Thus ngram_info is still computed // for them in order to calculate the combined cost. bool pruned; // -ln(P_ngram_model(path)) float ngram_cost; // -[ ln(P_classifier(path)) + scale_factor * ln(P_ngram_model(path)) ] float ngram_and_classifier_cost; }; // Struct for storing the information about a path in the segmentation graph // explored by Viterbi search. struct ViterbiStateEntry : public ELIST_LINK { ViterbiStateEntry(ViterbiStateEntry *pe, BLOB_CHOICE *b, float c, float ol, const LMConsistencyInfo &ci, const AssociateStats &as, LanguageModelFlagsType tcf, LanguageModelDawgInfo *d, LanguageModelNgramInfo *n, const char *debug_uch) : cost(c), curr_b(b), parent_vse(pe), competing_vse(NULL), ratings_sum(b->rating()), min_certainty(b->certainty()), adapted(b->IsAdapted()), length(1), outline_length(ol), consistency_info(ci), associate_stats(as), top_choice_flags(tcf), dawg_info(d), ngram_info(n), updated(true) { debug_str = (debug_uch == NULL) ? NULL : new STRING(); if (pe != NULL) { ratings_sum += pe->ratings_sum; if (pe->min_certainty < min_certainty) { min_certainty = pe->min_certainty; } adapted += pe->adapted; length += pe->length; outline_length += pe->outline_length; if (debug_uch != NULL) *debug_str += *(pe->debug_str); } if (debug_str != NULL && debug_uch != NULL) *debug_str += debug_uch; } ~ViterbiStateEntry() { delete dawg_info; delete ngram_info; delete debug_str; } // Comparator function for sorting ViterbiStateEntry_LISTs in // non-increasing order of costs. static int Compare(const void *e1, const void *e2) { const ViterbiStateEntry *ve1 = *reinterpret_cast<const ViterbiStateEntry * const *>(e1); const ViterbiStateEntry *ve2 = *reinterpret_cast<const ViterbiStateEntry * const *>(e2); return (ve1->cost < ve2->cost) ? -1 : 1; } inline bool Consistent() const { if (dawg_info != NULL && consistency_info.NumInconsistentCase() == 0) { return true; } return consistency_info.Consistent(); } // Returns true if this VSE has an alphanumeric character as its classifier // result. bool HasAlnumChoice(const UNICHARSET& unicharset) { if (curr_b == NULL) return false; UNICHAR_ID unichar_id = curr_b->unichar_id(); if (unicharset.get_isalpha(unichar_id) || unicharset.get_isdigit(unichar_id)) return true; return false; } void Print(const char *msg) const; // The cost is an adjusted ratings sum, that is adjusted by all the language // model components that use Viterbi search. float cost; // Pointers to BLOB_CHOICE and parent ViterbiStateEntry (not owned by this). BLOB_CHOICE *curr_b; ViterbiStateEntry *parent_vse; // Pointer to a case-competing ViterbiStateEntry in the same list that // represents a path ending in the same letter of the opposite case. ViterbiStateEntry *competing_vse; // Various information about the characters on the path represented // by this ViterbiStateEntry. float ratings_sum; // sum of ratings of character on the path float min_certainty; // minimum certainty on the path int adapted; // number of BLOB_CHOICES from adapted templates int length; // number of characters on the path float outline_length; // length of the outline so far LMConsistencyInfo consistency_info; // path consistency info AssociateStats associate_stats; // character widths/gaps/seams // Flags for marking the entry as a top choice path with // the smallest rating or lower/upper case letters). LanguageModelFlagsType top_choice_flags; // Extra information maintained by Dawg laguage model component // (owned by ViterbiStateEntry). LanguageModelDawgInfo *dawg_info; // Extra information maintained by Ngram laguage model component // (owned by ViterbiStateEntry). LanguageModelNgramInfo *ngram_info; bool updated; // set to true if the entry has just been created/updated // UTF8 string representing the path corresponding to this vse. // Populated only in when language_model_debug_level > 0. STRING *debug_str; }; ELISTIZEH(ViterbiStateEntry); // Struct to store information maintained by various language model components. struct LanguageModelState { LanguageModelState() : viterbi_state_entries_prunable_length(0), viterbi_state_entries_prunable_max_cost(MAX_FLOAT32), viterbi_state_entries_length(0) {} ~LanguageModelState() {} // Clears the viterbi search state back to its initial conditions. void Clear(); void Print(const char *msg); // Storage for the Viterbi state. ViterbiStateEntry_LIST viterbi_state_entries; // Number and max cost of prunable paths in viterbi_state_entries. int viterbi_state_entries_prunable_length; float viterbi_state_entries_prunable_max_cost; // Total number of entries in viterbi_state_entries. int viterbi_state_entries_length; }; // Bundle together all the things pertaining to the best choice/state. struct BestChoiceBundle { explicit BestChoiceBundle(int matrix_dimension) : updated(false), best_vse(NULL) { beam.reserve(matrix_dimension); for (int i = 0; i < matrix_dimension; ++i) beam.push_back(new LanguageModelState); } ~BestChoiceBundle() {} // Flag to indicate whether anything was changed. bool updated; // Places to try to fix the word suggested by ambiguity checking. DANGERR fixpt; // The beam. One LanguageModelState containing a list of ViterbiStateEntry per // row in the ratings matrix containing all VSEs whose BLOB_CHOICE is // somewhere in the corresponding row. PointerVector<LanguageModelState> beam; // Best ViterbiStateEntry and BLOB_CHOICE. ViterbiStateEntry *best_vse; }; } // namespace tesseract #endif // TESSERACT_WORDREC_LANGUAGE_MODEL_DEFS_H_
C++
/////////////////////////////////////////////////////////////////////// // File: pain_points.cpp // Description: Functions that utilize the knowledge about the properties // of the paths explored by the segmentation search in order // to "pain points" - the locations in the ratings matrix // which should be classified next. // Author: Rika Antonova // Created: Mon Jun 20 11:26:43 PST 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "lm_pain_points.h" #include "associate.h" #include "dict.h" #include "genericheap.h" #include "lm_state.h" #include "matrix.h" #include "pageres.h" namespace tesseract { const float LMPainPoints::kDefaultPainPointPriorityAdjustment = 2.0f; const float LMPainPoints::kLooseMaxCharWhRatio = 2.5f; LMPainPointsType LMPainPoints::Deque(MATRIX_COORD *pp, float *priority) { for (int h = 0; h < LM_PPTYPE_NUM; ++h) { if (pain_points_heaps_[h].empty()) continue; *priority = pain_points_heaps_[h].PeekTop().key; *pp = pain_points_heaps_[h].PeekTop().data; pain_points_heaps_[h].Pop(NULL); return static_cast<LMPainPointsType>(h); } return LM_PPTYPE_NUM; } void LMPainPoints::GenerateInitial(WERD_RES *word_res) { MATRIX *ratings = word_res->ratings; AssociateStats associate_stats; for (int col = 0; col < ratings->dimension(); ++col) { int row_end = MIN(ratings->dimension(), col + ratings->bandwidth() + 1); for (int row = col + 1; row < row_end; ++row) { MATRIX_COORD coord(col, row); if (coord.Valid(*ratings) && ratings->get(col, row) != NOT_CLASSIFIED) continue; // Add an initial pain point if needed. if (ratings->Classified(col, row - 1, dict_->WildcardID()) || (col + 1 < ratings->dimension() && ratings->Classified(col + 1, row, dict_->WildcardID()))) { GeneratePainPoint(col, row, LM_PPTYPE_SHAPE, 0.0, true, max_char_wh_ratio_, word_res); } } } } void LMPainPoints::GenerateFromPath(float rating_cert_scale, ViterbiStateEntry *vse, WERD_RES *word_res) { ViterbiStateEntry *curr_vse = vse; BLOB_CHOICE *curr_b = vse->curr_b; // The following pain point generation and priority calculation approaches // prioritize exploring paths with low average rating of the known part of // the path, while not relying on the ratings of the pieces to be combined. // // A pain point to combine the neighbors is generated for each pair of // neighboring blobs on the path (the path is represented by vse argument // given to GenerateFromPath()). The priority of each pain point is set to // the average rating (per outline length) of the path, not including the // ratings of the blobs to be combined. // The ratings of the blobs to be combined are not used to calculate the // priority, since it is not possible to determine from their magnitude // whether it will be beneficial to combine the blobs. The reason is that // chopped junk blobs (/ | - ') can have very good (low) ratings, however // combining them will be beneficial. Blobs with high ratings might be // over-joined pieces of characters, but also could be blobs from an unseen // font or chopped pieces of complex characters. while (curr_vse->parent_vse != NULL) { ViterbiStateEntry* parent_vse = curr_vse->parent_vse; const MATRIX_COORD& curr_cell = curr_b->matrix_cell(); const MATRIX_COORD& parent_cell = parent_vse->curr_b->matrix_cell(); MATRIX_COORD pain_coord(parent_cell.col, curr_cell.row); if (!pain_coord.Valid(*word_res->ratings) || !word_res->ratings->Classified(parent_cell.col, curr_cell.row, dict_->WildcardID())) { // rat_subtr contains ratings sum of the two adjacent blobs to be merged. // rat_subtr will be subtracted from the ratings sum of the path, since // the blobs will be joined into a new blob, whose rating is yet unknown. float rat_subtr = curr_b->rating() + parent_vse->curr_b->rating(); // ol_subtr contains the outline length of the blobs that will be joined. float ol_subtr = AssociateUtils::ComputeOutlineLength(rating_cert_scale, *curr_b) + AssociateUtils::ComputeOutlineLength(rating_cert_scale, *(parent_vse->curr_b)); // ol_dif is the outline of the path without the two blobs to be joined. float ol_dif = vse->outline_length - ol_subtr; // priority is set to the average rating of the path per unit of outline, // not counting the ratings of the pieces to be joined. float priority = ol_dif > 0 ? (vse->ratings_sum-rat_subtr)/ol_dif : 0.0; GeneratePainPoint(pain_coord.col, pain_coord.row, LM_PPTYPE_PATH, priority, true, max_char_wh_ratio_, word_res); } else if (debug_level_ > 3) { tprintf("NO pain point (Classified) for col=%d row=%d type=%s\n", pain_coord.col, pain_coord.row, LMPainPointsTypeName[LM_PPTYPE_PATH]); BLOB_CHOICE_IT b_it(word_res->ratings->get(pain_coord.col, pain_coord.row)); for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) { BLOB_CHOICE* choice = b_it.data(); choice->print_full(); } } curr_vse = parent_vse; curr_b = curr_vse->curr_b; } } void LMPainPoints::GenerateFromAmbigs(const DANGERR &fixpt, ViterbiStateEntry *vse, WERD_RES *word_res) { // Begins and ends in DANGERR vector now record the blob indices as used // by the ratings matrix. for (int d = 0; d < fixpt.size(); ++d) { const DANGERR_INFO &danger = fixpt[d]; // Only use dangerous ambiguities. if (danger.dangerous) { GeneratePainPoint(danger.begin, danger.end - 1, LM_PPTYPE_AMBIG, vse->cost, true, kLooseMaxCharWhRatio, word_res); } } } bool LMPainPoints::GeneratePainPoint( int col, int row, LMPainPointsType pp_type, float special_priority, bool ok_to_extend, float max_char_wh_ratio, WERD_RES *word_res) { MATRIX_COORD coord(col, row); if (coord.Valid(*word_res->ratings) && word_res->ratings->Classified(col, row, dict_->WildcardID())) { return false; } if (debug_level_ > 3) { tprintf("Generating pain point for col=%d row=%d type=%s\n", col, row, LMPainPointsTypeName[pp_type]); } // Compute associate stats. AssociateStats associate_stats; AssociateUtils::ComputeStats(col, row, NULL, 0, fixed_pitch_, max_char_wh_ratio, word_res, debug_level_, &associate_stats); // For fixed-pitch fonts/languages: if the current combined blob overlaps // the next blob on the right and it is ok to extend the blob, try extending // the blob until there is no overlap with the next blob on the right or // until the width-to-height ratio becomes too large. if (ok_to_extend) { while (associate_stats.bad_fixed_pitch_right_gap && row + 1 < word_res->ratings->dimension() && !associate_stats.bad_fixed_pitch_wh_ratio) { AssociateUtils::ComputeStats(col, ++row, NULL, 0, fixed_pitch_, max_char_wh_ratio, word_res, debug_level_, &associate_stats); } } if (associate_stats.bad_shape) { if (debug_level_ > 3) { tprintf("Discarded pain point with a bad shape\n"); } return false; } // Insert the new pain point into pain_points_heap_. if (pain_points_heaps_[pp_type].size() < max_heap_size_) { // Compute pain point priority. float priority; if (pp_type == LM_PPTYPE_PATH) { priority = special_priority; } else { priority = associate_stats.gap_sum; } MatrixCoordPair pain_point(priority, MATRIX_COORD(col, row)); pain_points_heaps_[pp_type].Push(&pain_point); if (debug_level_) { tprintf("Added pain point with priority %g\n", priority); } return true; } else { if (debug_level_) tprintf("Pain points heap is full\n"); return false; } } // Adjusts the pain point coordinates to cope with expansion of the ratings // matrix due to a split of the blob with the given index. void LMPainPoints::RemapForSplit(int index) { for (int i = 0; i < LM_PPTYPE_NUM; ++i) { GenericVector<MatrixCoordPair>* heap = pain_points_heaps_[i].heap(); for (int j = 0; j < heap->size(); ++j) (*heap)[j].data.MapForSplit(index); } } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: wordrec.h // Description: wordrec class. // Author: Samuel Charron // // (C) Copyright 2006, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_WORDREC_WORDREC_H__ #define TESSERACT_WORDREC_WORDREC_H__ #include "associate.h" #include "classify.h" #include "dict.h" #include "language_model.h" #include "ratngs.h" #include "matrix.h" #include "gradechop.h" #include "seam.h" #include "findseam.h" #include "callcpp.h" class WERD_RES; namespace tesseract { // A class for storing which nodes are to be processed by the segmentation // search. There is a single SegSearchPending for each column in the ratings // matrix, and it indicates whether the segsearch should combine all // BLOB_CHOICES in the column, or just the given row with the parents // corresponding to *this SegSearchPending, and whether only updated parent // ViterbiStateEntries should be combined, or all, with the BLOB_CHOICEs. class SegSearchPending { public: SegSearchPending() : classified_row_(-1), revisit_whole_column_(false), column_classified_(false) {} // Marks the whole column as just classified. Used to start a search on // a newly initialized ratings matrix. void SetColumnClassified() { column_classified_ = true; } // Marks the matrix entry at the given row as just classified. // Used after classifying a new matrix cell. // Additional to, not overriding a previous RevisitWholeColumn. void SetBlobClassified(int row) { classified_row_ = row; } // Marks the whole column as needing work, but not just classified. // Used when the parent vse list is updated. // Additional to, not overriding a previous SetBlobClassified. void RevisitWholeColumn() { revisit_whole_column_ = true; } // Clears *this to indicate no work to do. void Clear() { classified_row_ = -1; revisit_whole_column_ = false; column_classified_ = false; } // Returns true if there are updates to do in the column that *this // represents. bool WorkToDo() const { return revisit_whole_column_ || column_classified_ || classified_row_ >= 0; } // Returns true if the given row was just classified. bool IsRowJustClassified(int row) const { return row == classified_row_ || column_classified_; } // Returns the single row to process if there is only one, otherwise -1. int SingleRow() const { return revisit_whole_column_ || column_classified_ ? -1 : classified_row_; } private: // If non-negative, indicates the single row in the ratings matrix that has // just been classified, and so should be combined with all the parents in the // column that this SegSearchPending represents. // Operates independently of revisit_whole_column. int classified_row_; // If revisit_whole_column is true, then all BLOB_CHOICEs in this column will // be processed, but classified_row can indicate a row that is newly // classified. Overridden if column_classified is true. bool revisit_whole_column_; // If column_classified is true, parent vses are processed with all rows // regardless of whether they are just updated, overriding // revisit_whole_column and classified_row. bool column_classified_; }; /* ccmain/tstruct.cpp *********************************************************/ class FRAGMENT:public ELIST_LINK { public: FRAGMENT() { //constructor } FRAGMENT(EDGEPT *head_pt, //start EDGEPT *tail_pt); //end ICOORD head; //coords of start ICOORD tail; //coords of end EDGEPT *headpt; //start point EDGEPT *tailpt; //end point }; ELISTIZEH(FRAGMENT) class Wordrec : public Classify { public: // config parameters ******************************************************* BOOL_VAR_H(merge_fragments_in_matrix, TRUE, "Merge the fragments in the ratings matrix and delete them " "after merging"); BOOL_VAR_H(wordrec_no_block, FALSE, "Don't output block information"); BOOL_VAR_H(wordrec_enable_assoc, TRUE, "Associator Enable"); BOOL_VAR_H(force_word_assoc, FALSE, "force associator to run regardless of what enable_assoc is." "This is used for CJK where component grouping is necessary."); double_VAR_H(wordrec_worst_state, 1, "Worst segmentation state"); BOOL_VAR_H(fragments_guide_chopper, FALSE, "Use information from fragments to guide chopping process"); INT_VAR_H(repair_unchopped_blobs, 1, "Fix blobs that aren't chopped"); double_VAR_H(tessedit_certainty_threshold, -2.25, "Good blob limit"); INT_VAR_H(chop_debug, 0, "Chop debug"); BOOL_VAR_H(chop_enable, 1, "Chop enable"); BOOL_VAR_H(chop_vertical_creep, 0, "Vertical creep"); INT_VAR_H(chop_split_length, 10000, "Split Length"); INT_VAR_H(chop_same_distance, 2, "Same distance"); INT_VAR_H(chop_min_outline_points, 6, "Min Number of Points on Outline"); INT_VAR_H(chop_seam_pile_size, 150, "Max number of seams in seam_pile"); BOOL_VAR_H(chop_new_seam_pile, 1, "Use new seam_pile"); INT_VAR_H(chop_inside_angle, -50, "Min Inside Angle Bend"); INT_VAR_H(chop_min_outline_area, 2000, "Min Outline Area"); double_VAR_H(chop_split_dist_knob, 0.5, "Split length adjustment"); double_VAR_H(chop_overlap_knob, 0.9, "Split overlap adjustment"); double_VAR_H(chop_center_knob, 0.15, "Split center adjustment"); INT_VAR_H(chop_centered_maxwidth, 90, "Width of (smaller) chopped blobs " "above which we don't care that a chop is not near the center."); double_VAR_H(chop_sharpness_knob, 0.06, "Split sharpness adjustment"); double_VAR_H(chop_width_change_knob, 5.0, "Width change adjustment"); double_VAR_H(chop_ok_split, 100.0, "OK split limit"); double_VAR_H(chop_good_split, 50.0, "Good split limit"); INT_VAR_H(chop_x_y_weight, 3, "X / Y length weight"); INT_VAR_H(segment_adjust_debug, 0, "Segmentation adjustment debug"); BOOL_VAR_H(assume_fixed_pitch_char_segment, FALSE, "include fixed-pitch heuristics in char segmentation"); INT_VAR_H(wordrec_debug_level, 0, "Debug level for wordrec"); INT_VAR_H(wordrec_max_join_chunks, 4, "Max number of broken pieces to associate"); BOOL_VAR_H(wordrec_skip_no_truth_words, false, "Only run OCR for words that had truth recorded in BlamerBundle"); BOOL_VAR_H(wordrec_debug_blamer, false, "Print blamer debug messages"); BOOL_VAR_H(wordrec_run_blamer, false, "Try to set the blame for errors"); INT_VAR_H(segsearch_debug_level, 0, "SegSearch debug level"); INT_VAR_H(segsearch_max_pain_points, 2000, "Maximum number of pain points stored in the queue"); INT_VAR_H(segsearch_max_futile_classifications, 10, "Maximum number of pain point classifications per word."); double_VAR_H(segsearch_max_char_wh_ratio, 2.0, "Maximum character width-to-height ratio"); BOOL_VAR_H(save_alt_choices, true, "Save alternative paths found during chopping " "and segmentation search"); // methods from wordrec/*.cpp *********************************************** Wordrec(); virtual ~Wordrec(); // Fills word->alt_choices with alternative paths found during // chopping/segmentation search that are kept in best_choices. void SaveAltChoices(const LIST &best_choices, WERD_RES *word); // Fills character choice lattice in the given BlamerBundle // using the given ratings matrix and best choice list. void FillLattice(const MATRIX &ratings, const WERD_CHOICE_LIST &best_choices, const UNICHARSET &unicharset, BlamerBundle *blamer_bundle); // Calls fill_lattice_ member function // (assumes that fill_lattice_ is not NULL). void CallFillLattice(const MATRIX &ratings, const WERD_CHOICE_LIST &best_choices, const UNICHARSET &unicharset, BlamerBundle *blamer_bundle) { (this->*fill_lattice_)(ratings, best_choices, unicharset, blamer_bundle); } // tface.cpp void program_editup(const char *textbase, bool init_classifier, bool init_permute); void cc_recog(WERD_RES *word); void program_editdown(inT32 elasped_time); void set_pass1(); void set_pass2(); int end_recog(); BLOB_CHOICE_LIST *call_matcher(TBLOB* blob); int dict_word(const WERD_CHOICE &word); // wordclass.cpp BLOB_CHOICE_LIST *classify_blob(TBLOB *blob, const char *string, C_COL color, BlamerBundle *blamer_bundle); // segsearch.cpp // SegSearch works on the lower diagonal matrix of BLOB_CHOICE_LISTs. // Each entry in the matrix represents the classification choice // for a chunk, i.e. an entry in row 2, column 1 represents the list // of ratings for the chunks 1 and 2 classified as a single blob. // The entries on the diagonal of the matrix are classifier choice lists // for a single chunk from the maximal segmentation. // // The ratings matrix given to SegSearch represents the segmentation // graph / trellis for the current word. The nodes in the graph are the // individual BLOB_CHOICEs in each of the BLOB_CHOICE_LISTs in the ratings // matrix. The children of each node (nodes connected by outgoing links) // are the entries in the column that is equal to node's row+1. The parents // (nodes connected by the incoming links) are the entries in the row that // is equal to the node's column-1. Here is an example ratings matrix: // // 0 1 2 3 4 // ------------------------- // 0| c,( | // 1| d l,1 | // 2| o | // 3| c,( | // 4| g,y l,1 | // ------------------------- // // In the example above node "o" has children (outgoing connection to nodes) // "c","(","g","y" and parents (incoming connections from nodes) "l","1","d". // // The objective of the search is to find the least cost path, where the cost // is determined by the language model components and the properties of the // cut between the blobs on the path. SegSearch starts by populating the // matrix with the all the entries that were classified by the chopper and // finding the initial best path. Based on the classifier ratings, language // model scores and the properties of each cut, a list of "pain points" is // constructed - those are the points on the path where the choices do not // look consistent with the neighboring choices, the cuts look particularly // problematic, or the certainties of the blobs are low. The most troublesome // "pain point" is picked from the list and the new entry in the ratings // matrix corresponding to this "pain point" is filled in. Then the language // model state is updated to reflect the new classification and the new // "pain points" are added to the list and the next most troublesome // "pain point" is determined. This continues until either the word choice // composed from the best paths in the segmentation graph is "good enough" // (e.g. above a certain certainty threshold, is an unambiguous dictionary // word, etc) or there are no more "pain points" to explore. // // If associate_blobs is set to false no new classifications will be done // to combine blobs. Segmentation search will run only one "iteration" // on the classifications already recorded in chunks_record.ratings. // // Note: this function assumes that word_res, best_choice_bundle arguments // are not NULL. void SegSearch(WERD_RES* word_res, BestChoiceBundle* best_choice_bundle, BlamerBundle* blamer_bundle); // Setup and run just the initial segsearch on an established matrix, // without doing any additional chopping or joining. void WordSearch(WERD_RES* word_res); // Setup and run just the initial segsearch on an established matrix, // without doing any additional chopping or joining. // (Internal factored version that can be used as part of the main SegSearch.) void InitialSegSearch(WERD_RES* word_res, LMPainPoints* pain_points, GenericVector<SegSearchPending>* pending, BestChoiceBundle* best_choice_bundle, BlamerBundle* blamer_bundle); // Runs SegSearch() function (above) without needing a best_choice_bundle // or blamer_bundle. Used for testing. void DoSegSearch(WERD_RES* word_res); // chop.cpp PRIORITY point_priority(EDGEPT *point); void add_point_to_list(PointHeap* point_heap, EDGEPT *point); int angle_change(EDGEPT *point1, EDGEPT *point2, EDGEPT *point3); int is_little_chunk(EDGEPT *point1, EDGEPT *point2); int is_small_area(EDGEPT *point1, EDGEPT *point2); EDGEPT *pick_close_point(EDGEPT *critical_point, EDGEPT *vertical_point, int *best_dist); void prioritize_points(TESSLINE *outline, PointHeap* points); void new_min_point(EDGEPT *local_min, PointHeap* points); void new_max_point(EDGEPT *local_max, PointHeap* points); void vertical_projection_point(EDGEPT *split_point, EDGEPT *target_point, EDGEPT** best_point, EDGEPT_CLIST *new_points); // chopper.cpp SEAM *attempt_blob_chop(TWERD *word, TBLOB *blob, inT32 blob_number, bool italic_blob, const GenericVector<SEAM*>& seams); SEAM *chop_numbered_blob(TWERD *word, inT32 blob_number, bool italic_blob, const GenericVector<SEAM*>& seams); SEAM *chop_overlapping_blob(const GenericVector<TBOX>& boxes, bool italic_blob, WERD_RES *word_res, int *blob_number); SEAM *improve_one_blob(const GenericVector<BLOB_CHOICE*> &blob_choices, DANGERR *fixpt, bool split_next_to_fragment, bool italic_blob, WERD_RES *word, int *blob_number); SEAM *chop_one_blob(const GenericVector<TBOX> &boxes, const GenericVector<BLOB_CHOICE*> &blob_choices, WERD_RES *word_res, int *blob_number); void chop_word_main(WERD_RES *word); void improve_by_chopping(float rating_cert_scale, WERD_RES *word, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle, LMPainPoints *pain_points, GenericVector<SegSearchPending>* pending); int select_blob_to_split(const GenericVector<BLOB_CHOICE*> &blob_choices, float rating_ceiling, bool split_next_to_fragment); int select_blob_to_split_from_fixpt(DANGERR *fixpt); // findseam.cpp void add_seam_to_queue(float new_priority, SEAM *new_seam, SeamQueue* seams); void choose_best_seam(SeamQueue* seam_queue, SPLIT *split, PRIORITY priority, SEAM **seam_result, TBLOB *blob, SeamPile* seam_pile); void combine_seam(const SeamPile& seam_pile, const SEAM* seam, SeamQueue* seam_queue); inT16 constrained_split(SPLIT *split, TBLOB *blob); SEAM *pick_good_seam(TBLOB *blob); PRIORITY seam_priority(SEAM *seam, inT16 xmin, inT16 xmax); void try_point_pairs (EDGEPT * points[MAX_NUM_POINTS], inT16 num_points, SeamQueue* seam_queue, SeamPile* seam_pile, SEAM ** seam, TBLOB * blob); void try_vertical_splits(EDGEPT * points[MAX_NUM_POINTS], inT16 num_points, EDGEPT_CLIST *new_points, SeamQueue* seam_queue, SeamPile* seam_pile, SEAM ** seam, TBLOB * blob); // gradechop.cpp PRIORITY full_split_priority(SPLIT *split, inT16 xmin, inT16 xmax); PRIORITY grade_center_of_blob(register BOUNDS_RECT rect); PRIORITY grade_overlap(register BOUNDS_RECT rect); PRIORITY grade_split_length(register SPLIT *split); PRIORITY grade_sharpness(register SPLIT *split); PRIORITY grade_width_change(register BOUNDS_RECT rect); void set_outline_bounds(register EDGEPT *point1, register EDGEPT *point2, BOUNDS_RECT rect); // outlines.cpp int crosses_outline(EDGEPT *p0, EDGEPT *p1, EDGEPT *outline); int is_crossed(TPOINT a0, TPOINT a1, TPOINT b0, TPOINT b1); int is_same_edgept(EDGEPT *p1, EDGEPT *p2); bool near_point(EDGEPT *point, EDGEPT *line_pt_0, EDGEPT *line_pt_1, EDGEPT **near_pt); void reverse_outline(EDGEPT *outline); // pieces.cpp virtual BLOB_CHOICE_LIST *classify_piece(const GenericVector<SEAM*>& seams, inT16 start, inT16 end, const char* description, TWERD *word, BlamerBundle *blamer_bundle); // Try to merge fragments in the ratings matrix and put the result in // the corresponding row and column void merge_fragments(MATRIX *ratings, inT16 num_blobs); // Recursively go through the ratings matrix to find lists of fragments // to be merged in the function merge_and_put_fragment_lists. // current_frag is the postion of the piece we are looking for. // current_row is the row in the rating matrix we are currently at. // start is the row we started initially, so that we can know where // to append the results to the matrix. num_frag_parts is the total // number of pieces we are looking for and num_blobs is the size of the // ratings matrix. void get_fragment_lists(inT16 current_frag, inT16 current_row, inT16 start, inT16 num_frag_parts, inT16 num_blobs, MATRIX *ratings, BLOB_CHOICE_LIST *choice_lists); // Merge the fragment lists in choice_lists and append it to the // ratings matrix void merge_and_put_fragment_lists(inT16 row, inT16 column, inT16 num_frag_parts, BLOB_CHOICE_LIST *choice_lists, MATRIX *ratings); // Filter the fragment list so that the filtered_choices only contain // fragments that are in the correct position. choices is the list // that we are going to filter. fragment_pos is the position in the // fragment that we are looking for and num_frag_parts is the the // total number of pieces. The result will be appended to // filtered_choices. void fill_filtered_fragment_list(BLOB_CHOICE_LIST *choices, int fragment_pos, int num_frag_parts, BLOB_CHOICE_LIST *filtered_choices); // Member variables. LanguageModel *language_model_; PRIORITY pass2_ok_split; // Stores the best choice for the previous word in the paragraph. // This variable is modified by PAGE_RES_IT when iterating over // words to OCR on the page. WERD_CHOICE *prev_word_best_choice_; // Sums of blame reasons computed by the blamer. GenericVector<int> blame_reasons_; // Function used to fill char choice lattices. void (Wordrec::*fill_lattice_)(const MATRIX &ratings, const WERD_CHOICE_LIST &best_choices, const UNICHARSET &unicharset, BlamerBundle *blamer_bundle); protected: inline bool SegSearchDone(int num_futile_classifications) { return (language_model_->AcceptableChoiceFound() || num_futile_classifications >= segsearch_max_futile_classifications); } // Updates the language model state recorded for the child entries specified // in pending[starting_col]. Enqueues the children of the updated entries // into pending and proceeds to update (and remove from pending) all the // remaining entries in pending[col] (col >= starting_col). Upon termination // of this function all the pending[col] lists will be empty. // // The arguments: // // starting_col: index of the column in chunks_record->ratings from // which the update should be started // // pending: list of entries listing chunks_record->ratings entries // that should be updated // // pain_points: priority heap listing the pain points generated by // the language model // // temp_pain_points: temporary storage for tentative pain points generated // by the language model after a single call to LanguageModel::UpdateState() // (the argument is passed in rather than created before each // LanguageModel::UpdateState() call to avoid dynamic memory re-allocation) // // best_choice_bundle: a collection of variables that should be updated // if a new best choice is found // void UpdateSegSearchNodes( float rating_cert_scale, int starting_col, GenericVector<SegSearchPending>* pending, WERD_RES *word_res, LMPainPoints *pain_points, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle); // Process the given pain point: classify the corresponding blob, enqueue // new pain points to join the newly classified blob with its neighbors. void ProcessSegSearchPainPoint(float pain_point_priority, const MATRIX_COORD &pain_point, const char* pain_point_type, GenericVector<SegSearchPending>* pending, WERD_RES *word_res, LMPainPoints *pain_points, BlamerBundle *blamer_bundle); // Resets enough of the results so that the Viterbi search is re-run. // Needed when the n-gram model is enabled, as the multi-length comparison // implementation will re-value existing paths to worse values. void ResetNGramSearch(WERD_RES* word_res, BestChoiceBundle* best_choice_bundle, GenericVector<SegSearchPending>* pending); // Add pain points for classifying blobs on the correct segmentation path // (so that we can evaluate correct segmentation path and discover the reason // for incorrect result). void InitBlamerForSegSearch(WERD_RES *word_res, LMPainPoints *pain_points, BlamerBundle *blamer_bundle, STRING *blamer_debug); }; } // namespace tesseract #endif // TESSERACT_WORDREC_WORDREC_H__
C++
/////////////////////////////////////////////////////////////////////// // File: associate.cpp // Description: Functions for scoring segmentation paths according to // their character widths, gap widths and seam cuts. // Author: Daria Antonova // Created: Mon Mar 8 11:26:43 PDT 2010 // // (C) Copyright 2010, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include <stdio.h> #ifdef __UNIX__ #include <assert.h> #endif #include <math.h> #include "associate.h" #include "normalis.h" #include "pageres.h" namespace tesseract { const float AssociateUtils::kMaxFixedPitchCharAspectRatio = 2.0f; const float AssociateUtils::kMinGap = 0.03f; void AssociateUtils::ComputeStats(int col, int row, const AssociateStats *parent_stats, int parent_path_length, bool fixed_pitch, float max_char_wh_ratio, WERD_RES *word_res, bool debug, AssociateStats *stats) { stats->Clear(); ASSERT_HOST(word_res != NULL); if (word_res->blob_widths.empty()) { return; } if (debug) { tprintf("AssociateUtils::ComputeStats() for col=%d, row=%d%s\n", col, row, fixed_pitch ? " (fixed pitch)" : ""); } float normalizing_height = kBlnXHeight; ROW* blob_row = word_res->blob_row; // TODO(rays/daria) Can unicharset.script_has_xheight be useful here? if (fixed_pitch && blob_row != NULL) { // For fixed pitch language like CJK, we use the full text height // as the normalizing factor so we are not dependent on xheight // calculation. if (blob_row->body_size() > 0.0f) { normalizing_height = word_res->denorm.y_scale() * blob_row->body_size(); } else { normalizing_height = word_res->denorm.y_scale() * (blob_row->x_height() + blob_row->ascenders()); } if (debug) { tprintf("normalizing height = %g (scale %g xheight %g ascenders %g)\n", normalizing_height, word_res->denorm.y_scale(), blob_row->x_height(), blob_row->ascenders()); } } float wh_ratio = word_res->GetBlobsWidth(col, row) / normalizing_height; if (wh_ratio > max_char_wh_ratio) stats->bad_shape = true; // Compute the gap sum for this shape. If there are only negative or only // positive gaps, record their sum in stats->gap_sum. However, if there is // a mixture, record only the sum of the positive gaps. // TODO(antonova): explain fragment. int negative_gap_sum = 0; for (int c = col; c < row; ++c) { int gap = word_res->GetBlobsGap(c); (gap > 0) ? stats->gap_sum += gap : negative_gap_sum += gap; } if (stats->gap_sum == 0) stats->gap_sum = negative_gap_sum; if (debug) { tprintf("wh_ratio=%g (max_char_wh_ratio=%g) gap_sum=%d %s\n", wh_ratio, max_char_wh_ratio, stats->gap_sum, stats->bad_shape ? "bad_shape" : ""); } // Compute shape_cost (for fixed pitch mode). if (fixed_pitch) { bool end_row = (row == (word_res->ratings->dimension() - 1)); // Ensure that the blob has gaps on the left and the right sides // (except for beginning and ending punctuation) and that there is // no cutting through ink at the blob boundaries. if (col > 0) { float left_gap = word_res->GetBlobsGap(col - 1) / normalizing_height; SEAM *left_seam = word_res->seam_array[col - 1]; if ((!end_row && left_gap < kMinGap) || left_seam->priority > 0.0f) { stats->bad_shape = true; } if (debug) { tprintf("left_gap %g, left_seam %g %s\n", left_gap, left_seam->priority, stats->bad_shape ? "bad_shape" : ""); } } float right_gap = 0.0f; if (!end_row) { right_gap = word_res->GetBlobsGap(row) / normalizing_height; SEAM *right_seam = word_res->seam_array[row]; if (right_gap < kMinGap || right_seam->priority > 0.0f) { stats->bad_shape = true; if (right_gap < kMinGap) stats->bad_fixed_pitch_right_gap = true; } if (debug) { tprintf("right_gap %g right_seam %g %s\n", right_gap, right_seam->priority, stats->bad_shape ? "bad_shape" : ""); } } // Impose additional segmentation penalties if blob widths or gaps // distribution don't fit a fixed-pitch model. // Since we only know the widths and gaps of the path explored so far, // the means and variances are computed for the path so far (not // considering characters to the right of the last character on the path). stats->full_wh_ratio = wh_ratio + right_gap; if (parent_stats != NULL) { stats->full_wh_ratio_total = (parent_stats->full_wh_ratio_total + stats->full_wh_ratio); float mean = stats->full_wh_ratio_total / static_cast<float>(parent_path_length+1); stats->full_wh_ratio_var = parent_stats->full_wh_ratio_var + pow(mean-stats->full_wh_ratio, 2); } else { stats->full_wh_ratio_total = stats->full_wh_ratio; } if (debug) { tprintf("full_wh_ratio %g full_wh_ratio_total %g full_wh_ratio_var %g\n", stats->full_wh_ratio, stats->full_wh_ratio_total, stats->full_wh_ratio_var); } stats->shape_cost = FixedPitchWidthCost(wh_ratio, right_gap, end_row, max_char_wh_ratio); // For some reason Tesseract prefers to treat the whole CJ words // as one blob when the initial segmentation is particularly bad. // This hack is to avoid favoring such states. if (col == 0 && end_row && wh_ratio > max_char_wh_ratio) { stats->shape_cost += 10; } stats->shape_cost += stats->full_wh_ratio_var; if (debug) tprintf("shape_cost %g\n", stats->shape_cost); } } float AssociateUtils::FixedPitchWidthCost(float norm_width, float right_gap, bool end_pos, float max_char_wh_ratio) { float cost = 0.0f; if (norm_width > max_char_wh_ratio) cost += norm_width; if (norm_width > kMaxFixedPitchCharAspectRatio) cost += norm_width * norm_width; // extra penalty for merging CJK chars // Penalize skinny blobs, except for punctuation in the last position. if (norm_width+right_gap < 0.5f && !end_pos) { cost += 1.0f - (norm_width + right_gap); } return cost; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: segsearch.h // Description: Segmentation search functions. // Author: Daria Antonova // Created: Mon Jun 23 11:26:43 PDT 2008 // // (C) Copyright 2009, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "wordrec.h" #include "associate.h" #include "language_model.h" #include "matrix.h" #include "params.h" #include "lm_pain_points.h" #include "ratngs.h" namespace tesseract { void Wordrec::DoSegSearch(WERD_RES* word_res) { BestChoiceBundle best_choice_bundle(word_res->ratings->dimension()); // Run Segmentation Search. SegSearch(word_res, &best_choice_bundle, NULL); } void Wordrec::SegSearch(WERD_RES* word_res, BestChoiceBundle* best_choice_bundle, BlamerBundle* blamer_bundle) { LMPainPoints pain_points(segsearch_max_pain_points, segsearch_max_char_wh_ratio, assume_fixed_pitch_char_segment, &getDict(), segsearch_debug_level); // Compute scaling factor that will help us recover blob outline length // from classifier rating and certainty for the blob. float rating_cert_scale = -1.0 * getDict().certainty_scale / rating_scale; GenericVector<SegSearchPending> pending; InitialSegSearch(word_res, &pain_points, &pending, best_choice_bundle, blamer_bundle); if (!SegSearchDone(0)) { // find a better choice if (chop_enable && word_res->chopped_word != NULL) { improve_by_chopping(rating_cert_scale, word_res, best_choice_bundle, blamer_bundle, &pain_points, &pending); } if (chop_debug) print_seams("Final seam list:", word_res->seam_array); if (blamer_bundle != NULL && !blamer_bundle->ChoiceIsCorrect(word_res->best_choice)) { blamer_bundle->SetChopperBlame(word_res, wordrec_debug_blamer); } } // Keep trying to find a better path by fixing the "pain points". MATRIX_COORD pain_point; float pain_point_priority; int num_futile_classifications = 0; STRING blamer_debug; while (wordrec_enable_assoc && (!SegSearchDone(num_futile_classifications) || (blamer_bundle != NULL && blamer_bundle->GuidedSegsearchStillGoing()))) { // Get the next valid "pain point". bool found_nothing = true; LMPainPointsType pp_type; while ((pp_type = pain_points.Deque(&pain_point, &pain_point_priority)) != LM_PPTYPE_NUM) { if (!pain_point.Valid(*word_res->ratings)) { word_res->ratings->IncreaseBandSize( pain_point.row - pain_point.col + 1); } if (pain_point.Valid(*word_res->ratings) && !word_res->ratings->Classified(pain_point.col, pain_point.row, getDict().WildcardID())) { found_nothing = false; break; } } if (found_nothing) { if (segsearch_debug_level > 0) tprintf("Pain points queue is empty\n"); break; } ProcessSegSearchPainPoint(pain_point_priority, pain_point, LMPainPoints::PainPointDescription(pp_type), &pending, word_res, &pain_points, blamer_bundle); UpdateSegSearchNodes(rating_cert_scale, pain_point.col, &pending, word_res, &pain_points, best_choice_bundle, blamer_bundle); if (!best_choice_bundle->updated) ++num_futile_classifications; if (segsearch_debug_level > 0) { tprintf("num_futile_classifications %d\n", num_futile_classifications); } best_choice_bundle->updated = false; // reset updated // See if it's time to terminate SegSearch or time for starting a guided // search for the true path to find the blame for the incorrect best_choice. if (SegSearchDone(num_futile_classifications) && blamer_bundle != NULL && blamer_bundle->GuidedSegsearchNeeded(word_res->best_choice)) { InitBlamerForSegSearch(word_res, &pain_points, blamer_bundle, &blamer_debug); } } // end while loop exploring alternative paths if (blamer_bundle != NULL) { blamer_bundle->FinishSegSearch(word_res->best_choice, wordrec_debug_blamer, &blamer_debug); } if (segsearch_debug_level > 0) { tprintf("Done with SegSearch (AcceptableChoiceFound: %d)\n", language_model_->AcceptableChoiceFound()); } } // Setup and run just the initial segsearch on an established matrix, // without doing any additional chopping or joining. void Wordrec::WordSearch(WERD_RES* word_res) { LMPainPoints pain_points(segsearch_max_pain_points, segsearch_max_char_wh_ratio, assume_fixed_pitch_char_segment, &getDict(), segsearch_debug_level); GenericVector<SegSearchPending> pending; BestChoiceBundle best_choice_bundle(word_res->ratings->dimension()); // Run Segmentation Search. InitialSegSearch(word_res, &pain_points, &pending, &best_choice_bundle, NULL); if (segsearch_debug_level > 0) { tprintf("Ending ratings matrix%s:\n", wordrec_enable_assoc ? " (with assoc)" : ""); word_res->ratings->print(getDict().getUnicharset()); } } // Setup and run just the initial segsearch on an established matrix, // without doing any additional chopping or joining. // (Internal factored version that can be used as part of the main SegSearch.) void Wordrec::InitialSegSearch(WERD_RES* word_res, LMPainPoints* pain_points, GenericVector<SegSearchPending>* pending, BestChoiceBundle* best_choice_bundle, BlamerBundle* blamer_bundle) { if (segsearch_debug_level > 0) { tprintf("Starting SegSearch on ratings matrix%s:\n", wordrec_enable_assoc ? " (with assoc)" : ""); word_res->ratings->print(getDict().getUnicharset()); } pain_points->GenerateInitial(word_res); // Compute scaling factor that will help us recover blob outline length // from classifier rating and certainty for the blob. float rating_cert_scale = -1.0 * getDict().certainty_scale / rating_scale; language_model_->InitForWord(prev_word_best_choice_, assume_fixed_pitch_char_segment, segsearch_max_char_wh_ratio, rating_cert_scale); // Initialize blamer-related information: map character boxes recorded in // blamer_bundle->norm_truth_word to the corresponding i,j indices in the // ratings matrix. We expect this step to succeed, since when running the // chopper we checked that the correct chops are present. if (blamer_bundle != NULL) { blamer_bundle->SetupCorrectSegmentation(word_res->chopped_word, wordrec_debug_blamer); } // pending[col] tells whether there is update work to do to combine // best_choice_bundle->beam[col - 1] with some BLOB_CHOICEs in matrix[col, *]. // As the language model state is updated, pending entries are modified to // minimize duplication of work. It is important that during the update the // children are considered in the non-decreasing order of their column, since // this guarantees that all the parents would be up to date before an update // of a child is done. pending->init_to_size(word_res->ratings->dimension(), SegSearchPending()); // Search the ratings matrix for the initial best path. (*pending)[0].SetColumnClassified(); UpdateSegSearchNodes(rating_cert_scale, 0, pending, word_res, pain_points, best_choice_bundle, blamer_bundle); } void Wordrec::UpdateSegSearchNodes( float rating_cert_scale, int starting_col, GenericVector<SegSearchPending>* pending, WERD_RES *word_res, LMPainPoints *pain_points, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle) { MATRIX *ratings = word_res->ratings; ASSERT_HOST(ratings->dimension() == pending->size()); ASSERT_HOST(ratings->dimension() == best_choice_bundle->beam.size()); for (int col = starting_col; col < ratings->dimension(); ++col) { if (!(*pending)[col].WorkToDo()) continue; int first_row = col; int last_row = MIN(ratings->dimension() - 1, col + ratings->bandwidth() - 1); if ((*pending)[col].SingleRow() >= 0) { first_row = last_row = (*pending)[col].SingleRow(); } if (segsearch_debug_level > 0) { tprintf("\n\nUpdateSegSearchNodes: col=%d, rows=[%d,%d], alljust=%d\n", col, first_row, last_row, (*pending)[col].IsRowJustClassified(MAX_INT32)); } // Iterate over the pending list for this column. for (int row = first_row; row <= last_row; ++row) { // Update language model state of this child+parent pair. BLOB_CHOICE_LIST *current_node = ratings->get(col, row); LanguageModelState *parent_node = col == 0 ? NULL : best_choice_bundle->beam[col - 1]; if (current_node != NULL && language_model_->UpdateState((*pending)[col].IsRowJustClassified(row), col, row, current_node, parent_node, pain_points, word_res, best_choice_bundle, blamer_bundle) && row + 1 < ratings->dimension()) { // Since the language model state of this entry changed, process all // the child column. (*pending)[row + 1].RevisitWholeColumn(); if (segsearch_debug_level > 0) { tprintf("Added child col=%d to pending\n", row + 1); } } // end if UpdateState. } // end for row. } // end for col. if (best_choice_bundle->best_vse != NULL) { ASSERT_HOST(word_res->StatesAllValid()); if (best_choice_bundle->best_vse->updated) { pain_points->GenerateFromPath(rating_cert_scale, best_choice_bundle->best_vse, word_res); if (!best_choice_bundle->fixpt.empty()) { pain_points->GenerateFromAmbigs(best_choice_bundle->fixpt, best_choice_bundle->best_vse, word_res); } } } // The segsearch is completed. Reset all updated flags on all VSEs and reset // all pendings. for (int col = 0; col < pending->size(); ++col) { (*pending)[col].Clear(); ViterbiStateEntry_IT vse_it(&best_choice_bundle->beam[col]->viterbi_state_entries); for (vse_it.mark_cycle_pt(); !vse_it.cycled_list(); vse_it.forward()) { vse_it.data()->updated = false; } } } void Wordrec::ProcessSegSearchPainPoint( float pain_point_priority, const MATRIX_COORD &pain_point, const char* pain_point_type, GenericVector<SegSearchPending>* pending, WERD_RES *word_res, LMPainPoints *pain_points, BlamerBundle *blamer_bundle) { if (segsearch_debug_level > 0) { tprintf("Classifying pain point %s priority=%.4f, col=%d, row=%d\n", pain_point_type, pain_point_priority, pain_point.col, pain_point.row); } ASSERT_HOST(pain_points != NULL); MATRIX *ratings = word_res->ratings; // Classify blob [pain_point.col pain_point.row] if (!pain_point.Valid(*ratings)) { ratings->IncreaseBandSize(pain_point.row + 1 - pain_point.col); } ASSERT_HOST(pain_point.Valid(*ratings)); BLOB_CHOICE_LIST *classified = classify_piece(word_res->seam_array, pain_point.col, pain_point.row, pain_point_type, word_res->chopped_word, blamer_bundle); BLOB_CHOICE_LIST *lst = ratings->get(pain_point.col, pain_point.row); if (lst == NULL) { ratings->put(pain_point.col, pain_point.row, classified); } else { // We can not delete old BLOB_CHOICEs, since they might contain // ViterbiStateEntries that are parents of other "active" entries. // Thus if the matrix cell already contains classifications we add // the new ones to the beginning of the list. BLOB_CHOICE_IT it(lst); it.add_list_before(classified); delete classified; // safe to delete, since empty after add_list_before() classified = NULL; } if (segsearch_debug_level > 0) { print_ratings_list("Updated ratings matrix with a new entry:", ratings->get(pain_point.col, pain_point.row), getDict().getUnicharset()); ratings->print(getDict().getUnicharset()); } // Insert initial "pain points" to join the newly classified blob // with its left and right neighbors. if (classified != NULL && !classified->empty()) { if (pain_point.col > 0) { pain_points->GeneratePainPoint( pain_point.col - 1, pain_point.row, LM_PPTYPE_SHAPE, 0.0, true, segsearch_max_char_wh_ratio, word_res); } if (pain_point.row + 1 < ratings->dimension()) { pain_points->GeneratePainPoint( pain_point.col, pain_point.row + 1, LM_PPTYPE_SHAPE, 0.0, true, segsearch_max_char_wh_ratio, word_res); } } (*pending)[pain_point.col].SetBlobClassified(pain_point.row); } // Resets enough of the results so that the Viterbi search is re-run. // Needed when the n-gram model is enabled, as the multi-length comparison // implementation will re-value existing paths to worse values. void Wordrec::ResetNGramSearch(WERD_RES* word_res, BestChoiceBundle* best_choice_bundle, GenericVector<SegSearchPending>* pending) { // TODO(rays) More refactoring required here. // Delete existing viterbi states. for (int col = 0; col < best_choice_bundle->beam.size(); ++col) { best_choice_bundle->beam[col]->Clear(); } // Reset best_choice_bundle. word_res->ClearWordChoices(); best_choice_bundle->best_vse = NULL; // Clear out all existing pendings and add a new one for the first column. (*pending)[0].SetColumnClassified(); for (int i = 1; i < pending->size(); ++i) (*pending)[i].Clear(); } void Wordrec::InitBlamerForSegSearch(WERD_RES *word_res, LMPainPoints *pain_points, BlamerBundle *blamer_bundle, STRING *blamer_debug) { pain_points->Clear(); // Clear pain points heap. TessResultCallback2<bool, int, int>* pp_cb = NewPermanentTessCallback( pain_points, &LMPainPoints::GenerateForBlamer, static_cast<double>(segsearch_max_char_wh_ratio), word_res); blamer_bundle->InitForSegSearch(word_res->best_choice, word_res->ratings, getDict().WildcardID(), wordrec_debug_blamer, blamer_debug, pp_cb); delete pp_cb; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: language_model.cpp // Description: Functions that utilize the knowledge about the properties, // structure and statistics of the language to help recognition. // Author: Daria Antonova // Created: Mon Nov 11 11:26:43 PST 2009 // // (C) Copyright 2009, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include <math.h> #include "language_model.h" #include "dawg.h" #include "freelist.h" #include "intproto.h" #include "helpers.h" #include "lm_state.h" #include "lm_pain_points.h" #include "matrix.h" #include "params.h" #include "params_training_featdef.h" #if defined(_MSC_VER) || defined(ANDROID) double log2(double n) { return log(n) / log(2.0); } #endif // _MSC_VER namespace tesseract { const float LanguageModel::kMaxAvgNgramCost = 25.0f; LanguageModel::LanguageModel(const UnicityTable<FontInfo> *fontinfo_table, Dict *dict) : INT_MEMBER(language_model_debug_level, 0, "Language model debug level", dict->getCCUtil()->params()), BOOL_INIT_MEMBER(language_model_ngram_on, false, "Turn on/off the use of character ngram model", dict->getCCUtil()->params()), INT_MEMBER(language_model_ngram_order, 8, "Maximum order of the character ngram model", dict->getCCUtil()->params()), INT_MEMBER(language_model_viterbi_list_max_num_prunable, 10, "Maximum number of prunable (those for which" " PrunablePath() is true) entries in each viterbi list" " recorded in BLOB_CHOICEs", dict->getCCUtil()->params()), INT_MEMBER(language_model_viterbi_list_max_size, 500, "Maximum size of viterbi lists recorded in BLOB_CHOICEs", dict->getCCUtil()->params()), double_MEMBER(language_model_ngram_small_prob, 0.000001, "To avoid overly small denominators use this as the " "floor of the probability returned by the ngram model.", dict->getCCUtil()->params()), double_MEMBER(language_model_ngram_nonmatch_score, -40.0, "Average classifier score of a non-matching unichar.", dict->getCCUtil()->params()), BOOL_MEMBER(language_model_ngram_use_only_first_uft8_step, false, "Use only the first UTF8 step of the given string" " when computing log probabilities.", dict->getCCUtil()->params()), double_MEMBER(language_model_ngram_scale_factor, 0.03, "Strength of the character ngram model relative to the" " character classifier ", dict->getCCUtil()->params()), double_MEMBER(language_model_ngram_rating_factor, 16.0, "Factor to bring log-probs into the same range as ratings" " when multiplied by outline length ", dict->getCCUtil()->params()), BOOL_MEMBER(language_model_ngram_space_delimited_language, true, "Words are delimited by space", dict->getCCUtil()->params()), INT_MEMBER(language_model_min_compound_length, 3, "Minimum length of compound words", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_non_freq_dict_word, 0.1, "Penalty for words not in the frequent word dictionary", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_non_dict_word, 0.15, "Penalty for non-dictionary words", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_punc, 0.2, "Penalty for inconsistent punctuation", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_case, 0.1, "Penalty for inconsistent case", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_script, 0.5, "Penalty for inconsistent script", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_chartype, 0.3, "Penalty for inconsistent character type", dict->getCCUtil()->params()), // TODO(daria, rays): enable font consistency checking // after improving font analysis. double_MEMBER(language_model_penalty_font, 0.00, "Penalty for inconsistent font", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_spacing, 0.05, "Penalty for inconsistent spacing", dict->getCCUtil()->params()), double_MEMBER(language_model_penalty_increment, 0.01, "Penalty increment", dict->getCCUtil()->params()), INT_MEMBER(wordrec_display_segmentations, 0, "Display Segmentations", dict->getCCUtil()->params()), BOOL_INIT_MEMBER(language_model_use_sigmoidal_certainty, false, "Use sigmoidal score for certainty", dict->getCCUtil()->params()), fontinfo_table_(fontinfo_table), dict_(dict), fixed_pitch_(false), max_char_wh_ratio_(0.0), acceptable_choice_found_(false) { ASSERT_HOST(dict_ != NULL); dawg_args_ = new DawgArgs(NULL, new DawgPositionVector(), NO_PERM); very_beginning_active_dawgs_ = new DawgPositionVector(); beginning_active_dawgs_ = new DawgPositionVector(); } LanguageModel::~LanguageModel() { delete very_beginning_active_dawgs_; delete beginning_active_dawgs_; delete dawg_args_->updated_dawgs; delete dawg_args_; } void LanguageModel::InitForWord(const WERD_CHOICE *prev_word, bool fixed_pitch, float max_char_wh_ratio, float rating_cert_scale) { fixed_pitch_ = fixed_pitch; max_char_wh_ratio_ = max_char_wh_ratio; rating_cert_scale_ = rating_cert_scale; acceptable_choice_found_ = false; correct_segmentation_explored_ = false; // Initialize vectors with beginning DawgInfos. very_beginning_active_dawgs_->clear(); dict_->init_active_dawgs(very_beginning_active_dawgs_, false); beginning_active_dawgs_->clear(); dict_->default_dawgs(beginning_active_dawgs_, false); // Fill prev_word_str_ with the last language_model_ngram_order // unichars from prev_word. if (language_model_ngram_on) { if (prev_word != NULL && prev_word->unichar_string() != NULL) { prev_word_str_ = prev_word->unichar_string(); if (language_model_ngram_space_delimited_language) prev_word_str_ += ' '; } else { prev_word_str_ = " "; } const char *str_ptr = prev_word_str_.string(); const char *str_end = str_ptr + prev_word_str_.length(); int step; prev_word_unichar_step_len_ = 0; while (str_ptr != str_end && (step = UNICHAR::utf8_step(str_ptr))) { str_ptr += step; ++prev_word_unichar_step_len_; } ASSERT_HOST(str_ptr == str_end); } } // Helper scans the collection of predecessors for competing siblings that // have the same letter with the opposite case, setting competing_vse. static void ScanParentsForCaseMix(const UNICHARSET& unicharset, LanguageModelState* parent_node) { if (parent_node == NULL) return; ViterbiStateEntry_IT vit(&parent_node->viterbi_state_entries); for (vit.mark_cycle_pt(); !vit.cycled_list(); vit.forward()) { ViterbiStateEntry* vse = vit.data(); vse->competing_vse = NULL; UNICHAR_ID unichar_id = vse->curr_b->unichar_id(); if (unicharset.get_isupper(unichar_id) || unicharset.get_islower(unichar_id)) { UNICHAR_ID other_case = unicharset.get_other_case(unichar_id); if (other_case == unichar_id) continue; // Not in unicharset. // Find other case in same list. There could be multiple entries with // the same unichar_id, but in theory, they should all point to the // same BLOB_CHOICE, and that is what we will be using to decide // which to keep. ViterbiStateEntry_IT vit2(&parent_node->viterbi_state_entries); for (vit2.mark_cycle_pt(); !vit2.cycled_list() && vit2.data()->curr_b->unichar_id() != other_case; vit2.forward()) {} if (!vit2.cycled_list()) { vse->competing_vse = vit2.data(); } } } } // Helper returns true if the given choice has a better case variant before // it in the choice_list that is not distinguishable by size. static bool HasBetterCaseVariant(const UNICHARSET& unicharset, const BLOB_CHOICE* choice, BLOB_CHOICE_LIST* choices) { UNICHAR_ID choice_id = choice->unichar_id(); UNICHAR_ID other_case = unicharset.get_other_case(choice_id); if (other_case == choice_id || other_case == INVALID_UNICHAR_ID) return false; // Not upper or lower or not in unicharset. if (unicharset.SizesDistinct(choice_id, other_case)) return false; // Can be separated by size. BLOB_CHOICE_IT bc_it(choices); for (bc_it.mark_cycle_pt(); !bc_it.cycled_list(); bc_it.forward()) { BLOB_CHOICE* better_choice = bc_it.data(); if (better_choice->unichar_id() == other_case) return true; // Found an earlier instance of other_case. else if (better_choice == choice) return false; // Reached the original choice. } return false; // Should never happen, but just in case. } // UpdateState has the job of combining the ViterbiStateEntry lists on each // of the choices on parent_list with each of the blob choices in curr_list, // making a new ViterbiStateEntry for each sensible path. // This could be a huge set of combinations, creating a lot of work only to // be truncated by some beam limit, but only certain kinds of paths will // continue at the next step: // paths that are liked by the language model: either a DAWG or the n-gram // model, where active. // paths that represent some kind of top choice. The old permuter permuted // the top raw classifier score, the top upper case word and the top lower- // case word. UpdateState now concentrates its top-choice paths on top // lower-case, top upper-case (or caseless alpha), and top digit sequence, // with allowance for continuation of these paths through blobs where such // a character does not appear in the choices list. // GetNextParentVSE enforces some of these models to minimize the number of // calls to AddViterbiStateEntry, even prior to looking at the language model. // Thus an n-blob sequence of [l1I] will produce 3n calls to // AddViterbiStateEntry instead of 3^n. // Of course it isn't quite that simple as Title Case is handled by allowing // lower case to continue an upper case initial, but it has to be detected // in the combiner so it knows which upper case letters are initial alphas. bool LanguageModel::UpdateState( bool just_classified, int curr_col, int curr_row, BLOB_CHOICE_LIST *curr_list, LanguageModelState *parent_node, LMPainPoints *pain_points, WERD_RES *word_res, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle) { if (language_model_debug_level > 0) { tprintf("\nUpdateState: col=%d row=%d %s", curr_col, curr_row, just_classified ? "just_classified" : ""); if (language_model_debug_level > 5) tprintf("(parent=%p)\n", parent_node); else tprintf("\n"); } // Initialize helper variables. bool word_end = (curr_row+1 >= word_res->ratings->dimension()); bool new_changed = false; float denom = (language_model_ngram_on) ? ComputeDenom(curr_list) : 1.0f; const UNICHARSET& unicharset = dict_->getUnicharset(); BLOB_CHOICE *first_lower = NULL; BLOB_CHOICE *first_upper = NULL; BLOB_CHOICE *first_digit = NULL; bool has_alnum_mix = false; if (parent_node != NULL) { int result = SetTopParentLowerUpperDigit(parent_node); if (result < 0) { if (language_model_debug_level > 0) tprintf("No parents found to process\n"); return false; } if (result > 0) has_alnum_mix = true; } if (!GetTopLowerUpperDigit(curr_list, &first_lower, &first_upper, &first_digit)) has_alnum_mix = false;; ScanParentsForCaseMix(unicharset, parent_node); if (language_model_debug_level > 3 && parent_node != NULL) { parent_node->Print("Parent viterbi list"); } LanguageModelState *curr_state = best_choice_bundle->beam[curr_row]; // Call AddViterbiStateEntry() for each parent+child ViterbiStateEntry. ViterbiStateEntry_IT vit; BLOB_CHOICE_IT c_it(curr_list); for (c_it.mark_cycle_pt(); !c_it.cycled_list(); c_it.forward()) { BLOB_CHOICE* choice = c_it.data(); // TODO(antonova): make sure commenting this out if ok for ngram // model scoring (I think this was introduced to fix ngram model quirks). // Skip NULL unichars unless it is the only choice. //if (!curr_list->singleton() && c_it.data()->unichar_id() == 0) continue; UNICHAR_ID unichar_id = choice->unichar_id(); if (unicharset.get_fragment(unichar_id)) { continue; // Skip fragments. } // Set top choice flags. LanguageModelFlagsType blob_choice_flags = kXhtConsistentFlag; if (c_it.at_first() || !new_changed) blob_choice_flags |= kSmallestRatingFlag; if (first_lower == choice) blob_choice_flags |= kLowerCaseFlag; if (first_upper == choice) blob_choice_flags |= kUpperCaseFlag; if (first_digit == choice) blob_choice_flags |= kDigitFlag; if (parent_node == NULL) { // Process the beginning of a word. // If there is a better case variant that is not distinguished by size, // skip this blob choice, as we have no choice but to accept the result // of the character classifier to distinguish between them, even if // followed by an upper case. // With words like iPoc, and other CamelBackWords, the lower-upper // transition can only be achieved if the classifier has the correct case // as the top choice, and leaving an initial I lower down the list // increases the chances of choosing IPoc simply because it doesn't // include such a transition. iPoc will beat iPOC and ipoc because // the other words are baseline/x-height inconsistent. if (HasBetterCaseVariant(unicharset, choice, curr_list)) continue; // Upper counts as lower at the beginning of a word. if (blob_choice_flags & kUpperCaseFlag) blob_choice_flags |= kLowerCaseFlag; new_changed |= AddViterbiStateEntry( blob_choice_flags, denom, word_end, curr_col, curr_row, choice, curr_state, NULL, pain_points, word_res, best_choice_bundle, blamer_bundle); } else { // Get viterbi entries from each parent ViterbiStateEntry. vit.set_to_list(&parent_node->viterbi_state_entries); int vit_counter = 0; vit.mark_cycle_pt(); ViterbiStateEntry* parent_vse = NULL; LanguageModelFlagsType top_choice_flags; while ((parent_vse = GetNextParentVSE(just_classified, has_alnum_mix, c_it.data(), blob_choice_flags, unicharset, word_res, &vit, &top_choice_flags)) != NULL) { // Skip pruned entries and do not look at prunable entries if already // examined language_model_viterbi_list_max_num_prunable of those. if (PrunablePath(*parent_vse) && (++vit_counter > language_model_viterbi_list_max_num_prunable || (language_model_ngram_on && parent_vse->ngram_info->pruned))) { continue; } // If the parent has no alnum choice, (ie choice is the first in a // string of alnum), and there is a better case variant that is not // distinguished by size, skip this blob choice/parent, as with the // initial blob treatment above. if (!parent_vse->HasAlnumChoice(unicharset) && HasBetterCaseVariant(unicharset, choice, curr_list)) continue; // Create a new ViterbiStateEntry if BLOB_CHOICE in c_it.data() // looks good according to the Dawgs or character ngram model. new_changed |= AddViterbiStateEntry( top_choice_flags, denom, word_end, curr_col, curr_row, c_it.data(), curr_state, parent_vse, pain_points, word_res, best_choice_bundle, blamer_bundle); } } } return new_changed; } // Finds the first lower and upper case letter and first digit in curr_list. // For non-upper/lower languages, alpha counts as upper. // Uses the first character in the list in place of empty results. // Returns true if both alpha and digits are found. bool LanguageModel::GetTopLowerUpperDigit(BLOB_CHOICE_LIST *curr_list, BLOB_CHOICE **first_lower, BLOB_CHOICE **first_upper, BLOB_CHOICE **first_digit) const { BLOB_CHOICE_IT c_it(curr_list); const UNICHARSET &unicharset = dict_->getUnicharset(); BLOB_CHOICE *first_unichar = NULL; for (c_it.mark_cycle_pt(); !c_it.cycled_list(); c_it.forward()) { UNICHAR_ID unichar_id = c_it.data()->unichar_id(); if (unicharset.get_fragment(unichar_id)) continue; // skip fragments if (first_unichar == NULL) first_unichar = c_it.data(); if (*first_lower == NULL && unicharset.get_islower(unichar_id)) { *first_lower = c_it.data(); } if (*first_upper == NULL && unicharset.get_isalpha(unichar_id) && !unicharset.get_islower(unichar_id)) { *first_upper = c_it.data(); } if (*first_digit == NULL && unicharset.get_isdigit(unichar_id)) { *first_digit = c_it.data(); } } ASSERT_HOST(first_unichar != NULL); bool mixed = (*first_lower != NULL || *first_upper != NULL) && *first_digit != NULL; if (*first_lower == NULL) *first_lower = first_unichar; if (*first_upper == NULL) *first_upper = first_unichar; if (*first_digit == NULL) *first_digit = first_unichar; return mixed; } // Forces there to be at least one entry in the overall set of the // viterbi_state_entries of each element of parent_node that has the // top_choice_flag set for lower, upper and digit using the same rules as // GetTopLowerUpperDigit, setting the flag on the first found suitable // candidate, whether or not the flag is set on some other parent. // Returns 1 if both alpha and digits are found among the parents, -1 if no // parents are found at all (a legitimate case), and 0 otherwise. int LanguageModel::SetTopParentLowerUpperDigit( LanguageModelState *parent_node) const { if (parent_node == NULL) return -1; UNICHAR_ID top_id = INVALID_UNICHAR_ID; ViterbiStateEntry* top_lower = NULL; ViterbiStateEntry* top_upper = NULL; ViterbiStateEntry* top_digit = NULL; ViterbiStateEntry* top_choice = NULL; float lower_rating = 0.0f; float upper_rating = 0.0f; float digit_rating = 0.0f; float top_rating = 0.0f; const UNICHARSET &unicharset = dict_->getUnicharset(); ViterbiStateEntry_IT vit(&parent_node->viterbi_state_entries); for (vit.mark_cycle_pt(); !vit.cycled_list(); vit.forward()) { ViterbiStateEntry* vse = vit.data(); // INVALID_UNICHAR_ID should be treated like a zero-width joiner, so scan // back to the real character if needed. ViterbiStateEntry* unichar_vse = vse; UNICHAR_ID unichar_id = unichar_vse->curr_b->unichar_id(); float rating = unichar_vse->curr_b->rating(); while (unichar_id == INVALID_UNICHAR_ID && unichar_vse->parent_vse != NULL) { unichar_vse = unichar_vse->parent_vse; unichar_id = unichar_vse->curr_b->unichar_id(); rating = unichar_vse->curr_b->rating(); } if (unichar_id != INVALID_UNICHAR_ID) { if (unicharset.get_islower(unichar_id)) { if (top_lower == NULL || lower_rating > rating) { top_lower = vse; lower_rating = rating; } } else if (unicharset.get_isalpha(unichar_id)) { if (top_upper == NULL || upper_rating > rating) { top_upper = vse; upper_rating = rating; } } else if (unicharset.get_isdigit(unichar_id)) { if (top_digit == NULL || digit_rating > rating) { top_digit = vse; digit_rating = rating; } } } if (top_choice == NULL || top_rating > rating) { top_choice = vse; top_rating = rating; top_id = unichar_id; } } if (top_choice == NULL) return -1; bool mixed = (top_lower != NULL || top_upper != NULL) && top_digit != NULL; if (top_lower == NULL) top_lower = top_choice; top_lower->top_choice_flags |= kLowerCaseFlag; if (top_upper == NULL) top_upper = top_choice; top_upper->top_choice_flags |= kUpperCaseFlag; if (top_digit == NULL) top_digit = top_choice; top_digit->top_choice_flags |= kDigitFlag; top_choice->top_choice_flags |= kSmallestRatingFlag; if (top_id != INVALID_UNICHAR_ID && dict_->compound_marker(top_id) && (top_choice->top_choice_flags & (kLowerCaseFlag | kUpperCaseFlag | kDigitFlag))) { // If the compound marker top choice carries any of the top alnum flags, // then give it all of them, allowing words like I-295 to be chosen. top_choice->top_choice_flags |= kLowerCaseFlag | kUpperCaseFlag | kDigitFlag; } return mixed ? 1 : 0; } // Finds the next ViterbiStateEntry with which the given unichar_id can // combine sensibly, taking into account any mixed alnum/mixed case // situation, and whether this combination has been inspected before. ViterbiStateEntry* LanguageModel::GetNextParentVSE( bool just_classified, bool mixed_alnum, const BLOB_CHOICE* bc, LanguageModelFlagsType blob_choice_flags, const UNICHARSET& unicharset, WERD_RES* word_res, ViterbiStateEntry_IT* vse_it, LanguageModelFlagsType* top_choice_flags) const { for (; !vse_it->cycled_list(); vse_it->forward()) { ViterbiStateEntry* parent_vse = vse_it->data(); // Only consider the parent if it has been updated or // if the current ratings cell has just been classified. if (!just_classified && !parent_vse->updated) continue; if (language_model_debug_level > 2) parent_vse->Print("Considering"); // If the parent is non-alnum, then upper counts as lower. *top_choice_flags = blob_choice_flags; if ((blob_choice_flags & kUpperCaseFlag) && !parent_vse->HasAlnumChoice(unicharset)) { *top_choice_flags |= kLowerCaseFlag; } *top_choice_flags &= parent_vse->top_choice_flags; UNICHAR_ID unichar_id = bc->unichar_id(); const BLOB_CHOICE* parent_b = parent_vse->curr_b; UNICHAR_ID parent_id = parent_b->unichar_id(); // Digits do not bind to alphas if there is a mix in both parent and current // or if the alpha is not the top choice. if (unicharset.get_isdigit(unichar_id) && unicharset.get_isalpha(parent_id) && (mixed_alnum || *top_choice_flags == 0)) continue; // Digits don't bind to alphas. // Likewise alphas do not bind to digits if there is a mix in both or if // the digit is not the top choice. if (unicharset.get_isalpha(unichar_id) && unicharset.get_isdigit(parent_id) && (mixed_alnum || *top_choice_flags == 0)) continue; // Alphas don't bind to digits. // If there is a case mix of the same alpha in the parent list, then // competing_vse is non-null and will be used to determine whether // or not to bind the current blob choice. if (parent_vse->competing_vse != NULL) { const BLOB_CHOICE* competing_b = parent_vse->competing_vse->curr_b; UNICHAR_ID other_id = competing_b->unichar_id(); if (language_model_debug_level >= 5) { tprintf("Parent %s has competition %s\n", unicharset.id_to_unichar(parent_id), unicharset.id_to_unichar(other_id)); } if (unicharset.SizesDistinct(parent_id, other_id)) { // If other_id matches bc wrt position and size, and parent_id, doesn't, // don't bind to the current parent. if (bc->PosAndSizeAgree(*competing_b, word_res->x_height, language_model_debug_level >= 5) && !bc->PosAndSizeAgree(*parent_b, word_res->x_height, language_model_debug_level >= 5)) continue; // Competing blobchoice has a better vertical match. } } vse_it->forward(); return parent_vse; // This one is good! } return NULL; // Ran out of possibilities. } bool LanguageModel::AddViterbiStateEntry( LanguageModelFlagsType top_choice_flags, float denom, bool word_end, int curr_col, int curr_row, BLOB_CHOICE *b, LanguageModelState *curr_state, ViterbiStateEntry *parent_vse, LMPainPoints *pain_points, WERD_RES *word_res, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle) { ViterbiStateEntry_IT vit; if (language_model_debug_level > 1) { tprintf("AddViterbiStateEntry for unichar %s rating=%.4f" " certainty=%.4f top_choice_flags=0x%x", dict_->getUnicharset().id_to_unichar(b->unichar_id()), b->rating(), b->certainty(), top_choice_flags); if (language_model_debug_level > 5) tprintf(" parent_vse=%p\n", parent_vse); else tprintf("\n"); } // Check whether the list is full. if (curr_state != NULL && curr_state->viterbi_state_entries_length >= language_model_viterbi_list_max_size) { if (language_model_debug_level > 1) { tprintf("AddViterbiStateEntry: viterbi list is full!\n"); } return false; } // Invoke Dawg language model component. LanguageModelDawgInfo *dawg_info = GenerateDawgInfo(word_end, curr_col, curr_row, *b, parent_vse); float outline_length = AssociateUtils::ComputeOutlineLength(rating_cert_scale_, *b); // Invoke Ngram language model component. LanguageModelNgramInfo *ngram_info = NULL; if (language_model_ngram_on) { ngram_info = GenerateNgramInfo( dict_->getUnicharset().id_to_unichar(b->unichar_id()), b->certainty(), denom, curr_col, curr_row, outline_length, parent_vse); ASSERT_HOST(ngram_info != NULL); } bool liked_by_language_model = dawg_info != NULL || (ngram_info != NULL && !ngram_info->pruned); // Quick escape if not liked by the language model, can't be consistent // xheight, and not top choice. if (!liked_by_language_model && top_choice_flags == 0) { if (language_model_debug_level > 1) { tprintf("Language model components very early pruned this entry\n"); } delete ngram_info; delete dawg_info; return false; } // Check consistency of the path and set the relevant consistency_info. LMConsistencyInfo consistency_info( parent_vse != NULL ? &parent_vse->consistency_info : NULL); // Start with just the x-height consistency, as it provides significant // pruning opportunity. consistency_info.ComputeXheightConsistency( b, dict_->getUnicharset().get_ispunctuation(b->unichar_id())); // Turn off xheight consistent flag if not consistent. if (consistency_info.InconsistentXHeight()) { top_choice_flags &= ~kXhtConsistentFlag; } // Quick escape if not liked by the language model, not consistent xheight, // and not top choice. if (!liked_by_language_model && top_choice_flags == 0) { if (language_model_debug_level > 1) { tprintf("Language model components early pruned this entry\n"); } delete ngram_info; delete dawg_info; return false; } // Compute the rest of the consistency info. FillConsistencyInfo(curr_col, word_end, b, parent_vse, word_res, &consistency_info); if (dawg_info != NULL && consistency_info.invalid_punc) { consistency_info.invalid_punc = false; // do not penalize dict words } // Compute cost of associating the blobs that represent the current unichar. AssociateStats associate_stats; ComputeAssociateStats(curr_col, curr_row, max_char_wh_ratio_, parent_vse, word_res, &associate_stats); if (parent_vse != NULL) { associate_stats.shape_cost += parent_vse->associate_stats.shape_cost; associate_stats.bad_shape |= parent_vse->associate_stats.bad_shape; } // Create the new ViterbiStateEntry compute the adjusted cost of the path. ViterbiStateEntry *new_vse = new ViterbiStateEntry( parent_vse, b, 0.0, outline_length, consistency_info, associate_stats, top_choice_flags, dawg_info, ngram_info, (language_model_debug_level > 0) ? dict_->getUnicharset().id_to_unichar(b->unichar_id()) : NULL); new_vse->cost = ComputeAdjustedPathCost(new_vse); if (language_model_debug_level >= 3) tprintf("Adjusted cost = %g\n", new_vse->cost); // Invoke Top Choice language model component to make the final adjustments // to new_vse->top_choice_flags. if (!curr_state->viterbi_state_entries.empty() && new_vse->top_choice_flags) { GenerateTopChoiceInfo(new_vse, parent_vse, curr_state); } // If language model components did not like this unichar - return. bool keep = new_vse->top_choice_flags || liked_by_language_model; if (!(top_choice_flags & kSmallestRatingFlag) && // no non-top choice paths consistency_info.inconsistent_script) { // with inconsistent script keep = false; } if (!keep) { if (language_model_debug_level > 1) { tprintf("Language model components did not like this entry\n"); } delete new_vse; return false; } // Discard this entry if it represents a prunable path and // language_model_viterbi_list_max_num_prunable such entries with a lower // cost have already been recorded. if (PrunablePath(*new_vse) && (curr_state->viterbi_state_entries_prunable_length >= language_model_viterbi_list_max_num_prunable) && new_vse->cost >= curr_state->viterbi_state_entries_prunable_max_cost) { if (language_model_debug_level > 1) { tprintf("Discarded ViterbiEntry with high cost %g max cost %g\n", new_vse->cost, curr_state->viterbi_state_entries_prunable_max_cost); } delete new_vse; return false; } // Update best choice if needed. if (word_end) { UpdateBestChoice(new_vse, pain_points, word_res, best_choice_bundle, blamer_bundle); // Discard the entry if UpdateBestChoice() found flaws in it. if (new_vse->cost >= WERD_CHOICE::kBadRating && new_vse != best_choice_bundle->best_vse) { if (language_model_debug_level > 1) { tprintf("Discarded ViterbiEntry with high cost %g\n", new_vse->cost); } delete new_vse; return false; } } // Add the new ViterbiStateEntry and to curr_state->viterbi_state_entries. curr_state->viterbi_state_entries.add_sorted(ViterbiStateEntry::Compare, false, new_vse); curr_state->viterbi_state_entries_length++; if (PrunablePath(*new_vse)) { curr_state->viterbi_state_entries_prunable_length++; } // Update lms->viterbi_state_entries_prunable_max_cost and clear // top_choice_flags of entries with ratings_sum than new_vse->ratings_sum. if ((curr_state->viterbi_state_entries_prunable_length >= language_model_viterbi_list_max_num_prunable) || new_vse->top_choice_flags) { ASSERT_HOST(!curr_state->viterbi_state_entries.empty()); int prunable_counter = language_model_viterbi_list_max_num_prunable; vit.set_to_list(&(curr_state->viterbi_state_entries)); for (vit.mark_cycle_pt(); !vit.cycled_list(); vit.forward()) { ViterbiStateEntry *curr_vse = vit.data(); // Clear the appropriate top choice flags of the entries in the // list that have cost higher thank new_entry->cost // (since they will not be top choices any more). if (curr_vse->top_choice_flags && curr_vse != new_vse && curr_vse->cost > new_vse->cost) { curr_vse->top_choice_flags &= ~(new_vse->top_choice_flags); } if (prunable_counter > 0 && PrunablePath(*curr_vse)) --prunable_counter; // Update curr_state->viterbi_state_entries_prunable_max_cost. if (prunable_counter == 0) { curr_state->viterbi_state_entries_prunable_max_cost = vit.data()->cost; if (language_model_debug_level > 1) { tprintf("Set viterbi_state_entries_prunable_max_cost to %g\n", curr_state->viterbi_state_entries_prunable_max_cost); } prunable_counter = -1; // stop counting } } } // Print the newly created ViterbiStateEntry. if (language_model_debug_level > 2) { new_vse->Print("New"); if (language_model_debug_level > 5) curr_state->Print("Updated viterbi list"); } return true; } void LanguageModel::GenerateTopChoiceInfo(ViterbiStateEntry *new_vse, const ViterbiStateEntry *parent_vse, LanguageModelState *lms) { ViterbiStateEntry_IT vit(&(lms->viterbi_state_entries)); for (vit.mark_cycle_pt(); !vit.cycled_list() && new_vse->top_choice_flags && new_vse->cost >= vit.data()->cost; vit.forward()) { // Clear the appropriate flags if the list already contains // a top choice entry with a lower cost. new_vse->top_choice_flags &= ~(vit.data()->top_choice_flags); } if (language_model_debug_level > 2) { tprintf("GenerateTopChoiceInfo: top_choice_flags=0x%x\n", new_vse->top_choice_flags); } } LanguageModelDawgInfo *LanguageModel::GenerateDawgInfo( bool word_end, int curr_col, int curr_row, const BLOB_CHOICE &b, const ViterbiStateEntry *parent_vse) { // Initialize active_dawgs from parent_vse if it is not NULL. // Otherwise use very_beginning_active_dawgs_. if (parent_vse == NULL) { dawg_args_->active_dawgs = very_beginning_active_dawgs_; dawg_args_->permuter = NO_PERM; } else { if (parent_vse->dawg_info == NULL) return NULL; // not a dict word path dawg_args_->active_dawgs = parent_vse->dawg_info->active_dawgs; dawg_args_->permuter = parent_vse->dawg_info->permuter; } // Deal with hyphenated words. if (word_end && dict_->has_hyphen_end(b.unichar_id(), curr_col == 0)) { if (language_model_debug_level > 0) tprintf("Hyphenated word found\n"); return new LanguageModelDawgInfo(dawg_args_->active_dawgs, COMPOUND_PERM); } // Deal with compound words. if (dict_->compound_marker(b.unichar_id()) && (parent_vse == NULL || parent_vse->dawg_info->permuter != NUMBER_PERM)) { if (language_model_debug_level > 0) tprintf("Found compound marker\n"); // Do not allow compound operators at the beginning and end of the word. // Do not allow more than one compound operator per word. // Do not allow compounding of words with lengths shorter than // language_model_min_compound_length if (parent_vse == NULL || word_end || dawg_args_->permuter == COMPOUND_PERM || parent_vse->length < language_model_min_compound_length) return NULL; int i; // Check a that the path terminated before the current character is a word. bool has_word_ending = false; for (i = 0; i < parent_vse->dawg_info->active_dawgs->size(); ++i) { const DawgPosition &pos = (*parent_vse->dawg_info->active_dawgs)[i]; const Dawg *pdawg = pos.dawg_index < 0 ? NULL : dict_->GetDawg(pos.dawg_index); if (pdawg == NULL || pos.back_to_punc) continue;; if (pdawg->type() == DAWG_TYPE_WORD && pos.dawg_ref != NO_EDGE && pdawg->end_of_word(pos.dawg_ref)) { has_word_ending = true; break; } } if (!has_word_ending) return NULL; if (language_model_debug_level > 0) tprintf("Compound word found\n"); return new LanguageModelDawgInfo(beginning_active_dawgs_, COMPOUND_PERM); } // done dealing with compound words LanguageModelDawgInfo *dawg_info = NULL; // Call LetterIsOkay(). // Use the normalized IDs so that all shapes of ' can be allowed in words // like don't. const GenericVector<UNICHAR_ID>& normed_ids = dict_->getUnicharset().normed_ids(b.unichar_id()); DawgPositionVector tmp_active_dawgs; for (int i = 0; i < normed_ids.size(); ++i) { if (language_model_debug_level > 2) tprintf("Test Letter OK for unichar %d, normed %d\n", b.unichar_id(), normed_ids[i]); dict_->LetterIsOkay(dawg_args_, normed_ids[i], word_end && i == normed_ids.size() - 1); if (dawg_args_->permuter == NO_PERM) { break; } else if (i < normed_ids.size() - 1) { tmp_active_dawgs = *dawg_args_->updated_dawgs; dawg_args_->active_dawgs = &tmp_active_dawgs; } if (language_model_debug_level > 2) tprintf("Letter was OK for unichar %d, normed %d\n", b.unichar_id(), normed_ids[i]); } dawg_args_->active_dawgs = NULL; if (dawg_args_->permuter != NO_PERM) { dawg_info = new LanguageModelDawgInfo(dawg_args_->updated_dawgs, dawg_args_->permuter); } else if (language_model_debug_level > 3) { tprintf("Letter %s not OK!\n", dict_->getUnicharset().id_to_unichar(b.unichar_id())); } return dawg_info; } LanguageModelNgramInfo *LanguageModel::GenerateNgramInfo( const char *unichar, float certainty, float denom, int curr_col, int curr_row, float outline_length, const ViterbiStateEntry *parent_vse) { // Initialize parent context. const char *pcontext_ptr = ""; int pcontext_unichar_step_len = 0; if (parent_vse == NULL) { pcontext_ptr = prev_word_str_.string(); pcontext_unichar_step_len = prev_word_unichar_step_len_; } else { pcontext_ptr = parent_vse->ngram_info->context.string(); pcontext_unichar_step_len = parent_vse->ngram_info->context_unichar_step_len; } // Compute p(unichar | parent context). int unichar_step_len = 0; bool pruned = false; float ngram_cost; float ngram_and_classifier_cost = ComputeNgramCost(unichar, certainty, denom, pcontext_ptr, &unichar_step_len, &pruned, &ngram_cost); // Normalize just the ngram_and_classifier_cost by outline_length. // The ngram_cost is used by the params_model, so it needs to be left as-is, // and the params model cost will be normalized by outline_length. ngram_and_classifier_cost *= outline_length / language_model_ngram_rating_factor; // Add the ngram_cost of the parent. if (parent_vse != NULL) { ngram_and_classifier_cost += parent_vse->ngram_info->ngram_and_classifier_cost; ngram_cost += parent_vse->ngram_info->ngram_cost; } // Shorten parent context string by unichar_step_len unichars. int num_remove = (unichar_step_len + pcontext_unichar_step_len - language_model_ngram_order); if (num_remove > 0) pcontext_unichar_step_len -= num_remove; while (num_remove > 0 && *pcontext_ptr != '\0') { pcontext_ptr += UNICHAR::utf8_step(pcontext_ptr); --num_remove; } // Decide whether to prune this ngram path and update changed accordingly. if (parent_vse != NULL && parent_vse->ngram_info->pruned) pruned = true; // Construct and return the new LanguageModelNgramInfo. LanguageModelNgramInfo *ngram_info = new LanguageModelNgramInfo( pcontext_ptr, pcontext_unichar_step_len, pruned, ngram_cost, ngram_and_classifier_cost); ngram_info->context += unichar; ngram_info->context_unichar_step_len += unichar_step_len; assert(ngram_info->context_unichar_step_len <= language_model_ngram_order); return ngram_info; } float LanguageModel::ComputeNgramCost(const char *unichar, float certainty, float denom, const char *context, int *unichar_step_len, bool *found_small_prob, float *ngram_cost) { const char *context_ptr = context; char *modified_context = NULL; char *modified_context_end = NULL; const char *unichar_ptr = unichar; const char *unichar_end = unichar_ptr + strlen(unichar_ptr); float prob = 0.0f; int step = 0; while (unichar_ptr < unichar_end && (step = UNICHAR::utf8_step(unichar_ptr)) > 0) { if (language_model_debug_level > 1) { tprintf("prob(%s | %s)=%g\n", unichar_ptr, context_ptr, dict_->ProbabilityInContext(context_ptr, -1, unichar_ptr, step)); } prob += dict_->ProbabilityInContext(context_ptr, -1, unichar_ptr, step); ++(*unichar_step_len); if (language_model_ngram_use_only_first_uft8_step) break; unichar_ptr += step; // If there are multiple UTF8 characters present in unichar, context is // updated to include the previously examined characters from str, // unless use_only_first_uft8_step is true. if (unichar_ptr < unichar_end) { if (modified_context == NULL) { int context_len = strlen(context); modified_context = new char[context_len + strlen(unichar_ptr) + step + 1]; strncpy(modified_context, context, context_len); modified_context_end = modified_context + context_len; context_ptr = modified_context; } strncpy(modified_context_end, unichar_ptr - step, step); modified_context_end += step; *modified_context_end = '\0'; } } prob /= static_cast<float>(*unichar_step_len); // normalize if (prob < language_model_ngram_small_prob) { if (language_model_debug_level > 0) tprintf("Found small prob %g\n", prob); *found_small_prob = true; prob = language_model_ngram_small_prob; } *ngram_cost = -1.0*log2(prob); float ngram_and_classifier_cost = -1.0*log2(CertaintyScore(certainty)/denom) + *ngram_cost * language_model_ngram_scale_factor; if (language_model_debug_level > 1) { tprintf("-log [ p(%s) * p(%s | %s) ] = -log2(%g*%g) = %g\n", unichar, unichar, context_ptr, CertaintyScore(certainty)/denom, prob, ngram_and_classifier_cost); } if (modified_context != NULL) delete[] modified_context; return ngram_and_classifier_cost; } float LanguageModel::ComputeDenom(BLOB_CHOICE_LIST *curr_list) { if (curr_list->empty()) return 1.0f; float denom = 0.0f; int len = 0; BLOB_CHOICE_IT c_it(curr_list); for (c_it.mark_cycle_pt(); !c_it.cycled_list(); c_it.forward()) { ASSERT_HOST(c_it.data() != NULL); ++len; denom += CertaintyScore(c_it.data()->certainty()); } assert(len != 0); // The ideal situation would be to have the classifier scores for // classifying each position as each of the characters in the unicharset. // Since we can not do this because of speed, we add a very crude estimate // of what these scores for the "missing" classifications would sum up to. denom += (dict_->getUnicharset().size() - len) * CertaintyScore(language_model_ngram_nonmatch_score); return denom; } void LanguageModel::FillConsistencyInfo( int curr_col, bool word_end, BLOB_CHOICE *b, ViterbiStateEntry *parent_vse, WERD_RES *word_res, LMConsistencyInfo *consistency_info) { const UNICHARSET &unicharset = dict_->getUnicharset(); UNICHAR_ID unichar_id = b->unichar_id(); BLOB_CHOICE* parent_b = parent_vse != NULL ? parent_vse->curr_b : NULL; // Check punctuation validity. if (unicharset.get_ispunctuation(unichar_id)) consistency_info->num_punc++; if (dict_->GetPuncDawg() != NULL && !consistency_info->invalid_punc) { if (dict_->compound_marker(unichar_id) && parent_b != NULL && (unicharset.get_isalpha(parent_b->unichar_id()) || unicharset.get_isdigit(parent_b->unichar_id()))) { // reset punc_ref for compound words consistency_info->punc_ref = NO_EDGE; } else { bool is_apos = dict_->is_apostrophe(unichar_id); bool prev_is_numalpha = (parent_b != NULL && (unicharset.get_isalpha(parent_b->unichar_id()) || unicharset.get_isdigit(parent_b->unichar_id()))); UNICHAR_ID pattern_unichar_id = (unicharset.get_isalpha(unichar_id) || unicharset.get_isdigit(unichar_id) || (is_apos && prev_is_numalpha)) ? Dawg::kPatternUnicharID : unichar_id; if (consistency_info->punc_ref == NO_EDGE || pattern_unichar_id != Dawg::kPatternUnicharID || dict_->GetPuncDawg()->edge_letter(consistency_info->punc_ref) != Dawg::kPatternUnicharID) { NODE_REF node = Dict::GetStartingNode(dict_->GetPuncDawg(), consistency_info->punc_ref); consistency_info->punc_ref = (node != NO_EDGE) ? dict_->GetPuncDawg()->edge_char_of( node, pattern_unichar_id, word_end) : NO_EDGE; if (consistency_info->punc_ref == NO_EDGE) { consistency_info->invalid_punc = true; } } } } // Update case related counters. if (parent_vse != NULL && !word_end && dict_->compound_marker(unichar_id)) { // Reset counters if we are dealing with a compound word. consistency_info->num_lower = 0; consistency_info->num_non_first_upper = 0; } else if (unicharset.get_islower(unichar_id)) { consistency_info->num_lower++; } else if ((parent_b != NULL) && unicharset.get_isupper(unichar_id)) { if (unicharset.get_isupper(parent_b->unichar_id()) || consistency_info->num_lower > 0 || consistency_info->num_non_first_upper > 0) { consistency_info->num_non_first_upper++; } } // Initialize consistency_info->script_id (use script of unichar_id // if it is not Common, use script id recorded by the parent otherwise). // Set inconsistent_script to true if the script of the current unichar // is not consistent with that of the parent. consistency_info->script_id = unicharset.get_script(unichar_id); // Hiragana and Katakana can mix with Han. if (dict_->getUnicharset().han_sid() != dict_->getUnicharset().null_sid()) { if ((unicharset.hiragana_sid() != unicharset.null_sid() && consistency_info->script_id == unicharset.hiragana_sid()) || (unicharset.katakana_sid() != unicharset.null_sid() && consistency_info->script_id == unicharset.katakana_sid())) { consistency_info->script_id = dict_->getUnicharset().han_sid(); } } if (parent_vse != NULL && (parent_vse->consistency_info.script_id != dict_->getUnicharset().common_sid())) { int parent_script_id = parent_vse->consistency_info.script_id; // If script_id is Common, use script id of the parent instead. if (consistency_info->script_id == dict_->getUnicharset().common_sid()) { consistency_info->script_id = parent_script_id; } if (consistency_info->script_id != parent_script_id) { consistency_info->inconsistent_script = true; } } // Update chartype related counters. if (unicharset.get_isalpha(unichar_id)) { consistency_info->num_alphas++; } else if (unicharset.get_isdigit(unichar_id)) { consistency_info->num_digits++; } else if (!unicharset.get_ispunctuation(unichar_id)) { consistency_info->num_other++; } // Check font and spacing consistency. if (fontinfo_table_->size() > 0 && parent_b != NULL) { int fontinfo_id = -1; if (parent_b->fontinfo_id() == b->fontinfo_id() || parent_b->fontinfo_id2() == b->fontinfo_id()) { fontinfo_id = b->fontinfo_id(); } else if (parent_b->fontinfo_id() == b->fontinfo_id2() || parent_b->fontinfo_id2() == b->fontinfo_id2()) { fontinfo_id = b->fontinfo_id2(); } if(language_model_debug_level > 1) { tprintf("pfont %s pfont %s font %s font2 %s common %s(%d)\n", (parent_b->fontinfo_id() >= 0) ? fontinfo_table_->get(parent_b->fontinfo_id()).name : "" , (parent_b->fontinfo_id2() >= 0) ? fontinfo_table_->get(parent_b->fontinfo_id2()).name : "", (b->fontinfo_id() >= 0) ? fontinfo_table_->get(b->fontinfo_id()).name : "", (fontinfo_id >= 0) ? fontinfo_table_->get(fontinfo_id).name : "", (fontinfo_id >= 0) ? fontinfo_table_->get(fontinfo_id).name : "", fontinfo_id); } if (!word_res->blob_widths.empty()) { // if we have widths/gaps info bool expected_gap_found = false; float expected_gap; int temp_gap; if (fontinfo_id >= 0) { // found a common font ASSERT_HOST(fontinfo_id < fontinfo_table_->size()); if (fontinfo_table_->get(fontinfo_id).get_spacing( parent_b->unichar_id(), unichar_id, &temp_gap)) { expected_gap = temp_gap; expected_gap_found = true; } } else { consistency_info->inconsistent_font = true; // Get an average of the expected gaps in each font int num_addends = 0; expected_gap = 0; int temp_fid; for (int i = 0; i < 4; ++i) { if (i == 0) { temp_fid = parent_b->fontinfo_id(); } else if (i == 1) { temp_fid = parent_b->fontinfo_id2(); } else if (i == 2) { temp_fid = b->fontinfo_id(); } else { temp_fid = b->fontinfo_id2(); } ASSERT_HOST(temp_fid < 0 || fontinfo_table_->size()); if (temp_fid >= 0 && fontinfo_table_->get(temp_fid).get_spacing( parent_b->unichar_id(), unichar_id, &temp_gap)) { expected_gap += temp_gap; num_addends++; } } expected_gap_found = (num_addends > 0); if (num_addends > 0) { expected_gap /= static_cast<float>(num_addends); } } if (expected_gap_found) { float actual_gap = static_cast<float>(word_res->GetBlobsGap(curr_col-1)); float gap_ratio = expected_gap / actual_gap; // TODO(rays) The gaps seem to be way off most of the time, saved by // the error here that the ratio was compared to 1/2, when it should // have been 0.5f. Find the source of the gaps discrepancy and put // the 0.5f here in place of 0.0f. // Test on 2476595.sj, pages 0 to 6. (In French.) if (gap_ratio < 0.0f || gap_ratio > 2.0f) { consistency_info->num_inconsistent_spaces++; } if (language_model_debug_level > 1) { tprintf("spacing for %s(%d) %s(%d) col %d: expected %g actual %g\n", unicharset.id_to_unichar(parent_b->unichar_id()), parent_b->unichar_id(), unicharset.id_to_unichar(unichar_id), unichar_id, curr_col, expected_gap, actual_gap); } } } } } float LanguageModel::ComputeAdjustedPathCost(ViterbiStateEntry *vse) { ASSERT_HOST(vse != NULL); if (params_model_.Initialized()) { float features[PTRAIN_NUM_FEATURE_TYPES]; ExtractFeaturesFromPath(*vse, features); float cost = params_model_.ComputeCost(features); if (language_model_debug_level > 3) { tprintf("ComputeAdjustedPathCost %g ParamsModel features:\n", cost); if (language_model_debug_level >= 5) { for (int f = 0; f < PTRAIN_NUM_FEATURE_TYPES; ++f) { tprintf("%s=%g\n", kParamsTrainingFeatureTypeName[f], features[f]); } } } return cost * vse->outline_length; } else { float adjustment = 1.0f; if (vse->dawg_info == NULL || vse->dawg_info->permuter != FREQ_DAWG_PERM) { adjustment += language_model_penalty_non_freq_dict_word; } if (vse->dawg_info == NULL) { adjustment += language_model_penalty_non_dict_word; if (vse->length > language_model_min_compound_length) { adjustment += ((vse->length - language_model_min_compound_length) * language_model_penalty_increment); } } if (vse->associate_stats.shape_cost > 0) { adjustment += vse->associate_stats.shape_cost / static_cast<float>(vse->length); } if (language_model_ngram_on) { ASSERT_HOST(vse->ngram_info != NULL); return vse->ngram_info->ngram_and_classifier_cost * adjustment; } else { adjustment += ComputeConsistencyAdjustment(vse->dawg_info, vse->consistency_info); return vse->ratings_sum * adjustment; } } } void LanguageModel::UpdateBestChoice( ViterbiStateEntry *vse, LMPainPoints *pain_points, WERD_RES *word_res, BestChoiceBundle *best_choice_bundle, BlamerBundle *blamer_bundle) { bool truth_path; WERD_CHOICE *word = ConstructWord(vse, word_res, &best_choice_bundle->fixpt, blamer_bundle, &truth_path); ASSERT_HOST(word != NULL); if (dict_->stopper_debug_level >= 1) { STRING word_str; word->string_and_lengths(&word_str, NULL); vse->Print(word_str.string()); } if (language_model_debug_level > 0) { word->print("UpdateBestChoice() constructed word"); } // Record features from the current path if necessary. ParamsTrainingHypothesis curr_hyp; if (blamer_bundle != NULL) { if (vse->dawg_info != NULL) vse->dawg_info->permuter = static_cast<PermuterType>(word->permuter()); ExtractFeaturesFromPath(*vse, curr_hyp.features); word->string_and_lengths(&(curr_hyp.str), NULL); curr_hyp.cost = vse->cost; // record cost for error rate computations if (language_model_debug_level > 0) { tprintf("Raw features extracted from %s (cost=%g) [ ", curr_hyp.str.string(), curr_hyp.cost); for (int deb_i = 0; deb_i < PTRAIN_NUM_FEATURE_TYPES; ++deb_i) { tprintf("%g ", curr_hyp.features[deb_i]); } tprintf("]\n"); } // Record the current hypothesis in params_training_bundle. blamer_bundle->AddHypothesis(curr_hyp); if (truth_path) blamer_bundle->UpdateBestRating(word->rating()); } if (blamer_bundle != NULL && blamer_bundle->GuidedSegsearchStillGoing()) { // The word was constructed solely for blamer_bundle->AddHypothesis, so // we no longer need it. delete word; return; } if (word_res->chopped_word != NULL && !word_res->chopped_word->blobs.empty()) word->SetScriptPositions(false, word_res->chopped_word); // Update and log new raw_choice if needed. if (word_res->raw_choice == NULL || word->rating() < word_res->raw_choice->rating()) { if (word_res->LogNewRawChoice(word) && language_model_debug_level > 0) tprintf("Updated raw choice\n"); } // Set the modified rating for best choice to vse->cost and log best choice. word->set_rating(vse->cost); // Call LogNewChoice() for best choice from Dict::adjust_word() since it // computes adjust_factor that is used by the adaption code (e.g. by // ClassifyAdaptableWord() to compute adaption acceptance thresholds). // Note: the rating of the word is not adjusted. dict_->adjust_word(word, vse->dawg_info == NULL, vse->consistency_info.xht_decision, 0.0, false, language_model_debug_level > 0); // Hand ownership of the word over to the word_res. if (!word_res->LogNewCookedChoice(dict_->tessedit_truncate_wordchoice_log, dict_->stopper_debug_level >= 1, word)) { // The word was so bad that it was deleted. return; } if (word_res->best_choice == word) { // Word was the new best. if (dict_->AcceptableChoice(*word, vse->consistency_info.xht_decision) && AcceptablePath(*vse)) { acceptable_choice_found_ = true; } // Update best_choice_bundle. best_choice_bundle->updated = true; best_choice_bundle->best_vse = vse; if (language_model_debug_level > 0) { tprintf("Updated best choice\n"); word->print_state("New state "); } // Update hyphen state if we are dealing with a dictionary word. if (vse->dawg_info != NULL) { if (dict_->has_hyphen_end(*word)) { dict_->set_hyphen_word(*word, *(dawg_args_->active_dawgs)); } else { dict_->reset_hyphen_vars(true); } } if (blamer_bundle != NULL) { blamer_bundle->set_best_choice_is_dict_and_top_choice( vse->dawg_info != NULL && vse->top_choice_flags); } } if (wordrec_display_segmentations && word_res->chopped_word != NULL) { word->DisplaySegmentation(word_res->chopped_word); } } void LanguageModel::ExtractFeaturesFromPath( const ViterbiStateEntry &vse, float features[]) { memset(features, 0, sizeof(float) * PTRAIN_NUM_FEATURE_TYPES); // Record dictionary match info. int len = vse.length <= kMaxSmallWordUnichars ? 0 : vse.length <= kMaxMediumWordUnichars ? 1 : 2; if (vse.dawg_info != NULL) { int permuter = vse.dawg_info->permuter; if (permuter == NUMBER_PERM || permuter == USER_PATTERN_PERM) { if (vse.consistency_info.num_digits == vse.length) { features[PTRAIN_DIGITS_SHORT+len] = 1.0; } else { features[PTRAIN_NUM_SHORT+len] = 1.0; } } else if (permuter == DOC_DAWG_PERM) { features[PTRAIN_DOC_SHORT+len] = 1.0; } else if (permuter == SYSTEM_DAWG_PERM || permuter == USER_DAWG_PERM || permuter == COMPOUND_PERM) { features[PTRAIN_DICT_SHORT+len] = 1.0; } else if (permuter == FREQ_DAWG_PERM) { features[PTRAIN_FREQ_SHORT+len] = 1.0; } } // Record shape cost feature (normalized by path length). features[PTRAIN_SHAPE_COST_PER_CHAR] = vse.associate_stats.shape_cost / static_cast<float>(vse.length); // Record ngram cost. (normalized by the path length). features[PTRAIN_NGRAM_COST_PER_CHAR] = 0.0; if (vse.ngram_info != NULL) { features[PTRAIN_NGRAM_COST_PER_CHAR] = vse.ngram_info->ngram_cost / static_cast<float>(vse.length); } // Record consistency-related features. // Disabled this feature for due to its poor performance. // features[PTRAIN_NUM_BAD_PUNC] = vse.consistency_info.NumInconsistentPunc(); features[PTRAIN_NUM_BAD_CASE] = vse.consistency_info.NumInconsistentCase(); features[PTRAIN_XHEIGHT_CONSISTENCY] = vse.consistency_info.xht_decision; features[PTRAIN_NUM_BAD_CHAR_TYPE] = vse.dawg_info == NULL ? vse.consistency_info.NumInconsistentChartype() : 0.0; features[PTRAIN_NUM_BAD_SPACING] = vse.consistency_info.NumInconsistentSpaces(); // Disabled this feature for now due to its poor performance. // features[PTRAIN_NUM_BAD_FONT] = vse.consistency_info.inconsistent_font; // Classifier-related features. features[PTRAIN_RATING_PER_CHAR] = vse.ratings_sum / static_cast<float>(vse.outline_length); } WERD_CHOICE *LanguageModel::ConstructWord( ViterbiStateEntry *vse, WERD_RES *word_res, DANGERR *fixpt, BlamerBundle *blamer_bundle, bool *truth_path) { if (truth_path != NULL) { *truth_path = (blamer_bundle != NULL && vse->length == blamer_bundle->correct_segmentation_length()); } BLOB_CHOICE *curr_b = vse->curr_b; ViterbiStateEntry *curr_vse = vse; int i; bool compound = dict_->hyphenated(); // treat hyphenated words as compound // Re-compute the variance of the width-to-height ratios (since we now // can compute the mean over the whole word). float full_wh_ratio_mean = 0.0f; if (vse->associate_stats.full_wh_ratio_var != 0.0f) { vse->associate_stats.shape_cost -= vse->associate_stats.full_wh_ratio_var; full_wh_ratio_mean = (vse->associate_stats.full_wh_ratio_total / static_cast<float>(vse->length)); vse->associate_stats.full_wh_ratio_var = 0.0f; } // Construct a WERD_CHOICE by tracing parent pointers. WERD_CHOICE *word = new WERD_CHOICE(word_res->uch_set, vse->length); word->set_length(vse->length); int total_blobs = 0; for (i = (vse->length-1); i >= 0; --i) { if (blamer_bundle != NULL && truth_path != NULL && *truth_path && !blamer_bundle->MatrixPositionCorrect(i, curr_b->matrix_cell())) { *truth_path = false; } // The number of blobs used for this choice is row - col + 1. int num_blobs = curr_b->matrix_cell().row - curr_b->matrix_cell().col + 1; total_blobs += num_blobs; word->set_blob_choice(i, num_blobs, curr_b); // Update the width-to-height ratio variance. Useful non-space delimited // languages to ensure that the blobs are of uniform width. // Skip leading and trailing punctuation when computing the variance. if ((full_wh_ratio_mean != 0.0f && ((curr_vse != vse && curr_vse->parent_vse != NULL) || !dict_->getUnicharset().get_ispunctuation(curr_b->unichar_id())))) { vse->associate_stats.full_wh_ratio_var += pow(full_wh_ratio_mean - curr_vse->associate_stats.full_wh_ratio, 2); if (language_model_debug_level > 2) { tprintf("full_wh_ratio_var += (%g-%g)^2\n", full_wh_ratio_mean, curr_vse->associate_stats.full_wh_ratio); } } // Mark the word as compound if compound permuter was set for any of // the unichars on the path (usually this will happen for unichars // that are compounding operators, like "-" and "/"). if (!compound && curr_vse->dawg_info && curr_vse->dawg_info->permuter == COMPOUND_PERM) compound = true; // Update curr_* pointers. curr_vse = curr_vse->parent_vse; if (curr_vse == NULL) break; curr_b = curr_vse->curr_b; } ASSERT_HOST(i == 0); // check that we recorded all the unichar ids. ASSERT_HOST(total_blobs == word_res->ratings->dimension()); // Re-adjust shape cost to include the updated width-to-height variance. if (full_wh_ratio_mean != 0.0f) { vse->associate_stats.shape_cost += vse->associate_stats.full_wh_ratio_var; } word->set_rating(vse->ratings_sum); word->set_certainty(vse->min_certainty); word->set_x_heights(vse->consistency_info.BodyMinXHeight(), vse->consistency_info.BodyMaxXHeight()); if (vse->dawg_info != NULL) { word->set_permuter(compound ? COMPOUND_PERM : vse->dawg_info->permuter); } else if (language_model_ngram_on && !vse->ngram_info->pruned) { word->set_permuter(NGRAM_PERM); } else if (vse->top_choice_flags) { word->set_permuter(TOP_CHOICE_PERM); } else { word->set_permuter(NO_PERM); } word->set_dangerous_ambig_found_(!dict_->NoDangerousAmbig(word, fixpt, true, word_res->ratings)); return word; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: params_model.cpp // Description: Trained language model parameters. // Author: David Eger // Created: Mon Jun 11 11:26:42 PDT 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "params_model.h" #include <ctype.h> #include <math.h> #include <stdio.h> #include "bitvector.h" #include "tprintf.h" namespace tesseract { // Scale factor to apply to params model scores. static const float kScoreScaleFactor = 100.0f; // Minimum cost result to return. static const float kMinFinalCost = 0.001f; // Maximum cost result to return. static const float kMaxFinalCost = 100.0f; void ParamsModel::Print() { for (int p = 0; p < PTRAIN_NUM_PASSES; ++p) { tprintf("ParamsModel for pass %d lang %s\n", p, lang_.string()); for (int i = 0; i < weights_vec_[p].size(); ++i) { tprintf("%s = %g\n", kParamsTrainingFeatureTypeName[i], weights_vec_[p][i]); } } } void ParamsModel::Copy(const ParamsModel &other_model) { for (int p = 0; p < PTRAIN_NUM_PASSES; ++p) { weights_vec_[p] = other_model.weights_for_pass( static_cast<PassEnum>(p)); } } // Given a (modifiable) line, parse out a key / value pair. // Return true on success. bool ParamsModel::ParseLine(char *line, char** key, float *val) { if (line[0] == '#') return false; int end_of_key = 0; while (line[end_of_key] && !isspace(line[end_of_key])) end_of_key++; if (!line[end_of_key]) { tprintf("ParamsModel::Incomplete line %s\n", line); return false; } line[end_of_key++] = 0; *key = line; if (sscanf(line + end_of_key, " %f", val) != 1) return false; return true; } // Applies params model weights to the given features. // Assumes that features is an array of size PTRAIN_NUM_FEATURE_TYPES. // The cost is set to a number that can be multiplied by the outline length, // as with the old ratings scheme. This enables words of different length // and combinations of words to be compared meaningfully. float ParamsModel::ComputeCost(const float features[]) const { float unnorm_score = 0.0; for (int f = 0; f < PTRAIN_NUM_FEATURE_TYPES; ++f) { unnorm_score += weights_vec_[pass_][f] * features[f]; } return ClipToRange(-unnorm_score / kScoreScaleFactor, kMinFinalCost, kMaxFinalCost); } bool ParamsModel::Equivalent(const ParamsModel &that) const { float epsilon = 0.0001; for (int p = 0; p < PTRAIN_NUM_PASSES; ++p) { if (weights_vec_[p].size() != that.weights_vec_[p].size()) return false; for (int i = 0; i < weights_vec_[p].size(); i++) { if (weights_vec_[p][i] != that.weights_vec_[p][i] && fabs(weights_vec_[p][i] - that.weights_vec_[p][i]) > epsilon) return false; } } return true; } bool ParamsModel::LoadFromFile( const char *lang, const char *full_path) { FILE *fp = fopen(full_path, "rb"); if (!fp) { tprintf("Error opening file %s\n", full_path); return false; } bool result = LoadFromFp(lang, fp, -1); fclose(fp); return result; } bool ParamsModel::LoadFromFp(const char *lang, FILE *fp, inT64 end_offset) { const int kMaxLineSize = 100; char line[kMaxLineSize]; BitVector present; present.Init(PTRAIN_NUM_FEATURE_TYPES); lang_ = lang; // Load weights for passes with adaption on. GenericVector<float> &weights = weights_vec_[pass_]; weights.init_to_size(PTRAIN_NUM_FEATURE_TYPES, 0.0); while ((end_offset < 0 || ftell(fp) < end_offset) && fgets(line, kMaxLineSize, fp)) { char *key = NULL; float value; if (!ParseLine(line, &key, &value)) continue; int idx = ParamsTrainingFeatureByName(key); if (idx < 0) { tprintf("ParamsModel::Unknown parameter %s\n", key); continue; } if (!present[idx]) { present.SetValue(idx, true); } weights[idx] = value; } bool complete = (present.NumSetBits() == PTRAIN_NUM_FEATURE_TYPES); if (!complete) { for (int i = 0; i < PTRAIN_NUM_FEATURE_TYPES; i++) { if (!present[i]) { tprintf("Missing field %s.\n", kParamsTrainingFeatureTypeName[i]); } } lang_ = ""; weights.truncate(0); } return complete; } bool ParamsModel::SaveToFile(const char *full_path) const { const GenericVector<float> &weights = weights_vec_[pass_]; if (weights.size() != PTRAIN_NUM_FEATURE_TYPES) { tprintf("Refusing to save ParamsModel that has not been initialized.\n"); return false; } FILE *fp = fopen(full_path, "wb"); if (!fp) { tprintf("Could not open %s for writing.\n", full_path); return false; } bool all_good = true; for (int i = 0; i < weights.size(); i++) { if (fprintf(fp, "%s %f\n", kParamsTrainingFeatureTypeName[i], weights[i]) < 0) { all_good = false; } } fclose(fp); return all_good; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: lm_state.cpp // Description: Structures and functionality for capturing the state of // segmentation search guided by the language model. // Author: Rika Antonova // Created: Mon Jun 20 11:26:43 PST 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "lm_state.h" namespace tesseract { ELISTIZE(ViterbiStateEntry); void ViterbiStateEntry::Print(const char *msg) const { tprintf("%s ViterbiStateEntry", msg); if (updated) tprintf("(NEW)"); if (this->debug_str != NULL) { tprintf(" str=%s", this->debug_str->string()); } tprintf(" with ratings_sum=%.4f length=%d cost=%.6f", this->ratings_sum, this->length, this->cost); if (this->top_choice_flags) { tprintf(" top_choice_flags=0x%x", this->top_choice_flags); } if (!this->Consistent()) { tprintf(" inconsistent=(punc %d case %d chartype %d script %d font %d)", this->consistency_info.NumInconsistentPunc(), this->consistency_info.NumInconsistentCase(), this->consistency_info.NumInconsistentChartype(), this->consistency_info.inconsistent_script, this->consistency_info.inconsistent_font); } if (this->dawg_info) tprintf(" permuter=%d", this->dawg_info->permuter); if (this->ngram_info) { tprintf(" ngram_cl_cost=%g context=%s ngram pruned=%d", this->ngram_info->ngram_and_classifier_cost, this->ngram_info->context.string(), this->ngram_info->pruned); } if (this->associate_stats.shape_cost > 0.0f) { tprintf(" shape_cost=%g", this->associate_stats.shape_cost); } tprintf(" %s", XHeightConsistencyEnumName[this->consistency_info.xht_decision]); tprintf("\n"); } // Clears the viterbi search state back to its initial conditions. void LanguageModelState::Clear() { viterbi_state_entries.clear(); viterbi_state_entries_prunable_length = 0; viterbi_state_entries_prunable_max_cost = MAX_FLOAT32; viterbi_state_entries_length = 0; } void LanguageModelState::Print(const char *msg) { tprintf("%s VSEs (max_cost=%g prn_len=%d tot_len=%d):\n", msg, viterbi_state_entries_prunable_max_cost, viterbi_state_entries_prunable_length, viterbi_state_entries_length); ViterbiStateEntry_IT vit(&viterbi_state_entries); for (vit.mark_cycle_pt(); !vit.cycled_list(); vit.forward()) { vit.data()->Print(""); } } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: lm_pain_points.h // Description: Functions that utilize the knowledge about the properties // of the paths explored by the segmentation search in order // to generate "pain points" - the locations in the ratings // matrix which should be classified next. // Author: Rika Antonova // Created: Mon Jun 20 11:26:43 PST 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_WORDREC_PAIN_POINTS_H_ #define TESSERACT_WORDREC_PAIN_POINTS_H_ #include "associate.h" #include "dict.h" #include "genericheap.h" #include "lm_state.h" namespace tesseract { // Heap of pain points used for determining where to chop/join. typedef GenericHeap<MatrixCoordPair> PainPointHeap; // Types of pain points (ordered in the decreasing level of importance). enum LMPainPointsType { LM_PPTYPE_BLAMER, LM_PPTYPE_AMBIG, LM_PPTYPE_PATH, LM_PPTYPE_SHAPE, LM_PPTYPE_NUM }; static const char * const LMPainPointsTypeName[] = { "LM_PPTYPE_BLAMER", "LM_PPTYPE_AMBIGS", "LM_PPTYPE_PATH", "LM_PPTYPE_SHAPE", }; class LMPainPoints { public: static const float kDefaultPainPointPriorityAdjustment; // If there is a significant drop in character ngram probability or a // dangerous ambiguity make the thresholds on what blob combinations // can be classified looser. static const float kLooseMaxCharWhRatio; // Returns a description of the type of a pain point. static const char* PainPointDescription(LMPainPointsType type) { return LMPainPointsTypeName[type]; } LMPainPoints(int max, float rat, bool fp, const Dict *d, int deb) : max_heap_size_(max), max_char_wh_ratio_(rat), fixed_pitch_(fp), dict_(d), debug_level_(deb) {} ~LMPainPoints() {} // Returns true if the heap of pain points of pp_type is not empty(). inline bool HasPainPoints(LMPainPointsType pp_type) const { return !pain_points_heaps_[pp_type].empty(); } // Dequeues the next pain point from the pain points queue and copies // its contents and priority to *pp and *priority. // Returns LM_PPTYPE_NUM if pain points queue is empty, otherwise the type. LMPainPointsType Deque(MATRIX_COORD *pp, float *priority); // Clears pain points heap. void Clear() { for (int h = 0; h < LM_PPTYPE_NUM; ++h) pain_points_heaps_[h].clear(); } // For each cell, generate a "pain point" if the cell is not classified // and has a left or right neighbor that was classified. void GenerateInitial(WERD_RES *word_res); // Generate pain points from the given path. void GenerateFromPath(float rating_cert_scale, ViterbiStateEntry *vse, WERD_RES *word_res); // Generate pain points from dangerous ambiguities in best choice. void GenerateFromAmbigs(const DANGERR &fixpt, ViterbiStateEntry *vse, WERD_RES *word_res); // Generate a pain point for the blamer. bool GenerateForBlamer(double max_char_wh_ratio, WERD_RES *word_res, int col, int row) { return GeneratePainPoint(col, row, LM_PPTYPE_BLAMER, 0.0, false, max_char_wh_ratio, word_res); } // Adds a pain point to classify chunks_record->ratings(col, row). // Returns true if a new pain point was added to an appropriate heap. // Pain point priority is set to special_priority for pain points of // LM_PPTYPE_AMBIG or LM_PPTYPE_PATH, for other pain points // AssociateStats::gap_sum is used. bool GeneratePainPoint(int col, int row, LMPainPointsType pp_type, float special_priority, bool ok_to_extend, float max_char_wh_ratio, WERD_RES *word_res); // Adjusts the pain point coordinates to cope with expansion of the ratings // matrix due to a split of the blob with the given index. void RemapForSplit(int index); private: // Priority queues containing pain points generated by the language model // The priority is set by the language model components, adjustments like // seam cost and width priority are factored into the priority. PainPointHeap pain_points_heaps_[LM_PPTYPE_NUM]; // Maximum number of points to keep in the heap. int max_heap_size_; // Maximum character width/height ratio. float max_char_wh_ratio_; // Set to true if fixed pitch should be assumed. bool fixed_pitch_; // Cached pointer to dictionary. const Dict *dict_; // Debug level for print statements. int debug_level_; }; } // namespace tesseract #endif // TESSERACT_WORDREC_PAIN_POINTS_H_
C++
/////////////////////////////////////////////////////////////////////// // File: lm_consistency.cpp // Description: Struct for recording consistency of the paths representing // OCR hypotheses. // Author: Rika Antonova // Created: Mon Jun 20 11:26:43 PST 2012 // // (C) Copyright 2012, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // //////////////////////////////////////////////////////////////////////// #include "lm_consistency.h" #include "associate.h" #include "dict.h" #include "ratngs.h" namespace tesseract { void LMConsistencyInfo::ComputeXheightConsistency( const BLOB_CHOICE *b, bool is_punc) { if (xht_decision == XH_INCONSISTENT) return; // It isn't going to get any better. // Compute xheight consistency. bool parent_null = xht_sp < 0; int parent_sp = xht_sp; // Debug strings. if (b->yshift() > LMConsistencyInfo::kShiftThresh) { xht_sp = LMConsistencyInfo::kSUP; } else if (b->yshift() < -LMConsistencyInfo::kShiftThresh) { xht_sp = LMConsistencyInfo::kSUB; } else { xht_sp = LMConsistencyInfo::kNORM; } xht_count[xht_sp]++; if (is_punc) xht_count_punc[xht_sp]++; if (!parent_null) { xpos_entropy += abs(parent_sp - xht_sp); } // TODO(eger): Figure out a better way to account for small caps. // For the first character not y-shifted, we only care if it is too small. // Too large is common in drop caps and small caps. // inT16 small_xht = b->min_xheight(); // if (parent_vse == NULL && sp == LanguageModelConsistencyInfo::kNORM) { // small_xht = 0; // } IntersectRange(b->min_xheight(), b->max_xheight(), &(xht_lo[xht_sp]), &(xht_hi[xht_sp])); // Compute xheight inconsistency kinds. if (parent_null) { if (xht_count[kNORM] == 1) { xht_decision = XH_GOOD; } else { xht_decision = XH_SUBNORMAL; } return; } // When we intersect the ranges of xheights in pixels for all characters in // each position (subscript, normal, superscript), // How much range must be left? 0? [exactly one pixel height for xheight] 1? // TODO(eger): Extend this code to take a prior for the rest of the line. const int kMinIntersectedXHeightRange = 0; for (int i = 0; i < kNumPos; i++) { if (xht_lo[i] > xht_hi[i] - kMinIntersectedXHeightRange) { xht_decision = XH_INCONSISTENT; return; } } // Reject as improbable anything where there's much punctuation in subscript // or superscript regions. if (xht_count_punc[kSUB] > xht_count[kSUB] * 0.4 || xht_count_punc[kSUP] > xht_count[kSUP] * 0.4) { xht_decision = XH_INCONSISTENT; return; } // Now check that the subscript and superscript aren't too small relative to // the mainline. double mainline_xht = static_cast<double>(xht_lo[kNORM]); double kMinSizeRatio = 0.4; if (mainline_xht > 0.0 && (static_cast<double>(xht_hi[kSUB]) / mainline_xht < kMinSizeRatio || static_cast<double>(xht_hi[kSUP]) / mainline_xht < kMinSizeRatio)) { xht_decision = XH_INCONSISTENT; return; } // TODO(eger): Check into inconsistency of super/subscript y offsets. if (xpos_entropy > kMaxEntropy) { xht_decision = XH_INCONSISTENT; return; } if (xht_count[kSUB] == 0 && xht_count[kSUP] == 0) { xht_decision = XH_GOOD; return; } xht_decision = XH_SUBNORMAL; } } // namespace tesseract
C++
/********************************************************************** * File: tface.c (Formerly tface.c) * Description: C side of the Tess/tessedit C/C++ interface. * Author: Ray Smith * Created: Mon Apr 27 11:57:06 BST 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "callcpp.h" #include "chop.h" #include "chopper.h" #include "danerror.h" #include "fxdefs.h" #include "globals.h" #include "gradechop.h" #include "pageres.h" #include "wordrec.h" #include "featdefs.h" #include "params_model.h" #include <math.h> #ifdef __UNIX__ #include <unistd.h> #endif namespace tesseract { /** * @name program_editup * * Initialize all the things in the program that need to be initialized. * init_permute determines whether to initialize the permute functions * and Dawg models. */ void Wordrec::program_editup(const char *textbase, bool init_classifier, bool init_dict) { if (textbase != NULL) imagefile = textbase; InitFeatureDefs(&feature_defs_); SetupExtractors(&feature_defs_); InitAdaptiveClassifier(init_classifier); if (init_dict) getDict().Load(Dict::GlobalDawgCache()); pass2_ok_split = chop_ok_split; } /** * @name end_recog * * Cleanup and exit the recog program. */ int Wordrec::end_recog() { program_editdown (0); return (0); } /** * @name program_editdown * * This function holds any nessessary post processing for the Wise Owl * program. */ void Wordrec::program_editdown(inT32 elasped_time) { EndAdaptiveClassifier(); getDict().End(); } /** * @name set_pass1 * * Get ready to do some pass 1 stuff. */ void Wordrec::set_pass1() { chop_ok_split.set_value(70.0); language_model_->getParamsModel().SetPass(ParamsModel::PTRAIN_PASS1); SettupPass1(); } /** * @name set_pass2 * * Get ready to do some pass 2 stuff. */ void Wordrec::set_pass2() { chop_ok_split.set_value(pass2_ok_split); language_model_->getParamsModel().SetPass(ParamsModel::PTRAIN_PASS2); SettupPass2(); } /** * @name cc_recog * * Recognize a word. */ void Wordrec::cc_recog(WERD_RES *word) { getDict().reset_hyphen_vars(word->word->flag(W_EOL)); chop_word_main(word); word->DebugWordChoices(getDict().stopper_debug_level >= 1, getDict().word_to_debug.string()); ASSERT_HOST(word->StatesAllValid()); } /** * @name dict_word() * * Test the dictionaries, returning NO_PERM (0) if not found, or one * of the PermuterType values if found, according to the dictionary. */ int Wordrec::dict_word(const WERD_CHOICE &word) { return getDict().valid_word(word); } /** * @name call_matcher * * Called from Tess with a blob in tess form. * The blob may need rotating to the correct orientation for classification. */ BLOB_CHOICE_LIST *Wordrec::call_matcher(TBLOB *tessblob) { // Rotate the blob for classification if necessary. TBLOB* rotated_blob = tessblob->ClassifyNormalizeIfNeeded(); if (rotated_blob == NULL) { rotated_blob = tessblob; } BLOB_CHOICE_LIST *ratings = new BLOB_CHOICE_LIST(); // matcher result AdaptiveClassifier(rotated_blob, ratings); if (rotated_blob != tessblob) { delete rotated_blob; } return ratings; } } // namespace tesseract
C++
/********************************************************************** * File: drawfx.cpp (Formerly drawfx.c) * Description: Draw things to do with feature extraction. * Author: Ray Smith * Created: Mon Jan 27 11:02:16 GMT 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif #include "drawfx.h" #include "normalis.h" #include "werd.h" #ifndef GRAPHICS_DISABLED #define FXDEMOWIN "FXDemo" #define FXDEMOXPOS 250 #define FXDEMOYPOS 0 #define FXDEMOXSIZE 600 #define FXDEMOYSIZE 256 #define BLN_MAX 512 //max coord for bln #define WERDWIDTH (BLN_MAX*20) #define DECENT_WERD_WIDTH (5*kBlnXHeight) //title of window #define DEBUG_WIN_NAME "FXDebug" #define DEBUG_XPOS 0 #define DEBUG_YPOS 120 #define DEBUG_XSIZE 80 #define DEBUG_YSIZE 32 #define YMAX 3508 #define XMAX 2550 #define MAXEDGELENGTH 1024 //max steps inoutline #define EXTERN EXTERN STRING_VAR (fx_debugfile, DEBUG_WIN_NAME, "Name of debugfile"); EXTERN ScrollView* fx_win = NULL; EXTERN FILE *fx_debug = NULL; /********************************************************************** * create_fx_win * * Create the fx window used to show the fit. **********************************************************************/ void create_fx_win() { //make features win fx_win = new ScrollView (FXDEMOWIN, FXDEMOXPOS, FXDEMOYPOS, FXDEMOXSIZE, FXDEMOYSIZE, WERDWIDTH*2, BLN_MAX*2, true); } /********************************************************************** * clear_fx_win * * Clear the fx window and draw on the base/mean lines. **********************************************************************/ void clear_fx_win() { //make features win fx_win->Clear(); fx_win->Pen(64,64,64); fx_win->Line(-WERDWIDTH, kBlnBaselineOffset, WERDWIDTH, kBlnBaselineOffset); fx_win->Line(-WERDWIDTH, kBlnXHeight + kBlnBaselineOffset, WERDWIDTH, kBlnXHeight + kBlnBaselineOffset); } #endif // GRAPHICS_DISABLED /********************************************************************** * create_fxdebug_win * * Create the fx window used to show the fit. **********************************************************************/ void create_fxdebug_win() { //make gradients win }
C++
/********************************************************************** * File: pgedit.cpp (Formerly pgeditor.c) * Description: Page structure file editor * Author: Phil Cheatle * Created: Thu Oct 10 16:25:24 BST 1991 * *(C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0(the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http:// www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #endif // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif #include "pgedit.h" #include <ctype.h> #include <math.h> #include "blread.h" #include "control.h" #include "paramsd.h" #include "pageres.h" #include "tordmain.h" #include "scrollview.h" #include "svmnode.h" #include "statistc.h" #include "tesseractclass.h" #include "werdit.h" #ifndef GRAPHICS_DISABLED #define ASC_HEIGHT (2 * kBlnBaselineOffset + kBlnXHeight) #define X_HEIGHT (kBlnBaselineOffset + kBlnXHeight) #define BL_HEIGHT kBlnBaselineOffset #define DESC_HEIGHT 0 #define MAXSPACING 128 /*max expected spacing in pix */ const ERRCODE EMPTYBLOCKLIST = "No blocks to edit"; enum CMD_EVENTS { NULL_CMD_EVENT, CHANGE_DISP_CMD_EVENT, DUMP_WERD_CMD_EVENT, SHOW_POINT_CMD_EVENT, SHOW_BLN_WERD_CMD_EVENT, DEBUG_WERD_CMD_EVENT, BLAMER_CMD_EVENT, BOUNDING_BOX_CMD_EVENT, CORRECT_TEXT_CMD_EVENT, POLYGONAL_CMD_EVENT, BL_NORM_CMD_EVENT, BITMAP_CMD_EVENT, IMAGE_CMD_EVENT, BLOCKS_CMD_EVENT, BASELINES_CMD_EVENT, UNIFORM_DISP_CMD_EVENT, REFRESH_CMD_EVENT, QUIT_CMD_EVENT, RECOG_WERDS, RECOG_PSEUDO, SHOW_BLOB_FEATURES, SHOW_SUBSCRIPT_CMD_EVENT, SHOW_SUPERSCRIPT_CMD_EVENT, SHOW_ITALIC_CMD_EVENT, SHOW_BOLD_CMD_EVENT, SHOW_UNDERLINE_CMD_EVENT, SHOW_FIXEDPITCH_CMD_EVENT, SHOW_SERIF_CMD_EVENT, SHOW_SMALLCAPS_CMD_EVENT, SHOW_DROPCAPS_CMD_EVENT, }; enum ColorationMode { CM_RAINBOW, CM_SUBSCRIPT, CM_SUPERSCRIPT, CM_ITALIC, CM_BOLD, CM_UNDERLINE, CM_FIXEDPITCH, CM_SERIF, CM_SMALLCAPS, CM_DROPCAPS }; /* * * Some global data * */ ScrollView* image_win; ParamsEditor* pe; bool stillRunning = false; #ifdef __UNIX__ FILE *debug_window = NULL; // opened on demand #endif ScrollView* bln_word_window = NULL; // baseline norm words CMD_EVENTS mode = CHANGE_DISP_CMD_EVENT; // selected words op bool recog_done = false; // recog_all_words was called // These variables should remain global, since they are only used for the // debug mode (in which only a single Tesseract thread/instance will be exist). BITS16 word_display_mode; static ColorationMode color_mode = CM_RAINBOW; BOOL8 display_image = FALSE; BOOL8 display_blocks = FALSE; BOOL8 display_baselines = FALSE; PAGE_RES *current_page_res = NULL; STRING_VAR(editor_image_win_name, "EditorImage", "Editor image window name"); INT_VAR(editor_image_xpos, 590, "Editor image X Pos"); INT_VAR(editor_image_ypos, 10, "Editor image Y Pos"); INT_VAR(editor_image_menuheight, 50, "Add to image height for menu bar"); INT_VAR(editor_image_word_bb_color, ScrollView::BLUE, "Word bounding box colour"); INT_VAR(editor_image_blob_bb_color, ScrollView::YELLOW, "Blob bounding box colour"); INT_VAR(editor_image_text_color, ScrollView::WHITE, "Correct text colour"); STRING_VAR(editor_dbwin_name, "EditorDBWin", "Editor debug window name"); INT_VAR(editor_dbwin_xpos, 50, "Editor debug window X Pos"); INT_VAR(editor_dbwin_ypos, 500, "Editor debug window Y Pos"); INT_VAR(editor_dbwin_height, 24, "Editor debug window height"); INT_VAR(editor_dbwin_width, 80, "Editor debug window width"); STRING_VAR(editor_word_name, "BlnWords", "BL normalized word window"); INT_VAR(editor_word_xpos, 60, "Word window X Pos"); INT_VAR(editor_word_ypos, 510, "Word window Y Pos"); INT_VAR(editor_word_height, 240, "Word window height"); INT_VAR(editor_word_width, 655, "Word window width"); STRING_VAR(editor_debug_config_file, "", "Config file to apply to single words"); class BlnEventHandler : public SVEventHandler { public: void Notify(const SVEvent* sv_event) { if (sv_event->type == SVET_DESTROY) bln_word_window = NULL; else if (sv_event->type == SVET_CLICK) show_point(current_page_res, sv_event->x, sv_event->y); } }; /** * bln_word_window_handle() * * @return a WINDOW for the word window, creating it if necessary */ ScrollView* bln_word_window_handle() { // return handle // not opened yet if (bln_word_window == NULL) { pgeditor_msg("Creating BLN word window..."); bln_word_window = new ScrollView(editor_word_name.string(), editor_word_xpos, editor_word_ypos, editor_word_width, editor_word_height, 4000, 4000, true); BlnEventHandler* a = new BlnEventHandler(); bln_word_window->AddEventHandler(a); pgeditor_msg("Creating BLN word window...Done"); } return bln_word_window; } /** * build_image_window() * * Destroy the existing image window if there is one. Work out how big the * new window needs to be. Create it and re-display. */ void build_image_window(int width, int height) { if (image_win != NULL) { delete image_win; } image_win = new ScrollView(editor_image_win_name.string(), editor_image_xpos, editor_image_ypos, width + 1, height + editor_image_menuheight + 1, width, height, true); } /** * display_bln_lines() * * Display normalized baseline, x-height, ascender limit and descender limit */ void display_bln_lines(ScrollView* window, ScrollView::Color colour, float scale_factor, float y_offset, float minx, float maxx) { window->Pen(colour); window->Line(minx, y_offset + scale_factor * DESC_HEIGHT, maxx, y_offset + scale_factor * DESC_HEIGHT); window->Line(minx, y_offset + scale_factor * BL_HEIGHT, maxx, y_offset + scale_factor * BL_HEIGHT); window->Line(minx, y_offset + scale_factor * X_HEIGHT, maxx, y_offset + scale_factor * X_HEIGHT); window->Line(minx, y_offset + scale_factor * ASC_HEIGHT, maxx, y_offset + scale_factor * ASC_HEIGHT); } /** * notify() * * Event handler that processes incoming events, either forwarding * them to process_cmd_win_event or process_image_event. * */ void PGEventHandler::Notify(const SVEvent* event) { char myval = '0'; if (event->type == SVET_POPUP) { pe->Notify(event); } // These are handled by ParamsEditor else if (event->type == SVET_EXIT) { stillRunning = false; } else if (event->type == SVET_MENU) { if (strcmp(event->parameter, "true") == 0) { myval = 'T'; } else if (strcmp(event->parameter, "false") == 0) { myval = 'F'; } tess_->process_cmd_win_event(event->command_id, &myval); } else { tess_->process_image_event(*event); } } /** * build_menu() * * Construct the menu tree used by the command window */ namespace tesseract { SVMenuNode *Tesseract::build_menu_new() { SVMenuNode* parent_menu; SVMenuNode* root_menu_item = new SVMenuNode(); SVMenuNode* modes_menu_item = root_menu_item->AddChild("MODES"); modes_menu_item->AddChild("Change Display", CHANGE_DISP_CMD_EVENT); modes_menu_item->AddChild("Dump Word", DUMP_WERD_CMD_EVENT); modes_menu_item->AddChild("Show Point", SHOW_POINT_CMD_EVENT); modes_menu_item->AddChild("Show BL Norm Word", SHOW_BLN_WERD_CMD_EVENT); modes_menu_item->AddChild("Config Words", DEBUG_WERD_CMD_EVENT); modes_menu_item->AddChild("Recog Words", RECOG_WERDS); modes_menu_item->AddChild("Recog Blobs", RECOG_PSEUDO); modes_menu_item->AddChild("Show Blob Features", SHOW_BLOB_FEATURES); parent_menu = root_menu_item->AddChild("DISPLAY"); parent_menu->AddChild("Blamer", BLAMER_CMD_EVENT, FALSE); parent_menu->AddChild("Bounding Boxes", BOUNDING_BOX_CMD_EVENT, FALSE); parent_menu->AddChild("Correct Text", CORRECT_TEXT_CMD_EVENT, FALSE); parent_menu->AddChild("Polygonal Approx", POLYGONAL_CMD_EVENT, FALSE); parent_menu->AddChild("Baseline Normalized", BL_NORM_CMD_EVENT, FALSE); parent_menu->AddChild("Edge Steps", BITMAP_CMD_EVENT, TRUE); parent_menu->AddChild("Subscripts", SHOW_SUBSCRIPT_CMD_EVENT); parent_menu->AddChild("Superscripts", SHOW_SUPERSCRIPT_CMD_EVENT); parent_menu->AddChild("Italics", SHOW_ITALIC_CMD_EVENT); parent_menu->AddChild("Bold", SHOW_BOLD_CMD_EVENT); parent_menu->AddChild("Underline", SHOW_UNDERLINE_CMD_EVENT); parent_menu->AddChild("FixedPitch", SHOW_FIXEDPITCH_CMD_EVENT); parent_menu->AddChild("Serifs", SHOW_SERIF_CMD_EVENT); parent_menu->AddChild("SmallCaps", SHOW_SMALLCAPS_CMD_EVENT); parent_menu->AddChild("DropCaps", SHOW_DROPCAPS_CMD_EVENT); parent_menu = root_menu_item->AddChild("OTHER"); parent_menu->AddChild("Quit", QUIT_CMD_EVENT); parent_menu->AddChild("Show Image", IMAGE_CMD_EVENT, FALSE); parent_menu->AddChild("ShowBlock Outlines", BLOCKS_CMD_EVENT, FALSE); parent_menu->AddChild("Show Baselines", BASELINES_CMD_EVENT, FALSE); parent_menu->AddChild("Uniform Display", UNIFORM_DISP_CMD_EVENT); parent_menu->AddChild("Refresh Display", REFRESH_CMD_EVENT); return root_menu_item; } /** * do_re_display() * * Redisplay page */ void Tesseract::do_re_display( BOOL8 (tesseract::Tesseract::*word_painter)(PAGE_RES_IT* pr_it)) { int block_count = 1; image_win->Clear(); if (display_image != 0) { image_win->Image(pix_binary_, 0, 0); } PAGE_RES_IT pr_it(current_page_res); for (WERD_RES* word = pr_it.word(); word != NULL; word = pr_it.forward()) { (this->*word_painter)(&pr_it); if (display_baselines && pr_it.row() != pr_it.prev_row()) pr_it.row()->row->plot_baseline(image_win, ScrollView::GREEN); if (display_blocks && pr_it.block() != pr_it.prev_block()) pr_it.block()->block->plot(image_win, block_count++, ScrollView::RED); } image_win->Update(); } /** * pgeditor_main() * * Top level editor operation: * Setup a new window and an according event handler * */ void Tesseract::pgeditor_main(int width, int height, PAGE_RES *page_res) { current_page_res = page_res; if (current_page_res->block_res_list.empty()) return; recog_done = false; stillRunning = true; build_image_window(width, height); word_display_mode.turn_on_bit(DF_EDGE_STEP); do_re_display(&tesseract::Tesseract::word_set_display); #ifndef GRAPHICS_DISABLED pe = new ParamsEditor(this, image_win); #endif PGEventHandler pgEventHandler(this); image_win->AddEventHandler(&pgEventHandler); image_win->AddMessageBox(); SVMenuNode* svMenuRoot = build_menu_new(); svMenuRoot->BuildMenu(image_win); image_win->SetVisible(true); image_win->AwaitEvent(SVET_DESTROY); image_win->AddEventHandler(NULL); } } // namespace tesseract /** * pgeditor_msg() * * Display a message - in the command window if there is one, or to stdout */ void pgeditor_msg( // message display const char *msg) { image_win->AddMessage(msg); } /** * pgeditor_show_point() * * Display the coordinates of a point in the command window */ void pgeditor_show_point( // display coords SVEvent *event) { image_win->AddMessage("Pointing at(%d, %d)", event->x, event->y); } /** * process_cmd_win_event() * * Process a command returned from the command window * (Just call the appropriate command handler) */ namespace tesseract { BOOL8 Tesseract::process_cmd_win_event( // UI command semantics inT32 cmd_event, // which menu item? char *new_value // any prompt data ) { char msg[160]; BOOL8 exit = FALSE; color_mode = CM_RAINBOW; // Run recognition on the full page if needed. switch (cmd_event) { case BLAMER_CMD_EVENT: case SHOW_SUBSCRIPT_CMD_EVENT: case SHOW_SUPERSCRIPT_CMD_EVENT: case SHOW_ITALIC_CMD_EVENT: case SHOW_BOLD_CMD_EVENT: case SHOW_UNDERLINE_CMD_EVENT: case SHOW_FIXEDPITCH_CMD_EVENT: case SHOW_SERIF_CMD_EVENT: case SHOW_SMALLCAPS_CMD_EVENT: case SHOW_DROPCAPS_CMD_EVENT: if (!recog_done) { recog_all_words(current_page_res, NULL, NULL, NULL, 0); recog_done = true; } break; default: break; } switch (cmd_event) { case NULL_CMD_EVENT: break; case CHANGE_DISP_CMD_EVENT: case DUMP_WERD_CMD_EVENT: case SHOW_POINT_CMD_EVENT: case SHOW_BLN_WERD_CMD_EVENT: case RECOG_WERDS: case RECOG_PSEUDO: case SHOW_BLOB_FEATURES: mode =(CMD_EVENTS) cmd_event; break; case DEBUG_WERD_CMD_EVENT: mode = DEBUG_WERD_CMD_EVENT; word_config_ = image_win->ShowInputDialog("Config File Name"); break; case BOUNDING_BOX_CMD_EVENT: if (new_value[0] == 'T') word_display_mode.turn_on_bit(DF_BOX); else word_display_mode.turn_off_bit(DF_BOX); mode = CHANGE_DISP_CMD_EVENT; break; case BLAMER_CMD_EVENT: if (new_value[0] == 'T') word_display_mode.turn_on_bit(DF_BLAMER); else word_display_mode.turn_off_bit(DF_BLAMER); do_re_display(&tesseract::Tesseract::word_display); mode = CHANGE_DISP_CMD_EVENT; break; case CORRECT_TEXT_CMD_EVENT: if (new_value[0] == 'T') word_display_mode.turn_on_bit(DF_TEXT); else word_display_mode.turn_off_bit(DF_TEXT); mode = CHANGE_DISP_CMD_EVENT; break; case POLYGONAL_CMD_EVENT: if (new_value[0] == 'T') word_display_mode.turn_on_bit(DF_POLYGONAL); else word_display_mode.turn_off_bit(DF_POLYGONAL); mode = CHANGE_DISP_CMD_EVENT; break; case BL_NORM_CMD_EVENT: if (new_value[0] == 'T') word_display_mode.turn_on_bit(DF_BN_POLYGONAL); else word_display_mode.turn_off_bit(DF_BN_POLYGONAL); mode = CHANGE_DISP_CMD_EVENT; break; case BITMAP_CMD_EVENT: if (new_value[0] == 'T') word_display_mode.turn_on_bit(DF_EDGE_STEP); else word_display_mode.turn_off_bit(DF_EDGE_STEP); mode = CHANGE_DISP_CMD_EVENT; break; case UNIFORM_DISP_CMD_EVENT: do_re_display(&tesseract::Tesseract::word_set_display); break; case IMAGE_CMD_EVENT: display_image =(new_value[0] == 'T'); do_re_display(&tesseract::Tesseract::word_display); break; case BLOCKS_CMD_EVENT: display_blocks =(new_value[0] == 'T'); do_re_display(&tesseract::Tesseract::word_display); break; case BASELINES_CMD_EVENT: display_baselines =(new_value[0] == 'T'); do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_SUBSCRIPT_CMD_EVENT: color_mode = CM_SUBSCRIPT; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_SUPERSCRIPT_CMD_EVENT: color_mode = CM_SUPERSCRIPT; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_ITALIC_CMD_EVENT: color_mode = CM_ITALIC; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_BOLD_CMD_EVENT: color_mode = CM_BOLD; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_UNDERLINE_CMD_EVENT: color_mode = CM_UNDERLINE; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_FIXEDPITCH_CMD_EVENT: color_mode = CM_FIXEDPITCH; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_SERIF_CMD_EVENT: color_mode = CM_SERIF; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_SMALLCAPS_CMD_EVENT: color_mode = CM_SMALLCAPS; do_re_display(&tesseract::Tesseract::word_display); break; case SHOW_DROPCAPS_CMD_EVENT: color_mode = CM_DROPCAPS; do_re_display(&tesseract::Tesseract::word_display); break; case REFRESH_CMD_EVENT: do_re_display(&tesseract::Tesseract::word_display); break; case QUIT_CMD_EVENT: exit = TRUE; ScrollView::Exit(); break; default: sprintf(msg, "Unrecognised event " INT32FORMAT "(%s)", cmd_event, new_value); image_win->AddMessage(msg); break; } return exit; } /** * process_image_event() * * User has done something in the image window - mouse down or up. Work out * what it is and do something with it. * If DOWN - just remember where it was. * If UP - for each word in the selected area do the operation defined by * the current mode. */ void Tesseract::process_image_event( // action in image win const SVEvent &event) { // The following variable should remain static, since it is used by // debug editor, which uses a single Tesseract instance. static ICOORD down; ICOORD up; TBOX selection_box; char msg[80]; switch(event.type) { case SVET_SELECTION: if (event.type == SVET_SELECTION) { down.set_x(event.x + event.x_size); down.set_y(event.y + event.y_size); if (mode == SHOW_POINT_CMD_EVENT) show_point(current_page_res, event.x, event.y); } up.set_x(event.x); up.set_y(event.y); selection_box = TBOX(down, up); switch(mode) { case CHANGE_DISP_CMD_EVENT: process_selected_words( current_page_res, selection_box, &tesseract::Tesseract::word_blank_and_set_display); break; case DUMP_WERD_CMD_EVENT: process_selected_words(current_page_res, selection_box, &tesseract::Tesseract::word_dumper); break; case SHOW_BLN_WERD_CMD_EVENT: process_selected_words(current_page_res, selection_box, &tesseract::Tesseract::word_bln_display); break; case DEBUG_WERD_CMD_EVENT: debug_word(current_page_res, selection_box); break; case SHOW_POINT_CMD_EVENT: break; // ignore up event case RECOG_WERDS: image_win->AddMessage("Recogging selected words"); this->process_selected_words(current_page_res, selection_box, &Tesseract::recog_interactive); break; case RECOG_PSEUDO: image_win->AddMessage("Recogging selected blobs"); recog_pseudo_word(current_page_res, selection_box); break; case SHOW_BLOB_FEATURES: blob_feature_display(current_page_res, selection_box); break; default: sprintf(msg, "Mode %d not yet implemented", mode); image_win->AddMessage(msg); break; } default: break; } } /** * debug_word * * Process the whole image, but load word_config_ for the selected word(s). */ void Tesseract::debug_word(PAGE_RES* page_res, const TBOX &selection_box) { ResetAdaptiveClassifier(); recog_all_words(page_res, NULL, &selection_box, word_config_.string(), 0); } } // namespace tesseract /** * show_point() * * Show coords of point, blob bounding box, word bounding box and offset from * row baseline */ void show_point(PAGE_RES* page_res, float x, float y) { FCOORD pt(x, y); PAGE_RES_IT pr_it(page_res); char msg[160]; char *msg_ptr = msg; msg_ptr += sprintf(msg_ptr, "Pt:(%0.3f, %0.3f) ", x, y); for (WERD_RES* word = pr_it.word(); word != NULL; word = pr_it.forward()) { if (pr_it.row() != pr_it.prev_row() && pr_it.row()->row->bounding_box().contains(pt)) { msg_ptr += sprintf(msg_ptr, "BL(x)=%0.3f ", pr_it.row()->row->base_line(x)); } if (word->word->bounding_box().contains(pt)) { TBOX box = word->word->bounding_box(); msg_ptr += sprintf(msg_ptr, "Wd(%d, %d)/(%d, %d) ", box.left(), box.bottom(), box.right(), box.top()); C_BLOB_IT cblob_it(word->word->cblob_list()); for (cblob_it.mark_cycle_pt(); !cblob_it.cycled_list(); cblob_it.forward()) { C_BLOB* cblob = cblob_it.data(); box = cblob->bounding_box(); if (box.contains(pt)) { msg_ptr += sprintf(msg_ptr, "CBlb(%d, %d)/(%d, %d) ", box.left(), box.bottom(), box.right(), box.top()); } } } } image_win->AddMessage(msg); } /********************************************************************** * WERD PROCESSOR FUNCTIONS * ======================== * * These routines are invoked by one or more of: * process_all_words() * process_selected_words() * or * process_all_words_it() * process_selected_words_it() * for each word to be processed **********************************************************************/ /** * word_blank_and_set_display() Word processor * * Blank display of word then redisplay word according to current display mode * settings */ #endif // GRAPHICS_DISABLED namespace tesseract { #ifndef GRAPHICS_DISABLED BOOL8 Tesseract:: word_blank_and_set_display(PAGE_RES_IT* pr_it) { pr_it->word()->word->bounding_box().plot(image_win, ScrollView::BLACK, ScrollView::BLACK); return word_set_display(pr_it); } /** * word_bln_display() * * Normalize word and display in word window */ BOOL8 Tesseract::word_bln_display(PAGE_RES_IT* pr_it) { WERD_RES* word_res = pr_it->word(); if (word_res->chopped_word == NULL) { // Setup word normalization parameters. word_res->SetupForRecognition(unicharset, this, BestPix(), tessedit_ocr_engine_mode, NULL, classify_bln_numeric_mode, textord_use_cjk_fp_model, poly_allow_detailed_fx, pr_it->row()->row, pr_it->block()->block); } bln_word_window_handle()->Clear(); display_bln_lines(bln_word_window_handle(), ScrollView::CYAN, 1.0, 0.0f, -1000.0f, 1000.0f); C_BLOB_IT it(word_res->word->cblob_list()); ScrollView::Color color = WERD::NextColor(ScrollView::BLACK); for (it.mark_cycle_pt(); !it.cycled_list(); it.forward()) { it.data()->plot_normed(word_res->denorm, color, ScrollView::BROWN, bln_word_window_handle()); color = WERD::NextColor(color); } bln_word_window_handle()->Update(); return TRUE; } /** * word_display() Word Processor * * Display a word according to its display modes */ BOOL8 Tesseract::word_display(PAGE_RES_IT* pr_it) { WERD_RES* word_res = pr_it->word(); WERD* word = word_res->word; TBOX word_bb; // word bounding box int word_height; // ht of word BB BOOL8 displayed_something = FALSE; float shift; // from bot left C_BLOB_IT c_it; // cblob iterator if (color_mode != CM_RAINBOW && word_res->box_word != NULL) { BoxWord* box_word = word_res->box_word; WERD_CHOICE* best_choice = word_res->best_choice; int length = box_word->length(); if (word_res->fontinfo == NULL) return false; const FontInfo& font_info = *word_res->fontinfo; for (int i = 0; i < length; ++i) { ScrollView::Color color = ScrollView::GREEN; switch (color_mode) { case CM_SUBSCRIPT: if (best_choice->BlobPosition(i) == SP_SUBSCRIPT) color = ScrollView::RED; break; case CM_SUPERSCRIPT: if (best_choice->BlobPosition(i) == SP_SUPERSCRIPT) color = ScrollView::RED; break; case CM_ITALIC: if (font_info.is_italic()) color = ScrollView::RED; break; case CM_BOLD: if (font_info.is_bold()) color = ScrollView::RED; break; case CM_FIXEDPITCH: if (font_info.is_fixed_pitch()) color = ScrollView::RED; break; case CM_SERIF: if (font_info.is_serif()) color = ScrollView::RED; break; case CM_SMALLCAPS: if (word_res->small_caps) color = ScrollView::RED; break; case CM_DROPCAPS: if (best_choice->BlobPosition(i) == SP_DROPCAP) color = ScrollView::RED; break; // TODO(rays) underline is currently completely unsupported. case CM_UNDERLINE: default: break; } image_win->Pen(color); TBOX box = box_word->BlobBox(i); image_win->Rectangle(box.left(), box.bottom(), box.right(), box.top()); } return true; } /* Note the double coercions of(COLOUR)((inT32)editor_image_word_bb_color) etc. are to keep the compiler happy. */ // display bounding box if (word->display_flag(DF_BOX)) { word->bounding_box().plot(image_win, (ScrollView::Color)((inT32) editor_image_word_bb_color), (ScrollView::Color)((inT32) editor_image_word_bb_color)); ScrollView::Color c = (ScrollView::Color) ((inT32) editor_image_blob_bb_color); image_win->Pen(c); c_it.set_to_list(word->cblob_list()); for (c_it.mark_cycle_pt(); !c_it.cycled_list(); c_it.forward()) c_it.data()->bounding_box().plot(image_win); displayed_something = TRUE; } // display edge steps if (word->display_flag(DF_EDGE_STEP)) { // edgesteps available word->plot(image_win); // rainbow colors displayed_something = TRUE; } // display poly approx if (word->display_flag(DF_POLYGONAL)) { // need to convert TWERD* tword = TWERD::PolygonalCopy(poly_allow_detailed_fx, word); tword->plot(image_win); delete tword; displayed_something = TRUE; } // Display correct text and blamer information. STRING text; STRING blame; if (word->display_flag(DF_TEXT) && word->text() != NULL) { text = word->text(); } if (word->display_flag(DF_BLAMER) && !(word_res->blamer_bundle != NULL && word_res->blamer_bundle->incorrect_result_reason() == IRR_CORRECT)) { text = ""; const BlamerBundle *blamer_bundle = word_res->blamer_bundle; if (blamer_bundle == NULL) { text += "NULL"; } else { text = blamer_bundle->TruthString(); } text += " -> "; STRING best_choice_str; if (word_res->best_choice == NULL) { best_choice_str = "NULL"; } else { word_res->best_choice->string_and_lengths(&best_choice_str, NULL); } text += best_choice_str; IncorrectResultReason reason = (blamer_bundle == NULL) ? IRR_PAGE_LAYOUT : blamer_bundle->incorrect_result_reason(); ASSERT_HOST(reason < IRR_NUM_REASONS) blame += " ["; blame += BlamerBundle::IncorrectReasonName(reason); blame += "]"; } if (text.length() > 0) { word_bb = word->bounding_box(); image_win->Pen(ScrollView::RED); word_height = word_bb.height(); int text_height = 0.50 * word_height; if (text_height > 20) text_height = 20; image_win->TextAttributes("Arial", text_height, false, false, false); shift = (word_height < word_bb.width()) ? 0.25 * word_height : 0.0f; image_win->Text(word_bb.left() + shift, word_bb.bottom() + 0.25 * word_height, text.string()); if (blame.length() > 0) { image_win->Text(word_bb.left() + shift, word_bb.bottom() + 0.25 * word_height - text_height, blame.string()); } displayed_something = TRUE; } if (!displayed_something) // display BBox anyway word->bounding_box().plot(image_win, (ScrollView::Color)((inT32) editor_image_word_bb_color), (ScrollView::Color)((inT32) editor_image_word_bb_color)); return TRUE; } #endif // GRAPHICS_DISABLED /** * word_dumper() * * Dump members to the debug window */ BOOL8 Tesseract::word_dumper(PAGE_RES_IT* pr_it) { if (pr_it->block()->block != NULL) { tprintf("\nBlock data...\n"); pr_it->block()->block->print(NULL, FALSE); } tprintf("\nRow data...\n"); pr_it->row()->row->print(NULL); tprintf("\nWord data...\n"); WERD_RES* word_res = pr_it->word(); word_res->word->print(); if (word_res->blamer_bundle != NULL && wordrec_debug_blamer && word_res->blamer_bundle->incorrect_result_reason() != IRR_CORRECT) { tprintf("Current blamer debug: %s\n", word_res->blamer_bundle->debug().string()); } return TRUE; } #ifndef GRAPHICS_DISABLED /** * word_set_display() Word processor * * Display word according to current display mode settings */ BOOL8 Tesseract::word_set_display(PAGE_RES_IT* pr_it) { WERD* word = pr_it->word()->word; word->set_display_flag(DF_BOX, word_display_mode.bit(DF_BOX)); word->set_display_flag(DF_TEXT, word_display_mode.bit(DF_TEXT)); word->set_display_flag(DF_POLYGONAL, word_display_mode.bit(DF_POLYGONAL)); word->set_display_flag(DF_EDGE_STEP, word_display_mode.bit(DF_EDGE_STEP)); word->set_display_flag(DF_BN_POLYGONAL, word_display_mode.bit(DF_BN_POLYGONAL)); word->set_display_flag(DF_BLAMER, word_display_mode.bit(DF_BLAMER)); return word_display(pr_it); } // page_res is non-const because the iterator doesn't know if you are going // to change the items it points to! Really a const here though. void Tesseract::blob_feature_display(PAGE_RES* page_res, const TBOX& selection_box) { PAGE_RES_IT* it = make_pseudo_word(page_res, selection_box); if (it != NULL) { WERD_RES* word_res = it->word(); word_res->x_height = it->row()->row->x_height(); word_res->SetupForRecognition(unicharset, this, BestPix(), tessedit_ocr_engine_mode, NULL, classify_bln_numeric_mode, textord_use_cjk_fp_model, poly_allow_detailed_fx, it->row()->row, it->block()->block); TWERD* bln_word = word_res->chopped_word; TBLOB* bln_blob = bln_word->blobs[0]; INT_FX_RESULT_STRUCT fx_info; GenericVector<INT_FEATURE_STRUCT> bl_features; GenericVector<INT_FEATURE_STRUCT> cn_features; Classify::ExtractFeatures(*bln_blob, classify_nonlinear_norm, &bl_features, &cn_features, &fx_info, NULL); // Display baseline features. ScrollView* bl_win = CreateFeatureSpaceWindow("BL Features", 512, 0); ClearFeatureSpaceWindow(baseline, bl_win); for (int f = 0; f < bl_features.size(); ++f) RenderIntFeature(bl_win, &bl_features[f], ScrollView::GREEN); bl_win->Update(); // Display cn features. ScrollView* cn_win = CreateFeatureSpaceWindow("CN Features", 512, 0); ClearFeatureSpaceWindow(character, cn_win); for (int f = 0; f < cn_features.size(); ++f) RenderIntFeature(cn_win, &cn_features[f], ScrollView::GREEN); cn_win->Update(); it->DeleteCurrentWord(); delete it; } } #endif // GRAPHICS_DISABLED } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: par_control.cpp // Description: Control code for parallel implementation. // Author: Ray Smith // Created: Mon Nov 04 13:23:15 PST 2013 // // (C) Copyright 2013, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "tesseractclass.h" namespace tesseract { struct BlobData { BlobData() : blob(NULL), choices(NULL) {} BlobData(int index, Tesseract* tess, const WERD_RES& word) : blob(word.chopped_word->blobs[index]), tesseract(tess), choices(&(*word.ratings)(index, index)) {} TBLOB* blob; Tesseract* tesseract; BLOB_CHOICE_LIST** choices; }; void Tesseract::PrerecAllWordsPar(const GenericVector<WordData>& words) { // Prepare all the blobs. GenericVector<BlobData> blobs; for (int w = 0; w < words.size(); ++w) { if (words[w].word->ratings != NULL && words[w].word->ratings->get(0, 0) == NULL) { for (int s = 0; s < words[w].lang_words.size(); ++s) { Tesseract* sub = s < sub_langs_.size() ? sub_langs_[s] : this; const WERD_RES& word = *words[w].lang_words[s]; for (int b = 0; b < word.chopped_word->NumBlobs(); ++b) { blobs.push_back(BlobData(b, sub, word)); } } } } // Pre-classify all the blobs. if (tessedit_parallelize > 1) { #pragma omp parallel for num_threads(10) for (int b = 0; b < blobs.size(); ++b) { *blobs[b].choices = blobs[b].tesseract->classify_blob(blobs[b].blob, "par", White, NULL); } } else { // TODO(AMD) parallelize this. for (int b = 0; b < blobs.size(); ++b) { *blobs[b].choices = blobs[b].tesseract->classify_blob(blobs[b].blob, "par", White, NULL); } } } } // namespace tesseract.
C++
/////////////////////////////////////////////////////////////////////// // File: resultiterator.h // Description: Iterator for tesseract results that is capable of // iterating in proper reading order over Bi Directional // (e.g. mixed Hebrew and English) text. // Author: David Eger // Created: Fri May 27 13:58:06 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_RESULT_ITERATOR_H__ #define TESSERACT_CCMAIN_RESULT_ITERATOR_H__ #include "platform.h" #include "ltrresultiterator.h" template <typename T> class GenericVector; template <typename T> class GenericVectorEqEq; class BLOB_CHOICE_IT; class WERD_RES; class STRING; namespace tesseract { class Tesseract; class TESS_API ResultIterator : public LTRResultIterator { public: static ResultIterator *StartOfParagraph(const LTRResultIterator &resit); /** * ResultIterator is copy constructible! * The default copy constructor works just fine for us. */ virtual ~ResultIterator() {} // ============= Moving around within the page ============. /** * Moves the iterator to point to the start of the page to begin * an iteration. */ virtual void Begin(); /** * Moves to the start of the next object at the given level in the * page hierarchy in the appropriate reading order and returns false if * the end of the page was reached. * NOTE that RIL_SYMBOL will skip non-text blocks, but all other * PageIteratorLevel level values will visit each non-text block once. * Think of non text blocks as containing a single para, with a single line, * with a single imaginary word. * Calls to Next with different levels may be freely intermixed. * This function iterates words in right-to-left scripts correctly, if * the appropriate language has been loaded into Tesseract. */ virtual bool Next(PageIteratorLevel level); /** * IsAtBeginningOf() returns whether we're at the logical beginning of the * given level. (as opposed to ResultIterator's left-to-right top-to-bottom * order). Otherwise, this acts the same as PageIterator::IsAtBeginningOf(). * For a full description, see pageiterator.h */ virtual bool IsAtBeginningOf(PageIteratorLevel level) const; /** * Implement PageIterator's IsAtFinalElement correctly in a BiDi context. * For instance, IsAtFinalElement(RIL_PARA, RIL_WORD) returns whether we * point at the last word in a paragraph. See PageIterator for full comment. */ virtual bool IsAtFinalElement(PageIteratorLevel level, PageIteratorLevel element) const; // ============= Accessing data ==============. /** * Returns the null terminated UTF-8 encoded text string for the current * object at the given level. Use delete [] to free after use. */ virtual char* GetUTF8Text(PageIteratorLevel level) const; /** * Return whether the current paragraph's dominant reading direction * is left-to-right (as opposed to right-to-left). */ bool ParagraphIsLtr() const; // ============= Exposed only for testing =============. /** * Yields the reading order as a sequence of indices and (optional) * meta-marks for a set of words (given left-to-right). * The meta marks are passed as negative values: * kMinorRunStart Start of minor direction text. * kMinorRunEnd End of minor direction text. * kComplexWord The next indexed word contains both left-to-right and * right-to-left characters and was treated as neutral. * * For example, suppose we have five words in a text line, * indexed [0,1,2,3,4] from the leftmost side of the text line. * The following are all believable reading_orders: * * Left-to-Right (in ltr paragraph): * { 0, 1, 2, 3, 4 } * Left-to-Right (in rtl paragraph): * { kMinorRunStart, 0, 1, 2, 3, 4, kMinorRunEnd } * Right-to-Left (in rtl paragraph): * { 4, 3, 2, 1, 0 } * Left-to-Right except for an RTL phrase in words 2, 3 in an ltr paragraph: * { 0, 1, kMinorRunStart, 3, 2, kMinorRunEnd, 4 } */ static void CalculateTextlineOrder( bool paragraph_is_ltr, const GenericVector<StrongScriptDirection> &word_dirs, GenericVectorEqEq<int> *reading_order); static const int kMinorRunStart; static const int kMinorRunEnd; static const int kComplexWord; protected: /** * We presume the data associated with the given iterator will outlive us. * NB: This is private because it does something that is non-obvious: * it resets to the beginning of the paragraph instead of staying wherever * resit might have pointed. */ TESS_LOCAL explicit ResultIterator(const LTRResultIterator &resit); private: /** * Calculates the current paragraph's dominant writing direction. * Typically, members should use current_paragraph_ltr_ instead. */ bool CurrentParagraphIsLtr() const; /** * Returns word indices as measured from resit->RestartRow() = index 0 * for the reading order of words within a textline given an iterator * into the middle of the text line. * In addition to non-negative word indices, the following negative values * may be inserted: * kMinorRunStart Start of minor direction text. * kMinorRunEnd End of minor direction text. * kComplexWord The previous word contains both left-to-right and * right-to-left characters and was treated as neutral. */ void CalculateTextlineOrder(bool paragraph_is_ltr, const LTRResultIterator &resit, GenericVectorEqEq<int> *indices) const; /** Same as above, but the caller's ssd gets filled in if ssd != NULL. */ void CalculateTextlineOrder(bool paragraph_is_ltr, const LTRResultIterator &resit, GenericVector<StrongScriptDirection> *ssd, GenericVectorEqEq<int> *indices) const; /** * What is the index of the current word in a strict left-to-right reading * of the row? */ int LTRWordIndex() const; /** * Given an iterator pointing at a word, returns the logical reading order * of blob indices for the word. */ void CalculateBlobOrder(GenericVector<int> *blob_indices) const; /** Precondition: current_paragraph_is_ltr_ is set. */ void MoveToLogicalStartOfTextline(); /** * Precondition: current_paragraph_is_ltr_ and in_minor_direction_ * are set. */ void MoveToLogicalStartOfWord(); /** Are we pointing at the final (reading order) symbol of the word? */ bool IsAtFinalSymbolOfWord() const; /** Are we pointing at the first (reading order) symbol of the word? */ bool IsAtFirstSymbolOfWord() const; /** * Append any extra marks that should be appended to this word when printed. * Mostly, these are Unicode BiDi control characters. */ void AppendSuffixMarks(STRING *text) const; /** Appends the current word in reading order to the given buffer.*/ void AppendUTF8WordText(STRING *text) const; /** * Appends the text of the current text line, *assuming this iterator is * positioned at the beginning of the text line* This function * updates the iterator to point to the first position past the text line. * Each textline is terminated in a single newline character. * If the textline ends a paragraph, it gets a second terminal newline. */ void IterateAndAppendUTF8TextlineText(STRING *text); /** * Appends the text of the current paragraph in reading order * to the given buffer. * Each textline is terminated in a single newline character, and the * paragraph gets an extra newline at the end. */ void AppendUTF8ParagraphText(STRING *text) const; /** Returns whether the bidi_debug flag is set to at least min_level. */ bool BidiDebug(int min_level) const; bool current_paragraph_is_ltr_; /** * Is the currently pointed-at character at the beginning of * a minor-direction run? */ bool at_beginning_of_minor_run_; /** Is the currently pointed-at character in a minor-direction sequence? */ bool in_minor_direction_; /** * Should detected inter-word spaces be preserved, or "compressed" to a single * space character (default behavior). */ bool preserve_interword_spaces_; }; } // namespace tesseract. #endif // TESSERACT_CCMAIN_RESULT_ITERATOR_H__
C++
/********************************************************************** * File: werdit.cpp (Formerly wordit.c) * Description: An iterator for passing over all the words in a document. * Author: Ray Smith * Created: Mon Apr 27 08:51:22 BST 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "werdit.h" /********************************************************************** * make_pseudo_word * * Make all the blobs inside a selection into a single word. * The returned PAGE_RES_IT* it points to the new word. After use, call * it->DeleteCurrentWord() to delete the fake word, and then * delete it to get rid of the iterator itself. **********************************************************************/ PAGE_RES_IT* make_pseudo_word(PAGE_RES* page_res, const TBOX& selection_box) { PAGE_RES_IT pr_it(page_res); C_BLOB_LIST new_blobs; // list of gathered blobs C_BLOB_IT new_blob_it = &new_blobs; // iterator for (WERD_RES* word_res = pr_it.word(); word_res != NULL; word_res = pr_it.forward()) { WERD* word = word_res->word; if (word->bounding_box().overlap(selection_box)) { C_BLOB_IT blob_it(word->cblob_list()); for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) { C_BLOB* blob = blob_it.data(); if (blob->bounding_box().overlap(selection_box)) { new_blob_it.add_after_then_move(C_BLOB::deep_copy(blob)); } } if (!new_blobs.empty()) { WERD* pseudo_word = new WERD(&new_blobs, 1, NULL); word_res = pr_it.InsertSimpleCloneWord(*word_res, pseudo_word); PAGE_RES_IT* it = new PAGE_RES_IT(page_res); while (it->word() != word_res && it->word() != NULL) it->forward(); ASSERT_HOST(it->word() == word_res); return it; } } } return NULL; }
C++
/********************************************************************** * File: tessbox.cpp (Formerly tessbox.c) * Description: Black boxed Tess for developing a resaljet. * Author: Ray Smith * Created: Thu Apr 23 11:03:36 BST 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #endif #include "mfoutline.h" #include "tessbox.h" #include "tesseractclass.h" #define EXTERN /** * @name tess_segment_pass_n * * Segment a word using the pass_n conditions of the tess segmenter. * @param pass_n pass number * @param word word to do */ namespace tesseract { void Tesseract::tess_segment_pass_n(int pass_n, WERD_RES *word) { int saved_enable_assoc = 0; int saved_chop_enable = 0; if (word->word->flag(W_DONT_CHOP)) { saved_enable_assoc = wordrec_enable_assoc; saved_chop_enable = chop_enable; wordrec_enable_assoc.set_value(0); chop_enable.set_value(0); } if (pass_n == 1) set_pass1(); else set_pass2(); recog_word(word); if (word->best_choice == NULL) word->SetupFake(*word->uch_set); if (word->word->flag(W_DONT_CHOP)) { wordrec_enable_assoc.set_value(saved_enable_assoc); chop_enable.set_value(saved_chop_enable); } } /** * @name tess_acceptable_word * * @return true if the word is regarded as "good enough". * @param word_choice after context * @param raw_choice before context */ bool Tesseract::tess_acceptable_word(WERD_RES* word) { return getDict().AcceptableResult(word); } /** * @name tess_add_doc_word * * Add the given word to the document dictionary */ void Tesseract::tess_add_doc_word(WERD_CHOICE *word_choice) { getDict().add_document_word(*word_choice); } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: paramsd.cpp // Description: Tesseract parameter editor // Author: Joern Wanke // Created: Wed Jul 18 10:05:01 PDT 2007 // // (C) Copyright 2007, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// // // Tesseract parameter editor is used to edit all the parameters used // within tesseract from the ui. #ifndef GRAPHICS_DISABLED #ifndef VARABLED_H #define VARABLED_H #include "elst.h" #include "scrollview.h" #include "params.h" #include "tesseractclass.h" class SVMenuNode; // A list of all possible parameter types used. enum ParamType { VT_INTEGER, VT_BOOLEAN, VT_STRING, VT_DOUBLE }; // A rather hackish helper structure which can take any kind of parameter input // (defined by ParamType) and do a couple of common operations on them, like // comparisond or getting its value. It is used in the context of the // ParamsEditor as a bridge from the internal tesseract parameters to the // ones displayed by the ScrollView server. class ParamContent : public ELIST_LINK { public: // Compare two VC objects by their name. static int Compare(const void* v1, const void* v2); // Gets a VC object identified by its ID. static ParamContent* GetParamContentById(int id); // Constructors for the various ParamTypes. ParamContent() { } explicit ParamContent(tesseract::StringParam* it); explicit ParamContent(tesseract::IntParam* it); explicit ParamContent(tesseract::BoolParam* it); explicit ParamContent(tesseract::DoubleParam* it); // Getters and Setters. void SetValue(const char* val); STRING GetValue() const; const char* GetName() const; const char* GetDescription() const; int GetId() { return my_id_; } bool HasChanged() { return changed_; } private: // The unique ID of this VC object. int my_id_; // Whether the parameter was changed_ and thus needs to be rewritten. bool changed_; // The actual ParamType of this VC object. ParamType param_type_; tesseract::StringParam* sIt; tesseract::IntParam* iIt; tesseract::BoolParam* bIt; tesseract::DoubleParam* dIt; }; ELISTIZEH(ParamContent) // The parameters editor enables the user to edit all the parameters used within // tesseract. It can be invoked on its own, but is supposed to be invoked by // the program editor. class ParamsEditor : public SVEventHandler { public: // Integrate the parameters editor as popupmenu into the existing scrollview // window (usually the pg editor). If sv == null, create a new empty // empty window and attach the parameter editor to that window (ugly). explicit ParamsEditor(tesseract::Tesseract*, ScrollView* sv = NULL); // Event listener. Waits for SVET_POPUP events and processes them. void Notify(const SVEvent* sve); private: // Gets the up to the first 3 prefixes from s (split by _). // For example, tesseract_foo_bar will be split into tesseract,foo and bar. void GetPrefixes(const char* s, STRING* level_one, STRING* level_two, STRING* level_three); // Gets the first n words (split by _) and puts them in t. // For example, tesseract_foo_bar with N=2 will yield tesseract_foo_. void GetFirstWords(const char *s, // source string int n, // number of words char *t); // target string // Find all editable parameters used within tesseract and create a // SVMenuNode tree from it. SVMenuNode *BuildListOfAllLeaves(tesseract::Tesseract *tess); // Write all (changed_) parameters to a config file. void WriteParams(char* filename, bool changes_only); ScrollView* sv_window_; }; #endif #endif
C++
/////////////////////////////////////////////////////////////////////// // File: equationdetect.cpp // Description: Helper classes to detect equations. // Author: Zongyi (Joe) Liu (joeliu@google.com) // Created: Fri Aug 31 11:13:01 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #include <mathfix.h> #endif #ifdef __MINGW32__ #include <limits.h> #endif #include <float.h> // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif #include "equationdetect.h" #include "bbgrid.h" #include "classify.h" #include "colpartition.h" #include "colpartitiongrid.h" #include "colpartitionset.h" #include "helpers.h" #include "ratngs.h" #include "tesseractclass.h" // Config variables. BOOL_VAR(equationdetect_save_bi_image, false, "Save input bi image"); BOOL_VAR(equationdetect_save_spt_image, false, "Save special character image"); BOOL_VAR(equationdetect_save_seed_image, false, "Save the seed image"); BOOL_VAR(equationdetect_save_merged_image, false, "Save the merged image"); namespace tesseract { /////////////////////////////////////////////////////////////////////////// // Utility ColParition sort functions. /////////////////////////////////////////////////////////////////////////// static int SortCPByTopReverse(const void* p1, const void* p2) { const ColPartition* cp1 = *reinterpret_cast<ColPartition* const*>(p1); const ColPartition* cp2 = *reinterpret_cast<ColPartition* const*>(p2); ASSERT_HOST(cp1 != NULL && cp2 != NULL); const TBOX &box1(cp1->bounding_box()), &box2(cp2->bounding_box()); return box2.top() - box1.top(); } static int SortCPByBottom(const void* p1, const void* p2) { const ColPartition* cp1 = *reinterpret_cast<ColPartition* const*>(p1); const ColPartition* cp2 = *reinterpret_cast<ColPartition* const*>(p2); ASSERT_HOST(cp1 != NULL && cp2 != NULL); const TBOX &box1(cp1->bounding_box()), &box2(cp2->bounding_box()); return box1.bottom() - box2.bottom(); } static int SortCPByHeight(const void* p1, const void* p2) { const ColPartition* cp1 = *reinterpret_cast<ColPartition* const*>(p1); const ColPartition* cp2 = *reinterpret_cast<ColPartition* const*>(p2); ASSERT_HOST(cp1 != NULL && cp2 != NULL); const TBOX &box1(cp1->bounding_box()), &box2(cp2->bounding_box()); return box1.height() - box2.height(); } // TODO(joeliu): we may want to parameterize these constants. const float kMathDigitDensityTh1 = 0.25; const float kMathDigitDensityTh2 = 0.1; const float kMathItalicDensityTh = 0.5; const float kUnclearDensityTh = 0.25; const int kSeedBlobsCountTh = 10; const int kLeftIndentAlignmentCountTh = 1; // Returns true if PolyBlockType is of text type or equation type. inline bool IsTextOrEquationType(PolyBlockType type) { return PTIsTextType(type) || type == PT_EQUATION; } inline bool IsLeftIndented(const EquationDetect::IndentType type) { return type == EquationDetect::LEFT_INDENT || type == EquationDetect::BOTH_INDENT; } inline bool IsRightIndented(const EquationDetect::IndentType type) { return type == EquationDetect::RIGHT_INDENT || type == EquationDetect::BOTH_INDENT; } EquationDetect::EquationDetect(const char* equ_datapath, const char* equ_name) { const char* default_name = "equ"; if (equ_name == NULL) { equ_name = default_name; } equ_tesseract_ = lang_tesseract_ = NULL; resolution_ = 0; page_count_ = 0; // Construct equ_tesseract_. equ_tesseract_ = new Tesseract(); if (equ_tesseract_->init_tesseract(equ_datapath, equ_name, OEM_TESSERACT_ONLY)) { tprintf("Warning: equation region detection requested," " but %s failed to load from %s\n", equ_name, equ_datapath); delete equ_tesseract_; equ_tesseract_ = NULL; } cps_super_bbox_ = NULL; } EquationDetect::~EquationDetect() { if (equ_tesseract_) { delete (equ_tesseract_); } if (cps_super_bbox_) { delete(cps_super_bbox_); } } void EquationDetect::SetLangTesseract(Tesseract* lang_tesseract) { lang_tesseract_ = lang_tesseract; } void EquationDetect::SetResolution(const int resolution) { resolution_ = resolution; } int EquationDetect::LabelSpecialText(TO_BLOCK* to_block) { if (to_block == NULL) { tprintf("Warning: input to_block is NULL!\n"); return -1; } GenericVector<BLOBNBOX_LIST*> blob_lists; blob_lists.push_back(&(to_block->blobs)); blob_lists.push_back(&(to_block->large_blobs)); for (int i = 0; i < blob_lists.size(); ++i) { BLOBNBOX_IT bbox_it(blob_lists[i]); for (bbox_it.mark_cycle_pt (); !bbox_it.cycled_list(); bbox_it.forward()) { bbox_it.data()->set_special_text_type(BSTT_NONE); } } return 0; } void EquationDetect::IdentifySpecialText( BLOBNBOX *blobnbox, const int height_th) { ASSERT_HOST(blobnbox != NULL); if (blobnbox->bounding_box().height() < height_th && height_th > 0) { // For small blob, we simply set to BSTT_NONE. blobnbox->set_special_text_type(BSTT_NONE); return; } BLOB_CHOICE_LIST ratings_equ, ratings_lang; C_BLOB* blob = blobnbox->cblob(); // TODO(joeliu/rays) Fix this. We may have to normalize separately for // each classifier here, as they may require different PolygonalCopy. TBLOB* tblob = TBLOB::PolygonalCopy(false, blob); const TBOX& box = tblob->bounding_box(); // Normalize the blob. Set the origin to the place we want to be the // bottom-middle, and scaling is to make the height the x-height. float scaling = static_cast<float>(kBlnXHeight) / box.height(); float x_orig = (box.left() + box.right()) / 2.0f, y_orig = box.bottom(); TBLOB* normed_blob = new TBLOB(*tblob); normed_blob->Normalize(NULL, NULL, NULL, x_orig, y_orig, scaling, scaling, 0.0f, static_cast<float>(kBlnBaselineOffset), false, NULL); equ_tesseract_->AdaptiveClassifier(normed_blob, &ratings_equ); lang_tesseract_->AdaptiveClassifier(normed_blob, &ratings_lang); delete normed_blob; delete tblob; // Get the best choice from ratings_lang and rating_equ. As the choice in the // list has already been sorted by the certainty, we simply use the first // choice. BLOB_CHOICE *lang_choice = NULL, *equ_choice = NULL; if (ratings_lang.length() > 0) { BLOB_CHOICE_IT choice_it(&ratings_lang); lang_choice = choice_it.data(); } if (ratings_equ.length() > 0) { BLOB_CHOICE_IT choice_it(&ratings_equ); equ_choice = choice_it.data(); } float lang_score = lang_choice ? lang_choice->certainty() : -FLT_MAX; float equ_score = equ_choice ? equ_choice->certainty() : -FLT_MAX; const float kConfScoreTh = -5.0f, kConfDiffTh = 1.8; // The scores here are negative, so the max/min == fabs(min/max). // float ratio = fmax(lang_score, equ_score) / fmin(lang_score, equ_score); float diff = fabs(lang_score - equ_score); BlobSpecialTextType type = BSTT_NONE; // Classification. if (fmax(lang_score, equ_score) < kConfScoreTh) { // If both score are very small, then mark it as unclear. type = BSTT_UNCLEAR; } else if (diff > kConfDiffTh && equ_score > lang_score) { // If equ_score is significantly higher, then we classify this character as // math symbol. type = BSTT_MATH; } else if (lang_choice) { // For other cases: lang_score is similar or significantly higher. type = EstimateTypeForUnichar( lang_tesseract_->unicharset, lang_choice->unichar_id()); } if (type == BSTT_NONE && lang_tesseract_->get_fontinfo_table().get( lang_choice->fontinfo_id()).is_italic()) { // For text symbol, we still check if it is italic. blobnbox->set_special_text_type(BSTT_ITALIC); } else { blobnbox->set_special_text_type(type); } } BlobSpecialTextType EquationDetect::EstimateTypeForUnichar( const UNICHARSET& unicharset, const UNICHAR_ID id) const { STRING s = unicharset.id_to_unichar(id); if (unicharset.get_isalpha(id)) { return BSTT_NONE; } if (unicharset.get_ispunctuation(id)) { // Exclude some special texts that are likely to be confused as math symbol. static GenericVector<UNICHAR_ID> ids_to_exclude; if (ids_to_exclude.empty()) { static const STRING kCharsToEx[] = {"'", "`", "\"", "\\", ",", ".", "〈", "〉", "《", "》", "」", "「", ""}; int i = 0; while (kCharsToEx[i] != "") { ids_to_exclude.push_back( unicharset.unichar_to_id(kCharsToEx[i++].string())); } ids_to_exclude.sort(); } return ids_to_exclude.bool_binary_search(id) ? BSTT_NONE : BSTT_MATH; } // Check if it is digit. In addition to the isdigit attribute, we also check // if this character belongs to those likely to be confused with a digit. static const STRING kDigitsChars = "|"; if (unicharset.get_isdigit(id) || (s.length() == 1 && kDigitsChars.contains(s[0]))) { return BSTT_DIGIT; } else { return BSTT_MATH; } } void EquationDetect::IdentifySpecialText() { // Set configuration for Tesseract::AdaptiveClassifier. equ_tesseract_->tess_cn_matching.set_value(true); // turn it on equ_tesseract_->tess_bn_matching.set_value(false); // Set the multiplier to zero for lang_tesseract_ to improve the accuracy. int classify_class_pruner = lang_tesseract_->classify_class_pruner_multiplier; int classify_integer_matcher = lang_tesseract_->classify_integer_matcher_multiplier; lang_tesseract_->classify_class_pruner_multiplier.set_value(0); lang_tesseract_->classify_integer_matcher_multiplier.set_value(0); ColPartitionGridSearch gsearch(part_grid_); ColPartition *part = NULL; gsearch.StartFullSearch(); while ((part = gsearch.NextFullSearch()) != NULL) { if (!IsTextOrEquationType(part->type())) { continue; } IdentifyBlobsToSkip(part); BLOBNBOX_C_IT bbox_it(part->boxes()); // Compute the height threshold. GenericVector<int> blob_heights; for (bbox_it.mark_cycle_pt (); !bbox_it.cycled_list(); bbox_it.forward()) { if (bbox_it.data()->special_text_type() != BSTT_SKIP) { blob_heights.push_back(bbox_it.data()->bounding_box().height()); } } blob_heights.sort(); int height_th = blob_heights[blob_heights.size() / 2] / 3 * 2; for (bbox_it.mark_cycle_pt (); !bbox_it.cycled_list(); bbox_it.forward()) { if (bbox_it.data()->special_text_type() != BSTT_SKIP) { IdentifySpecialText(bbox_it.data(), height_th); } } } // Set the multiplier values back. lang_tesseract_->classify_class_pruner_multiplier.set_value( classify_class_pruner); lang_tesseract_->classify_integer_matcher_multiplier.set_value( classify_integer_matcher); if (equationdetect_save_spt_image) { // For debug. STRING outfile; GetOutputTiffName("_spt", &outfile); PaintSpecialTexts(outfile); } } void EquationDetect::IdentifyBlobsToSkip(ColPartition* part) { ASSERT_HOST(part); BLOBNBOX_C_IT blob_it(part->boxes()); for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) { // At this moment, no blob should have been joined. ASSERT_HOST(!blob_it.data()->joined_to_prev()); } for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) { BLOBNBOX* blob = blob_it.data(); if (blob->joined_to_prev() || blob->special_text_type() == BSTT_SKIP) { continue; } TBOX blob_box = blob->bounding_box(); // Search if any blob can be merged into blob. If found, then we mark all // these blobs as BSTT_SKIP. BLOBNBOX_C_IT blob_it2 = blob_it; bool found = false; while (!blob_it2.at_last()) { BLOBNBOX* nextblob = blob_it2.forward(); const TBOX& nextblob_box = nextblob->bounding_box(); if (nextblob_box.left() >= blob_box.right()) { break; } const float kWidthR = 0.4, kHeightR = 0.3; bool xoverlap = blob_box.major_x_overlap(nextblob_box), yoverlap = blob_box.y_overlap(nextblob_box); float widthR = static_cast<float>( MIN(nextblob_box.width(), blob_box.width())) / MAX(nextblob_box.width(), blob_box.width()); float heightR = static_cast<float>( MIN(nextblob_box.height(), blob_box.height())) / MAX(nextblob_box.height(), blob_box.height()); if (xoverlap && yoverlap && widthR > kWidthR && heightR > kHeightR) { // Found one, set nextblob type and recompute blob_box. found = true; nextblob->set_special_text_type(BSTT_SKIP); blob_box += nextblob_box; } } if (found) { blob->set_special_text_type(BSTT_SKIP); } } } int EquationDetect::FindEquationParts( ColPartitionGrid* part_grid, ColPartitionSet** best_columns) { if (!equ_tesseract_ || !lang_tesseract_) { tprintf("Warning: equ_tesseract_/lang_tesseract_ is NULL!\n"); return -1; } if (!part_grid || !best_columns) { tprintf("part_grid/best_columns is NULL!!\n"); return -1; } cp_seeds_.clear(); part_grid_ = part_grid; best_columns_ = best_columns; resolution_ = lang_tesseract_->source_resolution(); STRING outfile; page_count_++; if (equationdetect_save_bi_image) { GetOutputTiffName("_bi", &outfile); pixWrite(outfile.string(), lang_tesseract_->pix_binary(), IFF_TIFF_G4); } // Pass 0: Compute special text type for blobs. IdentifySpecialText(); // Pass 1: Merge parts by overlap. MergePartsByLocation(); // Pass 2: compute the math blob density and find the seed partition. IdentifySeedParts(); // We still need separate seed into block seed and inline seed partition. IdentifyInlineParts(); if (equationdetect_save_seed_image) { GetOutputTiffName("_seed", &outfile); PaintColParts(outfile); } // Pass 3: expand block equation seeds. while (!cp_seeds_.empty()) { GenericVector<ColPartition*> seeds_expanded; for (int i = 0; i < cp_seeds_.size(); ++i) { if (ExpandSeed(cp_seeds_[i])) { // If this seed is expanded, then we add it into seeds_expanded. Note // this seed has been removed from part_grid_ if it is expanded. seeds_expanded.push_back(cp_seeds_[i]); } } // Add seeds_expanded back into part_grid_ and reset cp_seeds_. for (int i = 0; i < seeds_expanded.size(); ++i) { InsertPartAfterAbsorb(seeds_expanded[i]); } cp_seeds_ = seeds_expanded; } // Pass 4: find math block satellite text partitions and merge them. ProcessMathBlockSatelliteParts(); if (equationdetect_save_merged_image) { // For debug. GetOutputTiffName("_merged", &outfile); PaintColParts(outfile); } return 0; } void EquationDetect::MergePartsByLocation() { while (true) { ColPartition* part = NULL; // partitions that have been updated. GenericVector<ColPartition*> parts_updated; ColPartitionGridSearch gsearch(part_grid_); gsearch.StartFullSearch(); while ((part = gsearch.NextFullSearch()) != NULL) { if (!IsTextOrEquationType(part->type())) { continue; } GenericVector<ColPartition*> parts_to_merge; SearchByOverlap(part, &parts_to_merge); if (parts_to_merge.empty()) { continue; } // Merge parts_to_merge with part, and remove them from part_grid_. part_grid_->RemoveBBox(part); for (int i = 0; i < parts_to_merge.size(); ++i) { ASSERT_HOST(parts_to_merge[i] != NULL && parts_to_merge[i] != part); part->Absorb(parts_to_merge[i], NULL); } gsearch.RepositionIterator(); parts_updated.push_back(part); } if (parts_updated.empty()) { // Exit the loop break; } // Re-insert parts_updated into part_grid_. for (int i = 0; i < parts_updated.size(); ++i) { InsertPartAfterAbsorb(parts_updated[i]); } } } void EquationDetect::SearchByOverlap( ColPartition* seed, GenericVector<ColPartition*>* parts_overlap) { ASSERT_HOST(seed != NULL && parts_overlap != NULL); if (!IsTextOrEquationType(seed->type())) { return; } ColPartitionGridSearch search(part_grid_); const TBOX& seed_box(seed->bounding_box()); const int kRadNeighborCells = 30; search.StartRadSearch((seed_box.left() + seed_box.right()) / 2, (seed_box.top() + seed_box.bottom()) / 2, kRadNeighborCells); search.SetUniqueMode(true); // Search iteratively. ColPartition *part; GenericVector<ColPartition*> parts; const float kLargeOverlapTh = 0.95; const float kEquXOverlap = 0.4, kEquYOverlap = 0.5; while ((part = search.NextRadSearch()) != NULL) { if (part == seed || !IsTextOrEquationType(part->type())) { continue; } const TBOX& part_box(part->bounding_box()); bool merge = false; float x_overlap_fraction = part_box.x_overlap_fraction(seed_box), y_overlap_fraction = part_box.y_overlap_fraction(seed_box); // If part is large overlapped with seed, then set merge to true. if (x_overlap_fraction >= kLargeOverlapTh && y_overlap_fraction >= kLargeOverlapTh) { merge = true; } else if (seed->type() == PT_EQUATION && IsTextOrEquationType(part->type())) { if ((x_overlap_fraction > kEquXOverlap && y_overlap_fraction > 0.0) || (x_overlap_fraction > 0.0 && y_overlap_fraction > kEquYOverlap)) { merge = true; } } if (merge) { // Remove the part from search and put it into parts. search.RemoveBBox(); parts_overlap->push_back(part); } } } void EquationDetect::InsertPartAfterAbsorb(ColPartition* part) { ASSERT_HOST(part); // Before insert part back into part_grid_, we will need re-compute some // of its attributes such as first_column_, last_column_. However, we still // want to preserve its type. BlobTextFlowType flow_type = part->flow(); PolyBlockType part_type = part->type(); BlobRegionType blob_type = part->blob_type(); // Call SetPartitionType to re-compute the attributes of part. const TBOX& part_box(part->bounding_box()); int grid_x, grid_y; part_grid_->GridCoords( part_box.left(), part_box.bottom(), &grid_x, &grid_y); part->SetPartitionType(resolution_, best_columns_[grid_y]); // Reset the types back. part->set_type(part_type); part->set_blob_type(blob_type); part->set_flow(flow_type); part->SetBlobTypes(); // Insert into part_grid_. part_grid_->InsertBBox(true, true, part); } void EquationDetect::IdentifySeedParts() { ColPartitionGridSearch gsearch(part_grid_); ColPartition *part = NULL; gsearch.StartFullSearch(); GenericVector<ColPartition*> seeds1, seeds2; // The left coordinates of indented text partitions. GenericVector<int> indented_texts_left; // The foreground density of text partitions. GenericVector<float> texts_foreground_density; while ((part = gsearch.NextFullSearch()) != NULL) { if (!IsTextOrEquationType(part->type())) { continue; } part->ComputeSpecialBlobsDensity(); bool blobs_check = CheckSeedBlobsCount(part); const int kTextBlobsTh = 20; if (CheckSeedDensity(kMathDigitDensityTh1, kMathDigitDensityTh2, part) && blobs_check) { // Passed high density threshold test, save into seeds1. seeds1.push_back(part); } else { IndentType indent = IsIndented(part); if (IsLeftIndented(indent) && blobs_check && CheckSeedDensity(kMathDigitDensityTh2, kMathDigitDensityTh2, part)) { // Passed low density threshold test and is indented, save into seeds2. seeds2.push_back(part); } else if (!IsRightIndented(indent) && part->boxes_count() > kTextBlobsTh) { // This is likely to be a text part, save the features. const TBOX&box = part->bounding_box(); if (IsLeftIndented(indent)) { indented_texts_left.push_back(box.left()); } texts_foreground_density.push_back(ComputeForegroundDensity(box)); } } } // Sort the features collected from text regions. indented_texts_left.sort(); texts_foreground_density.sort(); float foreground_density_th = 0.15; // Default value. if (!texts_foreground_density.empty()) { // Use the median of the texts_foreground_density. foreground_density_th = 0.8 * texts_foreground_density[ texts_foreground_density.size() / 2]; } for (int i = 0; i < seeds1.size(); ++i) { const TBOX& box = seeds1[i]->bounding_box(); if (CheckSeedFgDensity(foreground_density_th, seeds1[i]) && !(IsLeftIndented(IsIndented(seeds1[i])) && CountAlignment(indented_texts_left, box.left()) >= kLeftIndentAlignmentCountTh)) { // Mark as PT_EQUATION type. seeds1[i]->set_type(PT_EQUATION); cp_seeds_.push_back(seeds1[i]); } else { // Mark as PT_INLINE_EQUATION type. seeds1[i]->set_type(PT_INLINE_EQUATION); } } for (int i = 0; i < seeds2.size(); ++i) { if (CheckForSeed2(indented_texts_left, foreground_density_th, seeds2[i])) { seeds2[i]->set_type(PT_EQUATION); cp_seeds_.push_back(seeds2[i]); } } } float EquationDetect::ComputeForegroundDensity(const TBOX& tbox) { #if LIBLEPT_MINOR_VERSION < 69 && LIBLEPT_MAJOR_VERSION <= 1 // This will disable the detector because no seed will be identified. return 1.0f; #else Pix *pix_bi = lang_tesseract_->pix_binary(); int pix_height = pixGetHeight(pix_bi); Box* box = boxCreate(tbox.left(), pix_height - tbox.top(), tbox.width(), tbox.height()); Pix *pix_sub = pixClipRectangle(pix_bi, box, NULL); l_float32 fract; pixForegroundFraction(pix_sub, &fract); pixDestroy(&pix_sub); boxDestroy(&box); return fract; #endif } bool EquationDetect::CheckSeedFgDensity(const float density_th, ColPartition* part) { ASSERT_HOST(part); // Split part horizontall, and check for each sub part. GenericVector<TBOX> sub_boxes; SplitCPHorLite(part, &sub_boxes); float parts_passed = 0.0; for (int i = 0; i < sub_boxes.size(); ++i) { float density = ComputeForegroundDensity(sub_boxes[i]); if (density < density_th) { parts_passed++; } } // If most sub parts passed, then we return true. const float kSeedPartRatioTh = 0.3; bool retval = (parts_passed / sub_boxes.size() >= kSeedPartRatioTh); return retval; } void EquationDetect::SplitCPHor(ColPartition* part, GenericVector<ColPartition*>* parts_splitted) { ASSERT_HOST(part && parts_splitted); if (part->median_width() == 0 || part->boxes_count() == 0) { return; } // Make a copy of part, and reset parts_splitted. ColPartition* right_part = part->CopyButDontOwnBlobs(); parts_splitted->delete_data_pointers(); parts_splitted->clear(); const double kThreshold = part->median_width() * 3.0; bool found_split = true; while (found_split) { found_split = false; BLOBNBOX_C_IT box_it(right_part->boxes()); // Blobs are sorted left side first. If blobs overlap, // the previous blob may have a "more right" right side. // Account for this by always keeping the largest "right" // so far. int previous_right = MIN_INT32; // Look for the next split in the partition. for (box_it.mark_cycle_pt(); !box_it.cycled_list(); box_it.forward()) { const TBOX& box = box_it.data()->bounding_box(); if (previous_right != MIN_INT32 && box.left() - previous_right > kThreshold) { // We have a split position. Split the partition in two pieces. // Insert the left piece in the grid and keep processing the right. int mid_x = (box.left() + previous_right) / 2; ColPartition* left_part = right_part; right_part = left_part->SplitAt(mid_x); parts_splitted->push_back(left_part); left_part->ComputeSpecialBlobsDensity(); found_split = true; break; } // The right side of the previous blobs. previous_right = MAX(previous_right, box.right()); } } // Add the last piece. right_part->ComputeSpecialBlobsDensity(); parts_splitted->push_back(right_part); } void EquationDetect::SplitCPHorLite(ColPartition* part, GenericVector<TBOX>* splitted_boxes) { ASSERT_HOST(part && splitted_boxes); splitted_boxes->clear(); if (part->median_width() == 0) { return; } const double kThreshold = part->median_width() * 3.0; // Blobs are sorted left side first. If blobs overlap, // the previous blob may have a "more right" right side. // Account for this by always keeping the largest "right" // so far. TBOX union_box; int previous_right = MIN_INT32; BLOBNBOX_C_IT box_it(part->boxes()); for (box_it.mark_cycle_pt(); !box_it.cycled_list(); box_it.forward()) { const TBOX& box = box_it.data()->bounding_box(); if (previous_right != MIN_INT32 && box.left() - previous_right > kThreshold) { // We have a split position. splitted_boxes->push_back(union_box); previous_right = MIN_INT32; } if (previous_right == MIN_INT32) { union_box = box; } else { union_box += box; } // The right side of the previous blobs. previous_right = MAX(previous_right, box.right()); } // Add the last piece. if (previous_right != MIN_INT32) { splitted_boxes->push_back(union_box); } } bool EquationDetect::CheckForSeed2( const GenericVector<int>& indented_texts_left, const float foreground_density_th, ColPartition* part) { ASSERT_HOST(part); const TBOX& box = part->bounding_box(); // Check if it is aligned with any indented_texts_left. if (!indented_texts_left.empty() && CountAlignment(indented_texts_left, box.left()) >= kLeftIndentAlignmentCountTh) { return false; } // Check the foreground density. if (ComputeForegroundDensity(box) > foreground_density_th) { return false; } return true; } int EquationDetect::CountAlignment( const GenericVector<int>& sorted_vec, const int val) const { if (sorted_vec.empty()) { return 0; } const int kDistTh = static_cast<int>(roundf(0.03 * resolution_)); int pos = sorted_vec.binary_search(val), count = 0; // Search left side. int index = pos; while (index >= 0 && abs(val - sorted_vec[index--]) < kDistTh) { count++; } // Search right side. index = pos + 1; while (index < sorted_vec.size() && sorted_vec[index++] - val < kDistTh) { count++; } return count; } void EquationDetect::IdentifyInlineParts() { ComputeCPsSuperBBox(); IdentifyInlinePartsHorizontal(); int textparts_linespacing = EstimateTextPartLineSpacing(); IdentifyInlinePartsVertical(true, textparts_linespacing); IdentifyInlinePartsVertical(false, textparts_linespacing); } void EquationDetect::ComputeCPsSuperBBox() { ColPartitionGridSearch gsearch(part_grid_); ColPartition *part = NULL; gsearch.StartFullSearch(); if (cps_super_bbox_) { delete cps_super_bbox_; } cps_super_bbox_ = new TBOX(); while ((part = gsearch.NextFullSearch()) != NULL) { (*cps_super_bbox_) += part->bounding_box(); } } void EquationDetect::IdentifyInlinePartsHorizontal() { ASSERT_HOST(cps_super_bbox_); GenericVector<ColPartition*> new_seeds; const int kMarginDiffTh = IntCastRounded( 0.5 * lang_tesseract_->source_resolution()); const int kGapTh = static_cast<int>(roundf( 1.0 * lang_tesseract_->source_resolution())); ColPartitionGridSearch search(part_grid_); search.SetUniqueMode(true); // The center x coordinate of the cp_super_bbox_. int cps_cx = cps_super_bbox_->left() + cps_super_bbox_->width() / 2; for (int i = 0; i < cp_seeds_.size(); ++i) { ColPartition* part = cp_seeds_[i]; const TBOX& part_box(part->bounding_box()); int left_margin = part_box.left() - cps_super_bbox_->left(), right_margin = cps_super_bbox_->right() - part_box.right(); bool right_to_left; if (left_margin + kMarginDiffTh < right_margin && left_margin < kMarginDiffTh) { // part is left aligned, so we search if it has any right neighbor. search.StartSideSearch( part_box.right(), part_box.top(), part_box.bottom()); right_to_left = false; } else if (left_margin > cps_cx) { // part locates on the right half on image, so search if it has any left // neighbor. search.StartSideSearch( part_box.left(), part_box.top(), part_box.bottom()); right_to_left = true; } else { // part is not an inline equation. new_seeds.push_back(part); continue; } ColPartition* neighbor = NULL; bool side_neighbor_found = false; while ((neighbor = search.NextSideSearch(right_to_left)) != NULL) { const TBOX& neighbor_box(neighbor->bounding_box()); if (!IsTextOrEquationType(neighbor->type()) || part_box.x_gap(neighbor_box) > kGapTh || !part_box.major_y_overlap(neighbor_box) || part_box.major_x_overlap(neighbor_box)) { continue; } // We have found one. Set the side_neighbor_found flag. side_neighbor_found = true; break; } if (!side_neighbor_found) { // Mark part as PT_INLINE_EQUATION. part->set_type(PT_INLINE_EQUATION); } else { // Check the geometric feature of neighbor. const TBOX& neighbor_box(neighbor->bounding_box()); if (neighbor_box.width() > part_box.width() && neighbor->type() != PT_EQUATION) { // Mark as PT_INLINE_EQUATION. part->set_type(PT_INLINE_EQUATION); } else { // part is not an inline equation type. new_seeds.push_back(part); } } } // Reset the cp_seeds_ using the new_seeds. cp_seeds_ = new_seeds; } int EquationDetect::EstimateTextPartLineSpacing() { ColPartitionGridSearch gsearch(part_grid_); // Get the y gap between text partitions; ColPartition *current = NULL, *prev = NULL; gsearch.StartFullSearch(); GenericVector<int> ygaps; while ((current = gsearch.NextFullSearch()) != NULL) { if (!PTIsTextType(current->type())) { continue; } if (prev != NULL) { const TBOX &current_box = current->bounding_box(); const TBOX &prev_box = prev->bounding_box(); // prev and current should be x major overlap and non y overlap. if (current_box.major_x_overlap(prev_box) && !current_box.y_overlap(prev_box)) { int gap = current_box.y_gap(prev_box); if (gap < MIN(current_box.height(), prev_box.height())) { // The gap should be smaller than the height of the bounding boxes. ygaps.push_back(gap); } } } prev = current; } if (ygaps.size() < 8) { // We do not have enough data. return -1; } // Compute the line spacing from ygaps: use the mean of the first half. ygaps.sort(); int spacing = 0, count; for (count = 0; count < ygaps.size() / 2; count++) { spacing += ygaps[count]; } return spacing / count; } void EquationDetect::IdentifyInlinePartsVertical( const bool top_to_bottom, const int textparts_linespacing) { if (cp_seeds_.empty()) { return; } // Sort cp_seeds_. if (top_to_bottom) { // From top to bottom. cp_seeds_.sort(&SortCPByTopReverse); } else { // From bottom to top. cp_seeds_.sort(&SortCPByBottom); } GenericVector<ColPartition*> new_seeds; for (int i = 0; i < cp_seeds_.size(); ++i) { ColPartition* part = cp_seeds_[i]; // If we sort cp_seeds_ from top to bottom, then for each cp_seeds_, we look // for its top neighbors, so that if two/more inline regions are connected // to each other, then we will identify the top one, and then use it to // identify the bottom one. if (IsInline(!top_to_bottom, textparts_linespacing, part)) { part->set_type(PT_INLINE_EQUATION); } else { new_seeds.push_back(part); } } cp_seeds_ = new_seeds; } bool EquationDetect::IsInline(const bool search_bottom, const int textparts_linespacing, ColPartition* part) { ASSERT_HOST(part != NULL); // Look for its nearest vertical neighbor that hardly overlaps in y but // largely overlaps in x. ColPartitionGridSearch search(part_grid_); ColPartition *neighbor = NULL; const TBOX& part_box(part->bounding_box()); const float kYGapRatioTh = 1.0; if (search_bottom) { search.StartVerticalSearch(part_box.left(), part_box.right(), part_box.bottom()); } else { search.StartVerticalSearch(part_box.left(), part_box.right(), part_box.top()); } search.SetUniqueMode(true); while ((neighbor = search.NextVerticalSearch(search_bottom)) != NULL) { const TBOX& neighbor_box(neighbor->bounding_box()); if (part_box.y_gap(neighbor_box) > kYGapRatioTh * MIN(part_box.height(), neighbor_box.height())) { // Finished searching. break; } if (!PTIsTextType(neighbor->type())) { continue; } // Check if neighbor and part is inline similar. const float kHeightRatioTh = 0.5; const int kYGapTh = textparts_linespacing > 0 ? textparts_linespacing + static_cast<int>(roundf(0.02 * resolution_)): static_cast<int>(roundf(0.05 * resolution_)); // Default value. if (part_box.x_overlap(neighbor_box) && // Location feature. part_box.y_gap(neighbor_box) <= kYGapTh && // Line spacing. // Geo feature. static_cast<float>(MIN(part_box.height(), neighbor_box.height())) / MAX(part_box.height(), neighbor_box.height()) > kHeightRatioTh) { return true; } } return false; } bool EquationDetect::CheckSeedBlobsCount(ColPartition* part) { if (!part) { return false; } const int kSeedMathBlobsCount = 2; const int kSeedMathDigitBlobsCount = 5; int blobs = part->boxes_count(), math_blobs = part->SpecialBlobsCount(BSTT_MATH), digit_blobs = part->SpecialBlobsCount(BSTT_DIGIT); if (blobs < kSeedBlobsCountTh || math_blobs <= kSeedMathBlobsCount || math_blobs + digit_blobs <= kSeedMathDigitBlobsCount) { return false; } return true; } bool EquationDetect::CheckSeedDensity( const float math_density_high, const float math_density_low, const ColPartition* part) const { ASSERT_HOST(part); float math_digit_density = part->SpecialBlobsDensity(BSTT_MATH) + part->SpecialBlobsDensity(BSTT_DIGIT); float italic_density = part->SpecialBlobsDensity(BSTT_ITALIC); if (math_digit_density > math_density_high) { return true; } if (math_digit_density + italic_density > kMathItalicDensityTh && math_digit_density > math_density_low) { return true; } return false; } EquationDetect::IndentType EquationDetect::IsIndented(ColPartition* part) { ASSERT_HOST(part); ColPartitionGridSearch search(part_grid_); ColPartition *neighbor = NULL; const TBOX& part_box(part->bounding_box()); const int kXGapTh = static_cast<int>(roundf(0.5 * resolution_)); const int kRadiusTh = static_cast<int>(roundf(3.0 * resolution_)); const int kYGapTh = static_cast<int>(roundf(0.5 * resolution_)); // Here we use a simple approximation algorithm: from the center of part, We // perform the radius search, and check if we can find a neighboring parition // that locates on the top/bottom left of part. search.StartRadSearch((part_box.left() + part_box.right()) / 2, (part_box.top() + part_box.bottom()) / 2, kRadiusTh); search.SetUniqueMode(true); bool left_indented = false, right_indented = false; while ((neighbor = search.NextRadSearch()) != NULL && (!left_indented || !right_indented)) { if (neighbor == part) { continue; } const TBOX& neighbor_box(neighbor->bounding_box()); if (part_box.major_y_overlap(neighbor_box) && part_box.x_gap(neighbor_box) < kXGapTh) { // When this happens, it is likely part is a fragment of an // over-segmented colpartition. So we return false. return NO_INDENT; } if (!IsTextOrEquationType(neighbor->type())) { continue; } // The neighbor should be above/below part, and overlap in x direction. if (!part_box.x_overlap(neighbor_box) || part_box.y_overlap(neighbor_box)) { continue; } if (part_box.y_gap(neighbor_box) < kYGapTh) { int left_gap = part_box.left() - neighbor_box.left(); int right_gap = neighbor_box.right() - part_box.right(); if (left_gap > kXGapTh) { left_indented = true; } if (right_gap > kXGapTh) { right_indented = true; } } } if (left_indented && right_indented) { return BOTH_INDENT; } if (left_indented) { return LEFT_INDENT; } if (right_indented) { return RIGHT_INDENT; } return NO_INDENT; } bool EquationDetect::ExpandSeed(ColPartition* seed) { if (seed == NULL || // This seed has been absorbed by other seeds. seed->IsVerticalType()) { // We skip vertical type right now. return false; } // Expand in four directions. GenericVector<ColPartition*> parts_to_merge; ExpandSeedHorizontal(true, seed, &parts_to_merge); ExpandSeedHorizontal(false, seed, &parts_to_merge); ExpandSeedVertical(true, seed, &parts_to_merge); ExpandSeedVertical(false, seed, &parts_to_merge); SearchByOverlap(seed, &parts_to_merge); if (parts_to_merge.empty()) { // We don't find any partition to merge. return false; } // Merge all partitions in parts_to_merge with seed. We first remove seed // from part_grid_ as its bounding box is going to expand. Then we add it // back after it aborbs all parts_to_merge parititions. part_grid_->RemoveBBox(seed); for (int i = 0; i < parts_to_merge.size(); ++i) { ColPartition* part = parts_to_merge[i]; if (part->type() == PT_EQUATION) { // If part is in cp_seeds_, then we mark it as NULL so that we won't // process it again. for (int j = 0; j < cp_seeds_.size(); ++j) { if (part == cp_seeds_[j]) { cp_seeds_[j] = NULL; break; } } } // part has already been removed from part_grid_ in function // ExpandSeedHorizontal/ExpandSeedVertical. seed->Absorb(part, NULL); } return true; } void EquationDetect::ExpandSeedHorizontal( const bool search_left, ColPartition* seed, GenericVector<ColPartition*>* parts_to_merge) { ASSERT_HOST(seed != NULL && parts_to_merge != NULL); const float kYOverlapTh = 0.6; const int kXGapTh = static_cast<int>(roundf(0.2 * resolution_)); ColPartitionGridSearch search(part_grid_); const TBOX& seed_box(seed->bounding_box()); int x = search_left ? seed_box.left() : seed_box.right(); search.StartSideSearch(x, seed_box.bottom(), seed_box.top()); search.SetUniqueMode(true); // Search iteratively. ColPartition *part = NULL; while ((part = search.NextSideSearch(search_left)) != NULL) { if (part == seed) { continue; } const TBOX& part_box(part->bounding_box()); if (part_box.x_gap(seed_box) > kXGapTh) { // Out of scope. break; } // Check part location. if ((part_box.left() >= seed_box.left() && search_left) || (part_box.right() <= seed_box.right() && !search_left)) { continue; } if (part->type() != PT_EQUATION) { // Non-equation type. // Skip PT_LINLINE_EQUATION and non text type. if (part->type() == PT_INLINE_EQUATION || (!IsTextOrEquationType(part->type()) && part->blob_type() != BRT_HLINE)) { continue; } // For other types, it should be the near small neighbor of seed. if (!IsNearSmallNeighbor(seed_box, part_box) || !CheckSeedNeighborDensity(part)) { continue; } } else { // Equation type, check the y overlap. if (part_box.y_overlap_fraction(seed_box) < kYOverlapTh && seed_box.y_overlap_fraction(part_box) < kYOverlapTh) { continue; } } // Passed the check, delete it from search and add into parts_to_merge. search.RemoveBBox(); parts_to_merge->push_back(part); } } void EquationDetect::ExpandSeedVertical( const bool search_bottom, ColPartition* seed, GenericVector<ColPartition*>* parts_to_merge) { ASSERT_HOST(seed != NULL && parts_to_merge != NULL && cps_super_bbox_ != NULL); const float kXOverlapTh = 0.4; const int kYGapTh = static_cast<int>(roundf(0.2 * resolution_)); ColPartitionGridSearch search(part_grid_); const TBOX& seed_box(seed->bounding_box()); int y = search_bottom ? seed_box.bottom() : seed_box.top(); search.StartVerticalSearch( cps_super_bbox_->left(), cps_super_bbox_->right(), y); search.SetUniqueMode(true); // Search iteratively. ColPartition *part = NULL; GenericVector<ColPartition*> parts; int skipped_min_top = INT_MAX, skipped_max_bottom = -1; while ((part = search.NextVerticalSearch(search_bottom)) != NULL) { if (part == seed) { continue; } const TBOX& part_box(part->bounding_box()); if (part_box.y_gap(seed_box) > kYGapTh) { // Out of scope. break; } // Check part location. if ((part_box.bottom() >= seed_box.bottom() && search_bottom) || (part_box.top() <= seed_box.top() && !search_bottom)) { continue; } bool skip_part = false; if (part->type() != PT_EQUATION) { // Non-equation type. // Skip PT_LINLINE_EQUATION and non text type. if (part->type() == PT_INLINE_EQUATION || (!IsTextOrEquationType(part->type()) && part->blob_type() != BRT_HLINE)) { skip_part = true; } else if (!IsNearSmallNeighbor(seed_box, part_box) || !CheckSeedNeighborDensity(part)) { // For other types, it should be the near small neighbor of seed. skip_part = true; } } else { // Equation type, check the x overlap. if (part_box.x_overlap_fraction(seed_box) < kXOverlapTh && seed_box.x_overlap_fraction(part_box) < kXOverlapTh) { skip_part = true; } } if (skip_part) { if (part->type() != PT_EQUATION) { if (skipped_min_top > part_box.top()) { skipped_min_top = part_box.top(); } if (skipped_max_bottom < part_box.bottom()) { skipped_max_bottom = part_box.bottom(); } } } else { parts.push_back(part); } } // For every part in parts, we need verify it is not above skipped_min_top // when search top, or not below skipped_max_bottom when search bottom. I.e., // we will skip a part if it looks like: // search bottom | search top // seed: ****************** | part: ********** // skipped: xxx | skipped: xxx // part: ********** | seed: *********** for (int i = 0; i < parts.size(); i++) { const TBOX& part_box(parts[i]->bounding_box()); if ((search_bottom && part_box.top() <= skipped_max_bottom) || (!search_bottom && part_box.bottom() >= skipped_min_top)) { continue; } // Add parts[i] into parts_to_merge, and delete it from part_grid_. parts_to_merge->push_back(parts[i]); part_grid_->RemoveBBox(parts[i]); } } bool EquationDetect::IsNearSmallNeighbor(const TBOX& seed_box, const TBOX& part_box) const { const int kXGapTh = static_cast<int>(roundf(0.25 * resolution_)); const int kYGapTh = static_cast<int>(roundf(0.05 * resolution_)); // Check geometric feature. if (part_box.height() > seed_box.height() || part_box.width() > seed_box.width()) { return false; } // Check overlap and distance. if ((!part_box.major_x_overlap(seed_box) || part_box.y_gap(seed_box) > kYGapTh) && (!part_box.major_y_overlap(seed_box) || part_box.x_gap(seed_box) > kXGapTh)) { return false; } return true; } bool EquationDetect::CheckSeedNeighborDensity(const ColPartition* part) const { ASSERT_HOST(part); if (part->boxes_count() < kSeedBlobsCountTh) { // Too few blobs, skip the check. return true; } // We check the math blobs density and the unclear blobs density. if (part->SpecialBlobsDensity(BSTT_MATH) + part->SpecialBlobsDensity(BSTT_DIGIT) > kMathDigitDensityTh1 || part->SpecialBlobsDensity(BSTT_UNCLEAR) > kUnclearDensityTh) { return true; } return false; } void EquationDetect::ProcessMathBlockSatelliteParts() { // Iterate over part_grid_, and find all parts that are text type but not // equation type. ColPartition *part = NULL; GenericVector<ColPartition*> text_parts; ColPartitionGridSearch gsearch(part_grid_); gsearch.StartFullSearch(); while ((part = gsearch.NextFullSearch()) != NULL) { if (part->type() == PT_FLOWING_TEXT || part->type() == PT_HEADING_TEXT) { text_parts.push_back(part); } } if (text_parts.empty()) { return; } // Compute the medium height of the text_parts. text_parts.sort(&SortCPByHeight); const TBOX& text_box = text_parts[text_parts.size() / 2]->bounding_box(); int med_height = text_box.height(); if (text_parts.size() % 2 == 0 && text_parts.size() > 1) { const TBOX& text_box = text_parts[text_parts.size() / 2 - 1]->bounding_box(); med_height = static_cast<int>(roundf( 0.5 * (text_box.height() + med_height))); } // Iterate every text_parts and check if it is a math block satellite. for (int i = 0; i < text_parts.size(); ++i) { const TBOX& text_box(text_parts[i]->bounding_box()); if (text_box.height() > med_height) { continue; } GenericVector<ColPartition*> math_blocks; if (!IsMathBlockSatellite(text_parts[i], &math_blocks)) { continue; } // Found. merge text_parts[i] with math_blocks. part_grid_->RemoveBBox(text_parts[i]); text_parts[i]->set_type(PT_EQUATION); for (int j = 0; j < math_blocks.size(); ++j) { part_grid_->RemoveBBox(math_blocks[j]); text_parts[i]->Absorb(math_blocks[j], NULL); } InsertPartAfterAbsorb(text_parts[i]); } } bool EquationDetect::IsMathBlockSatellite( ColPartition* part, GenericVector<ColPartition*>* math_blocks) { ASSERT_HOST(part != NULL && math_blocks != NULL); math_blocks->clear(); const TBOX& part_box(part->bounding_box()); // Find the top/bottom nearest neighbor of part. ColPartition *neighbors[2]; int y_gaps[2] = {INT_MAX, INT_MAX}; // The horizontal boundary of the neighbors. int neighbors_left = INT_MAX, neighbors_right = 0; for (int i = 0; i < 2; ++i) { neighbors[i] = SearchNNVertical(i != 0, part); if (neighbors[i]) { const TBOX& neighbor_box = neighbors[i]->bounding_box(); y_gaps[i] = neighbor_box.y_gap(part_box); if (neighbor_box.left() < neighbors_left) { neighbors_left = neighbor_box.left(); } if (neighbor_box.right() > neighbors_right) { neighbors_right = neighbor_box.right(); } } } if (neighbors[0] == neighbors[1]) { // This happens when part is inside neighbor. neighbors[1] = NULL; y_gaps[1] = INT_MAX; } // Check if part is within [neighbors_left, neighbors_right]. if (part_box.left() < neighbors_left || part_box.right() > neighbors_right) { return false; } // Get the index of the near one in neighbors. int index = y_gaps[0] < y_gaps[1] ? 0 : 1; // Check the near one. if (IsNearMathNeighbor(y_gaps[index], neighbors[index])) { math_blocks->push_back(neighbors[index]); } else { // If the near one failed the check, then we skip checking the far one. return false; } // Check the far one. index = 1 - index; if (IsNearMathNeighbor(y_gaps[index], neighbors[index])) { math_blocks->push_back(neighbors[index]); } return true; } ColPartition* EquationDetect::SearchNNVertical( const bool search_bottom, const ColPartition* part) { ASSERT_HOST(part); ColPartition *nearest_neighbor = NULL, *neighbor = NULL; const int kYGapTh = static_cast<int>(roundf(resolution_ * 0.5)); ColPartitionGridSearch search(part_grid_); search.SetUniqueMode(true); const TBOX& part_box(part->bounding_box()); int y = search_bottom ? part_box.bottom() : part_box.top(); search.StartVerticalSearch(part_box.left(), part_box.right(), y); int min_y_gap = INT_MAX; while ((neighbor = search.NextVerticalSearch(search_bottom)) != NULL) { if (neighbor == part || !IsTextOrEquationType(neighbor->type())) { continue; } const TBOX& neighbor_box(neighbor->bounding_box()); int y_gap = neighbor_box.y_gap(part_box); if (y_gap > kYGapTh) { // Out of scope. break; } if (!neighbor_box.major_x_overlap(part_box) || (search_bottom && neighbor_box.bottom() > part_box.bottom()) || (!search_bottom && neighbor_box.top() < part_box.top())) { continue; } if (y_gap < min_y_gap) { min_y_gap = y_gap; nearest_neighbor = neighbor; } } return nearest_neighbor; } bool EquationDetect::IsNearMathNeighbor( const int y_gap, const ColPartition *neighbor) const { if (!neighbor) { return false; } const int kYGapTh = static_cast<int>(roundf(resolution_ * 0.1)); return neighbor->type() == PT_EQUATION && y_gap <= kYGapTh; } void EquationDetect::GetOutputTiffName(const char* name, STRING* image_name) const { ASSERT_HOST(image_name && name); char page[50]; snprintf(page, sizeof(page), "%04d", page_count_); *image_name = STRING(lang_tesseract_->imagebasename) + page + name + ".tif"; } void EquationDetect::PaintSpecialTexts(const STRING& outfile) const { Pix *pix = NULL, *pixBi = lang_tesseract_->pix_binary(); pix = pixConvertTo32(pixBi); ColPartitionGridSearch gsearch(part_grid_); ColPartition* part = NULL; gsearch.StartFullSearch(); while ((part = gsearch.NextFullSearch()) != NULL) { BLOBNBOX_C_IT blob_it(part->boxes()); for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) { RenderSpecialText(pix, blob_it.data()); } } pixWrite(outfile.string(), pix, IFF_TIFF_LZW); pixDestroy(&pix); } void EquationDetect::PaintColParts(const STRING& outfile) const { Pix *pix = pixConvertTo32(lang_tesseract_->BestPix()); ColPartitionGridSearch gsearch(part_grid_); gsearch.StartFullSearch(); ColPartition* part = NULL; while ((part = gsearch.NextFullSearch()) != NULL) { const TBOX& tbox = part->bounding_box(); Box *box = boxCreate(tbox.left(), pixGetHeight(pix) - tbox.top(), tbox.width(), tbox.height()); if (part->type() == PT_EQUATION) { pixRenderBoxArb(pix, box, 5, 255, 0, 0); } else if (part->type() == PT_INLINE_EQUATION) { pixRenderBoxArb(pix, box, 5, 0, 255, 0); } else { pixRenderBoxArb(pix, box, 5, 0, 0, 255); } boxDestroy(&box); } pixWrite(outfile.string(), pix, IFF_TIFF_LZW); pixDestroy(&pix); } void EquationDetect::PrintSpecialBlobsDensity(const ColPartition* part) const { ASSERT_HOST(part); TBOX box(part->bounding_box()); int h = pixGetHeight(lang_tesseract_->BestPix()); tprintf("Printing special blobs density values for ColParition (t=%d,b=%d) ", h - box.top(), h - box.bottom()); box.print(); tprintf("blobs count = %d, density = ", part->boxes_count()); for (int i = 0; i < BSTT_COUNT; ++i) { BlobSpecialTextType type = static_cast<BlobSpecialTextType>(i); tprintf("%d:%f ", i, part->SpecialBlobsDensity(type)); } tprintf("\n"); } }; // namespace tesseract
C++
/********************************************************************** * File: cube_reco_context.h * Description: Declaration of the Cube Recognition Context Class * Author: Ahmad Abdulkader * Created: 2007 * * (C) Copyright 2008, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ // The CubeRecoContext class abstracts the Cube OCR Engine. Typically a process // (or a thread) would create one CubeRecoContext object per language. // The CubeRecoContext object also provides methods to get and set the // different attribues of the Cube OCR Engine. #ifndef CUBE_RECO_CONTEXT_H #define CUBE_RECO_CONTEXT_H #include <string> #include "neural_net.h" #include "lang_model.h" #include "classifier_base.h" #include "feature_base.h" #include "char_set.h" #include "word_size_model.h" #include "char_bigrams.h" #include "word_unigrams.h" namespace tesseract { class Tesseract; class TessdataManager; class CubeRecoContext { public: // Reading order enum type enum ReadOrder { L2R, R2L }; // Instantiate using a Tesseract object CubeRecoContext(Tesseract *tess_obj); ~CubeRecoContext(); // accessor functions inline const string & Lang() const { return lang_; } inline CharSet *CharacterSet() const { return char_set_; } const UNICHARSET *TessUnicharset() const { return tess_unicharset_; } inline CharClassifier *Classifier() const { return char_classifier_; } inline WordSizeModel *SizeModel() const { return word_size_model_; } inline CharBigrams *Bigrams() const { return char_bigrams_; } inline WordUnigrams *WordUnigramsObj() const { return word_unigrams_; } inline TuningParams *Params() const { return params_; } inline LangModel *LangMod() const { return lang_mod_; } // the reading order of the language inline ReadOrder ReadingOrder() const { return ((lang_ == "ara") ? R2L : L2R); } // does the language support case inline bool HasCase() const { return (lang_ != "ara" && lang_ != "hin"); } inline bool Cursive() const { return (lang_ == "ara"); } inline bool HasItalics() const { return (lang_ != "ara" && lang_ != "hin"); } inline bool Contextual() const { return (lang_ == "ara"); } // RecoContext runtime flags accessor functions inline bool SizeNormalization() const { return size_normalization_; } inline bool NoisyInput() const { return noisy_input_; } inline bool OOD() const { return lang_mod_->OOD(); } inline bool Numeric() const { return lang_mod_->Numeric(); } inline bool WordList() const { return lang_mod_->WordList(); } inline bool Punc() const { return lang_mod_->Punc(); } inline bool CaseSensitive() const { return char_classifier_->CaseSensitive(); } inline void SetSizeNormalization(bool size_normalization) { size_normalization_ = size_normalization; } inline void SetNoisyInput(bool noisy_input) { noisy_input_ = noisy_input; } inline void SetOOD(bool ood_enabled) { lang_mod_->SetOOD(ood_enabled); } inline void SetNumeric(bool numeric_enabled) { lang_mod_->SetNumeric(numeric_enabled); } inline void SetWordList(bool word_list_enabled) { lang_mod_->SetWordList(word_list_enabled); } inline void SetPunc(bool punc_enabled) { lang_mod_->SetPunc(punc_enabled); } inline void SetCaseSensitive(bool case_sensitive) { char_classifier_->SetCaseSensitive(case_sensitive); } inline tesseract::Tesseract *TesseractObject() const { return tess_obj_; } // Returns the path of the data files bool GetDataFilePath(string *path) const; // Creates a CubeRecoContext object using a tesseract object. Data // files are loaded via the tessdata_manager, and the tesseract // unicharset is provided in order to map Cube's unicharset to // Tesseract's in the case where the two unicharsets differ. static CubeRecoContext *Create(Tesseract *tess_obj, TessdataManager *tessdata_manager, UNICHARSET *tess_unicharset); private: bool loaded_; string lang_; CharSet *char_set_; UNICHARSET *tess_unicharset_; WordSizeModel *word_size_model_; CharClassifier *char_classifier_; CharBigrams *char_bigrams_; WordUnigrams *word_unigrams_; TuningParams *params_; LangModel *lang_mod_; Tesseract *tess_obj_; // CubeRecoContext does not own this pointer bool size_normalization_; bool noisy_input_; // Loads and initialized all the necessary components of a // CubeRecoContext. See .cpp for more details. bool Load(TessdataManager *tessdata_manager, UNICHARSET *tess_unicharset); }; } #endif // CUBE_RECO_CONTEXT_H
C++
/////////////////////////////////////////////////////////////////////// // File: tesseractclass.cpp // Description: The Tesseract class. It holds/owns everything needed // to run Tesseract on a single language, and also a set of // sub-Tesseracts to run sub-languages. For thread safety, *every* // variable that was previously global or static (except for // constant data, and some visual debugging flags) has been moved // in here, directly, or indirectly. // This makes it safe to run multiple Tesseracts in different // threads in parallel, and keeps the different language // instances separate. // Some global functions remain, but they are isolated re-entrant // functions that operate on their arguments. Functions that work // on variable data have been moved to an appropriate class based // mostly on the directory hierarchy. For more information see // slide 6 of "2ArchitectureAndDataStructures" in // https://drive.google.com/file/d/0B7l10Bj_LprhbUlIUFlCdGtDYkE/edit?usp=sharing // Some global data and related functions still exist in the // training-related code, but they don't interfere with normal // recognition operation. // Author: Ray Smith // Created: Fri Mar 07 08:17:01 PST 2008 // // (C) Copyright 2008, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "tesseractclass.h" #include "allheaders.h" #include "cube_reco_context.h" #include "edgblob.h" #include "equationdetect.h" #include "globals.h" #include "tesseract_cube_combiner.h" // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif namespace tesseract { Tesseract::Tesseract() : BOOL_MEMBER(tessedit_resegment_from_boxes, false, "Take segmentation and labeling from box file", this->params()), BOOL_MEMBER(tessedit_resegment_from_line_boxes, false, "Conversion of word/line box file to char box file", this->params()), BOOL_MEMBER(tessedit_train_from_boxes, false, "Generate training data from boxed chars", this->params()), BOOL_MEMBER(tessedit_make_boxes_from_boxes, false, "Generate more boxes from boxed chars", this->params()), BOOL_MEMBER(tessedit_dump_pageseg_images, false, "Dump intermediate images made during page segmentation", this->params()), // The default for pageseg_mode is the old behaviour, so as not to // upset anything that relies on that. INT_MEMBER(tessedit_pageseg_mode, PSM_SINGLE_BLOCK, "Page seg mode: 0=osd only, 1=auto+osd, 2=auto, 3=col, 4=block," " 5=line, 6=word, 7=char" " (Values from PageSegMode enum in publictypes.h)", this->params()), INT_INIT_MEMBER(tessedit_ocr_engine_mode, tesseract::OEM_TESSERACT_ONLY, "Which OCR engine(s) to run (Tesseract, Cube, both)." " Defaults to loading and running only Tesseract" " (no Cube,no combiner)." " Values from OcrEngineMode enum in tesseractclass.h)", this->params()), STRING_MEMBER(tessedit_char_blacklist, "", "Blacklist of chars not to recognize", this->params()), STRING_MEMBER(tessedit_char_whitelist, "", "Whitelist of chars to recognize", this->params()), STRING_MEMBER(tessedit_char_unblacklist, "", "List of chars to override tessedit_char_blacklist", this->params()), BOOL_MEMBER(tessedit_ambigs_training, false, "Perform training for ambiguities", this->params()), INT_MEMBER(pageseg_devanagari_split_strategy, tesseract::ShiroRekhaSplitter::NO_SPLIT, "Whether to use the top-line splitting process for Devanagari " "documents while performing page-segmentation.", this->params()), INT_MEMBER(ocr_devanagari_split_strategy, tesseract::ShiroRekhaSplitter::NO_SPLIT, "Whether to use the top-line splitting process for Devanagari " "documents while performing ocr.", this->params()), STRING_MEMBER(tessedit_write_params_to_file, "", "Write all parameters to the given file.", this->params()), BOOL_MEMBER(tessedit_adaption_debug, false, "Generate and print debug" " information for adaption", this->params()), INT_MEMBER(bidi_debug, 0, "Debug level for BiDi", this->params()), INT_MEMBER(applybox_debug, 1, "Debug level", this->params()), INT_MEMBER(applybox_page, 0, "Page number to apply boxes from", this->params()), STRING_MEMBER(applybox_exposure_pattern, ".exp", "Exposure value follows" " this pattern in the image filename. The name of the image" " files are expected to be in the form" " [lang].[fontname].exp[num].tif", this->params()), BOOL_MEMBER(applybox_learn_chars_and_char_frags_mode, false, "Learn both character fragments (as is done in the" " special low exposure mode) as well as unfragmented" " characters.", this->params()), BOOL_MEMBER(applybox_learn_ngrams_mode, false, "Each bounding box" " is assumed to contain ngrams. Only learn the ngrams" " whose outlines overlap horizontally.", this->params()), BOOL_MEMBER(tessedit_display_outwords, false, "Draw output words", this->params()), BOOL_MEMBER(tessedit_dump_choices, false, "Dump char choices", this->params()), BOOL_MEMBER(tessedit_timing_debug, false, "Print timing stats", this->params()), BOOL_MEMBER(tessedit_fix_fuzzy_spaces, true, "Try to improve fuzzy spaces", this->params()), BOOL_MEMBER(tessedit_unrej_any_wd, false, "Dont bother with word plausibility", this->params()), BOOL_MEMBER(tessedit_fix_hyphens, true, "Crunch double hyphens?", this->params()), BOOL_MEMBER(tessedit_redo_xheight, true, "Check/Correct x-height", this->params()), BOOL_MEMBER(tessedit_enable_doc_dict, true, "Add words to the document dictionary", this->params()), BOOL_MEMBER(tessedit_debug_fonts, false, "Output font info per char", this->params()), BOOL_MEMBER(tessedit_debug_block_rejection, false, "Block and Row stats", this->params()), BOOL_MEMBER(tessedit_enable_bigram_correction, true, "Enable correction based on the word bigram dictionary.", this->params()), BOOL_MEMBER(tessedit_enable_dict_correction, false, "Enable single word correction based on the dictionary.", this->params()), INT_MEMBER(tessedit_bigram_debug, 0, "Amount of debug output for bigram correction.", this->params()), INT_MEMBER(debug_x_ht_level, 0, "Reestimate debug", this->params()), BOOL_MEMBER(debug_acceptable_wds, false, "Dump word pass/fail chk", this->params()), STRING_MEMBER(chs_leading_punct, "('`\"", "Leading punctuation", this->params()), STRING_MEMBER(chs_trailing_punct1, ").,;:?!", "1st Trailing punctuation", this->params()), STRING_MEMBER(chs_trailing_punct2, ")'`\"", "2nd Trailing punctuation", this->params()), double_MEMBER(quality_rej_pc, 0.08, "good_quality_doc lte rejection limit", this->params()), double_MEMBER(quality_blob_pc, 0.0, "good_quality_doc gte good blobs limit", this->params()), double_MEMBER(quality_outline_pc, 1.0, "good_quality_doc lte outline error limit", this->params()), double_MEMBER(quality_char_pc, 0.95, "good_quality_doc gte good char limit", this->params()), INT_MEMBER(quality_min_initial_alphas_reqd, 2, "alphas in a good word", this->params()), INT_MEMBER(tessedit_tess_adaption_mode, 0x27, "Adaptation decision algorithm for tess", this->params()), BOOL_MEMBER(tessedit_minimal_rej_pass1, false, "Do minimal rejection on pass 1 output", this->params()), BOOL_MEMBER(tessedit_test_adaption, false, "Test adaption criteria", this->params()), BOOL_MEMBER(tessedit_matcher_log, false, "Log matcher activity", this->params()), INT_MEMBER(tessedit_test_adaption_mode, 3, "Adaptation decision algorithm for tess", this->params()), BOOL_MEMBER(test_pt, false, "Test for point", this->params()), double_MEMBER(test_pt_x, 99999.99, "xcoord", this->params()), double_MEMBER(test_pt_y, 99999.99, "ycoord", this->params()), INT_MEMBER(paragraph_debug_level, 0, "Print paragraph debug info.", this->params()), BOOL_MEMBER(paragraph_text_based, true, "Run paragraph detection on the post-text-recognition " "(more accurate)", this->params()), INT_MEMBER(cube_debug_level, 0, "Print cube debug info.", this->params()), STRING_MEMBER(outlines_odd, "%| ", "Non standard number of outlines", this->params()), STRING_MEMBER(outlines_2, "ij!?%\":;", "Non standard number of outlines", this->params()), BOOL_MEMBER(docqual_excuse_outline_errs, false, "Allow outline errs in unrejection?", this->params()), BOOL_MEMBER(tessedit_good_quality_unrej, true, "Reduce rejection on good docs", this->params()), BOOL_MEMBER(tessedit_use_reject_spaces, true, "Reject spaces?", this->params()), double_MEMBER(tessedit_reject_doc_percent, 65.00, "%rej allowed before rej whole doc", this->params()), double_MEMBER(tessedit_reject_block_percent, 45.00, "%rej allowed before rej whole block", this->params()), double_MEMBER(tessedit_reject_row_percent, 40.00, "%rej allowed before rej whole row", this->params()), double_MEMBER(tessedit_whole_wd_rej_row_percent, 70.00, "Number of row rejects in whole word rejects" "which prevents whole row rejection", this->params()), BOOL_MEMBER(tessedit_preserve_blk_rej_perfect_wds, true, "Only rej partially rejected words in block rejection", this->params()), BOOL_MEMBER(tessedit_preserve_row_rej_perfect_wds, true, "Only rej partially rejected words in row rejection", this->params()), BOOL_MEMBER(tessedit_dont_blkrej_good_wds, false, "Use word segmentation quality metric", this->params()), BOOL_MEMBER(tessedit_dont_rowrej_good_wds, false, "Use word segmentation quality metric", this->params()), INT_MEMBER(tessedit_preserve_min_wd_len, 2, "Only preserve wds longer than this", this->params()), BOOL_MEMBER(tessedit_row_rej_good_docs, true, "Apply row rejection to good docs", this->params()), double_MEMBER(tessedit_good_doc_still_rowrej_wd, 1.1, "rej good doc wd if more than this fraction rejected", this->params()), BOOL_MEMBER(tessedit_reject_bad_qual_wds, true, "Reject all bad quality wds", this->params()), BOOL_MEMBER(tessedit_debug_doc_rejection, false, "Page stats", this->params()), BOOL_MEMBER(tessedit_debug_quality_metrics, false, "Output data to debug file", this->params()), BOOL_MEMBER(bland_unrej, false, "unrej potential with no chekcs", this->params()), double_MEMBER(quality_rowrej_pc, 1.1, "good_quality_doc gte good char limit", this->params()), BOOL_MEMBER(unlv_tilde_crunching, true, "Mark v.bad words for tilde crunch", this->params()), BOOL_MEMBER(hocr_font_info, false, "Add font info to hocr output", this->params()), BOOL_MEMBER(crunch_early_merge_tess_fails, true, "Before word crunch?", this->params()), BOOL_MEMBER(crunch_early_convert_bad_unlv_chs, false, "Take out ~^ early?", this->params()), double_MEMBER(crunch_terrible_rating, 80.0, "crunch rating lt this", this->params()), BOOL_MEMBER(crunch_terrible_garbage, true, "As it says", this->params()), double_MEMBER(crunch_poor_garbage_cert, -9.0, "crunch garbage cert lt this", this->params()), double_MEMBER(crunch_poor_garbage_rate, 60, "crunch garbage rating lt this", this->params()), double_MEMBER(crunch_pot_poor_rate, 40, "POTENTIAL crunch rating lt this", this->params()), double_MEMBER(crunch_pot_poor_cert, -8.0, "POTENTIAL crunch cert lt this", this->params()), BOOL_MEMBER(crunch_pot_garbage, true, "POTENTIAL crunch garbage", this->params()), double_MEMBER(crunch_del_rating, 60, "POTENTIAL crunch rating lt this", this->params()), double_MEMBER(crunch_del_cert, -10.0, "POTENTIAL crunch cert lt this", this->params()), double_MEMBER(crunch_del_min_ht, 0.7, "Del if word ht lt xht x this", this->params()), double_MEMBER(crunch_del_max_ht, 3.0, "Del if word ht gt xht x this", this->params()), double_MEMBER(crunch_del_min_width, 3.0, "Del if word width lt xht x this", this->params()), double_MEMBER(crunch_del_high_word, 1.5, "Del if word gt xht x this above bl", this->params()), double_MEMBER(crunch_del_low_word, 0.5, "Del if word gt xht x this below bl", this->params()), double_MEMBER(crunch_small_outlines_size, 0.6, "Small if lt xht x this", this->params()), INT_MEMBER(crunch_rating_max, 10, "For adj length in rating per ch", this->params()), INT_MEMBER(crunch_pot_indicators, 1, "How many potential indicators needed", this->params()), BOOL_MEMBER(crunch_leave_ok_strings, true, "Dont touch sensible strings", this->params()), BOOL_MEMBER(crunch_accept_ok, true, "Use acceptability in okstring", this->params()), BOOL_MEMBER(crunch_leave_accept_strings, false, "Dont pot crunch sensible strings", this->params()), BOOL_MEMBER(crunch_include_numerals, false, "Fiddle alpha figures", this->params()), INT_MEMBER(crunch_leave_lc_strings, 4, "Dont crunch words with long lower case strings", this->params()), INT_MEMBER(crunch_leave_uc_strings, 4, "Dont crunch words with long lower case strings", this->params()), INT_MEMBER(crunch_long_repetitions, 3, "Crunch words with long repetitions", this->params()), INT_MEMBER(crunch_debug, 0, "As it says", this->params()), INT_MEMBER(fixsp_non_noise_limit, 1, "How many non-noise blbs either side?", this->params()), double_MEMBER(fixsp_small_outlines_size, 0.28, "Small if lt xht x this", this->params()), BOOL_MEMBER(tessedit_prefer_joined_punct, false, "Reward punctation joins", this->params()), INT_MEMBER(fixsp_done_mode, 1, "What constitues done for spacing", this->params()), INT_MEMBER(debug_fix_space_level, 0, "Contextual fixspace debug", this->params()), STRING_MEMBER(numeric_punctuation, ".,", "Punct. chs expected WITHIN numbers", this->params()), INT_MEMBER(x_ht_acceptance_tolerance, 8, "Max allowed deviation of blob top outside of font data", this->params()), INT_MEMBER(x_ht_min_change, 8, "Min change in xht before actually trying it", this->params()), INT_MEMBER(superscript_debug, 0, "Debug level for sub & superscript fixer", this->params()), double_MEMBER(superscript_worse_certainty, 2.0, "How many times worse " "certainty does a superscript position glyph need to be for " "us to try classifying it as a char with a different " "baseline?", this->params()), double_MEMBER(superscript_bettered_certainty, 0.97, "What reduction in " "badness do we think sufficient to choose a superscript " "over what we'd thought. For example, a value of 0.6 means " "we want to reduce badness of certainty by at least 40%", this->params()), double_MEMBER(superscript_scaledown_ratio, 0.4, "A superscript scaled down more than this is unbelievably " "small. For example, 0.3 means we expect the font size to " "be no smaller than 30% of the text line font size.", this->params()), double_MEMBER(subscript_max_y_top, 0.5, "Maximum top of a character measured as a multiple of " "x-height above the baseline for us to reconsider whether " "it's a subscript.", this->params()), double_MEMBER(superscript_min_y_bottom, 0.3, "Minimum bottom of a character measured as a multiple of " "x-height above the baseline for us to reconsider whether " "it's a superscript.", this->params()), BOOL_MEMBER(tessedit_write_block_separators, false, "Write block separators in output", this->params()), BOOL_MEMBER(tessedit_write_rep_codes, false, "Write repetition char code", this->params()), BOOL_MEMBER(tessedit_write_unlv, false, "Write .unlv output file", this->params()), BOOL_MEMBER(tessedit_create_txt, true, "Write .txt output file", this->params()), BOOL_MEMBER(tessedit_create_hocr, false, "Write .html hOCR output file", this->params()), BOOL_MEMBER(tessedit_create_pdf, false, "Write .pdf output file", this->params()), STRING_MEMBER(unrecognised_char, "|", "Output char for unidentified blobs", this->params()), INT_MEMBER(suspect_level, 99, "Suspect marker level", this->params()), INT_MEMBER(suspect_space_level, 100, "Min suspect level for rejecting spaces", this->params()), INT_MEMBER(suspect_short_words, 2, "Dont Suspect dict wds longer than this", this->params()), BOOL_MEMBER(suspect_constrain_1Il, false, "UNLV keep 1Il chars rejected", this->params()), double_MEMBER(suspect_rating_per_ch, 999.9, "Dont touch bad rating limit", this->params()), double_MEMBER(suspect_accept_rating, -999.9, "Accept good rating limit", this->params()), BOOL_MEMBER(tessedit_minimal_rejection, false, "Only reject tess failures", this->params()), BOOL_MEMBER(tessedit_zero_rejection, false, "Dont reject ANYTHING", this->params()), BOOL_MEMBER(tessedit_word_for_word, false, "Make output have exactly one word per WERD", this->params()), BOOL_MEMBER(tessedit_zero_kelvin_rejection, false, "Dont reject ANYTHING AT ALL", this->params()), BOOL_MEMBER(tessedit_consistent_reps, true, "Force all rep chars the same", this->params()), INT_MEMBER(tessedit_reject_mode, 0, "Rejection algorithm", this->params()), BOOL_MEMBER(tessedit_rejection_debug, false, "Adaption debug", this->params()), BOOL_MEMBER(tessedit_flip_0O, true, "Contextual 0O O0 flips", this->params()), double_MEMBER(tessedit_lower_flip_hyphen, 1.5, "Aspect ratio dot/hyphen test", this->params()), double_MEMBER(tessedit_upper_flip_hyphen, 1.8, "Aspect ratio dot/hyphen test", this->params()), BOOL_MEMBER(rej_trust_doc_dawg, false, "Use DOC dawg in 11l conf. detector", this->params()), BOOL_MEMBER(rej_1Il_use_dict_word, false, "Use dictword test", this->params()), BOOL_MEMBER(rej_1Il_trust_permuter_type, true, "Dont double check", this->params()), BOOL_MEMBER(rej_use_tess_accepted, true, "Individual rejection control", this->params()), BOOL_MEMBER(rej_use_tess_blanks, true, "Individual rejection control", this->params()), BOOL_MEMBER(rej_use_good_perm, true, "Individual rejection control", this->params()), BOOL_MEMBER(rej_use_sensible_wd, false, "Extend permuter check", this->params()), BOOL_MEMBER(rej_alphas_in_number_perm, false, "Extend permuter check", this->params()), double_MEMBER(rej_whole_of_mostly_reject_word_fract, 0.85, "if >this fract", this->params()), INT_MEMBER(tessedit_image_border, 2, "Rej blbs near image edge limit", this->params()), STRING_MEMBER(ok_repeated_ch_non_alphanum_wds, "-?*\075", "Allow NN to unrej", this->params()), STRING_MEMBER(conflict_set_I_l_1, "Il1[]", "Il1 conflict set", this->params()), INT_MEMBER(min_sane_x_ht_pixels, 8, "Reject any x-ht lt or eq than this", this->params()), BOOL_MEMBER(tessedit_create_boxfile, false, "Output text with boxes", this->params()), INT_MEMBER(tessedit_page_number, -1, "-1 -> All pages" " , else specifc page to process", this->params()), BOOL_MEMBER(tessedit_write_images, false, "Capture the image from the IPE", this->params()), BOOL_MEMBER(interactive_display_mode, false, "Run interactively?", this->params()), STRING_MEMBER(file_type, ".tif", "Filename extension", this->params()), BOOL_MEMBER(tessedit_override_permuter, true, "According to dict_word", this->params()), INT_MEMBER(tessdata_manager_debug_level, 0, "Debug level for" " TessdataManager functions.", this->params()), STRING_MEMBER(tessedit_load_sublangs, "", "List of languages to load with this one", this->params()), BOOL_MEMBER(tessedit_use_primary_params_model, false, "In multilingual mode use params model of the" " primary language", this->params()), double_MEMBER(min_orientation_margin, 7.0, "Min acceptable orientation margin", this->params()), BOOL_MEMBER(textord_tabfind_show_vlines, false, "Debug line finding", this->params()), BOOL_MEMBER(textord_use_cjk_fp_model, FALSE, "Use CJK fixed pitch model", this->params()), BOOL_MEMBER(poly_allow_detailed_fx, false, "Allow feature extractors to see the original outline", this->params()), BOOL_INIT_MEMBER(tessedit_init_config_only, false, "Only initialize with the config file. Useful if the " "instance is not going to be used for OCR but say only " "for layout analysis.", this->params()), BOOL_MEMBER(textord_equation_detect, false, "Turn on equation detector", this->params()), BOOL_MEMBER(textord_tabfind_vertical_text, true, "Enable vertical detection", this->params()), BOOL_MEMBER(textord_tabfind_force_vertical_text, false, "Force using vertical text page mode", this->params()), double_MEMBER(textord_tabfind_vertical_text_ratio, 0.5, "Fraction of textlines deemed vertical to use vertical page " "mode", this->params()), double_MEMBER(textord_tabfind_aligned_gap_fraction, 0.75, "Fraction of height used as a minimum gap for aligned blobs.", this->params()), INT_MEMBER(tessedit_parallelize, 0, "Run in parallel where possible", this->params()), BOOL_MEMBER(preserve_interword_spaces, false, "Preserve multiple interword spaces", this->params()), BOOL_MEMBER(include_page_breaks, FALSE, "Include page separator string in output text after each " "image/page.", this->params()), STRING_MEMBER(page_separator, "\f", "Page separator (default is form feed control character)", this->params()), // The following parameters were deprecated and removed from their original // locations. The parameters are temporarily kept here to give Tesseract // users a chance to updated their [lang].traineddata and config files // without introducing failures during Tesseract initialization. // TODO(ocr-team): remove these parameters from the code once we are // reasonably sure that Tesseract users have updated their data files. // // BEGIN DEPRECATED PARAMETERS BOOL_MEMBER(textord_tabfind_vertical_horizontal_mix, true, "find horizontal lines such as headers in vertical page mode", this->params()), INT_MEMBER(tessedit_ok_mode, 5, "Acceptance decision algorithm", this->params()), BOOL_INIT_MEMBER(load_fixed_length_dawgs, true, "Load fixed length dawgs" " (e.g. for non-space delimited languages)", this->params()), INT_MEMBER(segment_debug, 0, "Debug the whole segmentation process", this->params()), BOOL_MEMBER(permute_debug, 0, "Debug char permutation process", this->params()), double_MEMBER(bestrate_pruning_factor, 2.0, "Multiplying factor of" " current best rate to prune other hypotheses", this->params()), BOOL_MEMBER(permute_script_word, 0, "Turn on word script consistency permuter", this->params()), BOOL_MEMBER(segment_segcost_rating, 0, "incorporate segmentation cost in word rating?", this->params()), double_MEMBER(segment_reward_script, 0.95, "Score multipler for script consistency within a word. " "Being a 'reward' factor, it should be <= 1. " "Smaller value implies bigger reward.", this->params()), BOOL_MEMBER(permute_fixed_length_dawg, 0, "Turn on fixed-length phrasebook search permuter", this->params()), BOOL_MEMBER(permute_chartype_word, 0, "Turn on character type (property) consistency permuter", this->params()), double_MEMBER(segment_reward_chartype, 0.97, "Score multipler for char type consistency within a word. ", this->params()), double_MEMBER(segment_reward_ngram_best_choice, 0.99, "Score multipler for ngram permuter's best choice" " (only used in the Han script path).", this->params()), BOOL_MEMBER(ngram_permuter_activated, false, "Activate character-level n-gram-based permuter", this->params()), BOOL_MEMBER(permute_only_top, false, "Run only the top choice permuter", this->params()), INT_MEMBER(language_model_fixed_length_choices_depth, 3, "Depth of blob choice lists to explore" " when fixed length dawgs are on", this->params()), BOOL_MEMBER(use_new_state_cost, FALSE, "use new state cost heuristics for segmentation state" " evaluation", this->params()), double_MEMBER(heuristic_segcost_rating_base, 1.25, "base factor for adding segmentation cost into word rating." "It's a multiplying factor, the larger the value above 1, " "the bigger the effect of segmentation cost.", this->params()), double_MEMBER(heuristic_weight_rating, 1.0, "weight associated with char rating in combined cost of" "state", this->params()), double_MEMBER(heuristic_weight_width, 1000.0, "weight associated with width evidence in combined cost of" " state", this->params()), double_MEMBER(heuristic_weight_seamcut, 0.0, "weight associated with seam cut in combined cost of state", this->params()), double_MEMBER(heuristic_max_char_wh_ratio, 2.0, "max char width-to-height ratio allowed in segmentation", this->params()), BOOL_MEMBER(enable_new_segsearch, true, "Enable new segmentation search path.", this->params()), double_MEMBER(segsearch_max_fixed_pitch_char_wh_ratio, 2.0, "Maximum character width-to-height ratio for" " fixed-pitch fonts", this->params()), // END DEPRECATED PARAMETERS backup_config_file_(NULL), pix_binary_(NULL), cube_binary_(NULL), pix_grey_(NULL), pix_thresholds_(NULL), source_resolution_(0), textord_(this), right_to_left_(false), scaled_color_(NULL), scaled_factor_(-1), deskew_(1.0f, 0.0f), reskew_(1.0f, 0.0f), most_recently_used_(this), font_table_size_(0), cube_cntxt_(NULL), tess_cube_combiner_(NULL), equ_detect_(NULL) { } Tesseract::~Tesseract() { Clear(); end_tesseract(); sub_langs_.delete_data_pointers(); // Delete cube objects. if (cube_cntxt_ != NULL) { delete cube_cntxt_; cube_cntxt_ = NULL; } if (tess_cube_combiner_ != NULL) { delete tess_cube_combiner_; tess_cube_combiner_ = NULL; } } void Tesseract::Clear() { pixDestroy(&pix_binary_); pixDestroy(&cube_binary_); pixDestroy(&pix_grey_); pixDestroy(&pix_thresholds_); pixDestroy(&scaled_color_); deskew_ = FCOORD(1.0f, 0.0f); reskew_ = FCOORD(1.0f, 0.0f); splitter_.Clear(); scaled_factor_ = -1; for (int i = 0; i < sub_langs_.size(); ++i) sub_langs_[i]->Clear(); } void Tesseract::SetEquationDetect(EquationDetect* detector) { equ_detect_ = detector; equ_detect_->SetLangTesseract(this); } // Clear all memory of adaption for this and all subclassifiers. void Tesseract::ResetAdaptiveClassifier() { ResetAdaptiveClassifierInternal(); for (int i = 0; i < sub_langs_.size(); ++i) { sub_langs_[i]->ResetAdaptiveClassifierInternal(); } } // Clear the document dictionary for this and all subclassifiers. void Tesseract::ResetDocumentDictionary() { getDict().ResetDocumentDictionary(); for (int i = 0; i < sub_langs_.size(); ++i) { sub_langs_[i]->getDict().ResetDocumentDictionary(); } } void Tesseract::SetBlackAndWhitelist() { // Set the white and blacklists (if any) unicharset.set_black_and_whitelist(tessedit_char_blacklist.string(), tessedit_char_whitelist.string(), tessedit_char_unblacklist.string()); // Black and white lists should apply to all loaded classifiers. for (int i = 0; i < sub_langs_.size(); ++i) { sub_langs_[i]->unicharset.set_black_and_whitelist( tessedit_char_blacklist.string(), tessedit_char_whitelist.string(), tessedit_char_unblacklist.string()); } } // Perform steps to prepare underlying binary image/other data structures for // page segmentation. void Tesseract::PrepareForPageseg() { textord_.set_use_cjk_fp_model(textord_use_cjk_fp_model); pixDestroy(&cube_binary_); cube_binary_ = pixClone(pix_binary()); // Find the max splitter strategy over all langs. ShiroRekhaSplitter::SplitStrategy max_pageseg_strategy = static_cast<ShiroRekhaSplitter::SplitStrategy>( static_cast<inT32>(pageseg_devanagari_split_strategy)); for (int i = 0; i < sub_langs_.size(); ++i) { ShiroRekhaSplitter::SplitStrategy pageseg_strategy = static_cast<ShiroRekhaSplitter::SplitStrategy>( static_cast<inT32>(sub_langs_[i]->pageseg_devanagari_split_strategy)); if (pageseg_strategy > max_pageseg_strategy) max_pageseg_strategy = pageseg_strategy; // Clone the cube image to all the sub langs too. pixDestroy(&sub_langs_[i]->cube_binary_); sub_langs_[i]->cube_binary_ = pixClone(pix_binary()); pixDestroy(&sub_langs_[i]->pix_binary_); sub_langs_[i]->pix_binary_ = pixClone(pix_binary()); } // Perform shiro-rekha (top-line) splitting and replace the current image by // the newly splitted image. splitter_.set_orig_pix(pix_binary()); splitter_.set_pageseg_split_strategy(max_pageseg_strategy); if (splitter_.Split(true)) { ASSERT_HOST(splitter_.splitted_image()); pixDestroy(&pix_binary_); pix_binary_ = pixClone(splitter_.splitted_image()); } } // Perform steps to prepare underlying binary image/other data structures for // OCR. The current segmentation is required by this method. // Note that this method resets pix_binary_ to the original binarized image, // which may be different from the image actually used for OCR depending on the // value of devanagari_ocr_split_strategy. void Tesseract::PrepareForTessOCR(BLOCK_LIST* block_list, Tesseract* osd_tess, OSResults* osr) { // Find the max splitter strategy over all langs. ShiroRekhaSplitter::SplitStrategy max_ocr_strategy = static_cast<ShiroRekhaSplitter::SplitStrategy>( static_cast<inT32>(ocr_devanagari_split_strategy)); for (int i = 0; i < sub_langs_.size(); ++i) { ShiroRekhaSplitter::SplitStrategy ocr_strategy = static_cast<ShiroRekhaSplitter::SplitStrategy>( static_cast<inT32>(sub_langs_[i]->ocr_devanagari_split_strategy)); if (ocr_strategy > max_ocr_strategy) max_ocr_strategy = ocr_strategy; } // Utilize the segmentation information available. splitter_.set_segmentation_block_list(block_list); splitter_.set_ocr_split_strategy(max_ocr_strategy); // Run the splitter for OCR bool split_for_ocr = splitter_.Split(false); // Restore pix_binary to the binarized original pix for future reference. ASSERT_HOST(splitter_.orig_pix()); pixDestroy(&pix_binary_); pix_binary_ = pixClone(splitter_.orig_pix()); // If the pageseg and ocr strategies are different, refresh the block list // (from the last SegmentImage call) with blobs from the real image to be used // for OCR. if (splitter_.HasDifferentSplitStrategies()) { BLOCK block("", TRUE, 0, 0, 0, 0, pixGetWidth(pix_binary_), pixGetHeight(pix_binary_)); Pix* pix_for_ocr = split_for_ocr ? splitter_.splitted_image() : splitter_.orig_pix(); extract_edges(pix_for_ocr, &block); splitter_.RefreshSegmentationWithNewBlobs(block.blob_list()); } // The splitter isn't needed any more after this, so save memory by clearing. splitter_.Clear(); } } // namespace tesseract
C++
/****************************************************************** * File: cube_control.cpp * Description: Tesseract class methods for invoking cube convolutional * neural network word recognizer. * Author: Raquel Romano * Created: September 2009 * **********************************************************************/ // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif #include "allheaders.h" #include "cube_object.h" #include "cube_reco_context.h" #include "tesseractclass.h" #include "tesseract_cube_combiner.h" namespace tesseract { /********************************************************************** * convert_prob_to_tess_certainty * * Normalize a probability in the range [0.0, 1.0] to a tesseract * certainty in the range [-20.0, 0.0] **********************************************************************/ static float convert_prob_to_tess_certainty(float prob) { return (prob - 1.0) * 20.0; } /********************************************************************** * char_box_to_tbox * * Create a TBOX from a character bounding box. If nonzero, the * x_offset accounts for any additional padding of the word box that * should be taken into account. * **********************************************************************/ TBOX char_box_to_tbox(Box* char_box, TBOX word_box, int x_offset) { l_int32 left; l_int32 top; l_int32 width; l_int32 height; l_int32 right; l_int32 bottom; boxGetGeometry(char_box, &left, &top, &width, &height); left += word_box.left() - x_offset; right = left + width; top = word_box.bottom() + word_box.height() - top; bottom = top - height; return TBOX(left, bottom, right, top); } /********************************************************************** * extract_cube_state * * Extract CharSamp objects and character bounding boxes from the * CubeObject's state. The caller should free both structres. * **********************************************************************/ bool Tesseract::extract_cube_state(CubeObject* cube_obj, int* num_chars, Boxa** char_boxes, CharSamp*** char_samples) { if (!cube_obj) { if (cube_debug_level > 0) { tprintf("Cube WARNING (extract_cube_state): Invalid cube object " "passed to extract_cube_state\n"); } return false; } // Note that the CubeObject accessors return either the deslanted or // regular objects search object or beam search object, whichever // was used in the last call to Recognize() CubeSearchObject* cube_search_obj = cube_obj->SrchObj(); if (!cube_search_obj) { if (cube_debug_level > 0) { tprintf("Cube WARNING (Extract_cube_state): Could not retrieve " "cube's search object in extract_cube_state.\n"); } return false; } BeamSearch *beam_search_obj = cube_obj->BeamObj(); if (!beam_search_obj) { if (cube_debug_level > 0) { tprintf("Cube WARNING (Extract_cube_state): Could not retrieve " "cube's beam search object in extract_cube_state.\n"); } return false; } // Get the character samples and bounding boxes by backtracking // through the beam search path int best_node_index = beam_search_obj->BestPresortedNodeIndex(); *char_samples = beam_search_obj->BackTrack( cube_search_obj, best_node_index, num_chars, NULL, char_boxes); if (!*char_samples) return false; return true; } /********************************************************************** * create_cube_box_word * * Fill the given BoxWord with boxes from character bounding * boxes. The char_boxes have local coordinates w.r.t. the * word bounding box, i.e., the left-most character bbox of each word * has (0,0) left-top coord, but the BoxWord must be defined in page * coordinates. **********************************************************************/ bool Tesseract::create_cube_box_word(Boxa *char_boxes, int num_chars, TBOX word_box, BoxWord* box_word) { if (!box_word) { if (cube_debug_level > 0) { tprintf("Cube WARNING (create_cube_box_word): Invalid box_word.\n"); } return false; } // Find the x-coordinate of left-most char_box, which could be // nonzero if the word image was padded before recognition took place. int x_offset = -1; for (int i = 0; i < num_chars; ++i) { Box* char_box = boxaGetBox(char_boxes, i, L_CLONE); if (x_offset < 0 || char_box->x < x_offset) { x_offset = char_box->x; } boxDestroy(&char_box); } for (int i = 0; i < num_chars; ++i) { Box* char_box = boxaGetBox(char_boxes, i, L_CLONE); TBOX tbox = char_box_to_tbox(char_box, word_box, x_offset); boxDestroy(&char_box); box_word->InsertBox(i, tbox); } return true; } /********************************************************************** * init_cube_objects * * Instantiates Tesseract object's CubeRecoContext and TesseractCubeCombiner. * Returns false if cube context could not be created or if load_combiner is * true, but the combiner could not be loaded. **********************************************************************/ bool Tesseract::init_cube_objects(bool load_combiner, TessdataManager *tessdata_manager) { ASSERT_HOST(cube_cntxt_ == NULL); ASSERT_HOST(tess_cube_combiner_ == NULL); // Create the cube context object cube_cntxt_ = CubeRecoContext::Create(this, tessdata_manager, &unicharset); if (cube_cntxt_ == NULL) { if (cube_debug_level > 0) { tprintf("Cube WARNING (Tesseract::init_cube_objects()): Failed to " "instantiate CubeRecoContext\n"); } return false; } // Create the combiner object and load the combiner net for target languages. if (load_combiner) { tess_cube_combiner_ = new tesseract::TesseractCubeCombiner(cube_cntxt_); if (!tess_cube_combiner_ || !tess_cube_combiner_->LoadCombinerNet()) { delete cube_cntxt_; cube_cntxt_ = NULL; if (tess_cube_combiner_ != NULL) { delete tess_cube_combiner_; tess_cube_combiner_ = NULL; } if (cube_debug_level > 0) tprintf("Cube ERROR (Failed to instantiate TesseractCubeCombiner\n"); return false; } } return true; } /********************************************************************** * run_cube_combiner * * Iterates through tesseract's results and calls cube on each word, * combining the results with the existing tesseract result. **********************************************************************/ void Tesseract::run_cube_combiner(PAGE_RES *page_res) { if (page_res == NULL || tess_cube_combiner_ == NULL) return; PAGE_RES_IT page_res_it(page_res); // Iterate through the word results and call cube on each word. for (page_res_it.restart_page(); page_res_it.word () != NULL; page_res_it.forward()) { BLOCK* block = page_res_it.block()->block; if (block->poly_block() != NULL && !block->poly_block()->IsText()) continue; // Don't deal with non-text blocks. WERD_RES* word = page_res_it.word(); // Skip cube entirely if tesseract's certainty is greater than threshold. int combiner_run_thresh = convert_prob_to_tess_certainty( cube_cntxt_->Params()->CombinerRunThresh()); if (word->best_choice->certainty() >= combiner_run_thresh) { continue; } // Use the same language as Tesseract used for the word. Tesseract* lang_tess = word->tesseract; // Setup a trial WERD_RES in which to classify with cube. WERD_RES cube_word; cube_word.InitForRetryRecognition(*word); cube_word.SetupForRecognition(lang_tess->unicharset, this, BestPix(), OEM_CUBE_ONLY, NULL, false, false, false, page_res_it.row()->row, page_res_it.block()->block); CubeObject *cube_obj = lang_tess->cube_recognize_word( page_res_it.block()->block, &cube_word); if (cube_obj != NULL) lang_tess->cube_combine_word(cube_obj, &cube_word, word); delete cube_obj; } } /********************************************************************** * cube_word_pass1 * * Recognizes a single word using (only) cube. Compatible with * Tesseract's classify_word_pass1/classify_word_pass2. **********************************************************************/ void Tesseract::cube_word_pass1(BLOCK* block, ROW *row, WERD_RES *word) { CubeObject *cube_obj = cube_recognize_word(block, word); delete cube_obj; } /********************************************************************** * cube_recognize_word * * Cube recognizer to recognize a single word as with classify_word_pass1 * but also returns the cube object in case the combiner is needed. **********************************************************************/ CubeObject* Tesseract::cube_recognize_word(BLOCK* block, WERD_RES* word) { if (!cube_binary_ || !cube_cntxt_) { if (cube_debug_level > 0 && !cube_binary_) tprintf("Tesseract::run_cube(): NULL binary image.\n"); word->SetupFake(unicharset); return NULL; } TBOX word_box = word->word->bounding_box(); if (block != NULL && (block->re_rotation().x() != 1.0f || block->re_rotation().y() != 0.0f)) { // TODO(rays) We have to rotate the bounding box to get the true coords. // This will be achieved in the future via DENORM. // In the mean time, cube can't process this word. if (cube_debug_level > 0) { tprintf("Cube can't process rotated word at:"); word_box.print(); } word->SetupFake(unicharset); return NULL; } CubeObject* cube_obj = new tesseract::CubeObject( cube_cntxt_, cube_binary_, word_box.left(), pixGetHeight(cube_binary_) - word_box.top(), word_box.width(), word_box.height()); if (!cube_recognize(cube_obj, block, word)) { delete cube_obj; return NULL; } return cube_obj; } /********************************************************************** * cube_combine_word * * Combines the cube and tesseract results for a single word, leaving the * result in tess_word. **********************************************************************/ void Tesseract::cube_combine_word(CubeObject* cube_obj, WERD_RES* cube_word, WERD_RES* tess_word) { float combiner_prob = tess_cube_combiner_->CombineResults(tess_word, cube_obj); // If combiner probability is greater than tess/cube combiner // classifier threshold, i.e. tesseract wins, then just return the // tesseract result unchanged, as the combiner knows nothing about how // correct the answer is. If cube and tesseract agree, then improve the // scores before returning. WERD_CHOICE* tess_best = tess_word->best_choice; WERD_CHOICE* cube_best = cube_word->best_choice; if (cube_debug_level || classify_debug_level) { tprintf("Combiner prob = %g vs threshold %g\n", combiner_prob, cube_cntxt_->Params()->CombinerClassifierThresh()); } if (combiner_prob >= cube_cntxt_->Params()->CombinerClassifierThresh()) { if (tess_best->unichar_string() == cube_best->unichar_string()) { // Cube and tess agree, so improve the scores. tess_best->set_rating(tess_best->rating() / 2); tess_best->set_certainty(tess_best->certainty() / 2); } return; } // Cube wins. // It is better for the language combiner to have all tesseract scores, // so put them in the cube result. cube_best->set_rating(tess_best->rating()); cube_best->set_certainty(tess_best->certainty()); if (cube_debug_level || classify_debug_level) { tprintf("Cube INFO: tesseract result replaced by cube: %s -> %s\n", tess_best->unichar_string().string(), cube_best->unichar_string().string()); } tess_word->ConsumeWordResults(cube_word); } /********************************************************************** * cube_recognize * * Call cube on the current word, and write the result to word. * Sets up a fake result and returns false if something goes wrong. **********************************************************************/ bool Tesseract::cube_recognize(CubeObject *cube_obj, BLOCK* block, WERD_RES *word) { // Run cube WordAltList *cube_alt_list = cube_obj->RecognizeWord(); if (!cube_alt_list || cube_alt_list->AltCount() <= 0) { if (cube_debug_level > 0) { tprintf("Cube returned nothing for word at:"); word->word->bounding_box().print(); } word->SetupFake(unicharset); return false; } // Get cube's best result and its probability, mapped to tesseract's // certainty range char_32 *cube_best_32 = cube_alt_list->Alt(0); double cube_prob = CubeUtils::Cost2Prob(cube_alt_list->AltCost(0)); float cube_certainty = convert_prob_to_tess_certainty(cube_prob); string cube_best_str; CubeUtils::UTF32ToUTF8(cube_best_32, &cube_best_str); // Retrieve Cube's character bounding boxes and CharSamples, // corresponding to the most recent call to RecognizeWord(). Boxa *char_boxes = NULL; CharSamp **char_samples = NULL;; int num_chars; if (!extract_cube_state(cube_obj, &num_chars, &char_boxes, &char_samples) && cube_debug_level > 0) { tprintf("Cube WARNING (Tesseract::cube_recognize): Cannot extract " "cube state.\n"); word->SetupFake(unicharset); return false; } // Convert cube's character bounding boxes to a BoxWord. BoxWord cube_box_word; TBOX tess_word_box = word->word->bounding_box(); if (word->denorm.block() != NULL) tess_word_box.rotate(word->denorm.block()->re_rotation()); bool box_word_success = create_cube_box_word(char_boxes, num_chars, tess_word_box, &cube_box_word); boxaDestroy(&char_boxes); if (!box_word_success) { if (cube_debug_level > 0) { tprintf("Cube WARNING (Tesseract::cube_recognize): Could not " "create cube BoxWord\n"); } word->SetupFake(unicharset); return false; } // Fill tesseract result's fields with cube results fill_werd_res(cube_box_word, cube_best_str.c_str(), word); // Create cube's best choice. BLOB_CHOICE** choices = new BLOB_CHOICE*[num_chars]; for (int i = 0; i < num_chars; ++i) { UNICHAR_ID uch_id = cube_cntxt_->CharacterSet()->UnicharID(char_samples[i]->StrLabel()); choices[i] = new BLOB_CHOICE(uch_id, -cube_certainty, cube_certainty, -1, -1, 0, 0, 0, 0, BCC_STATIC_CLASSIFIER); } word->FakeClassifyWord(num_chars, choices); // within a word, cube recognizes the word in reading order. word->best_choice->set_unichars_in_script_order(true); delete [] choices; delete [] char_samples; // Some sanity checks ASSERT_HOST(word->best_choice->length() == word->reject_map.length()); if (cube_debug_level || classify_debug_level) { tprintf("Cube result: %s r=%g, c=%g\n", word->best_choice->unichar_string().string(), word->best_choice->rating(), word->best_choice->certainty()); } return true; } /********************************************************************** * fill_werd_res * * Fill Tesseract's word result fields with cube's. * **********************************************************************/ void Tesseract::fill_werd_res(const BoxWord& cube_box_word, const char* cube_best_str, WERD_RES* tess_werd_res) { delete tess_werd_res->box_word; tess_werd_res->box_word = new BoxWord(cube_box_word); tess_werd_res->box_word->ClipToOriginalWord(tess_werd_res->denorm.block(), tess_werd_res->word); // Fill text and remaining fields tess_werd_res->word->set_text(cube_best_str); tess_werd_res->tess_failed = FALSE; tess_werd_res->tess_accepted = tess_acceptable_word(tess_werd_res); // There is no output word, so we can' call AdaptableWord, but then I don't // think we need to. Fudge the result with accepted. tess_werd_res->tess_would_adapt = tess_werd_res->tess_accepted; // Set word to done, i.e., ignore all of tesseract's tests for rejection tess_werd_res->done = tess_werd_res->tess_accepted; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: pgedit.h // Description: Page structure file editor // Author: Joern Wanke // Created: Wed Jul 18 10:05:01 PDT 2007 // // (C) Copyright 2007, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef PGEDIT_H #define PGEDIT_H #include "ocrblock.h" #include "ocrrow.h" #include "werd.h" #include "rect.h" #include "params.h" #include "tesseractclass.h" class ScrollView; class SVMenuNode; struct SVEvent; // A small event handler class to process incoming events to // this window. class PGEventHandler : public SVEventHandler { public: PGEventHandler(tesseract::Tesseract* tess) : tess_(tess) { } void Notify(const SVEvent* sve); private: tesseract::Tesseract* tess_; }; extern BLOCK_LIST *current_block_list; extern STRING_VAR_H (editor_image_win_name, "EditorImage", "Editor image window name"); extern INT_VAR_H (editor_image_xpos, 590, "Editor image X Pos"); extern INT_VAR_H (editor_image_ypos, 10, "Editor image Y Pos"); extern INT_VAR_H (editor_image_height, 680, "Editor image height"); extern INT_VAR_H (editor_image_width, 655, "Editor image width"); extern INT_VAR_H (editor_image_word_bb_color, BLUE, "Word bounding box colour"); extern INT_VAR_H (editor_image_blob_bb_color, YELLOW, "Blob bounding box colour"); extern INT_VAR_H (editor_image_text_color, WHITE, "Correct text colour"); extern STRING_VAR_H (editor_dbwin_name, "EditorDBWin", "Editor debug window name"); extern INT_VAR_H (editor_dbwin_xpos, 50, "Editor debug window X Pos"); extern INT_VAR_H (editor_dbwin_ypos, 500, "Editor debug window Y Pos"); extern INT_VAR_H (editor_dbwin_height, 24, "Editor debug window height"); extern INT_VAR_H (editor_dbwin_width, 80, "Editor debug window width"); extern STRING_VAR_H (editor_word_name, "BlnWords", "BL normalised word window"); extern INT_VAR_H (editor_word_xpos, 60, "Word window X Pos"); extern INT_VAR_H (editor_word_ypos, 510, "Word window Y Pos"); extern INT_VAR_H (editor_word_height, 240, "Word window height"); extern INT_VAR_H (editor_word_width, 655, "Word window width"); extern double_VAR_H (editor_smd_scale_factor, 1.0, "Scaling for smd image"); ScrollView* bln_word_window_handle(); //return handle void build_image_window(int width, int height); void display_bln_lines(ScrollView window, ScrollView::Color colour, float scale_factor, float y_offset, float minx, float maxx); //function to call void pgeditor_msg( //message display const char *msg); void pgeditor_show_point( //display coords SVEvent *event); //put bln word in box void show_point(PAGE_RES* page_res, float x, float y); #endif
C++
/////////////////////////////////////////////////////////////////////// // File: thresholder.cpp // Description: Base API for thresolding images in tesseract. // Author: Ray Smith // Created: Mon May 12 11:28:15 PDT 2008 // // (C) Copyright 2008, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "allheaders.h" #include "thresholder.h" #include <string.h> #include "otsuthr.h" #include "openclwrapper.h" namespace tesseract { ImageThresholder::ImageThresholder() : pix_(NULL), image_width_(0), image_height_(0), pix_channels_(0), pix_wpl_(0), scale_(1), yres_(300), estimated_res_(300) { SetRectangle(0, 0, 0, 0); } ImageThresholder::~ImageThresholder() { Clear(); } // Destroy the Pix if there is one, freeing memory. void ImageThresholder::Clear() { pixDestroy(&pix_); } // Return true if no image has been set. bool ImageThresholder::IsEmpty() const { return pix_ == NULL; } // SetImage makes a copy of all the image data, so it may be deleted // immediately after this call. // Greyscale of 8 and color of 24 or 32 bits per pixel may be given. // Palette color images will not work properly and must be converted to // 24 bit. // Binary images of 1 bit per pixel may also be given but they must be // byte packed with the MSB of the first byte being the first pixel, and a // one pixel is WHITE. For binary images set bytes_per_pixel=0. void ImageThresholder::SetImage(const unsigned char* imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line) { int bpp = bytes_per_pixel * 8; if (bpp == 0) bpp = 1; Pix* pix = pixCreate(width, height, bpp == 24 ? 32 : bpp); l_uint32* data = pixGetData(pix); int wpl = pixGetWpl(pix); switch (bpp) { case 1: for (int y = 0; y < height; ++y, data += wpl, imagedata += bytes_per_line) { for (int x = 0; x < width; ++x) { if (imagedata[x / 8] & (0x80 >> (x % 8))) CLEAR_DATA_BIT(data, x); else SET_DATA_BIT(data, x); } } break; case 8: // Greyscale just copies the bytes in the right order. for (int y = 0; y < height; ++y, data += wpl, imagedata += bytes_per_line) { for (int x = 0; x < width; ++x) SET_DATA_BYTE(data, x, imagedata[x]); } break; case 24: // Put the colors in the correct places in the line buffer. for (int y = 0; y < height; ++y, imagedata += bytes_per_line) { for (int x = 0; x < width; ++x, ++data) { SET_DATA_BYTE(data, COLOR_RED, imagedata[3 * x]); SET_DATA_BYTE(data, COLOR_GREEN, imagedata[3 * x + 1]); SET_DATA_BYTE(data, COLOR_BLUE, imagedata[3 * x + 2]); } } break; case 32: // Maintain byte order consistency across different endianness. for (int y = 0; y < height; ++y, imagedata += bytes_per_line, data += wpl) { for (int x = 0; x < width; ++x) { data[x] = (imagedata[x * 4] << 24) | (imagedata[x * 4 + 1] << 16) | (imagedata[x * 4 + 2] << 8) | imagedata[x * 4 + 3]; } } break; default: tprintf("Cannot convert RAW image to Pix with bpp = %d\n", bpp); } pixSetYRes(pix, 300); SetImage(pix); pixDestroy(&pix); } // Store the coordinates of the rectangle to process for later use. // Doesn't actually do any thresholding. void ImageThresholder::SetRectangle(int left, int top, int width, int height) { rect_left_ = left; rect_top_ = top; rect_width_ = width; rect_height_ = height; } // Get enough parameters to be able to rebuild bounding boxes in the // original image (not just within the rectangle). // Left and top are enough with top-down coordinates, but // the height of the rectangle and the image are needed for bottom-up. void ImageThresholder::GetImageSizes(int* left, int* top, int* width, int* height, int* imagewidth, int* imageheight) { *left = rect_left_; *top = rect_top_; *width = rect_width_; *height = rect_height_; *imagewidth = image_width_; *imageheight = image_height_; } // Pix vs raw, which to use? Pix is the preferred input for efficiency, // since raw buffers are copied. // SetImage for Pix clones its input, so the source pix may be pixDestroyed // immediately after, but may not go away until after the Thresholder has // finished with it. void ImageThresholder::SetImage(const Pix* pix) { if (pix_ != NULL) pixDestroy(&pix_); Pix* src = const_cast<Pix*>(pix); int depth; pixGetDimensions(src, &image_width_, &image_height_, &depth); // Convert the image as necessary so it is one of binary, plain RGB, or // 8 bit with no colormap. if (depth > 1 && depth < 8) { pix_ = pixConvertTo8(src, false); } else if (pixGetColormap(src)) { pix_ = pixRemoveColormap(src, REMOVE_CMAP_BASED_ON_SRC); } else { pix_ = pixClone(src); } depth = pixGetDepth(pix_); pix_channels_ = depth / 8; pix_wpl_ = pixGetWpl(pix_); scale_ = 1; estimated_res_ = yres_ = pixGetYRes(src); Init(); } // Threshold the source image as efficiently as possible to the output Pix. // Creates a Pix and sets pix to point to the resulting pointer. // Caller must use pixDestroy to free the created Pix. void ImageThresholder::ThresholdToPix(PageSegMode pageseg_mode, Pix** pix) { if (pix_channels_ == 0) { // We have a binary image, so it just has to be cloned. *pix = GetPixRect(); } else { OtsuThresholdRectToPix(pix_, pix); } } // Gets a pix that contains an 8 bit threshold value at each pixel. The // returned pix may be an integer reduction of the binary image such that // the scale factor may be inferred from the ratio of the sizes, even down // to the extreme of a 1x1 pixel thresholds image. // Ideally the 8 bit threshold should be the exact threshold used to generate // the binary image in ThresholdToPix, but this is not a hard constraint. // Returns NULL if the input is binary. PixDestroy after use. Pix* ImageThresholder::GetPixRectThresholds() { if (IsBinary()) return NULL; Pix* pix_grey = GetPixRectGrey(); int width = pixGetWidth(pix_grey); int height = pixGetHeight(pix_grey); int* thresholds; int* hi_values; OtsuThreshold(pix_grey, 0, 0, width, height, &thresholds, &hi_values); pixDestroy(&pix_grey); Pix* pix_thresholds = pixCreate(width, height, 8); int threshold = thresholds[0] > 0 ? thresholds[0] : 128; pixSetAllArbitrary(pix_thresholds, threshold); delete [] thresholds; delete [] hi_values; return pix_thresholds; } // Common initialization shared between SetImage methods. void ImageThresholder::Init() { SetRectangle(0, 0, image_width_, image_height_); } // Get a clone/copy of the source image rectangle. // The returned Pix must be pixDestroyed. // This function will be used in the future by the page layout analysis, and // the layout analysis that uses it will only be available with Leptonica, // so there is no raw equivalent. Pix* ImageThresholder::GetPixRect() { if (IsFullImage()) { // Just clone the whole thing. return pixClone(pix_); } else { // Crop to the given rectangle. Box* box = boxCreate(rect_left_, rect_top_, rect_width_, rect_height_); Pix* cropped = pixClipRectangle(pix_, box, NULL); boxDestroy(&box); return cropped; } } // Get a clone/copy of the source image rectangle, reduced to greyscale, // and at the same resolution as the output binary. // The returned Pix must be pixDestroyed. // Provided to the classifier to extract features from the greyscale image. Pix* ImageThresholder::GetPixRectGrey() { Pix* pix = GetPixRect(); // May have to be reduced to grey. int depth = pixGetDepth(pix); if (depth != 8) { Pix* result = depth < 8 ? pixConvertTo8(pix, false) : pixConvertRGBToLuminance(pix); pixDestroy(&pix); return result; } return pix; } // Otsu thresholds the rectangle, taking the rectangle from *this. void ImageThresholder::OtsuThresholdRectToPix(Pix* src_pix, Pix** out_pix) const { PERF_COUNT_START("OtsuThresholdRectToPix") int* thresholds; int* hi_values; int num_channels = OtsuThreshold(src_pix, rect_left_, rect_top_, rect_width_, rect_height_, &thresholds, &hi_values); // only use opencl if compiled w/ OpenCL and selected device is opencl #ifdef USE_OPENCL OpenclDevice od; if ((num_channels == 4 || num_channels == 1) && od.selectedDeviceIsOpenCL() && rect_top_ == 0 && rect_left_ == 0 ) { od.ThresholdRectToPixOCL((const unsigned char*)pixGetData(src_pix), num_channels, pixGetWpl(src_pix) * 4, thresholds, hi_values, out_pix /*pix_OCL*/, rect_height_, rect_width_, rect_top_, rect_left_); } else { #endif ThresholdRectToPix(src_pix, num_channels, thresholds, hi_values, out_pix); #ifdef USE_OPENCL } #endif delete [] thresholds; delete [] hi_values; PERF_COUNT_END } /// Threshold the rectangle, taking everything except the src_pix /// from the class, using thresholds/hi_values to the output pix. /// NOTE that num_channels is the size of the thresholds and hi_values // arrays and also the bytes per pixel in src_pix. void ImageThresholder::ThresholdRectToPix(Pix* src_pix, int num_channels, const int* thresholds, const int* hi_values, Pix** pix) const { PERF_COUNT_START("ThresholdRectToPix") *pix = pixCreate(rect_width_, rect_height_, 1); uinT32* pixdata = pixGetData(*pix); int wpl = pixGetWpl(*pix); int src_wpl = pixGetWpl(src_pix); uinT32* srcdata = pixGetData(src_pix); for (int y = 0; y < rect_height_; ++y) { const uinT32* linedata = srcdata + (y + rect_top_) * src_wpl; uinT32* pixline = pixdata + y * wpl; for (int x = 0; x < rect_width_; ++x) { bool white_result = true; for (int ch = 0; ch < num_channels; ++ch) { int pixel = GET_DATA_BYTE(const_cast<void*>( reinterpret_cast<const void *>(linedata)), (x + rect_left_) * num_channels + ch); if (hi_values[ch] >= 0 && (pixel > thresholds[ch]) == (hi_values[ch] == 0)) { white_result = false; break; } } if (white_result) CLEAR_DATA_BIT(pixline, x); else SET_DATA_BIT(pixline, x); } } PERF_COUNT_END } } // namespace tesseract.
C++
/********************************************************************** * File: fixxht.cpp (Formerly fixxht.c) * Description: Improve x_ht and look out for case inconsistencies * Author: Phil Cheatle * Created: Thu Aug 5 14:11:08 BST 1993 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include <string.h> #include <ctype.h> #include "params.h" #include "float2int.h" #include "tesseractclass.h" namespace tesseract { // Fixxht overview. // Premise: Initial estimate of x-height is adequate most of the time, but // occasionally it is incorrect. Most notable causes of failure are: // 1. Small caps, where the top of the caps is the same as the body text // xheight. For small caps words the xheight needs to be reduced to correctly // recognize the caps in the small caps word. // 2. All xheight lines, such as summer. Here the initial estimate will have // guessed that the blob tops are caps and will have placed the xheight too low. // 3. Noise/logos beside words, or changes in font size on a line. Such // things can blow the statistics and cause an incorrect estimate. // // Algorithm. // Compare the vertical position (top only) of alphnumerics in a word with // the range of positions in training data (in the unicharset). // See CountMisfitTops. If any characters disagree sufficiently with the // initial xheight estimate, then recalculate the xheight, re-run OCR on // the word, and if the number of vertical misfits goes down, along with // either the word rating or certainty, then keep the new xheight. // The new xheight is calculated as follows:ComputeCompatibleXHeight // For each alphanumeric character that has a vertically misplaced top // (a misfit), yet its bottom is within the acceptable range (ie it is not // likely a sub-or super-script) calculate the range of acceptable xheight // positions from its range of tops, and give each value in the range a // number of votes equal to the distance of its top from its acceptance range. // The x-height position with the median of the votes becomes the new // x-height. This assumes that most characters will be correctly recognized // even if the x-height is incorrect. This is not a terrible assumption, but // it is not great. An improvement would be to use a classifier that does // not care about vertical position or scaling at all. // If the max-min top of a unicharset char is bigger than kMaxCharTopRange // then the char top cannot be used to judge misfits or suggest a new top. const int kMaxCharTopRange = 48; // Returns the number of misfit blob tops in this word. int Tesseract::CountMisfitTops(WERD_RES *word_res) { int bad_blobs = 0; int num_blobs = word_res->rebuild_word->NumBlobs(); for (int blob_id = 0; blob_id < num_blobs; ++blob_id) { TBLOB* blob = word_res->rebuild_word->blobs[blob_id]; UNICHAR_ID class_id = word_res->best_choice->unichar_id(blob_id); if (unicharset.get_isalpha(class_id) || unicharset.get_isdigit(class_id)) { int top = blob->bounding_box().top(); if (top >= INT_FEAT_RANGE) top = INT_FEAT_RANGE - 1; int min_bottom, max_bottom, min_top, max_top; unicharset.get_top_bottom(class_id, &min_bottom, &max_bottom, &min_top, &max_top); if (max_top - min_top > kMaxCharTopRange) continue; bool bad = top < min_top - x_ht_acceptance_tolerance || top > max_top + x_ht_acceptance_tolerance; if (bad) ++bad_blobs; if (debug_x_ht_level >= 1) { tprintf("Class %s is %s with top %d vs limits of %d->%d, +/-%d\n", unicharset.id_to_unichar(class_id), bad ? "Misfit" : "OK", top, min_top, max_top, static_cast<int>(x_ht_acceptance_tolerance)); } } } return bad_blobs; } // Returns a new x-height maximally compatible with the result in word_res. // See comment above for overall algorithm. float Tesseract::ComputeCompatibleXheight(WERD_RES *word_res) { STATS top_stats(0, MAX_UINT8); int num_blobs = word_res->rebuild_word->NumBlobs(); for (int blob_id = 0; blob_id < num_blobs; ++blob_id) { TBLOB* blob = word_res->rebuild_word->blobs[blob_id]; UNICHAR_ID class_id = word_res->best_choice->unichar_id(blob_id); if (unicharset.get_isalpha(class_id) || unicharset.get_isdigit(class_id)) { int top = blob->bounding_box().top(); // Clip the top to the limit of normalized feature space. if (top >= INT_FEAT_RANGE) top = INT_FEAT_RANGE - 1; int bottom = blob->bounding_box().bottom(); int min_bottom, max_bottom, min_top, max_top; unicharset.get_top_bottom(class_id, &min_bottom, &max_bottom, &min_top, &max_top); // Chars with a wild top range would mess up the result so ignore them. if (max_top - min_top > kMaxCharTopRange) continue; int misfit_dist = MAX((min_top - x_ht_acceptance_tolerance) - top, top - (max_top + x_ht_acceptance_tolerance)); int height = top - kBlnBaselineOffset; if (debug_x_ht_level >= 20) { tprintf("Class %s: height=%d, bottom=%d,%d top=%d,%d, actual=%d,%d : ", unicharset.id_to_unichar(class_id), height, min_bottom, max_bottom, min_top, max_top, bottom, top); } // Use only chars that fit in the expected bottom range, and where // the range of tops is sensibly near the xheight. if (min_bottom <= bottom + x_ht_acceptance_tolerance && bottom - x_ht_acceptance_tolerance <= max_bottom && min_top > kBlnBaselineOffset && max_top - kBlnBaselineOffset >= kBlnXHeight && misfit_dist > 0) { // Compute the x-height position using proportionality between the // actual height and expected height. int min_xht = DivRounded(height * kBlnXHeight, max_top - kBlnBaselineOffset); int max_xht = DivRounded(height * kBlnXHeight, min_top - kBlnBaselineOffset); if (debug_x_ht_level >= 20) { tprintf(" xht range min=%d, max=%d\n", min_xht, max_xht); } // The range of expected heights gets a vote equal to the distance // of the actual top from the expected top. for (int y = min_xht; y <= max_xht; ++y) top_stats.add(y, misfit_dist); } else if (debug_x_ht_level >= 20) { tprintf(" already OK\n"); } } } if (top_stats.get_total() == 0) return 0.0f; // The new xheight is just the median vote, which is then scaled out // of BLN space back to pixel space to get the x-height in pixel space. float new_xht = top_stats.median(); if (debug_x_ht_level >= 20) { tprintf("Median xht=%f\n", new_xht); tprintf("Mode20:A: New x-height = %f (norm), %f (orig)\n", new_xht, new_xht / word_res->denorm.y_scale()); } // The xheight must change by at least x_ht_min_change to be used. if (fabs(new_xht - kBlnXHeight) >= x_ht_min_change) return new_xht / word_res->denorm.y_scale(); else return 0.0f; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: osdetect.h // Description: Orientation and script detection. // Author: Samuel Charron // Ranjith Unnikrishnan // // (C) Copyright 2008, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_OSDETECT_H__ #define TESSERACT_CCMAIN_OSDETECT_H__ #include "strngs.h" #include "unicharset.h" class TO_BLOCK_LIST; class BLOBNBOX; class BLOB_CHOICE_LIST; class BLOBNBOX_CLIST; namespace tesseract { class Tesseract; } // Max number of scripts in ICU + "NULL" + Japanese and Korean + Fraktur const int kMaxNumberOfScripts = 116 + 1 + 2 + 1; struct OSBestResult { OSBestResult() : orientation_id(0), script_id(0), sconfidence(0.0), oconfidence(0.0) {} int orientation_id; int script_id; float sconfidence; float oconfidence; }; struct OSResults { OSResults() : unicharset(NULL) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < kMaxNumberOfScripts; ++j) scripts_na[i][j] = 0; orientations[i] = 0; } } void update_best_orientation(); // Set the estimate of the orientation to the given id. void set_best_orientation(int orientation_id); // Update/Compute the best estimate of the script assuming the given // orientation id. void update_best_script(int orientation_id); // Return the index of the script with the highest score for this orientation. TESS_API int get_best_script(int orientation_id) const; // Accumulate scores with given OSResults instance and update the best script. void accumulate(const OSResults& osr); // Print statistics. void print_scores(void) const; void print_scores(int orientation_id) const; // Array holding scores for each orientation id [0,3]. // Orientation ids [0..3] map to [0, 270, 180, 90] degree orientations of the // page respectively, where the values refer to the amount of clockwise // rotation to be applied to the page for the text to be upright and readable. float orientations[4]; // Script confidence scores for each of 4 possible orientations. float scripts_na[4][kMaxNumberOfScripts]; UNICHARSET* unicharset; OSBestResult best_result; }; class OrientationDetector { public: OrientationDetector(const GenericVector<int>* allowed_scripts, OSResults* results); bool detect_blob(BLOB_CHOICE_LIST* scores); int get_orientation(); private: OSResults* osr_; tesseract::Tesseract* tess_; const GenericVector<int>* allowed_scripts_; }; class ScriptDetector { public: ScriptDetector(const GenericVector<int>* allowed_scripts, OSResults* osr, tesseract::Tesseract* tess); void detect_blob(BLOB_CHOICE_LIST* scores); bool must_stop(int orientation); private: OSResults* osr_; static const char* korean_script_; static const char* japanese_script_; static const char* fraktur_script_; int korean_id_; int japanese_id_; int katakana_id_; int hiragana_id_; int han_id_; int hangul_id_; int latin_id_; int fraktur_id_; tesseract::Tesseract* tess_; const GenericVector<int>* allowed_scripts_; }; int orientation_and_script_detection(STRING& filename, OSResults*, tesseract::Tesseract*); int os_detect(TO_BLOCK_LIST* port_blocks, OSResults* osr, tesseract::Tesseract* tess); int os_detect_blobs(const GenericVector<int>* allowed_scripts, BLOBNBOX_CLIST* blob_list, OSResults* osr, tesseract::Tesseract* tess); bool os_detect_blob(BLOBNBOX* bbox, OrientationDetector* o, ScriptDetector* s, OSResults*, tesseract::Tesseract* tess); // Helper method to convert an orientation index to its value in degrees. // The value represents the amount of clockwise rotation in degrees that must be // applied for the text to be upright (readable). TESS_API const int OrientationIdToValue(const int& id); #endif // TESSERACT_CCMAIN_OSDETECT_H__
C++
/********************************************************************** * File: tfacepp.cpp (Formerly tface++.c) * Description: C++ side of the C/C++ Tess/Editor interface. * Author: Ray Smith * Created: Thu Apr 23 15:39:23 BST 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #pragma warning(disable:4305) // int/float warnings #pragma warning(disable:4800) // int/bool warnings #endif #include <math.h> #include "blamer.h" #include "errcode.h" #include "ratngs.h" #include "reject.h" #include "tesseractclass.h" #include "werd.h" #define MAX_UNDIVIDED_LENGTH 24 /********************************************************************** * recog_word * * Convert the word to tess form and pass it to the tess segmenter. * Convert the output back to editor form. **********************************************************************/ namespace tesseract { void Tesseract::recog_word(WERD_RES *word) { if (wordrec_skip_no_truth_words && (word->blamer_bundle == NULL || word->blamer_bundle->incorrect_result_reason() == IRR_NO_TRUTH)) { if (classify_debug_level) tprintf("No truth for word - skipping\n"); word->tess_failed = true; return; } ASSERT_HOST(!word->chopped_word->blobs.empty()); recog_word_recursive(word); word->SetupBoxWord(); if (word->best_choice->length() != word->box_word->length()) { tprintf("recog_word ASSERT FAIL String:\"%s\"; " "Strlen=%d; #Blobs=%d\n", word->best_choice->debug_string().string(), word->best_choice->length(), word->box_word->length()); } ASSERT_HOST(word->best_choice->length() == word->box_word->length()); // Check that the ratings matrix size matches the sum of all the // segmentation states. if (!word->StatesAllValid()) { tprintf("Not all words have valid states relative to ratings matrix!!"); word->DebugWordChoices(true, NULL); ASSERT_HOST(word->StatesAllValid()); } if (tessedit_override_permuter) { /* Override the permuter type if a straight dictionary check disagrees. */ uinT8 perm_type = word->best_choice->permuter(); if ((perm_type != SYSTEM_DAWG_PERM) && (perm_type != FREQ_DAWG_PERM) && (perm_type != USER_DAWG_PERM)) { uinT8 real_dict_perm_type = dict_word(*word->best_choice); if (((real_dict_perm_type == SYSTEM_DAWG_PERM) || (real_dict_perm_type == FREQ_DAWG_PERM) || (real_dict_perm_type == USER_DAWG_PERM)) && (alpha_count(word->best_choice->unichar_string().string(), word->best_choice->unichar_lengths().string()) > 0)) { word->best_choice->set_permuter(real_dict_perm_type); // use dict perm } } if (tessedit_rejection_debug && perm_type != word->best_choice->permuter()) { tprintf("Permuter Type Flipped from %d to %d\n", perm_type, word->best_choice->permuter()); } } // Factored out from control.cpp ASSERT_HOST((word->best_choice == NULL) == (word->raw_choice == NULL)); if (word->best_choice == NULL || word->best_choice->length() == 0 || static_cast<int>(strspn(word->best_choice->unichar_string().string(), " ")) == word->best_choice->length()) { word->tess_failed = true; word->reject_map.initialise(word->box_word->length()); word->reject_map.rej_word_tess_failure(); } else { word->tess_failed = false; } } /********************************************************************** * recog_word_recursive * * Convert the word to tess form and pass it to the tess segmenter. * Convert the output back to editor form. **********************************************************************/ void Tesseract::recog_word_recursive(WERD_RES *word) { int word_length = word->chopped_word->NumBlobs(); // no of blobs if (word_length > MAX_UNDIVIDED_LENGTH) { return split_and_recog_word(word); } cc_recog(word); word_length = word->rebuild_word->NumBlobs(); // No of blobs in output. // Do sanity checks and minor fixes on best_choice. if (word->best_choice->length() > word_length) { word->best_choice->make_bad(); // should never happen tprintf("recog_word: Discarded long string \"%s\"" " (%d characters vs %d blobs)\n", word->best_choice->unichar_string().string(), word->best_choice->length(), word_length); tprintf("Word is at:"); word->word->bounding_box().print(); } if (word->best_choice->length() < word_length) { UNICHAR_ID space_id = unicharset.unichar_to_id(" "); while (word->best_choice->length() < word_length) { word->best_choice->append_unichar_id(space_id, 1, 0.0, word->best_choice->certainty()); } } } /********************************************************************** * split_and_recog_word * * Split the word into 2 smaller pieces at the largest gap. * Recognize the pieces and stick the results back together. **********************************************************************/ void Tesseract::split_and_recog_word(WERD_RES *word) { // Find the biggest blob gap in the chopped_word. int bestgap = -MAX_INT32; int split_index = 0; for (int b = 1; b < word->chopped_word->NumBlobs(); ++b) { TBOX prev_box = word->chopped_word->blobs[b - 1]->bounding_box(); TBOX blob_box = word->chopped_word->blobs[b]->bounding_box(); int gap = blob_box.left() - prev_box.right(); if (gap > bestgap) { bestgap = gap; split_index = b; } } ASSERT_HOST(split_index > 0); WERD_RES *word2 = NULL; BlamerBundle *orig_bb = NULL; split_word(word, split_index, &word2, &orig_bb); // Recognize the first part of the word. recog_word_recursive(word); // Recognize the second part of the word. recog_word_recursive(word2); join_words(word, word2, orig_bb); } /********************************************************************** * split_word * * Split a given WERD_RES in place into two smaller words for recognition. * split_pt is the index of the first blob to go in the second word. * The underlying word is left alone, only the TWERD (and subsequent data) * are split up. orig_blamer_bundle is set to the original blamer bundle, * and will now be owned by the caller. New blamer bundles are forged for the * two pieces. **********************************************************************/ void Tesseract::split_word(WERD_RES *word, int split_pt, WERD_RES **right_piece, BlamerBundle **orig_blamer_bundle) const { ASSERT_HOST(split_pt >0 && split_pt < word->chopped_word->NumBlobs()); // Save a copy of the blamer bundle so we can try to reconstruct it below. BlamerBundle *orig_bb = word->blamer_bundle ? new BlamerBundle(*word->blamer_bundle) : NULL; WERD_RES *word2 = new WERD_RES(*word); // blow away the copied chopped_word, as we want to work with // the blobs from the input chopped_word so seam_arrays can be merged. TWERD *chopped = word->chopped_word; TWERD *chopped2 = new TWERD; chopped2->blobs.reserve(chopped->NumBlobs() - split_pt); for (int i = split_pt; i < chopped->NumBlobs(); ++i) { chopped2->blobs.push_back(chopped->blobs[i]); } chopped->blobs.truncate(split_pt); word->chopped_word = NULL; delete word2->chopped_word; word2->chopped_word = NULL; const UNICHARSET &unicharset = *word->uch_set; word->ClearResults(); word2->ClearResults(); word->chopped_word = chopped; word2->chopped_word = chopped2; word->SetupBasicsFromChoppedWord(unicharset); word2->SetupBasicsFromChoppedWord(unicharset); // Try to adjust the blamer bundle. if (orig_bb != NULL) { // TODO(rays) Looks like a leak to me. // orig_bb should take, rather than copy. word->blamer_bundle = new BlamerBundle(); word2->blamer_bundle = new BlamerBundle(); orig_bb->SplitBundle(chopped->blobs.back()->bounding_box().right(), word2->chopped_word->blobs[0]->bounding_box().left(), wordrec_debug_blamer, word->blamer_bundle, word2->blamer_bundle); } *right_piece = word2; *orig_blamer_bundle = orig_bb; } /********************************************************************** * join_words * * The opposite of split_word(): * join word2 (including any recognized data / seam array / etc) * onto the right of word and then delete word2. * Also, if orig_bb is provided, stitch it back into word. **********************************************************************/ void Tesseract::join_words(WERD_RES *word, WERD_RES *word2, BlamerBundle *orig_bb) const { TBOX prev_box = word->chopped_word->blobs.back()->bounding_box(); TBOX blob_box = word2->chopped_word->blobs[0]->bounding_box(); // Tack the word2 outputs onto the end of the word outputs. word->chopped_word->blobs += word2->chopped_word->blobs; word->rebuild_word->blobs += word2->rebuild_word->blobs; word2->chopped_word->blobs.clear(); word2->rebuild_word->blobs.clear(); TPOINT split_pt; split_pt.x = (prev_box.right() + blob_box.left()) / 2; split_pt.y = (prev_box.top() + prev_box.bottom() + blob_box.top() + blob_box.bottom()) / 4; // Move the word2 seams onto the end of the word1 seam_array. // Since the seam list is one element short, an empty seam marking the // end of the last blob in the first word is needed first. word->seam_array.push_back(new SEAM(0.0f, split_pt, NULL, NULL, NULL)); word->seam_array += word2->seam_array; word2->seam_array.truncate(0); // Fix widths and gaps. word->blob_widths += word2->blob_widths; word->blob_gaps += word2->blob_gaps; // Fix the ratings matrix. int rat1 = word->ratings->dimension(); int rat2 = word2->ratings->dimension(); word->ratings->AttachOnCorner(word2->ratings); ASSERT_HOST(word->ratings->dimension() == rat1 + rat2); word->best_state += word2->best_state; // Append the word choices. *word->raw_choice += *word2->raw_choice; // How many alt choices from each should we try to get? const int kAltsPerPiece = 2; // When do we start throwing away extra alt choices? const int kTooManyAltChoices = 100; // Construct the cartesian product of the best_choices of word(1) and word2. WERD_CHOICE_LIST joined_choices; WERD_CHOICE_IT jc_it(&joined_choices); WERD_CHOICE_IT bc1_it(&word->best_choices); WERD_CHOICE_IT bc2_it(&word2->best_choices); int num_word1_choices = word->best_choices.length(); int total_joined_choices = num_word1_choices; // Nota Bene: For the main loop here, we operate only on the 2nd and greater // word2 choices, and put them in the joined_choices list. The 1st word2 // choice gets added to the original word1 choices in-place after we have // finished with them. int bc2_index = 1; for (bc2_it.forward(); !bc2_it.at_first(); bc2_it.forward(), ++bc2_index) { if (total_joined_choices >= kTooManyAltChoices && bc2_index > kAltsPerPiece) break; int bc1_index = 0; for (bc1_it.move_to_first(); bc1_index < num_word1_choices; ++bc1_index, bc1_it.forward()) { if (total_joined_choices >= kTooManyAltChoices && bc1_index > kAltsPerPiece) break; WERD_CHOICE *wc = new WERD_CHOICE(*bc1_it.data()); *wc += *bc2_it.data(); jc_it.add_after_then_move(wc); ++total_joined_choices; } } // Now that we've filled in as many alternates as we want, paste the best // choice for word2 onto the original word alt_choices. bc1_it.move_to_first(); bc2_it.move_to_first(); for (bc1_it.mark_cycle_pt(); !bc1_it.cycled_list(); bc1_it.forward()) { *bc1_it.data() += *bc2_it.data(); } bc1_it.move_to_last(); bc1_it.add_list_after(&joined_choices); // Restore the pointer to original blamer bundle and combine blamer // information recorded in the splits. if (orig_bb != NULL) { orig_bb->JoinBlames(*word->blamer_bundle, *word2->blamer_bundle, wordrec_debug_blamer); delete word->blamer_bundle; word->blamer_bundle = orig_bb; } word->SetupBoxWord(); word->reject_map.initialise(word->box_word->length()); delete word2; } } // namespace tesseract
C++
/****************************************************************** * File: superscript.cpp * Description: Correction pass to fix superscripts and subscripts. * Author: David Eger * Created: Mon Mar 12 14:05:00 PDT 2012 * * (C) Copyright 2012, Google, Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "normalis.h" #include "tesseractclass.h" static int LeadingUnicharsToChopped(WERD_RES *word, int num_unichars) { int num_chopped = 0; for (int i = 0; i < num_unichars; i++) num_chopped += word->best_state[i]; return num_chopped; } static int TrailingUnicharsToChopped(WERD_RES *word, int num_unichars) { int num_chopped = 0; for (int i = 0; i < num_unichars; i++) num_chopped += word->best_state[word->best_state.size() - 1 - i]; return num_chopped; } namespace tesseract { /** * Given a recognized blob, see if a contiguous collection of sub-pieces * (chopped blobs) starting at its left might qualify as being a subscript * or superscript letter based only on y position. Also do this for the * right side. */ void YOutlierPieces(WERD_RES *word, int rebuilt_blob_index, int super_y_bottom, int sub_y_top, ScriptPos *leading_pos, int *num_leading_outliers, ScriptPos *trailing_pos, int *num_trailing_outliers) { ScriptPos sp_unused1, sp_unused2; int unused1, unused2; if (!leading_pos) leading_pos = &sp_unused1; if (!num_leading_outliers) num_leading_outliers = &unused1; if (!trailing_pos) trailing_pos = &sp_unused2; if (!num_trailing_outliers) num_trailing_outliers = &unused2; *num_leading_outliers = *num_trailing_outliers = 0; *leading_pos = *trailing_pos = SP_NORMAL; int chopped_start = LeadingUnicharsToChopped(word, rebuilt_blob_index); int num_chopped_pieces = word->best_state[rebuilt_blob_index]; ScriptPos last_pos = SP_NORMAL; int trailing_outliers = 0; for (int i = 0; i < num_chopped_pieces; i++) { TBOX box = word->chopped_word->blobs[chopped_start + i]->bounding_box(); ScriptPos pos = SP_NORMAL; if (box.bottom() >= super_y_bottom) { pos = SP_SUPERSCRIPT; } else if (box.top() <= sub_y_top) { pos = SP_SUBSCRIPT; } if (pos == SP_NORMAL) { if (trailing_outliers == i) { *num_leading_outliers = trailing_outliers; *leading_pos = last_pos; } trailing_outliers = 0; } else { if (pos == last_pos) { trailing_outliers++; } else { trailing_outliers = 1; } } last_pos = pos; } *num_trailing_outliers = trailing_outliers; *trailing_pos = last_pos; } /** * Attempt to split off any high (or low) bits at the ends of the word with poor * certainty and recognize them separately. If the certainty gets much better * and other sanity checks pass, acccept. * * This superscript fix is meant to be called in the second pass of recognition * when we have tried once and already have a preliminary answer for word. * * @return Whether we modified the given word. */ bool Tesseract::SubAndSuperscriptFix(WERD_RES *word) { if (word->tess_failed || word->word->flag(W_REP_CHAR) || !word->best_choice) { return false; } int num_leading, num_trailing; ScriptPos sp_leading, sp_trailing; float leading_certainty, trailing_certainty; float avg_certainty, unlikely_threshold; // Calculate the number of whole suspicious characters at the edges. GetSubAndSuperscriptCandidates( word, &num_leading, &sp_leading, &leading_certainty, &num_trailing, &sp_trailing, &trailing_certainty, &avg_certainty, &unlikely_threshold); const char *leading_pos = sp_leading == SP_SUBSCRIPT ? "sub" : "super"; const char *trailing_pos = sp_trailing == SP_SUBSCRIPT ? "sub" : "super"; int num_blobs = word->best_choice->length(); // Calculate the remainder (partial characters) at the edges. // This accounts for us having classified the best version of // a word as [speaker?'] when it was instead [speaker.^{21}] // (that is we accidentally thought the 2 was attached to the period). int num_remainder_leading = 0, num_remainder_trailing = 0; if (num_leading + num_trailing < num_blobs && unlikely_threshold < 0.0) { int super_y_bottom = kBlnBaselineOffset + kBlnXHeight * superscript_min_y_bottom; int sub_y_top = kBlnBaselineOffset + kBlnXHeight * subscript_max_y_top; int last_word_char = num_blobs - 1 - num_trailing; float last_char_certainty = word->best_choice->certainty(last_word_char); if (word->best_choice->unichar_id(last_word_char) != 0 && last_char_certainty <= unlikely_threshold) { ScriptPos rpos; YOutlierPieces(word, last_word_char, super_y_bottom, sub_y_top, NULL, NULL, &rpos, &num_remainder_trailing); if (num_trailing > 0 && rpos != sp_trailing) num_remainder_trailing = 0; if (num_remainder_trailing > 0 && last_char_certainty < trailing_certainty) { trailing_certainty = last_char_certainty; } } bool another_blob_available = (num_remainder_trailing == 0) || num_leading + num_trailing + 1 < num_blobs; int first_char_certainty = word->best_choice->certainty(num_leading); if (another_blob_available && word->best_choice->unichar_id(num_leading) != 0 && first_char_certainty <= unlikely_threshold) { ScriptPos lpos; YOutlierPieces(word, num_leading, super_y_bottom, sub_y_top, &lpos, &num_remainder_leading, NULL, NULL); if (num_leading > 0 && lpos != sp_leading) num_remainder_leading = 0; if (num_remainder_leading > 0 && first_char_certainty < leading_certainty) { leading_certainty = first_char_certainty; } } } // If nothing to do, bail now. if (num_leading + num_trailing + num_remainder_leading + num_remainder_trailing == 0) { return false; } if (superscript_debug >= 1) { tprintf("Candidate for superscript detection: %s (", word->best_choice->unichar_string().string()); if (num_leading || num_remainder_leading) { tprintf("%d.%d %s-leading ", num_leading, num_remainder_leading, leading_pos); } if (num_trailing || num_remainder_trailing) { tprintf("%d.%d %s-trailing ", num_trailing, num_remainder_trailing, trailing_pos); } tprintf(")\n"); } if (superscript_debug >= 3) { word->best_choice->print(); } if (superscript_debug >= 2) { tprintf(" Certainties -- Average: %.2f Unlikely thresh: %.2f ", avg_certainty, unlikely_threshold); if (num_leading) tprintf("Orig. leading (min): %.2f ", leading_certainty); if (num_trailing) tprintf("Orig. trailing (min): %.2f ", trailing_certainty); tprintf("\n"); } // We've now calculated the number of rebuilt blobs we want to carve off. // However, split_word() works from TBLOBs in chopped_word, so we need to // convert to those. int num_chopped_leading = LeadingUnicharsToChopped(word, num_leading) + num_remainder_leading; int num_chopped_trailing = TrailingUnicharsToChopped(word, num_trailing) + num_remainder_trailing; int retry_leading = 0; int retry_trailing = 0; bool is_good = false; WERD_RES *revised = TrySuperscriptSplits( num_chopped_leading, leading_certainty, sp_leading, num_chopped_trailing, trailing_certainty, sp_trailing, word, &is_good, &retry_leading, &retry_trailing); if (is_good) { word->ConsumeWordResults(revised); } else if (retry_leading || retry_trailing) { int retry_chopped_leading = LeadingUnicharsToChopped(revised, retry_leading); int retry_chopped_trailing = TrailingUnicharsToChopped(revised, retry_trailing); WERD_RES *revised2 = TrySuperscriptSplits( retry_chopped_leading, leading_certainty, sp_leading, retry_chopped_trailing, trailing_certainty, sp_trailing, revised, &is_good, &retry_leading, &retry_trailing); if (is_good) { word->ConsumeWordResults(revised2); } delete revised2; } delete revised; return is_good; } /** * Determine how many characters (rebuilt blobs) on each end of a given word * might plausibly be superscripts so SubAndSuperscriptFix can try to * re-recognize them. Even if we find no whole blobs at either end, * we will set *unlikely_threshold to a certainty that might be used to * select "bad enough" outlier characters. If *unlikely_threshold is set to 0, * though, there's really no hope. * * @param[in] word The word to examine. * @param[out] num_rebuilt_leading the number of rebuilt blobs at the start * of the word which are all up or down and * seem badly classified. * @param[out] leading_pos "super" or "sub" (for debugging) * @param[out] leading_certainty the worst certainty in the leading blobs. * @param[out] num_rebuilt_trailing the number of rebuilt blobs at the end * of the word which are all up or down and * seem badly classified. * @param[out] trailing_pos "super" or "sub" (for debugging) * @param[out] trailing_certainty the worst certainty in the trailing blobs. * @param[out] avg_certainty the average certainty of "normal" blobs in * the word. * @param[out] unlikely_threshold the threshold (on certainty) we used to * select "bad enough" outlier characters. */ void Tesseract::GetSubAndSuperscriptCandidates(const WERD_RES *word, int *num_rebuilt_leading, ScriptPos *leading_pos, float *leading_certainty, int *num_rebuilt_trailing, ScriptPos *trailing_pos, float *trailing_certainty, float *avg_certainty, float *unlikely_threshold) { *avg_certainty = *unlikely_threshold = 0.0f; *num_rebuilt_leading = *num_rebuilt_trailing = 0; *leading_certainty = *trailing_certainty = 0.0f; int super_y_bottom = kBlnBaselineOffset + kBlnXHeight * superscript_min_y_bottom; int sub_y_top = kBlnBaselineOffset + kBlnXHeight * subscript_max_y_top; // Step one: Get an average certainty for "normally placed" characters. // Counts here are of blobs in the rebuild_word / unichars in best_choice. *leading_pos = *trailing_pos = SP_NORMAL; int leading_outliers = 0; int trailing_outliers = 0; int num_normal = 0; float normal_certainty_total = 0.0f; float worst_normal_certainty = 0.0f; ScriptPos last_pos = SP_NORMAL; int num_blobs = word->rebuild_word->NumBlobs(); for (int b = 0; b < num_blobs; ++b) { TBOX box = word->rebuild_word->blobs[b]->bounding_box(); ScriptPos pos = SP_NORMAL; if (box.bottom() >= super_y_bottom) { pos = SP_SUPERSCRIPT; } else if (box.top() <= sub_y_top) { pos = SP_SUBSCRIPT; } if (pos == SP_NORMAL) { if (word->best_choice->unichar_id(b) != 0) { float char_certainty = word->best_choice->certainty(b); if (char_certainty < worst_normal_certainty) { worst_normal_certainty = char_certainty; } num_normal++; normal_certainty_total += char_certainty; } if (trailing_outliers == b) { leading_outliers = trailing_outliers; *leading_pos = last_pos; } trailing_outliers = 0; } else { if (last_pos == pos) { trailing_outliers++; } else { trailing_outliers = 1; } } last_pos = pos; } *trailing_pos = last_pos; if (num_normal >= 3) { // throw out the worst as an outlier. num_normal--; normal_certainty_total -= worst_normal_certainty; } if (num_normal > 0) { *avg_certainty = normal_certainty_total / num_normal; *unlikely_threshold = superscript_worse_certainty * (*avg_certainty); } if (num_normal == 0 || (leading_outliers == 0 && trailing_outliers == 0)) { return; } // Step two: Try to split off bits of the word that are both outliers // and have much lower certainty than average // Calculate num_leading and leading_certainty. for (*leading_certainty = 0.0f, *num_rebuilt_leading = 0; *num_rebuilt_leading < leading_outliers; (*num_rebuilt_leading)++) { float char_certainty = word->best_choice->certainty(*num_rebuilt_leading); if (char_certainty > *unlikely_threshold) { break; } if (char_certainty < *leading_certainty) { *leading_certainty = char_certainty; } } // Calculate num_trailing and trailing_certainty. for (*trailing_certainty = 0.0f, *num_rebuilt_trailing = 0; *num_rebuilt_trailing < trailing_outliers; (*num_rebuilt_trailing)++) { int blob_idx = num_blobs - 1 - *num_rebuilt_trailing; float char_certainty = word->best_choice->certainty(blob_idx); if (char_certainty > *unlikely_threshold) { break; } if (char_certainty < *trailing_certainty) { *trailing_certainty = char_certainty; } } } /** * Try splitting off the given number of (chopped) blobs from the front and * back of the given word and recognizing the pieces. * * @param[in] num_chopped_leading how many chopped blobs from the left * end of the word to chop off and try recognizing as a * superscript (or subscript) * @param[in] leading_certainty the (minimum) certainty had by the * characters in the original leading section. * @param[in] leading_pos "super" or "sub" (for debugging) * @param[in] num_chopped_trailing how many chopped blobs from the right * end of the word to chop off and try recognizing as a * superscript (or subscript) * @param[in] trailing_certainty the (minimum) certainty had by the * characters in the original trailing section. * @param[in] trailing_pos "super" or "sub" (for debugging) * @param[in] word the word to try to chop up. * @param[out] is_good do we believe our result? * @param[out] retry_rebuild_leading, retry_rebuild_trailing * If non-zero, and !is_good, then the caller may have luck trying * to split the returned word with this number of (rebuilt) leading * and trailing blobs / unichars. * @return A word which is the result of re-recognizing as asked. */ WERD_RES *Tesseract::TrySuperscriptSplits( int num_chopped_leading, float leading_certainty, ScriptPos leading_pos, int num_chopped_trailing, float trailing_certainty, ScriptPos trailing_pos, WERD_RES *word, bool *is_good, int *retry_rebuild_leading, int *retry_rebuild_trailing) { int num_chopped = word->chopped_word->NumBlobs(); *retry_rebuild_leading = *retry_rebuild_trailing = 0; // Chop apart the word into up to three pieces. BlamerBundle *bb0 = NULL; BlamerBundle *bb1 = NULL; WERD_RES *prefix = NULL; WERD_RES *core = NULL; WERD_RES *suffix = NULL; if (num_chopped_leading > 0) { prefix = new WERD_RES(*word); split_word(prefix, num_chopped_leading, &core, &bb0); } else { core = new WERD_RES(*word); } if (num_chopped_trailing > 0) { int split_pt = num_chopped - num_chopped_trailing - num_chopped_leading; split_word(core, split_pt, &suffix, &bb1); } // Recognize the pieces in turn. int saved_cp_multiplier = classify_class_pruner_multiplier; int saved_im_multiplier = classify_integer_matcher_multiplier; if (prefix) { // Turn off Tesseract's y-position penalties for the leading superscript. classify_class_pruner_multiplier.set_value(0); classify_integer_matcher_multiplier.set_value(0); // Adjust our expectations about the baseline for this prefix. if (superscript_debug >= 3) { tprintf(" recognizing first %d chopped blobs\n", num_chopped_leading); } recog_word_recursive(prefix); if (superscript_debug >= 2) { tprintf(" The leading bits look like %s %s\n", ScriptPosToString(leading_pos), prefix->best_choice->unichar_string().string()); } // Restore the normal y-position penalties. classify_class_pruner_multiplier.set_value(saved_cp_multiplier); classify_integer_matcher_multiplier.set_value(saved_im_multiplier); } if (superscript_debug >= 3) { tprintf(" recognizing middle %d chopped blobs\n", num_chopped - num_chopped_leading - num_chopped_trailing); } if (suffix) { // Turn off Tesseract's y-position penalties for the trailing superscript. classify_class_pruner_multiplier.set_value(0); classify_integer_matcher_multiplier.set_value(0); if (superscript_debug >= 3) { tprintf(" recognizing last %d chopped blobs\n", num_chopped_trailing); } recog_word_recursive(suffix); if (superscript_debug >= 2) { tprintf(" The trailing bits look like %s %s\n", ScriptPosToString(trailing_pos), suffix->best_choice->unichar_string().string()); } // Restore the normal y-position penalties. classify_class_pruner_multiplier.set_value(saved_cp_multiplier); classify_integer_matcher_multiplier.set_value(saved_im_multiplier); } // Evaluate whether we think the results are believably better // than what we already had. bool good_prefix = !prefix || BelievableSuperscript( superscript_debug >= 1, *prefix, superscript_bettered_certainty * leading_certainty, retry_rebuild_leading, NULL); bool good_suffix = !suffix || BelievableSuperscript( superscript_debug >= 1, *suffix, superscript_bettered_certainty * trailing_certainty, NULL, retry_rebuild_trailing); *is_good = good_prefix && good_suffix; if (!*is_good && !*retry_rebuild_leading && !*retry_rebuild_trailing) { // None of it is any good. Quit now. delete core; delete prefix; delete suffix; return NULL; } recog_word_recursive(core); // Now paste the results together into core. if (suffix) { suffix->SetAllScriptPositions(trailing_pos); join_words(core, suffix, bb1); } if (prefix) { prefix->SetAllScriptPositions(leading_pos); join_words(prefix, core, bb0); core = prefix; prefix = NULL; } if (superscript_debug >= 1) { tprintf("%s superscript fix: %s\n", *is_good ? "ACCEPT" : "REJECT", core->best_choice->unichar_string().string()); } return core; } /** * Return whether this is believable superscript or subscript text. * * We insist that: * + there are no punctuation marks. * + there are no italics. * + no normal-sized character is smaller than superscript_scaledown_ratio * of what it ought to be, and * + each character is at least as certain as certainty_threshold. * * @param[in] debug If true, spew debug output * @param[in] word The word whose best_choice we're evaluating * @param[in] certainty_threshold If any of the characters have less * certainty than this, reject. * @param[out] left_ok How many left-side characters were ok? * @param[out] right_ok How many right-side characters were ok? * @return Whether the complete best choice is believable as a superscript. */ bool Tesseract::BelievableSuperscript(bool debug, const WERD_RES &word, float certainty_threshold, int *left_ok, int *right_ok) const { int initial_ok_run_count = 0; int ok_run_count = 0; float worst_certainty = 0.0f; const WERD_CHOICE &wc = *word.best_choice; const UnicityTable<FontInfo>& fontinfo_table = get_fontinfo_table(); for (int i = 0; i < wc.length(); i++) { TBLOB *blob = word.rebuild_word->blobs[i]; UNICHAR_ID unichar_id = wc.unichar_id(i); float char_certainty = wc.certainty(i); bool bad_certainty = char_certainty < certainty_threshold; bool is_punc = wc.unicharset()->get_ispunctuation(unichar_id); bool is_italic = word.fontinfo && word.fontinfo->is_italic(); BLOB_CHOICE *choice = word.GetBlobChoice(i); if (choice && fontinfo_table.size() > 0) { // Get better information from the specific choice, if available. int font_id1 = choice->fontinfo_id(); bool font1_is_italic = font_id1 >= 0 ? fontinfo_table.get(font_id1).is_italic() : false; int font_id2 = choice->fontinfo_id2(); is_italic = font1_is_italic && (font_id2 < 0 || fontinfo_table.get(font_id2).is_italic()); } float height_fraction = 1.0f; float char_height = blob->bounding_box().height(); float normal_height = char_height; if (wc.unicharset()->top_bottom_useful()) { int min_bot, max_bot, min_top, max_top; wc.unicharset()->get_top_bottom(unichar_id, &min_bot, &max_bot, &min_top, &max_top); float hi_height = max_top - max_bot; float lo_height = min_top - min_bot; normal_height = (hi_height + lo_height) / 2; if (normal_height >= kBlnXHeight) { // Only ding characters that we have decent information for because // they're supposed to be normal sized, not tiny specks or dashes. height_fraction = char_height / normal_height; } } bool bad_height = height_fraction < superscript_scaledown_ratio; if (debug) { if (is_italic) { tprintf(" Rejecting: superscript is italic.\n"); } if (is_punc) { tprintf(" Rejecting: punctuation present.\n"); } const char *char_str = wc.unicharset()->id_to_unichar(unichar_id); if (bad_certainty) { tprintf(" Rejecting: don't believe character %s with certainty %.2f " "which is less than threshold %.2f\n", char_str, char_certainty, certainty_threshold); } if (bad_height) { tprintf(" Rejecting: character %s seems too small @ %.2f versus " "expected %.2f\n", char_str, char_height, normal_height); } } if (bad_certainty || bad_height || is_punc || is_italic) { if (ok_run_count == i) { initial_ok_run_count = ok_run_count; } ok_run_count = 0; } else { ok_run_count++; } if (char_certainty < worst_certainty) { worst_certainty = char_certainty; } } bool all_ok = ok_run_count == wc.length(); if (all_ok && debug) { tprintf(" Accept: worst revised certainty is %.2f\n", worst_certainty); } if (!all_ok) { if (left_ok) *left_ok = initial_ok_run_count; if (right_ok) *right_ok = ok_run_count; } return all_ok; } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: ltrresultiterator.cpp // Description: Iterator for tesseract results in strict left-to-right // order that avoids using tesseract internal data structures. // Author: Ray Smith // Created: Fri Feb 26 14:32:09 PST 2010 // // (C) Copyright 2010, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "ltrresultiterator.h" #include "allheaders.h" #include "pageres.h" #include "strngs.h" #include "tesseractclass.h" namespace tesseract { LTRResultIterator::LTRResultIterator(PAGE_RES* page_res, Tesseract* tesseract, int scale, int scaled_yres, int rect_left, int rect_top, int rect_width, int rect_height) : PageIterator(page_res, tesseract, scale, scaled_yres, rect_left, rect_top, rect_width, rect_height), line_separator_("\n"), paragraph_separator_("\n") { } LTRResultIterator::~LTRResultIterator() { } // Returns the null terminated UTF-8 encoded text string for the current // object at the given level. Use delete [] to free after use. char* LTRResultIterator::GetUTF8Text(PageIteratorLevel level) const { if (it_->word() == NULL) return NULL; // Already at the end! STRING text; PAGE_RES_IT res_it(*it_); WERD_CHOICE* best_choice = res_it.word()->best_choice; ASSERT_HOST(best_choice != NULL); if (level == RIL_SYMBOL) { text = res_it.word()->BestUTF8(blob_index_, false); } else if (level == RIL_WORD) { text = best_choice->unichar_string(); } else { bool eol = false; // end of line? bool eop = false; // end of paragraph? do { // for each paragraph in a block do { // for each text line in a paragraph do { // for each word in a text line best_choice = res_it.word()->best_choice; ASSERT_HOST(best_choice != NULL); text += best_choice->unichar_string(); text += " "; res_it.forward(); eol = res_it.row() != res_it.prev_row(); } while (!eol); text.truncate_at(text.length() - 1); text += line_separator_; eop = res_it.block() != res_it.prev_block() || res_it.row()->row->para() != res_it.prev_row()->row->para(); } while (level != RIL_TEXTLINE && !eop); if (eop) text += paragraph_separator_; } while (level == RIL_BLOCK && res_it.block() == res_it.prev_block()); } int length = text.length() + 1; char* result = new char[length]; strncpy(result, text.string(), length); return result; } // Set the string inserted at the end of each text line. "\n" by default. void LTRResultIterator::SetLineSeparator(const char *new_line) { line_separator_ = new_line; } // Set the string inserted at the end of each paragraph. "\n" by default. void LTRResultIterator::SetParagraphSeparator(const char *new_para) { paragraph_separator_ = new_para; } // Returns the mean confidence of the current object at the given level. // The number should be interpreted as a percent probability. (0.0f-100.0f) float LTRResultIterator::Confidence(PageIteratorLevel level) const { if (it_->word() == NULL) return 0.0f; // Already at the end! float mean_certainty = 0.0f; int certainty_count = 0; PAGE_RES_IT res_it(*it_); WERD_CHOICE* best_choice = res_it.word()->best_choice; ASSERT_HOST(best_choice != NULL); switch (level) { case RIL_BLOCK: do { best_choice = res_it.word()->best_choice; ASSERT_HOST(best_choice != NULL); mean_certainty += best_choice->certainty(); ++certainty_count; res_it.forward(); } while (res_it.block() == res_it.prev_block()); break; case RIL_PARA: do { best_choice = res_it.word()->best_choice; ASSERT_HOST(best_choice != NULL); mean_certainty += best_choice->certainty(); ++certainty_count; res_it.forward(); } while (res_it.block() == res_it.prev_block() && res_it.row()->row->para() == res_it.prev_row()->row->para()); break; case RIL_TEXTLINE: do { best_choice = res_it.word()->best_choice; ASSERT_HOST(best_choice != NULL); mean_certainty += best_choice->certainty(); ++certainty_count; res_it.forward(); } while (res_it.row() == res_it.prev_row()); break; case RIL_WORD: mean_certainty += best_choice->certainty(); ++certainty_count; break; case RIL_SYMBOL: mean_certainty += best_choice->certainty(blob_index_); ++certainty_count; } if (certainty_count > 0) { mean_certainty /= certainty_count; float confidence = 100 + 5 * mean_certainty; if (confidence < 0.0f) confidence = 0.0f; if (confidence > 100.0f) confidence = 100.0f; return confidence; } return 0.0f; } // Returns the font attributes of the current word. If iterating at a higher // level object than words, eg textlines, then this will return the // attributes of the first word in that textline. // The actual return value is a string representing a font name. It points // to an internal table and SHOULD NOT BE DELETED. Lifespan is the same as // the iterator itself, ie rendered invalid by various members of // TessBaseAPI, including Init, SetImage, End or deleting the TessBaseAPI. // Pointsize is returned in printers points (1/72 inch.) const char* LTRResultIterator::WordFontAttributes(bool* is_bold, bool* is_italic, bool* is_underlined, bool* is_monospace, bool* is_serif, bool* is_smallcaps, int* pointsize, int* font_id) const { if (it_->word() == NULL) return NULL; // Already at the end! if (it_->word()->fontinfo == NULL) { *font_id = -1; return NULL; // No font information. } const FontInfo& font_info = *it_->word()->fontinfo; *font_id = font_info.universal_id; *is_bold = font_info.is_bold(); *is_italic = font_info.is_italic(); *is_underlined = false; // TODO(rays) fix this! *is_monospace = font_info.is_fixed_pitch(); *is_serif = font_info.is_serif(); *is_smallcaps = it_->word()->small_caps; float row_height = it_->row()->row->x_height() + it_->row()->row->ascenders() - it_->row()->row->descenders(); // Convert from pixels to printers points. *pointsize = scaled_yres_ > 0 ? static_cast<int>(row_height * kPointsPerInch / scaled_yres_ + 0.5) : 0; return font_info.name; } // Returns the name of the language used to recognize this word. const char* LTRResultIterator::WordRecognitionLanguage() const { if (it_->word() == NULL || it_->word()->tesseract == NULL) return NULL; return it_->word()->tesseract->lang.string(); } // Return the overall directionality of this word. StrongScriptDirection LTRResultIterator::WordDirection() const { if (it_->word() == NULL) return DIR_NEUTRAL; bool has_rtl = it_->word()->AnyRtlCharsInWord(); bool has_ltr = it_->word()->AnyLtrCharsInWord(); if (has_rtl && !has_ltr) return DIR_RIGHT_TO_LEFT; if (has_ltr && !has_rtl) return DIR_LEFT_TO_RIGHT; if (!has_ltr && !has_rtl) return DIR_NEUTRAL; return DIR_MIX; } // Returns true if the current word was found in a dictionary. bool LTRResultIterator::WordIsFromDictionary() const { if (it_->word() == NULL) return false; // Already at the end! int permuter = it_->word()->best_choice->permuter(); return permuter == SYSTEM_DAWG_PERM || permuter == FREQ_DAWG_PERM || permuter == USER_DAWG_PERM; } // Returns true if the current word is numeric. bool LTRResultIterator::WordIsNumeric() const { if (it_->word() == NULL) return false; // Already at the end! int permuter = it_->word()->best_choice->permuter(); return permuter == NUMBER_PERM; } // Returns true if the word contains blamer information. bool LTRResultIterator::HasBlamerInfo() const { return it_->word() != NULL && it_->word()->blamer_bundle != NULL && it_->word()->blamer_bundle->HasDebugInfo(); } // Returns the pointer to ParamsTrainingBundle stored in the BlamerBundle // of the current word. const void *LTRResultIterator::GetParamsTrainingBundle() const { return (it_->word() != NULL && it_->word()->blamer_bundle != NULL) ? &(it_->word()->blamer_bundle->params_training_bundle()) : NULL; } // Returns the pointer to the string with blamer information for this word. // Assumes that the word's blamer_bundle is not NULL. const char *LTRResultIterator::GetBlamerDebug() const { return it_->word()->blamer_bundle->debug().string(); } // Returns the pointer to the string with misadaption information for this word. // Assumes that the word's blamer_bundle is not NULL. const char *LTRResultIterator::GetBlamerMisadaptionDebug() const { return it_->word()->blamer_bundle->misadaption_debug().string(); } // Returns true if a truth string was recorded for the current word. bool LTRResultIterator::HasTruthString() const { if (it_->word() == NULL) return false; // Already at the end! if (it_->word()->blamer_bundle == NULL || it_->word()->blamer_bundle->NoTruth()) { return false; // no truth information for this word } return true; } // Returns true if the given string is equivalent to the truth string for // the current word. bool LTRResultIterator::EquivalentToTruth(const char *str) const { if (!HasTruthString()) return false; ASSERT_HOST(it_->word()->uch_set != NULL); WERD_CHOICE str_wd(str, *(it_->word()->uch_set)); return it_->word()->blamer_bundle->ChoiceIsCorrect(&str_wd); } // Returns the null terminated UTF-8 encoded truth string for the current word. // Use delete [] to free after use. char* LTRResultIterator::WordTruthUTF8Text() const { if (!HasTruthString()) return NULL; STRING truth_text = it_->word()->blamer_bundle->TruthString(); int length = truth_text.length() + 1; char* result = new char[length]; strncpy(result, truth_text.string(), length); return result; } // Returns the null terminated UTF-8 encoded normalized OCR string for the // current word. Use delete [] to free after use. char* LTRResultIterator::WordNormedUTF8Text() const { if (it_->word() == NULL) return NULL; // Already at the end! STRING ocr_text; WERD_CHOICE* best_choice = it_->word()->best_choice; const UNICHARSET *unicharset = it_->word()->uch_set; ASSERT_HOST(best_choice != NULL); for (int i = 0; i < best_choice->length(); ++i) { ocr_text += unicharset->get_normed_unichar(best_choice->unichar_id(i)); } int length = ocr_text.length() + 1; char* result = new char[length]; strncpy(result, ocr_text.string(), length); return result; } // Returns a pointer to serialized choice lattice. // Fills lattice_size with the number of bytes in lattice data. const char *LTRResultIterator::WordLattice(int *lattice_size) const { if (it_->word() == NULL) return NULL; // Already at the end! if (it_->word()->blamer_bundle == NULL) return NULL; *lattice_size = it_->word()->blamer_bundle->lattice_size(); return it_->word()->blamer_bundle->lattice_data(); } // Returns true if the current symbol is a superscript. // If iterating at a higher level object than symbols, eg words, then // this will return the attributes of the first symbol in that word. bool LTRResultIterator::SymbolIsSuperscript() const { if (cblob_it_ == NULL && it_->word() != NULL) return it_->word()->best_choice->BlobPosition(blob_index_) == SP_SUPERSCRIPT; return false; } // Returns true if the current symbol is a subscript. // If iterating at a higher level object than symbols, eg words, then // this will return the attributes of the first symbol in that word. bool LTRResultIterator::SymbolIsSubscript() const { if (cblob_it_ == NULL && it_->word() != NULL) return it_->word()->best_choice->BlobPosition(blob_index_) == SP_SUBSCRIPT; return false; } // Returns true if the current symbol is a dropcap. // If iterating at a higher level object than symbols, eg words, then // this will return the attributes of the first symbol in that word. bool LTRResultIterator::SymbolIsDropcap() const { if (cblob_it_ == NULL && it_->word() != NULL) return it_->word()->best_choice->BlobPosition(blob_index_) == SP_DROPCAP; return false; } ChoiceIterator::ChoiceIterator(const LTRResultIterator& result_it) { ASSERT_HOST(result_it.it_->word() != NULL); word_res_ = result_it.it_->word(); BLOB_CHOICE_LIST* choices = NULL; if (word_res_->ratings != NULL) choices = word_res_->GetBlobChoices(result_it.blob_index_); if (choices != NULL && !choices->empty()) { choice_it_ = new BLOB_CHOICE_IT(choices); choice_it_->mark_cycle_pt(); } else { choice_it_ = NULL; } } ChoiceIterator::~ChoiceIterator() { delete choice_it_; } // Moves to the next choice for the symbol and returns false if there // are none left. bool ChoiceIterator::Next() { if (choice_it_ == NULL) return false; choice_it_->forward(); return !choice_it_->cycled_list(); } // Returns the null terminated UTF-8 encoded text string for the current // choice. Do NOT use delete [] to free after use. const char* ChoiceIterator::GetUTF8Text() const { if (choice_it_ == NULL) return NULL; UNICHAR_ID id = choice_it_->data()->unichar_id(); return word_res_->uch_set->id_to_unichar_ext(id); } // Returns the confidence of the current choice. // The number should be interpreted as a percent probability. (0.0f-100.0f) float ChoiceIterator::Confidence() const { if (choice_it_ == NULL) return 0.0f; float confidence = 100 + 5 * choice_it_->data()->certainty(); if (confidence < 0.0f) confidence = 0.0f; if (confidence > 100.0f) confidence = 100.0f; return confidence; } } // namespace tesseract.
C++
/****************************************************************** * File: fixspace.cpp (Formerly fixspace.c) * Description: Implements a pass over the page res, exploring the alternative * spacing possibilities, trying to use context to improve the * word spacing * Author: Phil Cheatle * Created: Thu Oct 21 11:38:43 BST 1993 * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include <ctype.h> #include "reject.h" #include "statistc.h" #include "control.h" #include "fixspace.h" #include "genblob.h" #include "tessvars.h" #include "tessbox.h" #include "globals.h" #include "tesseractclass.h" #define PERFECT_WERDS 999 #define MAXSPACING 128 /*max expected spacing in pix */ namespace tesseract { /** * @name fix_fuzzy_spaces() * Walk over the page finding sequences of words joined by fuzzy spaces. Extract * them as a sublist, process the sublist to find the optimal arrangement of * spaces then replace the sublist in the ROW_RES. * * @param monitor progress monitor * @param word_count count of words in doc * @param[out] page_res */ void Tesseract::fix_fuzzy_spaces(ETEXT_DESC *monitor, inT32 word_count, PAGE_RES *page_res) { BLOCK_RES_IT block_res_it; ROW_RES_IT row_res_it; WERD_RES_IT word_res_it_from; WERD_RES_IT word_res_it_to; WERD_RES *word_res; WERD_RES_LIST fuzzy_space_words; inT16 new_length; BOOL8 prevent_null_wd_fixsp; // DONT process blobless wds inT32 word_index; // current word block_res_it.set_to_list(&page_res->block_res_list); word_index = 0; for (block_res_it.mark_cycle_pt(); !block_res_it.cycled_list(); block_res_it.forward()) { row_res_it.set_to_list(&block_res_it.data()->row_res_list); for (row_res_it.mark_cycle_pt(); !row_res_it.cycled_list(); row_res_it.forward()) { word_res_it_from.set_to_list(&row_res_it.data()->word_res_list); while (!word_res_it_from.at_last()) { word_res = word_res_it_from.data(); while (!word_res_it_from.at_last() && !(word_res->combination || word_res_it_from.data_relative(1)->word->flag(W_FUZZY_NON) || word_res_it_from.data_relative(1)->word->flag(W_FUZZY_SP))) { fix_sp_fp_word(word_res_it_from, row_res_it.data()->row, block_res_it.data()->block); word_res = word_res_it_from.forward(); word_index++; if (monitor != NULL) { monitor->ocr_alive = TRUE; monitor->progress = 90 + 5 * word_index / word_count; if (monitor->deadline_exceeded() || (monitor->cancel != NULL && (*monitor->cancel)(monitor->cancel_this, stats_.dict_words))) return; } } if (!word_res_it_from.at_last()) { word_res_it_to = word_res_it_from; prevent_null_wd_fixsp = word_res->word->cblob_list()->empty(); if (check_debug_pt(word_res, 60)) debug_fix_space_level.set_value(10); word_res_it_to.forward(); word_index++; if (monitor != NULL) { monitor->ocr_alive = TRUE; monitor->progress = 90 + 5 * word_index / word_count; if (monitor->deadline_exceeded() || (monitor->cancel != NULL && (*monitor->cancel)(monitor->cancel_this, stats_.dict_words))) return; } while (!word_res_it_to.at_last () && (word_res_it_to.data_relative(1)->word->flag(W_FUZZY_NON) || word_res_it_to.data_relative(1)->word->flag(W_FUZZY_SP))) { if (check_debug_pt(word_res, 60)) debug_fix_space_level.set_value(10); if (word_res->word->cblob_list()->empty()) prevent_null_wd_fixsp = TRUE; word_res = word_res_it_to.forward(); } if (check_debug_pt(word_res, 60)) debug_fix_space_level.set_value(10); if (word_res->word->cblob_list()->empty()) prevent_null_wd_fixsp = TRUE; if (prevent_null_wd_fixsp) { word_res_it_from = word_res_it_to; } else { fuzzy_space_words.assign_to_sublist(&word_res_it_from, &word_res_it_to); fix_fuzzy_space_list(fuzzy_space_words, row_res_it.data()->row, block_res_it.data()->block); new_length = fuzzy_space_words.length(); word_res_it_from.add_list_before(&fuzzy_space_words); for (; !word_res_it_from.at_last() && new_length > 0; new_length--) { word_res_it_from.forward(); } } if (test_pt) debug_fix_space_level.set_value(0); } fix_sp_fp_word(word_res_it_from, row_res_it.data()->row, block_res_it.data()->block); // Last word in row } } } } void Tesseract::fix_fuzzy_space_list(WERD_RES_LIST &best_perm, ROW *row, BLOCK* block) { inT16 best_score; WERD_RES_LIST current_perm; inT16 current_score; BOOL8 improved = FALSE; best_score = eval_word_spacing(best_perm); // default score dump_words(best_perm, best_score, 1, improved); if (best_score != PERFECT_WERDS) initialise_search(best_perm, current_perm); while ((best_score != PERFECT_WERDS) && !current_perm.empty()) { match_current_words(current_perm, row, block); current_score = eval_word_spacing(current_perm); dump_words(current_perm, current_score, 2, improved); if (current_score > best_score) { best_perm.clear(); best_perm.deep_copy(&current_perm, &WERD_RES::deep_copy); best_score = current_score; improved = TRUE; } if (current_score < PERFECT_WERDS) transform_to_next_perm(current_perm); } dump_words(best_perm, best_score, 3, improved); } } // namespace tesseract void initialise_search(WERD_RES_LIST &src_list, WERD_RES_LIST &new_list) { WERD_RES_IT src_it(&src_list); WERD_RES_IT new_it(&new_list); WERD_RES *src_wd; WERD_RES *new_wd; for (src_it.mark_cycle_pt(); !src_it.cycled_list(); src_it.forward()) { src_wd = src_it.data(); if (!src_wd->combination) { new_wd = WERD_RES::deep_copy(src_wd); new_wd->combination = FALSE; new_wd->part_of_combo = FALSE; new_it.add_after_then_move(new_wd); } } } namespace tesseract { void Tesseract::match_current_words(WERD_RES_LIST &words, ROW *row, BLOCK* block) { WERD_RES_IT word_it(&words); WERD_RES *word; // Since we are not using PAGE_RES to iterate over words, we need to update // prev_word_best_choice_ before calling classify_word_pass2(). prev_word_best_choice_ = NULL; for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) { word = word_it.data(); if ((!word->part_of_combo) && (word->box_word == NULL)) { WordData word_data(block, row, word); SetupWordPassN(2, &word_data); classify_word_and_language(&Tesseract::classify_word_pass2, NULL, &word_data); } prev_word_best_choice_ = word->best_choice; } } /** * @name eval_word_spacing() * The basic measure is the number of characters in contextually confirmed * words. (I.e the word is done) * If all words are contextually confirmed the evaluation is deemed perfect. * * Some fiddles are done to handle "1"s as these are VERY frequent causes of * fuzzy spaces. The problem with the basic measure is that "561 63" would score * the same as "56163", though given our knowledge that the space is fuzzy, and * that there is a "1" next to the fuzzy space, we need to ensure that "56163" * is prefered. * * The solution is to NOT COUNT the score of any word which has a digit at one * end and a "1Il" as the character the other side of the space. * * Conversly, any character next to a "1" within a word is counted as a positive * score. Thus "561 63" would score 4 (3 chars in a numeric word plus 1 side of * the "1" joined). "56163" would score 7 - all chars in a numeric word + 2 * sides of a "1" joined. * * The joined 1 rule is applied to any word REGARDLESS of contextual * confirmation. Thus "PS7a71 3/7a" scores 1 (neither word is contexutally * confirmed. The only score is from the joined 1. "PS7a713/7a" scores 2. * */ inT16 Tesseract::eval_word_spacing(WERD_RES_LIST &word_res_list) { WERD_RES_IT word_res_it(&word_res_list); inT16 total_score = 0; inT16 word_count = 0; inT16 done_word_count = 0; inT16 word_len; inT16 i; inT16 offset; WERD_RES *word; // current word inT16 prev_word_score = 0; BOOL8 prev_word_done = FALSE; BOOL8 prev_char_1 = FALSE; // prev ch a "1/I/l"? BOOL8 prev_char_digit = FALSE; // prev ch 2..9 or 0 BOOL8 current_char_1 = FALSE; BOOL8 current_word_ok_so_far; STRING punct_chars = "!\"`',.:;"; BOOL8 prev_char_punct = FALSE; BOOL8 current_char_punct = FALSE; BOOL8 word_done = FALSE; do { word = word_res_it.data(); word_done = fixspace_thinks_word_done(word); word_count++; if (word->tess_failed) { total_score += prev_word_score; if (prev_word_done) done_word_count++; prev_word_score = 0; prev_char_1 = FALSE; prev_char_digit = FALSE; prev_word_done = FALSE; } else { /* Can we add the prev word score and potentially count this word? Yes IF it didnt end in a 1 when the first char of this word is a digit AND it didnt end in a digit when the first char of this word is a 1 */ word_len = word->reject_map.length(); current_word_ok_so_far = FALSE; if (!((prev_char_1 && digit_or_numeric_punct(word, 0)) || (prev_char_digit && ( (word_done && word->best_choice->unichar_lengths().string()[0] == 1 && word->best_choice->unichar_string()[0] == '1') || (!word_done && STRING(conflict_set_I_l_1).contains( word->best_choice->unichar_string()[0])))))) { total_score += prev_word_score; if (prev_word_done) done_word_count++; current_word_ok_so_far = word_done; } if (current_word_ok_so_far) { prev_word_done = TRUE; prev_word_score = word_len; } else { prev_word_done = FALSE; prev_word_score = 0; } /* Add 1 to total score for every joined 1 regardless of context and rejtn */ for (i = 0, prev_char_1 = FALSE; i < word_len; i++) { current_char_1 = word->best_choice->unichar_string()[i] == '1'; if (prev_char_1 || (current_char_1 && (i > 0))) total_score++; prev_char_1 = current_char_1; } /* Add 1 to total score for every joined punctuation regardless of context and rejtn */ if (tessedit_prefer_joined_punct) { for (i = 0, offset = 0, prev_char_punct = FALSE; i < word_len; offset += word->best_choice->unichar_lengths()[i++]) { current_char_punct = punct_chars.contains(word->best_choice->unichar_string()[offset]); if (prev_char_punct || (current_char_punct && i > 0)) total_score++; prev_char_punct = current_char_punct; } } prev_char_digit = digit_or_numeric_punct(word, word_len - 1); for (i = 0, offset = 0; i < word_len - 1; offset += word->best_choice->unichar_lengths()[i++]); prev_char_1 = ((word_done && (word->best_choice->unichar_string()[offset] == '1')) || (!word_done && STRING(conflict_set_I_l_1).contains( word->best_choice->unichar_string()[offset]))); } /* Find next word */ do { word_res_it.forward(); } while (word_res_it.data()->part_of_combo); } while (!word_res_it.at_first()); total_score += prev_word_score; if (prev_word_done) done_word_count++; if (done_word_count == word_count) return PERFECT_WERDS; else return total_score; } BOOL8 Tesseract::digit_or_numeric_punct(WERD_RES *word, int char_position) { int i; int offset; for (i = 0, offset = 0; i < char_position; offset += word->best_choice->unichar_lengths()[i++]); return ( word->uch_set->get_isdigit( word->best_choice->unichar_string().string() + offset, word->best_choice->unichar_lengths()[i]) || (word->best_choice->permuter() == NUMBER_PERM && STRING(numeric_punctuation).contains( word->best_choice->unichar_string().string()[offset]))); } } // namespace tesseract /** * @name transform_to_next_perm() * Examines the current word list to find the smallest word gap size. Then walks * the word list closing any gaps of this size by either inserted new * combination words, or extending existing ones. * * The routine COULD be limited to stop it building words longer than N blobs. * * If there are no more gaps then it DELETES the entire list and returns the * empty list to cause termination. */ void transform_to_next_perm(WERD_RES_LIST &words) { WERD_RES_IT word_it(&words); WERD_RES_IT prev_word_it(&words); WERD_RES *word; WERD_RES *prev_word; WERD_RES *combo; WERD *copy_word; inT16 prev_right = -MAX_INT16; TBOX box; inT16 gap; inT16 min_gap = MAX_INT16; for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) { word = word_it.data(); if (!word->part_of_combo) { box = word->word->bounding_box(); if (prev_right > -MAX_INT16) { gap = box.left() - prev_right; if (gap < min_gap) min_gap = gap; } prev_right = box.right(); } } if (min_gap < MAX_INT16) { prev_right = -MAX_INT16; // back to start word_it.set_to_list(&words); // Note: we can't use cycle_pt due to inserted combos at start of list. for (; (prev_right == -MAX_INT16) || !word_it.at_first(); word_it.forward()) { word = word_it.data(); if (!word->part_of_combo) { box = word->word->bounding_box(); if (prev_right > -MAX_INT16) { gap = box.left() - prev_right; if (gap <= min_gap) { prev_word = prev_word_it.data(); if (prev_word->combination) { combo = prev_word; } else { /* Make a new combination and insert before * the first word being joined. */ copy_word = new WERD; *copy_word = *(prev_word->word); // deep copy combo = new WERD_RES(copy_word); combo->combination = TRUE; combo->x_height = prev_word->x_height; prev_word->part_of_combo = TRUE; prev_word_it.add_before_then_move(combo); } combo->word->set_flag(W_EOL, word->word->flag(W_EOL)); if (word->combination) { combo->word->join_on(word->word); // Move blobs to combo // old combo no longer needed delete word_it.extract(); } else { // Copy current wd to combo combo->copy_on(word); word->part_of_combo = TRUE; } combo->done = FALSE; combo->ClearResults(); } else { prev_word_it = word_it; // catch up } } prev_right = box.right(); } } } else { words.clear(); // signal termination } } namespace tesseract { void Tesseract::dump_words(WERD_RES_LIST &perm, inT16 score, inT16 mode, BOOL8 improved) { WERD_RES_IT word_res_it(&perm); if (debug_fix_space_level > 0) { if (mode == 1) { stats_.dump_words_str = ""; for (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list(); word_res_it.forward()) { if (!word_res_it.data()->part_of_combo) { stats_.dump_words_str += word_res_it.data()->best_choice->unichar_string(); stats_.dump_words_str += ' '; } } } if (debug_fix_space_level > 1) { switch (mode) { case 1: tprintf("EXTRACTED (%d): \"", score); break; case 2: tprintf("TESTED (%d): \"", score); break; case 3: tprintf("RETURNED (%d): \"", score); break; } for (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list(); word_res_it.forward()) { if (!word_res_it.data()->part_of_combo) { tprintf("%s/%1d ", word_res_it.data()->best_choice->unichar_string().string(), (int)word_res_it.data()->best_choice->permuter()); } } tprintf("\"\n"); } else if (improved) { tprintf("FIX SPACING \"%s\" => \"", stats_.dump_words_str.string()); for (word_res_it.mark_cycle_pt(); !word_res_it.cycled_list(); word_res_it.forward()) { if (!word_res_it.data()->part_of_combo) { tprintf("%s/%1d ", word_res_it.data()->best_choice->unichar_string().string(), (int)word_res_it.data()->best_choice->permuter()); } } tprintf("\"\n"); } } } BOOL8 Tesseract::fixspace_thinks_word_done(WERD_RES *word) { if (word->done) return TRUE; /* Use all the standard pass 2 conditions for mode 5 in set_done() in reject.c BUT DONT REJECT IF THE WERD IS AMBIGUOUS - FOR SPACING WE DONT CARE WHETHER WE HAVE of/at on/an etc. */ if (fixsp_done_mode > 0 && (word->tess_accepted || (fixsp_done_mode == 2 && word->reject_map.reject_count() == 0) || fixsp_done_mode == 3) && (strchr(word->best_choice->unichar_string().string(), ' ') == NULL) && ((word->best_choice->permuter() == SYSTEM_DAWG_PERM) || (word->best_choice->permuter() == FREQ_DAWG_PERM) || (word->best_choice->permuter() == USER_DAWG_PERM) || (word->best_choice->permuter() == NUMBER_PERM))) { return TRUE; } else { return FALSE; } } /** * @name fix_sp_fp_word() * Test the current word to see if it can be split by deleting noise blobs. If * so, do the business. * Return with the iterator pointing to the same place if the word is unchanged, * or the last of the replacement words. */ void Tesseract::fix_sp_fp_word(WERD_RES_IT &word_res_it, ROW *row, BLOCK* block) { WERD_RES *word_res; WERD_RES_LIST sub_word_list; WERD_RES_IT sub_word_list_it(&sub_word_list); inT16 blob_index; inT16 new_length; float junk; word_res = word_res_it.data(); if (word_res->word->flag(W_REP_CHAR) || word_res->combination || word_res->part_of_combo || !word_res->word->flag(W_DONT_CHOP)) return; blob_index = worst_noise_blob(word_res, &junk); if (blob_index < 0) return; if (debug_fix_space_level > 1) { tprintf("FP fixspace working on \"%s\"\n", word_res->best_choice->unichar_string().string()); } word_res->word->rej_cblob_list()->sort(c_blob_comparator); sub_word_list_it.add_after_stay_put(word_res_it.extract()); fix_noisy_space_list(sub_word_list, row, block); new_length = sub_word_list.length(); word_res_it.add_list_before(&sub_word_list); for (; !word_res_it.at_last() && new_length > 1; new_length--) { word_res_it.forward(); } } void Tesseract::fix_noisy_space_list(WERD_RES_LIST &best_perm, ROW *row, BLOCK* block) { inT16 best_score; WERD_RES_IT best_perm_it(&best_perm); WERD_RES_LIST current_perm; WERD_RES_IT current_perm_it(&current_perm); WERD_RES *old_word_res; inT16 current_score; BOOL8 improved = FALSE; best_score = fp_eval_word_spacing(best_perm); // default score dump_words(best_perm, best_score, 1, improved); old_word_res = best_perm_it.data(); // Even deep_copy doesn't copy the underlying WERD unless its combination // flag is true!. old_word_res->combination = TRUE; // Kludge to force deep copy current_perm_it.add_to_end(WERD_RES::deep_copy(old_word_res)); old_word_res->combination = FALSE; // Undo kludge break_noisiest_blob_word(current_perm); while (best_score != PERFECT_WERDS && !current_perm.empty()) { match_current_words(current_perm, row, block); current_score = fp_eval_word_spacing(current_perm); dump_words(current_perm, current_score, 2, improved); if (current_score > best_score) { best_perm.clear(); best_perm.deep_copy(&current_perm, &WERD_RES::deep_copy); best_score = current_score; improved = TRUE; } if (current_score < PERFECT_WERDS) { break_noisiest_blob_word(current_perm); } } dump_words(best_perm, best_score, 3, improved); } /** * break_noisiest_blob_word() * Find the word with the blob which looks like the worst noise. * Break the word into two, deleting the noise blob. */ void Tesseract::break_noisiest_blob_word(WERD_RES_LIST &words) { WERD_RES_IT word_it(&words); WERD_RES_IT worst_word_it; float worst_noise_score = 9999; int worst_blob_index = -1; // Noisiest blob of noisiest wd int blob_index; // of wds noisiest blob float noise_score; // of wds noisiest blob WERD_RES *word_res; C_BLOB_IT blob_it; C_BLOB_IT rej_cblob_it; C_BLOB_LIST new_blob_list; C_BLOB_IT new_blob_it; C_BLOB_IT new_rej_cblob_it; WERD *new_word; inT16 start_of_noise_blob; inT16 i; for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) { blob_index = worst_noise_blob(word_it.data(), &noise_score); if (blob_index > -1 && worst_noise_score > noise_score) { worst_noise_score = noise_score; worst_blob_index = blob_index; worst_word_it = word_it; } } if (worst_blob_index < 0) { words.clear(); // signal termination return; } /* Now split the worst_word_it */ word_res = worst_word_it.data(); /* Move blobs before noise blob to a new bloblist */ new_blob_it.set_to_list(&new_blob_list); blob_it.set_to_list(word_res->word->cblob_list()); for (i = 0; i < worst_blob_index; i++, blob_it.forward()) { new_blob_it.add_after_then_move(blob_it.extract()); } start_of_noise_blob = blob_it.data()->bounding_box().left(); delete blob_it.extract(); // throw out noise blob new_word = new WERD(&new_blob_list, word_res->word); new_word->set_flag(W_EOL, FALSE); word_res->word->set_flag(W_BOL, FALSE); word_res->word->set_blanks(1); // After break new_rej_cblob_it.set_to_list(new_word->rej_cblob_list()); rej_cblob_it.set_to_list(word_res->word->rej_cblob_list()); for (; (!rej_cblob_it.empty() && (rej_cblob_it.data()->bounding_box().left() < start_of_noise_blob)); rej_cblob_it.forward()) { new_rej_cblob_it.add_after_then_move(rej_cblob_it.extract()); } WERD_RES* new_word_res = new WERD_RES(new_word); new_word_res->combination = TRUE; worst_word_it.add_before_then_move(new_word_res); word_res->ClearResults(); } inT16 Tesseract::worst_noise_blob(WERD_RES *word_res, float *worst_noise_score) { float noise_score[512]; int i; int min_noise_blob; // 1st contender int max_noise_blob; // last contender int non_noise_count; int worst_noise_blob; // Worst blob float small_limit = kBlnXHeight * fixsp_small_outlines_size; float non_noise_limit = kBlnXHeight * 0.8; if (word_res->rebuild_word == NULL) return -1; // Can't handle cube words. // Normalised. int blob_count = word_res->box_word->length(); ASSERT_HOST(blob_count <= 512); if (blob_count < 5) return -1; // too short to split /* Get the noise scores for all blobs */ #ifndef SECURE_NAMES if (debug_fix_space_level > 5) tprintf("FP fixspace Noise metrics for \"%s\": ", word_res->best_choice->unichar_string().string()); #endif for (i = 0; i < blob_count && i < word_res->rebuild_word->NumBlobs(); i++) { TBLOB* blob = word_res->rebuild_word->blobs[i]; if (word_res->reject_map[i].accepted()) noise_score[i] = non_noise_limit; else noise_score[i] = blob_noise_score(blob); if (debug_fix_space_level > 5) tprintf("%1.1f ", noise_score[i]); } if (debug_fix_space_level > 5) tprintf("\n"); /* Now find the worst one which is far enough away from the end of the word */ non_noise_count = 0; for (i = 0; i < blob_count && non_noise_count < fixsp_non_noise_limit; i++) { if (noise_score[i] >= non_noise_limit) { non_noise_count++; } } if (non_noise_count < fixsp_non_noise_limit) return -1; min_noise_blob = i; non_noise_count = 0; for (i = blob_count - 1; i >= 0 && non_noise_count < fixsp_non_noise_limit; i--) { if (noise_score[i] >= non_noise_limit) { non_noise_count++; } } if (non_noise_count < fixsp_non_noise_limit) return -1; max_noise_blob = i; if (min_noise_blob > max_noise_blob) return -1; *worst_noise_score = small_limit; worst_noise_blob = -1; for (i = min_noise_blob; i <= max_noise_blob; i++) { if (noise_score[i] < *worst_noise_score) { worst_noise_blob = i; *worst_noise_score = noise_score[i]; } } return worst_noise_blob; } float Tesseract::blob_noise_score(TBLOB *blob) { TBOX box; // BB of outline inT16 outline_count = 0; inT16 max_dimension; inT16 largest_outline_dimension = 0; for (TESSLINE* ol = blob->outlines; ol != NULL; ol= ol->next) { outline_count++; box = ol->bounding_box(); if (box.height() > box.width()) { max_dimension = box.height(); } else { max_dimension = box.width(); } if (largest_outline_dimension < max_dimension) largest_outline_dimension = max_dimension; } if (outline_count > 5) { // penalise LOTS of blobs largest_outline_dimension *= 2; } box = blob->bounding_box(); if (box.bottom() > kBlnBaselineOffset * 4 || box.top() < kBlnBaselineOffset / 2) { // Lax blob is if high or low largest_outline_dimension /= 2; } return largest_outline_dimension; } } // namespace tesseract void fixspace_dbg(WERD_RES *word) { TBOX box = word->word->bounding_box(); BOOL8 show_map_detail = FALSE; inT16 i; box.print(); tprintf(" \"%s\" ", word->best_choice->unichar_string().string()); tprintf("Blob count: %d (word); %d/%d (rebuild word)\n", word->word->cblob_list()->length(), word->rebuild_word->NumBlobs(), word->box_word->length()); word->reject_map.print(debug_fp); tprintf("\n"); if (show_map_detail) { tprintf("\"%s\"\n", word->best_choice->unichar_string().string()); for (i = 0; word->best_choice->unichar_string()[i] != '\0'; i++) { tprintf("**** \"%c\" ****\n", word->best_choice->unichar_string()[i]); word->reject_map[i].full_print(debug_fp); } } tprintf("Tess Accepted: %s\n", word->tess_accepted ? "TRUE" : "FALSE"); tprintf("Done flag: %s\n\n", word->done ? "TRUE" : "FALSE"); } /** * fp_eval_word_spacing() * Evaluation function for fixed pitch word lists. * * Basically, count the number of "nice" characters - those which are in tess * acceptable words or in dict words and are not rejected. * Penalise any potential noise chars */ namespace tesseract { inT16 Tesseract::fp_eval_word_spacing(WERD_RES_LIST &word_res_list) { WERD_RES_IT word_it(&word_res_list); WERD_RES *word; inT16 word_length; inT16 score = 0; inT16 i; float small_limit = kBlnXHeight * fixsp_small_outlines_size; for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) { word = word_it.data(); if (word->rebuild_word == NULL) continue; // Can't handle cube words. word_length = word->reject_map.length(); if (word->done || word->tess_accepted || word->best_choice->permuter() == SYSTEM_DAWG_PERM || word->best_choice->permuter() == FREQ_DAWG_PERM || word->best_choice->permuter() == USER_DAWG_PERM || safe_dict_word(word) > 0) { int num_blobs = word->rebuild_word->NumBlobs(); UNICHAR_ID space = word->uch_set->unichar_to_id(" "); for (i = 0; i < word->best_choice->length() && i < num_blobs; ++i) { TBLOB* blob = word->rebuild_word->blobs[i]; if (word->best_choice->unichar_id(i) == space || blob_noise_score(blob) < small_limit) { score -= 1; // penalise possibly erroneous non-space } else if (word->reject_map[i].accepted()) { score++; } } } } if (score < 0) score = 0; return score; } } // namespace tesseract
C++
/****************************************************************** * File: control.cpp (Formerly control.c) * Description: Module-independent matcher controller. * Author: Ray Smith * Created: Thu Apr 23 11:09:58 BST 1992 * ReHacked: Tue Sep 22 08:42:49 BST 1992 Phil Cheatle * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include <string.h> #include <math.h> #ifdef __UNIX__ #include <assert.h> #include <unistd.h> #include <errno.h> #endif #include <ctype.h> #include "ocrclass.h" #include "werdit.h" #include "drawfx.h" #include "tessbox.h" #include "tessvars.h" #include "pgedit.h" #include "reject.h" #include "fixspace.h" #include "docqual.h" #include "control.h" #include "output.h" #include "callcpp.h" #include "globals.h" #include "sorthelper.h" #include "tesseractclass.h" // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif #define MIN_FONT_ROW_COUNT 8 #define MAX_XHEIGHT_DIFF 3 const char* const kBackUpConfigFile = "tempconfigdata.config"; // Multiple of x-height to make a repeated word have spaces in it. const double kRepcharGapThreshold = 0.5; // Min believable x-height for any text when refitting as a fraction of // original x-height const double kMinRefitXHeightFraction = 0.5; /** * recog_pseudo_word * * Make a word from the selected blobs and run Tess on them. * * @param page_res recognise blobs * @param selection_box within this box */ namespace tesseract { void Tesseract::recog_pseudo_word(PAGE_RES* page_res, TBOX &selection_box) { PAGE_RES_IT* it = make_pseudo_word(page_res, selection_box); if (it != NULL) { recog_interactive(it); it->DeleteCurrentWord(); delete it; } } /** * recog_interactive * * Recognize a single word in interactive mode. * * @param block block * @param row row of word * @param word_res word to recognise */ BOOL8 Tesseract::recog_interactive(PAGE_RES_IT* pr_it) { inT16 char_qual; inT16 good_char_qual; WordData word_data(*pr_it); SetupWordPassN(2, &word_data); classify_word_and_language(&Tesseract::classify_word_pass2, pr_it, &word_data); if (tessedit_debug_quality_metrics) { WERD_RES* word_res = pr_it->word(); word_char_quality(word_res, pr_it->row()->row, &char_qual, &good_char_qual); tprintf("\n%d chars; word_blob_quality: %d; outline_errs: %d; " "char_quality: %d; good_char_quality: %d\n", word_res->reject_map.length(), word_blob_quality(word_res, pr_it->row()->row), word_outline_errs(word_res), char_qual, good_char_qual); } return TRUE; } // Helper function to check for a target word and handle it appropriately. // Inspired by Jetsoft's requirement to process only single words on pass2 // and beyond. // If word_config is not null: // If the word_box and target_word_box overlap, read the word_config file // else reset to previous config data. // return true. // else // If the word_box and target_word_box overlap or pass <= 1, return true. // Note that this function uses a fixed temporary file for storing the previous // configs, so it is neither thread-safe, nor process-safe, but the assumption // is that it will only be used for one debug window at a time. // // Since this function is used for debugging (and not to change OCR results) // set only debug params from the word config file. bool Tesseract::ProcessTargetWord(const TBOX& word_box, const TBOX& target_word_box, const char* word_config, int pass) { if (word_config != NULL) { if (word_box.major_overlap(target_word_box)) { if (backup_config_file_ == NULL) { backup_config_file_ = kBackUpConfigFile; FILE* config_fp = fopen(backup_config_file_, "wb"); ParamUtils::PrintParams(config_fp, params()); fclose(config_fp); ParamUtils::ReadParamsFile(word_config, SET_PARAM_CONSTRAINT_DEBUG_ONLY, params()); } } else { if (backup_config_file_ != NULL) { ParamUtils::ReadParamsFile(backup_config_file_, SET_PARAM_CONSTRAINT_DEBUG_ONLY, params()); backup_config_file_ = NULL; } } } else if (pass > 1 && !word_box.major_overlap(target_word_box)) { return false; } return true; } // If tesseract is to be run, sets the words up ready for it. void Tesseract::SetupAllWordsPassN(int pass_n, const TBOX* target_word_box, const char* word_config, PAGE_RES* page_res, GenericVector<WordData>* words) { // Prepare all the words. PAGE_RES_IT page_res_it(page_res); for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { if (target_word_box == NULL || ProcessTargetWord(page_res_it.word()->word->bounding_box(), *target_word_box, word_config, 1)) { words->push_back(WordData(page_res_it)); } } // Setup all the words for recognition with polygonal approximation. for (int w = 0; w < words->size(); ++w) { SetupWordPassN(pass_n, &(*words)[w]); if (w > 0) (*words)[w].prev_word = &(*words)[w - 1]; } } // Sets up the single word ready for whichever engine is to be run. void Tesseract::SetupWordPassN(int pass_n, WordData* word) { if (pass_n == 1 || !word->word->done) { if (pass_n == 1) { word->word->SetupForRecognition(unicharset, this, BestPix(), tessedit_ocr_engine_mode, NULL, classify_bln_numeric_mode, textord_use_cjk_fp_model, poly_allow_detailed_fx, word->row, word->block); } else if (pass_n == 2) { // TODO(rays) Should we do this on pass1 too? word->word->caps_height = 0.0; if (word->word->x_height == 0.0f) word->word->x_height = word->row->x_height(); } for (int s = 0; s <= sub_langs_.size(); ++s) { // The sub_langs_.size() entry is for the master language. Tesseract* lang_t = s < sub_langs_.size() ? sub_langs_[s] : this; WERD_RES* word_res = new WERD_RES; word_res->InitForRetryRecognition(*word->word); word->lang_words.push_back(word_res); // Cube doesn't get setup for pass2. if (pass_n == 1 || lang_t->tessedit_ocr_engine_mode != OEM_CUBE_ONLY) { word_res->SetupForRecognition( lang_t->unicharset, lang_t, BestPix(), lang_t->tessedit_ocr_engine_mode, NULL, lang_t->classify_bln_numeric_mode, lang_t->textord_use_cjk_fp_model, lang_t->poly_allow_detailed_fx, word->row, word->block); } } } } // Runs word recognition on all the words. bool Tesseract::RecogAllWordsPassN(int pass_n, ETEXT_DESC* monitor, PAGE_RES_IT* pr_it, GenericVector<WordData>* words) { // TODO(rays) Before this loop can be parallelized (it would yield a massive // speed-up) all remaining member globals need to be converted to local/heap // (eg set_pass1 and set_pass2) and an intermediate adaption pass needs to be // added. The results will be significantly different with adaption on, and // deterioration will need investigation. pr_it->restart_page(); for (int w = 0; w < words->size(); ++w) { WordData* word = &(*words)[w]; if (w > 0) word->prev_word = &(*words)[w - 1]; if (monitor != NULL) { monitor->ocr_alive = TRUE; if (pass_n == 1) monitor->progress = 30 + 50 * w / words->size(); else monitor->progress = 80 + 10 * w / words->size(); if (monitor->deadline_exceeded() || (monitor->cancel != NULL && (*monitor->cancel)(monitor->cancel_this, words->size()))) { // Timeout. Fake out the rest of the words. for (; w < words->size(); ++w) { (*words)[w].word->SetupFake(unicharset); } return false; } } if (word->word->tess_failed) { int s; for (s = 0; s < word->lang_words.size() && word->lang_words[s]->tess_failed; ++s) {} // If all are failed, skip it. Image words are skipped by this test. if (s > word->lang_words.size()) continue; } // Sync pr_it with the wth WordData. while (pr_it->word() != NULL && pr_it->word() != word->word) pr_it->forward(); ASSERT_HOST(pr_it->word() != NULL); WordRecognizer recognizer = pass_n == 1 ? &Tesseract::classify_word_pass1 : &Tesseract::classify_word_pass2; classify_word_and_language(recognizer, pr_it, word); if (tessedit_dump_choices) { tprintf("Pass%d: %s [%s]\n", pass_n, word->word->best_choice->unichar_string().string(), word->word->best_choice->debug_string().string()); } pr_it->forward(); } return true; } /** * recog_all_words() * * Walk the page_res, recognizing all the words. * If monitor is not null, it is used as a progress monitor/timeout/cancel. * If dopasses is 0, all recognition passes are run, * 1 just pass 1, 2 passes2 and higher. * If target_word_box is not null, special things are done to words that * overlap the target_word_box: * if word_config is not null, the word config file is read for just the * target word(s), otherwise, on pass 2 and beyond ONLY the target words * are processed (Jetsoft modification.) * Returns false if we cancelled prematurely. * * @param page_res page structure * @param monitor progress monitor * @param word_config word_config file * @param target_word_box specifies just to extract a rectangle * @param dopasses 0 - all, 1 just pass 1, 2 passes 2 and higher */ bool Tesseract::recog_all_words(PAGE_RES* page_res, ETEXT_DESC* monitor, const TBOX* target_word_box, const char* word_config, int dopasses) { PAGE_RES_IT page_res_it(page_res); if (tessedit_minimal_rej_pass1) { tessedit_test_adaption.set_value (TRUE); tessedit_minimal_rejection.set_value (TRUE); } if (dopasses==0 || dopasses==1) { page_res_it.restart_page(); // ****************** Pass 1 ******************* // Clear adaptive classifier at the beginning of the page if it is full. // This is done only at the beginning of the page to ensure that the // classifier is not reset at an arbitrary point while processing the page, // which would cripple Passes 2+ if the reset happens towards the end of // Pass 1 on a page with very difficult text. // TODO(daria): preemptively clear the classifier if it is almost full. if (AdaptiveClassifierIsFull()) ResetAdaptiveClassifierInternal(); // Now check the sub-langs as well. for (int i = 0; i < sub_langs_.size(); ++i) { if (sub_langs_[i]->AdaptiveClassifierIsFull()) sub_langs_[i]->ResetAdaptiveClassifierInternal(); } // Set up all words ready for recognition, so that if parallelism is on // all the input and output classes are ready to run the classifier. GenericVector<WordData> words; SetupAllWordsPassN(1, target_word_box, word_config, page_res, &words); if (tessedit_parallelize) { PrerecAllWordsPar(words); } stats_.word_count = words.size(); stats_.dict_words = 0; stats_.doc_blob_quality = 0; stats_.doc_outline_errs = 0; stats_.doc_char_quality = 0; stats_.good_char_count = 0; stats_.doc_good_char_quality = 0; most_recently_used_ = this; // Run pass 1 word recognition. if (!RecogAllWordsPassN(1, monitor, &page_res_it, &words)) return false; // Pass 1 post-processing. for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { if (page_res_it.word()->word->flag(W_REP_CHAR)) { fix_rep_char(&page_res_it); continue; } // Count dict words. if (page_res_it.word()->best_choice->permuter() == USER_DAWG_PERM) ++(stats_.dict_words); // Update misadaption log (we only need to do it on pass 1, since // adaption only happens on this pass). if (page_res_it.word()->blamer_bundle != NULL && page_res_it.word()->blamer_bundle->misadaption_debug().length() > 0) { page_res->misadaption_log.push_back( page_res_it.word()->blamer_bundle->misadaption_debug()); } } } if (dopasses == 1) return true; // ****************** Pass 2 ******************* if (tessedit_tess_adaption_mode != 0x0 && !tessedit_test_adaption && AnyTessLang()) { page_res_it.restart_page(); GenericVector<WordData> words; SetupAllWordsPassN(2, target_word_box, word_config, page_res, &words); if (tessedit_parallelize) { PrerecAllWordsPar(words); } most_recently_used_ = this; // Run pass 2 word recognition. if (!RecogAllWordsPassN(2, monitor, &page_res_it, &words)) return false; } // The next passes can only be run if tesseract has been used, as cube // doesn't set all the necessary outputs in WERD_RES. if (AnyTessLang()) { // ****************** Pass 3 ******************* // Fix fuzzy spaces. set_global_loc_code(LOC_FUZZY_SPACE); if (!tessedit_test_adaption && tessedit_fix_fuzzy_spaces && !tessedit_word_for_word && !right_to_left()) fix_fuzzy_spaces(monitor, stats_.word_count, page_res); // ****************** Pass 4 ******************* if (tessedit_enable_dict_correction) dictionary_correction_pass(page_res); if (tessedit_enable_bigram_correction) bigram_correction_pass(page_res); // ****************** Pass 5,6 ******************* rejection_passes(page_res, monitor, target_word_box, word_config); // ****************** Pass 7 ******************* // Cube combiner. // If cube is loaded and its combiner is present, run it. if (tessedit_ocr_engine_mode == OEM_TESSERACT_CUBE_COMBINED) { run_cube_combiner(page_res); } // ****************** Pass 8 ******************* font_recognition_pass(page_res); // ****************** Pass 9 ******************* // Check the correctness of the final results. blamer_pass(page_res); script_pos_pass(page_res); } // Write results pass. set_global_loc_code(LOC_WRITE_RESULTS); // This is now redundant, but retained commented so show how to obtain // bounding boxes and style information. // changed by jetsoft // needed for dll to output memory structure if ((dopasses == 0 || dopasses == 2) && (monitor || tessedit_write_unlv)) output_pass(page_res_it, target_word_box); // end jetsoft PageSegMode pageseg_mode = static_cast<PageSegMode>( static_cast<int>(tessedit_pageseg_mode)); textord_.CleanupSingleRowResult(pageseg_mode, page_res); // Remove empty words, as these mess up the result iterators. for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { WERD_RES* word = page_res_it.word(); if (word->best_choice == NULL || word->best_choice->length() == 0) page_res_it.DeleteCurrentWord(); } if (monitor != NULL) { monitor->progress = 100; } return true; } void Tesseract::bigram_correction_pass(PAGE_RES *page_res) { PAGE_RES_IT word_it(page_res); WERD_RES *w_prev = NULL; WERD_RES *w = word_it.word(); while (1) { w_prev = w; while (word_it.forward() != NULL && (!word_it.word() || word_it.word()->part_of_combo)) { // advance word_it, skipping over parts of combos } if (!word_it.word()) break; w = word_it.word(); if (!w || !w_prev || w->uch_set != w_prev->uch_set) { continue; } if (w_prev->word->flag(W_REP_CHAR) || w->word->flag(W_REP_CHAR)) { if (tessedit_bigram_debug) { tprintf("Skipping because one of the words is W_REP_CHAR\n"); } continue; } // Two words sharing the same language model, excellent! GenericVector<WERD_CHOICE *> overrides_word1; GenericVector<WERD_CHOICE *> overrides_word2; STRING orig_w1_str = w_prev->best_choice->unichar_string(); STRING orig_w2_str = w->best_choice->unichar_string(); WERD_CHOICE prev_best(w->uch_set); { int w1start, w1end; w_prev->best_choice->GetNonSuperscriptSpan(&w1start, &w1end); prev_best = w_prev->best_choice->shallow_copy(w1start, w1end); } WERD_CHOICE this_best(w->uch_set); { int w2start, w2end; w->best_choice->GetNonSuperscriptSpan(&w2start, &w2end); this_best = w->best_choice->shallow_copy(w2start, w2end); } if (w->tesseract->getDict().valid_bigram(prev_best, this_best)) { if (tessedit_bigram_debug) { tprintf("Top choice \"%s %s\" verified by bigram model.\n", orig_w1_str.string(), orig_w2_str.string()); } continue; } if (tessedit_bigram_debug > 2) { tprintf("Examining alt choices for \"%s %s\".\n", orig_w1_str.string(), orig_w2_str.string()); } if (tessedit_bigram_debug > 1) { if (!w_prev->best_choices.singleton()) { w_prev->PrintBestChoices(); } if (!w->best_choices.singleton()) { w->PrintBestChoices(); } } float best_rating = 0.0; int best_idx = 0; WERD_CHOICE_IT prev_it(&w_prev->best_choices); for (prev_it.mark_cycle_pt(); !prev_it.cycled_list(); prev_it.forward()) { WERD_CHOICE *p1 = prev_it.data(); WERD_CHOICE strip1(w->uch_set); { int p1start, p1end; p1->GetNonSuperscriptSpan(&p1start, &p1end); strip1 = p1->shallow_copy(p1start, p1end); } WERD_CHOICE_IT w_it(&w->best_choices); for (w_it.mark_cycle_pt(); !w_it.cycled_list(); w_it.forward()) { WERD_CHOICE *p2 = w_it.data(); WERD_CHOICE strip2(w->uch_set); { int p2start, p2end; p2->GetNonSuperscriptSpan(&p2start, &p2end); strip2 = p2->shallow_copy(p2start, p2end); } if (w->tesseract->getDict().valid_bigram(strip1, strip2)) { overrides_word1.push_back(p1); overrides_word2.push_back(p2); if (overrides_word1.size() == 1 || p1->rating() + p2->rating() < best_rating) { best_rating = p1->rating() + p2->rating(); best_idx = overrides_word1.size() - 1; } } } } if (overrides_word1.size() >= 1) { // Excellent, we have some bigram matches. if (EqualIgnoringCaseAndTerminalPunct(*w_prev->best_choice, *overrides_word1[best_idx]) && EqualIgnoringCaseAndTerminalPunct(*w->best_choice, *overrides_word2[best_idx])) { if (tessedit_bigram_debug > 1) { tprintf("Top choice \"%s %s\" verified (sans case) by bigram " "model.\n", orig_w1_str.string(), orig_w2_str.string()); } continue; } STRING new_w1_str = overrides_word1[best_idx]->unichar_string(); STRING new_w2_str = overrides_word2[best_idx]->unichar_string(); if (new_w1_str != orig_w1_str) { w_prev->ReplaceBestChoice(overrides_word1[best_idx]); } if (new_w2_str != orig_w2_str) { w->ReplaceBestChoice(overrides_word2[best_idx]); } if (tessedit_bigram_debug > 0) { STRING choices_description; int num_bigram_choices = overrides_word1.size() * overrides_word2.size(); if (num_bigram_choices == 1) { choices_description = "This was the unique bigram choice."; } else { if (tessedit_bigram_debug > 1) { STRING bigrams_list; const int kMaxChoicesToPrint = 20; for (int i = 0; i < overrides_word1.size() && i < kMaxChoicesToPrint; i++) { if (i > 0) { bigrams_list += ", "; } WERD_CHOICE *p1 = overrides_word1[i]; WERD_CHOICE *p2 = overrides_word2[i]; bigrams_list += p1->unichar_string() + " " + p2->unichar_string(); if (i == kMaxChoicesToPrint) { bigrams_list += " ..."; } } choices_description = "There were many choices: {"; choices_description += bigrams_list; choices_description += "}"; } else { choices_description.add_str_int("There were ", num_bigram_choices); choices_description += " compatible bigrams."; } } tprintf("Replaced \"%s %s\" with \"%s %s\" with bigram model. %s\n", orig_w1_str.string(), orig_w2_str.string(), new_w1_str.string(), new_w2_str.string(), choices_description.string()); } } } } void Tesseract::rejection_passes(PAGE_RES* page_res, ETEXT_DESC* monitor, const TBOX* target_word_box, const char* word_config) { PAGE_RES_IT page_res_it(page_res); // ****************** Pass 5 ******************* // Gather statistics on rejects. int word_index = 0; while (!tessedit_test_adaption && page_res_it.word() != NULL) { set_global_loc_code(LOC_MM_ADAPT); WERD_RES* word = page_res_it.word(); word_index++; if (monitor != NULL) { monitor->ocr_alive = TRUE; monitor->progress = 95 + 5 * word_index / stats_.word_count; } if (word->rebuild_word == NULL) { // Word was not processed by tesseract. page_res_it.forward(); continue; } check_debug_pt(word, 70); // changed by jetsoft // specific to its needs to extract one word when need if (target_word_box && !ProcessTargetWord(word->word->bounding_box(), *target_word_box, word_config, 4)) { page_res_it.forward(); continue; } // end jetsoft page_res_it.rej_stat_word(); int chars_in_word = word->reject_map.length(); int rejects_in_word = word->reject_map.reject_count(); int blob_quality = word_blob_quality(word, page_res_it.row()->row); stats_.doc_blob_quality += blob_quality; int outline_errs = word_outline_errs(word); stats_.doc_outline_errs += outline_errs; inT16 all_char_quality; inT16 accepted_all_char_quality; word_char_quality(word, page_res_it.row()->row, &all_char_quality, &accepted_all_char_quality); stats_.doc_char_quality += all_char_quality; uinT8 permuter_type = word->best_choice->permuter(); if ((permuter_type == SYSTEM_DAWG_PERM) || (permuter_type == FREQ_DAWG_PERM) || (permuter_type == USER_DAWG_PERM)) { stats_.good_char_count += chars_in_word - rejects_in_word; stats_.doc_good_char_quality += accepted_all_char_quality; } check_debug_pt(word, 80); if (tessedit_reject_bad_qual_wds && (blob_quality == 0) && (outline_errs >= chars_in_word)) word->reject_map.rej_word_bad_quality(); check_debug_pt(word, 90); page_res_it.forward(); } if (tessedit_debug_quality_metrics) { tprintf ("QUALITY: num_chs= %d num_rejs= %d %5.3f blob_qual= %d %5.3f" " outline_errs= %d %5.3f char_qual= %d %5.3f good_ch_qual= %d %5.3f\n", page_res->char_count, page_res->rej_count, page_res->rej_count / static_cast<float>(page_res->char_count), stats_.doc_blob_quality, stats_.doc_blob_quality / static_cast<float>(page_res->char_count), stats_.doc_outline_errs, stats_.doc_outline_errs / static_cast<float>(page_res->char_count), stats_.doc_char_quality, stats_.doc_char_quality / static_cast<float>(page_res->char_count), stats_.doc_good_char_quality, (stats_.good_char_count > 0) ? (stats_.doc_good_char_quality / static_cast<float>(stats_.good_char_count)) : 0.0); } BOOL8 good_quality_doc = ((page_res->rej_count / static_cast<float>(page_res->char_count)) <= quality_rej_pc) && (stats_.doc_blob_quality / static_cast<float>(page_res->char_count) >= quality_blob_pc) && (stats_.doc_outline_errs / static_cast<float>(page_res->char_count) <= quality_outline_pc) && (stats_.doc_char_quality / static_cast<float>(page_res->char_count) >= quality_char_pc); // ****************** Pass 6 ******************* // Do whole document or whole block rejection pass if (!tessedit_test_adaption) { set_global_loc_code(LOC_DOC_BLK_REJ); quality_based_rejection(page_res_it, good_quality_doc); } } void Tesseract::blamer_pass(PAGE_RES* page_res) { if (!wordrec_run_blamer) return; PAGE_RES_IT page_res_it(page_res); for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { WERD_RES *word = page_res_it.word(); BlamerBundle::LastChanceBlame(wordrec_debug_blamer, word); page_res->blame_reasons[word->blamer_bundle->incorrect_result_reason()]++; } tprintf("Blame reasons:\n"); for (int bl = 0; bl < IRR_NUM_REASONS; ++bl) { tprintf("%s %d\n", BlamerBundle::IncorrectReasonName( static_cast<IncorrectResultReason>(bl)), page_res->blame_reasons[bl]); } if (page_res->misadaption_log.length() > 0) { tprintf("Misadaption log:\n"); for (int i = 0; i < page_res->misadaption_log.length(); ++i) { tprintf("%s\n", page_res->misadaption_log[i].string()); } } } // Sets script positions and detects smallcaps on all output words. void Tesseract::script_pos_pass(PAGE_RES* page_res) { PAGE_RES_IT page_res_it(page_res); for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { WERD_RES* word = page_res_it.word(); if (word->word->flag(W_REP_CHAR)) { page_res_it.forward(); continue; } float x_height = page_res_it.block()->block->x_height(); float word_x_height = word->x_height; if (word_x_height < word->best_choice->min_x_height() || word_x_height > word->best_choice->max_x_height()) { word_x_height = (word->best_choice->min_x_height() + word->best_choice->max_x_height()) / 2.0f; } // Test for small caps. Word capheight must be close to block xheight, // and word must contain no lower case letters, and at least one upper case. double small_cap_xheight = x_height * kXHeightCapRatio; double small_cap_delta = (x_height - small_cap_xheight) / 2.0; if (word->uch_set->script_has_xheight() && small_cap_xheight - small_cap_delta <= word_x_height && word_x_height <= small_cap_xheight + small_cap_delta) { // Scan for upper/lower. int num_upper = 0; int num_lower = 0; for (int i = 0; i < word->best_choice->length(); ++i) { if (word->uch_set->get_isupper(word->best_choice->unichar_id(i))) ++num_upper; else if (word->uch_set->get_islower(word->best_choice->unichar_id(i))) ++num_lower; } if (num_upper > 0 && num_lower == 0) word->small_caps = true; } word->SetScriptPositions(); } } // Factored helper considers the indexed word and updates all the pointed // values. static void EvaluateWord(const PointerVector<WERD_RES>& words, int index, float* rating, float* certainty, bool* bad, bool* valid_permuter, int* right, int* next_left) { *right = -MAX_INT32; *next_left = MAX_INT32; if (index < words.size()) { WERD_CHOICE* choice = words[index]->best_choice; if (choice == NULL) { *bad = true; } else { *rating += choice->rating(); *certainty = MIN(*certainty, choice->certainty()); if (!Dict::valid_word_permuter(choice->permuter(), false)) *valid_permuter = false; } *right = words[index]->word->bounding_box().right(); if (index + 1 < words.size()) *next_left = words[index + 1]->word->bounding_box().left(); } else { *valid_permuter = false; *bad = true; } } // Helper chooses the best combination of words, transferring good ones from // new_words to best_words. To win, a new word must have (better rating and // certainty) or (better permuter status and rating within rating ratio and // certainty within certainty margin) than current best. // All the new_words are consumed (moved to best_words or deleted.) // The return value is the number of new_words used minus the number of // best_words that remain in the output. static int SelectBestWords(double rating_ratio, double certainty_margin, bool debug, PointerVector<WERD_RES>* new_words, PointerVector<WERD_RES>* best_words) { // Process the smallest groups of words that have an overlapping word // boundary at the end. GenericVector<WERD_RES*> out_words; // Index into each word vector (best, new). int b = 0, n = 0; int num_best = 0, num_new = 0; while (b < best_words->size() || n < new_words->size()) { // Start of the current run in each. int start_b = b, start_n = n; // Rating of the current run in each. float b_rating = 0.0f, n_rating = 0.0f; // Certainty of the current run in each. float b_certainty = 0.0f, n_certainty = 0.0f; // True if any word is missing its best choice. bool b_bad = false, n_bad = false; // True if all words have a valid permuter. bool b_valid_permuter = true, n_valid_permuter = true; while (b < best_words->size() || n < new_words->size()) { int b_right = -MAX_INT32; int next_b_left = MAX_INT32; EvaluateWord(*best_words, b, &b_rating, &b_certainty, &b_bad, &b_valid_permuter, &b_right, &next_b_left); int n_right = -MAX_INT32; int next_n_left = MAX_INT32; EvaluateWord(*new_words, n, &n_rating, &n_certainty, &n_bad, &n_valid_permuter, &n_right, &next_n_left); if (MAX(b_right, n_right) < MIN(next_b_left, next_n_left)) { // The word breaks overlap. [start_b,b] and [start_n, n] match. break; } // Keep searching for the matching word break. if ((b_right < n_right && b < best_words->size()) || n == new_words->size()) ++b; else ++n; } bool new_better = false; if (!n_bad && (b_bad || (n_certainty > b_certainty && n_rating < b_rating) || (!b_valid_permuter && n_valid_permuter && n_rating < b_rating * rating_ratio && n_certainty > b_certainty - certainty_margin))) { // New is better. for (int i = start_n; i <= n; ++i) { out_words.push_back((*new_words)[i]); (*new_words)[i] = NULL; ++num_new; } new_better = true; } else if (!b_bad) { // Current best is better. for (int i = start_b; i <= b; ++i) { out_words.push_back((*best_words)[i]); (*best_words)[i] = NULL; ++num_best; } } int end_b = b < best_words->size() ? b + 1 : b; int end_n = n < new_words->size() ? n + 1 : n; if (debug) { tprintf("%d new words %s than %d old words: r: %g v %g c: %g v %g" " valid dict: %d v %d\n", end_n - start_n, new_better ? "better" : "worse", end_b - start_b, n_rating, b_rating, n_certainty, b_certainty, n_valid_permuter, b_valid_permuter); } // Move on to the next group. b = end_b; n = end_n; } // Transfer from out_words to best_words. best_words->clear(); for (int i = 0; i < out_words.size(); ++i) best_words->push_back(out_words[i]); return num_new - num_best; } // Helper to recognize the word using the given (language-specific) tesseract. // Returns positive if this recognizer found more new best words than the // number kept from best_words. int Tesseract::RetryWithLanguage(const WordData& word_data, WordRecognizer recognizer, WERD_RES** in_word, PointerVector<WERD_RES>* best_words) { bool debug = classify_debug_level || cube_debug_level; if (debug) { tprintf("Trying word using lang %s, oem %d\n", lang.string(), static_cast<int>(tessedit_ocr_engine_mode)); } // Run the recognizer on the word. PointerVector<WERD_RES> new_words; (this->*recognizer)(word_data, in_word, &new_words); if (new_words.empty()) { // Transfer input word to new_words, as the classifier must have put // the result back in the input. new_words.push_back(*in_word); *in_word = NULL; } if (debug) { for (int i = 0; i < new_words.size(); ++i) new_words[i]->DebugTopChoice("Lang result"); } // Initial version is a bit of a hack based on better certainty and rating // (to reduce false positives from cube) or a dictionary vs non-dictionary // word. return SelectBestWords(classify_max_rating_ratio, classify_max_certainty_margin, debug, &new_words, best_words); } // Helper returns true if all the words are acceptable. static bool WordsAcceptable(const PointerVector<WERD_RES>& words) { for (int w = 0; w < words.size(); ++w) { if (words[w]->tess_failed || !words[w]->tess_accepted) return false; } return true; } // Generic function for classifying a word. Can be used either for pass1 or // pass2 according to the function passed to recognizer. // word_data holds the word to be recognized, and its block and row, and // pr_it points to the word as well, in case we are running LSTM and it wants // to output multiple words. // Recognizes in the current language, and if successful that is all. // If recognition was not successful, tries all available languages until // it gets a successful result or runs out of languages. Keeps the best result. void Tesseract::classify_word_and_language(WordRecognizer recognizer, PAGE_RES_IT* pr_it, WordData* word_data) { // Best result so far. PointerVector<WERD_RES> best_words; // Points to the best result. May be word or in lang_words. WERD_RES* word = word_data->word; clock_t start_t = clock(); if (classify_debug_level || cube_debug_level) { tprintf("%s word with lang %s at:", word->done ? "Already done" : "Processing", most_recently_used_->lang.string()); word->word->bounding_box().print(); } if (word->done) { // If done on pass1, leave it as-is. if (!word->tess_failed) most_recently_used_ = word->tesseract; return; } int sub = sub_langs_.size(); if (most_recently_used_ != this) { // Get the index of the most_recently_used_. for (sub = 0; sub < sub_langs_.size() && most_recently_used_ != sub_langs_[sub]; ++sub) {} } most_recently_used_->RetryWithLanguage( *word_data, recognizer, &word_data->lang_words[sub], &best_words); Tesseract* best_lang_tess = most_recently_used_; if (!WordsAcceptable(best_words)) { // Try all the other languages to see if they are any better. if (most_recently_used_ != this && this->RetryWithLanguage(*word_data, recognizer, &word_data->lang_words[sub_langs_.size()], &best_words) > 0) { best_lang_tess = this; } for (int i = 0; !WordsAcceptable(best_words) && i < sub_langs_.size(); ++i) { if (most_recently_used_ != sub_langs_[i] && sub_langs_[i]->RetryWithLanguage(*word_data, recognizer, &word_data->lang_words[i], &best_words) > 0) { best_lang_tess = sub_langs_[i]; } } } most_recently_used_ = best_lang_tess; if (!best_words.empty()) { if (best_words.size() == 1 && !best_words[0]->combination) { // Move the best single result to the main word. word_data->word->ConsumeWordResults(best_words[0]); } else { // Words came from LSTM, and must be moved to the PAGE_RES properly. word_data->word = best_words.back(); pr_it->ReplaceCurrentWord(&best_words); } ASSERT_HOST(word_data->word->box_word != NULL); } else { tprintf("no best words!!\n"); } clock_t ocr_t = clock(); if (tessedit_timing_debug) { tprintf("%s (ocr took %.2f sec)\n", word->best_choice->unichar_string().string(), static_cast<double>(ocr_t-start_t)/CLOCKS_PER_SEC); } } /** * classify_word_pass1 * * Baseline normalize the word and pass it to Tess. */ void Tesseract::classify_word_pass1(const WordData& word_data, WERD_RES** in_word, PointerVector<WERD_RES>* out_words) { ROW* row = word_data.row; BLOCK* block = word_data.block; prev_word_best_choice_ = word_data.prev_word != NULL ? word_data.prev_word->word->best_choice : NULL; // If we only intend to run cube - run it and return. if (tessedit_ocr_engine_mode == OEM_CUBE_ONLY) { cube_word_pass1(block, row, *in_word); return; } WERD_RES* word = *in_word; match_word_pass_n(1, word, row, block); if (!word->tess_failed && !word->word->flag(W_REP_CHAR)) { word->tess_would_adapt = AdaptableWord(word); bool adapt_ok = word_adaptable(word, tessedit_tess_adaption_mode); if (adapt_ok) { // Send word to adaptive classifier for training. word->BestChoiceToCorrectText(); LearnWord(NULL, word); // Mark misadaptions if running blamer. if (word->blamer_bundle != NULL) { word->blamer_bundle->SetMisAdaptionDebug(word->best_choice, wordrec_debug_blamer); } } if (tessedit_enable_doc_dict && !word->IsAmbiguous()) tess_add_doc_word(word->best_choice); } } // Helper to report the result of the xheight fix. void Tesseract::ReportXhtFixResult(bool accept_new_word, float new_x_ht, WERD_RES* word, WERD_RES* new_word) { tprintf("New XHT Match:%s = %s ", word->best_choice->unichar_string().string(), word->best_choice->debug_string().string()); word->reject_map.print(debug_fp); tprintf(" -> %s = %s ", new_word->best_choice->unichar_string().string(), new_word->best_choice->debug_string().string()); new_word->reject_map.print(debug_fp); tprintf(" %s->%s %s %s\n", word->guessed_x_ht ? "GUESS" : "CERT", new_word->guessed_x_ht ? "GUESS" : "CERT", new_x_ht > 0.1 ? "STILL DOUBT" : "OK", accept_new_word ? "ACCEPTED" : ""); } // Run the x-height fix-up, based on min/max top/bottom information in // unicharset. // Returns true if the word was changed. // See the comment in fixxht.cpp for a description of the overall process. bool Tesseract::TrainedXheightFix(WERD_RES *word, BLOCK* block, ROW *row) { bool accept_new_x_ht = false; int original_misfits = CountMisfitTops(word); if (original_misfits == 0) return false; float new_x_ht = ComputeCompatibleXheight(word); if (new_x_ht >= kMinRefitXHeightFraction * word->x_height) { WERD_RES new_x_ht_word(word->word); if (word->blamer_bundle != NULL) { new_x_ht_word.blamer_bundle = new BlamerBundle(); new_x_ht_word.blamer_bundle->CopyTruth(*(word->blamer_bundle)); } new_x_ht_word.x_height = new_x_ht; new_x_ht_word.caps_height = 0.0; new_x_ht_word.SetupForRecognition( unicharset, this, BestPix(), tessedit_ocr_engine_mode, NULL, classify_bln_numeric_mode, textord_use_cjk_fp_model, poly_allow_detailed_fx, row, block); match_word_pass_n(2, &new_x_ht_word, row, block); if (!new_x_ht_word.tess_failed) { int new_misfits = CountMisfitTops(&new_x_ht_word); if (debug_x_ht_level >= 1) { tprintf("Old misfits=%d with x-height %f, new=%d with x-height %f\n", original_misfits, word->x_height, new_misfits, new_x_ht); tprintf("Old rating= %f, certainty=%f, new=%f, %f\n", word->best_choice->rating(), word->best_choice->certainty(), new_x_ht_word.best_choice->rating(), new_x_ht_word.best_choice->certainty()); } // The misfits must improve and either the rating or certainty. accept_new_x_ht = new_misfits < original_misfits && (new_x_ht_word.best_choice->certainty() > word->best_choice->certainty() || new_x_ht_word.best_choice->rating() < word->best_choice->rating()); if (debug_x_ht_level >= 1) { ReportXhtFixResult(accept_new_x_ht, new_x_ht, word, &new_x_ht_word); } } if (accept_new_x_ht) { word->ConsumeWordResults(&new_x_ht_word); return true; } } return false; } /** * classify_word_pass2 * * Control what to do with the word in pass 2 */ void Tesseract::classify_word_pass2(const WordData& word_data, WERD_RES** in_word, PointerVector<WERD_RES>* out_words) { // Return if we do not want to run Tesseract. if (tessedit_ocr_engine_mode != OEM_TESSERACT_ONLY && tessedit_ocr_engine_mode != OEM_TESSERACT_CUBE_COMBINED && word_data.word->best_choice != NULL) return; if (tessedit_ocr_engine_mode == OEM_CUBE_ONLY) { return; } ROW* row = word_data.row; BLOCK* block = word_data.block; WERD_RES* word = *in_word; prev_word_best_choice_ = word_data.prev_word != NULL ? word_data.prev_word->word->best_choice : NULL; set_global_subloc_code(SUBLOC_NORM); check_debug_pt(word, 30); if (!word->done) { word->caps_height = 0.0; if (word->x_height == 0.0f) word->x_height = row->x_height(); match_word_pass_n(2, word, row, block); check_debug_pt(word, 40); } SubAndSuperscriptFix(word); if (!word->tess_failed && !word->word->flag(W_REP_CHAR)) { if (unicharset.top_bottom_useful() && unicharset.script_has_xheight() && block->classify_rotation().y() == 0.0f) { // Use the tops and bottoms since they are available. TrainedXheightFix(word, block, row); } set_global_subloc_code(SUBLOC_NORM); } #ifndef GRAPHICS_DISABLED if (tessedit_display_outwords) { if (fx_win == NULL) create_fx_win(); clear_fx_win(); word->rebuild_word->plot(fx_win); TBOX wbox = word->rebuild_word->bounding_box(); fx_win->ZoomToRectangle(wbox.left(), wbox.top(), wbox.right(), wbox.bottom()); ScrollView::Update(); } #endif set_global_subloc_code(SUBLOC_NORM); check_debug_pt(word, 50); } /** * match_word_pass2 * * Baseline normalize the word and pass it to Tess. */ void Tesseract::match_word_pass_n(int pass_n, WERD_RES *word, ROW *row, BLOCK* block) { if (word->tess_failed) return; tess_segment_pass_n(pass_n, word); if (!word->tess_failed) { if (!word->word->flag (W_REP_CHAR)) { word->fix_quotes(); if (tessedit_fix_hyphens) word->fix_hyphens(); /* Dont trust fix_quotes! - though I think I've fixed the bug */ if (word->best_choice->length() != word->box_word->length()) { tprintf("POST FIX_QUOTES FAIL String:\"%s\"; Strlen=%d;" " #Blobs=%d\n", word->best_choice->debug_string().string(), word->best_choice->length(), word->box_word->length()); } word->tess_accepted = tess_acceptable_word(word); // Also sets word->done flag make_reject_map(word, row, pass_n); } } set_word_fonts(word); ASSERT_HOST(word->raw_choice != NULL); } // Helper to return the best rated BLOB_CHOICE in the whole word that matches // the given char_id, or NULL if none can be found. static BLOB_CHOICE* FindBestMatchingChoice(UNICHAR_ID char_id, WERD_RES* word_res) { // Find the corresponding best BLOB_CHOICE from any position in the word_res. BLOB_CHOICE* best_choice = NULL; for (int i = 0; i < word_res->best_choice->length(); ++i) { BLOB_CHOICE* choice = FindMatchingChoice(char_id, word_res->GetBlobChoices(i)); if (choice != NULL) { if (best_choice == NULL || choice->rating() < best_choice->rating()) best_choice = choice; } } return best_choice; } // Helper to insert blob_choice in each location in the leader word if there is // no matching BLOB_CHOICE there already, and correct any incorrect results // in the best_choice. static void CorrectRepcharChoices(BLOB_CHOICE* blob_choice, WERD_RES* word_res) { WERD_CHOICE* word = word_res->best_choice; for (int i = 0; i < word_res->best_choice->length(); ++i) { BLOB_CHOICE* choice = FindMatchingChoice(blob_choice->unichar_id(), word_res->GetBlobChoices(i)); if (choice == NULL) { BLOB_CHOICE_IT choice_it(word_res->GetBlobChoices(i)); choice_it.add_before_stay_put(new BLOB_CHOICE(*blob_choice)); } } // Correct any incorrect results in word. for (int i = 0; i < word->length(); ++i) { if (word->unichar_id(i) != blob_choice->unichar_id()) word->set_unichar_id(blob_choice->unichar_id(), i); } } /** * fix_rep_char() * The word is a repeated char. (Leader.) Find the repeated char character. * Create the appropriate single-word or multi-word sequence according to * the size of spaces in between blobs, and correct the classifications * where some of the characters disagree with the majority. */ void Tesseract::fix_rep_char(PAGE_RES_IT* page_res_it) { WERD_RES *word_res = page_res_it->word(); const WERD_CHOICE &word = *(word_res->best_choice); // Find the frequency of each unique character in the word. SortHelper<UNICHAR_ID> rep_ch(word.length()); for (int i = 0; i < word.length(); ++i) { rep_ch.Add(word.unichar_id(i), 1); } // Find the most frequent result. UNICHAR_ID maxch_id = INVALID_UNICHAR_ID; // most common char int max_count = rep_ch.MaxCount(&maxch_id); // Find the best exemplar of a classifier result for maxch_id. BLOB_CHOICE* best_choice = FindBestMatchingChoice(maxch_id, word_res); if (best_choice == NULL) { tprintf("Failed to find a choice for %s, occurring %d times\n", word_res->uch_set->debug_str(maxch_id).string(), max_count); return; } word_res->done = TRUE; // Measure the mean space. int gap_count = 0; WERD* werd = word_res->word; C_BLOB_IT blob_it(werd->cblob_list()); C_BLOB* prev_blob = blob_it.data(); for (blob_it.forward(); !blob_it.at_first(); blob_it.forward()) { C_BLOB* blob = blob_it.data(); int gap = blob->bounding_box().left(); gap -= prev_blob->bounding_box().right(); ++gap_count; prev_blob = blob; } // Just correct existing classification. CorrectRepcharChoices(best_choice, word_res); word_res->reject_map.initialise(word.length()); } ACCEPTABLE_WERD_TYPE Tesseract::acceptable_word_string( const UNICHARSET& char_set, const char *s, const char *lengths) { int i = 0; int offset = 0; int leading_punct_count; int upper_count = 0; int hyphen_pos = -1; ACCEPTABLE_WERD_TYPE word_type = AC_UNACCEPTABLE; if (strlen (lengths) > 20) return word_type; /* Single Leading punctuation char*/ if (s[offset] != '\0' && STRING(chs_leading_punct).contains(s[offset])) offset += lengths[i++]; leading_punct_count = i; /* Initial cap */ while (s[offset] != '\0' && char_set.get_isupper(s + offset, lengths[i])) { offset += lengths[i++]; upper_count++; } if (upper_count > 1) { word_type = AC_UPPER_CASE; } else { /* Lower case word, possibly with an initial cap */ while (s[offset] != '\0' && char_set.get_islower(s + offset, lengths[i])) { offset += lengths[i++]; } if (i - leading_punct_count < quality_min_initial_alphas_reqd) goto not_a_word; /* Allow a single hyphen in a lower case word - dont trust upper case - I've seen several cases of "H" -> "I-I" */ if (lengths[i] == 1 && s[offset] == '-') { hyphen_pos = i; offset += lengths[i++]; if (s[offset] != '\0') { while ((s[offset] != '\0') && char_set.get_islower(s + offset, lengths[i])) { offset += lengths[i++]; } if (i < hyphen_pos + 3) goto not_a_word; } } else { /* Allow "'s" in NON hyphenated lower case words */ if (lengths[i] == 1 && (s[offset] == '\'') && lengths[i + 1] == 1 && (s[offset + lengths[i]] == 's')) { offset += lengths[i++]; offset += lengths[i++]; } } if (upper_count > 0) word_type = AC_INITIAL_CAP; else word_type = AC_LOWER_CASE; } /* Up to two different, constrained trailing punctuation chars */ if (lengths[i] == 1 && s[offset] != '\0' && STRING(chs_trailing_punct1).contains(s[offset])) offset += lengths[i++]; if (lengths[i] == 1 && s[offset] != '\0' && i > 0 && s[offset - lengths[i - 1]] != s[offset] && STRING(chs_trailing_punct2).contains (s[offset])) offset += lengths[i++]; if (s[offset] != '\0') word_type = AC_UNACCEPTABLE; not_a_word: if (word_type == AC_UNACCEPTABLE) { /* Look for abbreviation string */ i = 0; offset = 0; if (s[0] != '\0' && char_set.get_isupper(s, lengths[0])) { word_type = AC_UC_ABBREV; while (s[offset] != '\0' && char_set.get_isupper(s + offset, lengths[i]) && lengths[i + 1] == 1 && s[offset + lengths[i]] == '.') { offset += lengths[i++]; offset += lengths[i++]; } } else if (s[0] != '\0' && char_set.get_islower(s, lengths[0])) { word_type = AC_LC_ABBREV; while (s[offset] != '\0' && char_set.get_islower(s + offset, lengths[i]) && lengths[i + 1] == 1 && s[offset + lengths[i]] == '.') { offset += lengths[i++]; offset += lengths[i++]; } } if (s[offset] != '\0') word_type = AC_UNACCEPTABLE; } return word_type; } BOOL8 Tesseract::check_debug_pt(WERD_RES *word, int location) { BOOL8 show_map_detail = FALSE; inT16 i; if (!test_pt) return FALSE; tessedit_rejection_debug.set_value (FALSE); debug_x_ht_level.set_value (0); if (word->word->bounding_box ().contains (FCOORD (test_pt_x, test_pt_y))) { if (location < 0) return TRUE; // For breakpoint use tessedit_rejection_debug.set_value (TRUE); debug_x_ht_level.set_value (20); tprintf ("\n\nTESTWD::"); switch (location) { case 0: tprintf ("classify_word_pass1 start\n"); word->word->print(); break; case 10: tprintf ("make_reject_map: initial map"); break; case 20: tprintf ("make_reject_map: after NN"); break; case 30: tprintf ("classify_word_pass2 - START"); break; case 40: tprintf ("classify_word_pass2 - Pre Xht"); break; case 50: tprintf ("classify_word_pass2 - END"); show_map_detail = TRUE; break; case 60: tprintf ("fixspace"); break; case 70: tprintf ("MM pass START"); break; case 80: tprintf ("MM pass END"); break; case 90: tprintf ("After Poor quality rejection"); break; case 100: tprintf ("unrej_good_quality_words - START"); break; case 110: tprintf ("unrej_good_quality_words - END"); break; case 120: tprintf ("Write results pass"); show_map_detail = TRUE; break; } if (word->best_choice != NULL) { tprintf(" \"%s\" ", word->best_choice->unichar_string().string()); word->reject_map.print(debug_fp); tprintf("\n"); if (show_map_detail) { tprintf("\"%s\"\n", word->best_choice->unichar_string().string()); for (i = 0; word->best_choice->unichar_string()[i] != '\0'; i++) { tprintf("**** \"%c\" ****\n", word->best_choice->unichar_string()[i]); word->reject_map[i].full_print(debug_fp); } } } else { tprintf("null best choice\n"); } tprintf ("Tess Accepted: %s\n", word->tess_accepted ? "TRUE" : "FALSE"); tprintf ("Done flag: %s\n\n", word->done ? "TRUE" : "FALSE"); return TRUE; } else { return FALSE; } } /** * find_modal_font * * Find the modal font and remove from the stats. */ static void find_modal_font( //good chars in word STATS *fonts, //font stats inT16 *font_out, //output font inT8 *font_count //output count ) { inT16 font; //font index inT32 count; //pile couat if (fonts->get_total () > 0) { font = (inT16) fonts->mode (); *font_out = font; count = fonts->pile_count (font); *font_count = count < MAX_INT8 ? count : MAX_INT8; fonts->add (font, -*font_count); } else { *font_out = -1; *font_count = 0; } } /** * set_word_fonts * * Get the fonts for the word. */ void Tesseract::set_word_fonts(WERD_RES *word) { // Don't try to set the word fonts for a cube word, as the configs // will be meaningless. if (word->chopped_word == NULL) return; ASSERT_HOST(word->best_choice != NULL); inT32 index; // char id index // character iterator BLOB_CHOICE_IT choice_it; // choice iterator int fontinfo_size = get_fontinfo_table().size(); int fontset_size = get_fontset_table().size(); if (fontinfo_size == 0 || fontset_size == 0) return; STATS fonts(0, fontinfo_size); // font counters word->italic = 0; word->bold = 0; if (!word->best_choice_fontinfo_ids.empty()) { word->best_choice_fontinfo_ids.clear(); } // Compute the modal font for the word for (index = 0; index < word->best_choice->length(); ++index) { UNICHAR_ID word_ch_id = word->best_choice->unichar_id(index); choice_it.set_to_list(word->GetBlobChoices(index)); if (tessedit_debug_fonts) { tprintf("Examining fonts in %s\n", word->best_choice->debug_string().string()); } for (choice_it.mark_cycle_pt(); !choice_it.cycled_list(); choice_it.forward()) { UNICHAR_ID blob_ch_id = choice_it.data()->unichar_id(); if (blob_ch_id == word_ch_id) { if (tessedit_debug_fonts) { tprintf("%s font %s (%d) font2 %s (%d)\n", word->uch_set->id_to_unichar(blob_ch_id), choice_it.data()->fontinfo_id() < 0 ? "unknown" : fontinfo_table_.get(choice_it.data()->fontinfo_id()).name, choice_it.data()->fontinfo_id(), choice_it.data()->fontinfo_id2() < 0 ? "unknown" : fontinfo_table_.get(choice_it.data()->fontinfo_id2()).name, choice_it.data()->fontinfo_id2()); } // 1st choice font gets 2 pts, 2nd choice 1 pt. if (choice_it.data()->fontinfo_id() >= 0) { fonts.add(choice_it.data()->fontinfo_id(), 2); } if (choice_it.data()->fontinfo_id2() >= 0) { fonts.add(choice_it.data()->fontinfo_id2(), 1); } break; } } } inT16 font_id1, font_id2; find_modal_font(&fonts, &font_id1, &word->fontinfo_id_count); find_modal_font(&fonts, &font_id2, &word->fontinfo_id2_count); word->fontinfo = font_id1 >= 0 ? &fontinfo_table_.get(font_id1) : NULL; word->fontinfo2 = font_id2 >= 0 ? &fontinfo_table_.get(font_id2) : NULL; // All the blobs get the word's best choice font. for (int i = 0; i < word->best_choice->length(); ++i) { word->best_choice_fontinfo_ids.push_back(font_id1); } if (word->fontinfo_id_count > 0) { FontInfo fi = fontinfo_table_.get(font_id1); if (tessedit_debug_fonts) { if (word->fontinfo_id2_count > 0) { tprintf("Word modal font=%s, score=%d, 2nd choice %s/%d\n", fi.name, word->fontinfo_id_count, fontinfo_table_.get(font_id2).name, word->fontinfo_id2_count); } else { tprintf("Word modal font=%s, score=%d. No 2nd choice\n", fi.name, word->fontinfo_id_count); } } // 1st choices got 2 pts, so we need to halve the score for the mode. word->italic = (fi.is_italic() ? 1 : -1) * (word->fontinfo_id_count + 1) / 2; word->bold = (fi.is_bold() ? 1 : -1) * (word->fontinfo_id_count + 1) / 2; } } /** * font_recognition_pass * * Smooth the fonts for the document. */ void Tesseract::font_recognition_pass(PAGE_RES* page_res) { PAGE_RES_IT page_res_it(page_res); WERD_RES *word; // current word STATS doc_fonts(0, font_table_size_); // font counters // Gather font id statistics. for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { word = page_res_it.word(); if (word->fontinfo != NULL) { doc_fonts.add(word->fontinfo->universal_id, word->fontinfo_id_count); } if (word->fontinfo2 != NULL) { doc_fonts.add(word->fontinfo2->universal_id, word->fontinfo_id2_count); } } inT16 doc_font; // modal font inT8 doc_font_count; // modal font find_modal_font(&doc_fonts, &doc_font, &doc_font_count); if (doc_font_count == 0) return; // Get the modal font pointer. const FontInfo* modal_font = NULL; for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { word = page_res_it.word(); if (word->fontinfo != NULL && word->fontinfo->universal_id == doc_font) { modal_font = word->fontinfo; break; } if (word->fontinfo2 != NULL && word->fontinfo2->universal_id == doc_font) { modal_font = word->fontinfo2; break; } } ASSERT_HOST(modal_font != NULL); // Assign modal font to weak words. for (page_res_it.restart_page(); page_res_it.word() != NULL; page_res_it.forward()) { word = page_res_it.word(); int length = word->best_choice->length(); // 1st choices got 2 pts, so we need to halve the score for the mode. int count = (word->fontinfo_id_count + 1) / 2; if (!(count == length || (length > 3 && count >= length * 3 / 4))) { word->fontinfo = modal_font; // Counts only get 1 as it came from the doc. word->fontinfo_id_count = 1; word->italic = modal_font->is_italic() ? 1 : -1; word->bold = modal_font->is_bold() ? 1 : -1; } } } // If a word has multiple alternates check if the best choice is in the // dictionary. If not, replace it with an alternate that exists in the // dictionary. void Tesseract::dictionary_correction_pass(PAGE_RES *page_res) { PAGE_RES_IT word_it(page_res); for (WERD_RES* word = word_it.word(); word != NULL; word = word_it.forward()) { if (word->best_choices.singleton()) continue; // There are no alternates. WERD_CHOICE* best = word->best_choice; if (word->tesseract->getDict().valid_word(*best) != 0) continue; // The best choice is in the dictionary. WERD_CHOICE_IT choice_it(&word->best_choices); for (choice_it.mark_cycle_pt(); !choice_it.cycled_list(); choice_it.forward()) { WERD_CHOICE* alternate = choice_it.data(); if (word->tesseract->getDict().valid_word(*alternate)) { // The alternate choice is in the dictionary. if (tessedit_bigram_debug) { tprintf("Dictionary correction replaces best choice '%s' with '%s'\n", best->unichar_string().string(), alternate->unichar_string().string()); } // Replace the 'best' choice with a better choice. word->ReplaceBestChoice(alternate); break; } } } } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: thresholder.h // Description: Base API for thresolding images in tesseract. // Author: Ray Smith // Created: Mon May 12 11:00:15 PDT 2008 // // (C) Copyright 2008, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_THRESHOLDER_H__ #define TESSERACT_CCMAIN_THRESHOLDER_H__ #include "platform.h" #include "publictypes.h" struct Pix; namespace tesseract { /// Base class for all tesseract image thresholding classes. /// Specific classes can add new thresholding methods by /// overriding ThresholdToPix. /// Each instance deals with a single image, but the design is intended to /// be useful for multiple calls to SetRectangle and ThresholdTo* if /// desired. class TESS_API ImageThresholder { public: ImageThresholder(); virtual ~ImageThresholder(); /// Destroy the Pix if there is one, freeing memory. virtual void Clear(); /// Return true if no image has been set. bool IsEmpty() const; /// SetImage makes a copy of all the image data, so it may be deleted /// immediately after this call. /// Greyscale of 8 and color of 24 or 32 bits per pixel may be given. /// Palette color images will not work properly and must be converted to /// 24 bit. /// Binary images of 1 bit per pixel may also be given but they must be /// byte packed with the MSB of the first byte being the first pixel, and a /// one pixel is WHITE. For binary images set bytes_per_pixel=0. void SetImage(const unsigned char* imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line); /// Store the coordinates of the rectangle to process for later use. /// Doesn't actually do any thresholding. void SetRectangle(int left, int top, int width, int height); /// Get enough parameters to be able to rebuild bounding boxes in the /// original image (not just within the rectangle). /// Left and top are enough with top-down coordinates, but /// the height of the rectangle and the image are needed for bottom-up. virtual void GetImageSizes(int* left, int* top, int* width, int* height, int* imagewidth, int* imageheight); /// Return true if the source image is color. bool IsColor() const { return pix_channels_ >= 3; } /// Returns true if the source image is binary. bool IsBinary() const { return pix_channels_ == 0; } int GetScaleFactor() const { return scale_; } // Set the resolution of the source image in pixels per inch. // This should be called right after SetImage(), and will let us return // appropriate font sizes for the text. void SetSourceYResolution(int ppi) { yres_ = ppi; estimated_res_ = ppi; } int GetSourceYResolution() const { return yres_; } int GetScaledYResolution() const { return scale_ * yres_; } // Set the resolution of the source image in pixels per inch, as estimated // by the thresholder from the text size found during thresholding. // This value will be used to set internal size thresholds during recognition // and will not influence the output "point size." The default value is // the same as the source resolution. (yres_) void SetEstimatedResolution(int ppi) { estimated_res_ = ppi; } // Returns the estimated resolution, including any active scaling. // This value will be used to set internal size thresholds during recognition. int GetScaledEstimatedResolution() const { return scale_ * estimated_res_; } /// Pix vs raw, which to use? Pix is the preferred input for efficiency, /// since raw buffers are copied. /// SetImage for Pix clones its input, so the source pix may be pixDestroyed /// immediately after, but may not go away until after the Thresholder has /// finished with it. void SetImage(const Pix* pix); /// Threshold the source image as efficiently as possible to the output Pix. /// Creates a Pix and sets pix to point to the resulting pointer. /// Caller must use pixDestroy to free the created Pix. virtual void ThresholdToPix(PageSegMode pageseg_mode, Pix** pix); // Gets a pix that contains an 8 bit threshold value at each pixel. The // returned pix may be an integer reduction of the binary image such that // the scale factor may be inferred from the ratio of the sizes, even down // to the extreme of a 1x1 pixel thresholds image. // Ideally the 8 bit threshold should be the exact threshold used to generate // the binary image in ThresholdToPix, but this is not a hard constraint. // Returns NULL if the input is binary. PixDestroy after use. virtual Pix* GetPixRectThresholds(); /// Get a clone/copy of the source image rectangle. /// The returned Pix must be pixDestroyed. /// This function will be used in the future by the page layout analysis, and /// the layout analysis that uses it will only be available with Leptonica, /// so there is no raw equivalent. Pix* GetPixRect(); // Get a clone/copy of the source image rectangle, reduced to greyscale, // and at the same resolution as the output binary. // The returned Pix must be pixDestroyed. // Provided to the classifier to extract features from the greyscale image. virtual Pix* GetPixRectGrey(); protected: // ---------------------------------------------------------------------- // Utility functions that may be useful components for other thresholders. /// Common initialization shared between SetImage methods. virtual void Init(); /// Return true if we are processing the full image. bool IsFullImage() const { return rect_left_ == 0 && rect_top_ == 0 && rect_width_ == image_width_ && rect_height_ == image_height_; } // Otsu thresholds the rectangle, taking the rectangle from *this. void OtsuThresholdRectToPix(Pix* src_pix, Pix** out_pix) const; /// Threshold the rectangle, taking everything except the src_pix /// from the class, using thresholds/hi_values to the output pix. /// NOTE that num_channels is the size of the thresholds and hi_values // arrays and also the bytes per pixel in src_pix. void ThresholdRectToPix(Pix* src_pix, int num_channels, const int* thresholds, const int* hi_values, Pix** pix) const; protected: /// Clone or other copy of the source Pix. /// The pix will always be PixDestroy()ed on destruction of the class. Pix* pix_; int image_width_; //< Width of source pix_. int image_height_; //< Height of source pix_. int pix_channels_; //< Number of 8-bit channels in pix_. int pix_wpl_; //< Words per line of pix_. // Limits of image rectangle to be processed. int scale_; //< Scale factor from original image. int yres_; //< y pixels/inch in source image. int estimated_res_; //< Resolution estimate from text size. int rect_left_; int rect_top_; int rect_width_; int rect_height_; }; } // namespace tesseract. #endif // TESSERACT_CCMAIN_THRESHOLDER_H__
C++
/********************************************************************** * File: paragraphs.h * Description: Paragraph Detection data structures. * Author: David Eger * Created: 25 February 2011 * * (C) Copyright 2011, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef TESSERACT_CCMAIN_PARAGRAPHS_H_ #define TESSERACT_CCMAIN_PARAGRAPHS_H_ #include "rect.h" #include "ocrpara.h" #include "genericvector.h" #include "strngs.h" class WERD; class UNICHARSET; namespace tesseract { class MutableIterator; // This structure captures all information needed about a text line for the // purposes of paragraph detection. It is meant to be exceedingly light-weight // so that we can easily test paragraph detection independent of the rest of // Tesseract. class RowInfo { public: // Constant data derived from Tesseract output. STRING text; // the full UTF-8 text of the line. bool ltr; // whether the majority of the text is left-to-right // TODO(eger) make this more fine-grained. bool has_leaders; // does the line contain leader dots (.....)? bool has_drop_cap; // does the line have a drop cap? int pix_ldistance; // distance to the left pblock boundary in pixels int pix_rdistance; // distance to the right pblock boundary in pixels float pix_xheight; // guessed xheight for the line int average_interword_space; // average space between words in pixels. int num_words; TBOX lword_box; // in normalized (horiz text rows) space TBOX rword_box; // in normalized (horiz text rows) space STRING lword_text; // the UTF-8 text of the leftmost werd STRING rword_text; // the UTF-8 text of the rightmost werd // The text of a paragraph typically starts with the start of an idea and // ends with the end of an idea. Here we define paragraph as something that // may have a first line indent and a body indent which may be different. // Typical words that start an idea are: // 1. Words in western scripts that start with // a capital letter, for example "The" // 2. Bulleted or numbered list items, for // example "2." // Typical words which end an idea are words ending in punctuation marks. In // this vocabulary, each list item is represented as a paragraph. bool lword_indicates_list_item; bool lword_likely_starts_idea; bool lword_likely_ends_idea; bool rword_indicates_list_item; bool rword_likely_starts_idea; bool rword_likely_ends_idea; }; // Main entry point for Paragraph Detection Algorithm. // // Given a set of equally spaced textlines (described by row_infos), // Split them into paragraphs. See http://goto/paragraphstalk // // Output: // row_owners - one pointer for each row, to the paragraph it belongs to. // paragraphs - this is the actual list of PARA objects. // models - the list of paragraph models referenced by the PARA objects. // caller is responsible for deleting the models. void DetectParagraphs(int debug_level, GenericVector<RowInfo> *row_infos, GenericVector<PARA *> *row_owners, PARA_LIST *paragraphs, GenericVector<ParagraphModel *> *models); // Given a MutableIterator to the start of a block, run DetectParagraphs on // that block and commit the results to the underlying ROW and BLOCK structs, // saving the ParagraphModels in models. Caller owns the models. // We use unicharset during the function to answer questions such as "is the // first letter of this word upper case?" void DetectParagraphs(int debug_level, bool after_text_recognition, const MutableIterator *block_start, GenericVector<ParagraphModel *> *models); } // namespace #endif // TESSERACT_CCMAIN_PARAGRAPHS_H_
C++
/********************************************************************** * File: tessedit.cpp (Formerly tessedit.c) * Description: Main program for merge of tess and editor. * Author: Ray Smith * Created: Tue Jan 07 15:21:46 GMT 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "stderr.h" #include "basedir.h" #include "tessvars.h" #include "control.h" #include "reject.h" #include "pageres.h" #include "nwmain.h" #include "pgedit.h" #include "tprintf.h" #include "tessedit.h" #include "stopper.h" #include "intmatcher.h" #include "chop.h" #include "efio.h" #include "danerror.h" #include "globals.h" #include "tesseractclass.h" #include "params.h" #define VARDIR "configs/" /*variables files */ //config under api #define API_CONFIG "configs/api_config" ETEXT_DESC *global_monitor = NULL; // progress monitor namespace tesseract { // Read a "config" file containing a set of variable, value pairs. // Searches the standard places: tessdata/configs, tessdata/tessconfigs // and also accepts a relative or absolute path name. void Tesseract::read_config_file(const char *filename, SetParamConstraint constraint) { STRING path = datadir; path += "configs/"; path += filename; FILE* fp; if ((fp = fopen(path.string(), "rb")) != NULL) { fclose(fp); } else { path = datadir; path += "tessconfigs/"; path += filename; if ((fp = fopen(path.string(), "rb")) != NULL) { fclose(fp); } else { path = filename; } } ParamUtils::ReadParamsFile(path.string(), constraint, this->params()); } // Returns false if a unicharset file for the specified language was not found // or was invalid. // This function initializes TessdataManager. After TessdataManager is // no longer needed, TessdataManager::End() should be called. // // This function sets tessedit_oem_mode to the given OcrEngineMode oem, unless // it is OEM_DEFAULT, in which case the value of the variable will be obtained // from the language-specific config file (stored in [lang].traineddata), from // the config files specified on the command line or left as the default // OEM_TESSERACT_ONLY if none of the configs specify this variable. bool Tesseract::init_tesseract_lang_data( const char *arg0, const char *textbase, const char *language, OcrEngineMode oem, char **configs, int configs_size, const GenericVector<STRING> *vars_vec, const GenericVector<STRING> *vars_values, bool set_only_non_debug_params) { // Set the basename, compute the data directory. main_setup(arg0, textbase); // Set the language data path prefix lang = language != NULL ? language : "eng"; language_data_path_prefix = datadir; language_data_path_prefix += lang; language_data_path_prefix += "."; // Initialize TessdataManager. STRING tessdata_path = language_data_path_prefix + kTrainedDataSuffix; if (!tessdata_manager.Init(tessdata_path.string(), tessdata_manager_debug_level)) { return false; } // If a language specific config file (lang.config) exists, load it in. if (tessdata_manager.SeekToStart(TESSDATA_LANG_CONFIG)) { ParamUtils::ReadParamsFromFp( tessdata_manager.GetDataFilePtr(), tessdata_manager.GetEndOffset(TESSDATA_LANG_CONFIG), SET_PARAM_CONSTRAINT_NONE, this->params()); if (tessdata_manager_debug_level) { tprintf("Loaded language config file\n"); } } SetParamConstraint set_params_constraint = set_only_non_debug_params ? SET_PARAM_CONSTRAINT_NON_DEBUG_ONLY : SET_PARAM_CONSTRAINT_NONE; // Load tesseract variables from config files. This is done after loading // language-specific variables from [lang].traineddata file, so that custom // config files can override values in [lang].traineddata file. for (int i = 0; i < configs_size; ++i) { read_config_file(configs[i], set_params_constraint); } // Set params specified in vars_vec (done after setting params from config // files, so that params in vars_vec can override those from files). if (vars_vec != NULL && vars_values != NULL) { for (int i = 0; i < vars_vec->size(); ++i) { if (!ParamUtils::SetParam((*vars_vec)[i].string(), (*vars_values)[i].string(), set_params_constraint, this->params())) { tprintf("Error setting param %s\n", (*vars_vec)[i].string()); exit(1); } } } if (((STRING &)tessedit_write_params_to_file).length() > 0) { FILE *params_file = fopen(tessedit_write_params_to_file.string(), "wb"); if (params_file != NULL) { ParamUtils::PrintParams(params_file, this->params()); fclose(params_file); if (tessdata_manager_debug_level > 0) { tprintf("Wrote parameters to %s\n", tessedit_write_params_to_file.string()); } } else { tprintf("Failed to open %s for writing params.\n", tessedit_write_params_to_file.string()); } } // Determine which ocr engine(s) should be loaded and used for recognition. if (oem != OEM_DEFAULT) tessedit_ocr_engine_mode.set_value(oem); if (tessdata_manager_debug_level) { tprintf("Loading Tesseract/Cube with tessedit_ocr_engine_mode %d\n", static_cast<int>(tessedit_ocr_engine_mode)); } // If we are only loading the config file (and so not planning on doing any // recognition) then there's nothing else do here. if (tessedit_init_config_only) { if (tessdata_manager_debug_level) { tprintf("Returning after loading config file\n"); } return true; } // Load the unicharset if (!tessdata_manager.SeekToStart(TESSDATA_UNICHARSET) || !unicharset.load_from_file(tessdata_manager.GetDataFilePtr())) { return false; } if (unicharset.size() > MAX_NUM_CLASSES) { tprintf("Error: Size of unicharset is greater than MAX_NUM_CLASSES\n"); return false; } if (tessdata_manager_debug_level) tprintf("Loaded unicharset\n"); right_to_left_ = unicharset.major_right_to_left(); // Setup initial unichar ambigs table and read universal ambigs. UNICHARSET encoder_unicharset; encoder_unicharset.CopyFrom(unicharset); unichar_ambigs.InitUnicharAmbigs(unicharset, use_ambigs_for_adaption); unichar_ambigs.LoadUniversal(encoder_unicharset, &unicharset); if (!tessedit_ambigs_training && tessdata_manager.SeekToStart(TESSDATA_AMBIGS)) { TFile ambigs_file; ambigs_file.Open(tessdata_manager.GetDataFilePtr(), tessdata_manager.GetEndOffset(TESSDATA_AMBIGS) + 1); unichar_ambigs.LoadUnicharAmbigs( encoder_unicharset, &ambigs_file, ambigs_debug_level, use_ambigs_for_adaption, &unicharset); if (tessdata_manager_debug_level) tprintf("Loaded ambigs\n"); } // Load Cube objects if necessary. if (tessedit_ocr_engine_mode == OEM_CUBE_ONLY) { ASSERT_HOST(init_cube_objects(false, &tessdata_manager)); if (tessdata_manager_debug_level) tprintf("Loaded Cube w/out combiner\n"); } else if (tessedit_ocr_engine_mode == OEM_TESSERACT_CUBE_COMBINED) { ASSERT_HOST(init_cube_objects(true, &tessdata_manager)); if (tessdata_manager_debug_level) tprintf("Loaded Cube with combiner\n"); } // Init ParamsModel. // Load pass1 and pass2 weights (for now these two sets are the same, but in // the future separate sets of weights can be generated). for (int p = ParamsModel::PTRAIN_PASS1; p < ParamsModel::PTRAIN_NUM_PASSES; ++p) { language_model_->getParamsModel().SetPass( static_cast<ParamsModel::PassEnum>(p)); if (tessdata_manager.SeekToStart(TESSDATA_PARAMS_MODEL)) { if (!language_model_->getParamsModel().LoadFromFp( lang.string(), tessdata_manager.GetDataFilePtr(), tessdata_manager.GetEndOffset(TESSDATA_PARAMS_MODEL))) { return false; } } } if (tessdata_manager_debug_level) language_model_->getParamsModel().Print(); return true; } // Helper returns true if the given string is in the vector of strings. static bool IsStrInList(const STRING& str, const GenericVector<STRING>& str_list) { for (int i = 0; i < str_list.size(); ++i) { if (str_list[i] == str) return true; } return false; } // Parse a string of the form [~]<lang>[+[~]<lang>]*. // Langs with no prefix get appended to to_load, provided they // are not in there already. // Langs with ~ prefix get appended to not_to_load, provided they are not in // there already. void Tesseract::ParseLanguageString(const char* lang_str, GenericVector<STRING>* to_load, GenericVector<STRING>* not_to_load) { STRING remains(lang_str); while (remains.length() > 0) { // Find the start of the lang code and which vector to add to. const char* start = remains.string(); while (*start == '+') ++start; GenericVector<STRING>* target = to_load; if (*start == '~') { target = not_to_load; ++start; } // Find the index of the end of the lang code in string start. int end = strlen(start); const char* plus = strchr(start, '+'); if (plus != NULL && plus - start < end) end = plus - start; STRING lang_code(start); lang_code.truncate_at(end); STRING next(start + end); remains = next; // Check whether lang_code is already in the target vector and add. if (!IsStrInList(lang_code, *target)) { if (tessdata_manager_debug_level) tprintf("Adding language '%s' to list\n", lang_code.string()); target->push_back(lang_code); } } } // Initialize for potentially a set of languages defined by the language // string and recursively any additional languages required by any language // traineddata file (via tessedit_load_sublangs in its config) that is loaded. // See init_tesseract_internal for args. int Tesseract::init_tesseract( const char *arg0, const char *textbase, const char *language, OcrEngineMode oem, char **configs, int configs_size, const GenericVector<STRING> *vars_vec, const GenericVector<STRING> *vars_values, bool set_only_non_debug_params) { GenericVector<STRING> langs_to_load; GenericVector<STRING> langs_not_to_load; ParseLanguageString(language, &langs_to_load, &langs_not_to_load); sub_langs_.delete_data_pointers(); sub_langs_.clear(); // Find the first loadable lang and load into this. // Add any languages that this language requires bool loaded_primary = false; // Load the rest into sub_langs_. for (int lang_index = 0; lang_index < langs_to_load.size(); ++lang_index) { if (!IsStrInList(langs_to_load[lang_index], langs_not_to_load)) { const char *lang_str = langs_to_load[lang_index].string(); Tesseract *tess_to_init; if (!loaded_primary) { tess_to_init = this; } else { tess_to_init = new Tesseract; } int result = tess_to_init->init_tesseract_internal( arg0, textbase, lang_str, oem, configs, configs_size, vars_vec, vars_values, set_only_non_debug_params); if (!loaded_primary) { if (result < 0) { tprintf("Failed loading language '%s'\n", lang_str); } else { if (tessdata_manager_debug_level) tprintf("Loaded language '%s' as main language\n", lang_str); ParseLanguageString(tess_to_init->tessedit_load_sublangs.string(), &langs_to_load, &langs_not_to_load); loaded_primary = true; } } else { if (result < 0) { tprintf("Failed loading language '%s'\n", lang_str); delete tess_to_init; } else { if (tessdata_manager_debug_level) tprintf("Loaded language '%s' as secondary language\n", lang_str); sub_langs_.push_back(tess_to_init); // Add any languages that this language requires ParseLanguageString(tess_to_init->tessedit_load_sublangs.string(), &langs_to_load, &langs_not_to_load); } } } } if (!loaded_primary) { tprintf("Tesseract couldn't load any languages!\n"); return -1; // Couldn't load any language! } if (!sub_langs_.empty()) { // In multilingual mode word ratings have to be directly comparable, // so use the same language model weights for all languages: // use the primary language's params model if // tessedit_use_primary_params_model is set, // otherwise use default language model weights. if (tessedit_use_primary_params_model) { for (int s = 0; s < sub_langs_.size(); ++s) { sub_langs_[s]->language_model_->getParamsModel().Copy( this->language_model_->getParamsModel()); } tprintf("Using params model of the primary language\n"); if (tessdata_manager_debug_level) { this->language_model_->getParamsModel().Print(); } } else { this->language_model_->getParamsModel().Clear(); for (int s = 0; s < sub_langs_.size(); ++s) { sub_langs_[s]->language_model_->getParamsModel().Clear(); } if (tessdata_manager_debug_level) tprintf("Using default language params\n"); } } SetupUniversalFontIds(); return 0; } // Common initialization for a single language. // arg0 is the datapath for the tessdata directory, which could be the // path of the tessdata directory with no trailing /, or (if tessdata // lives in the same directory as the executable, the path of the executable, // hence the name arg0. // textbase is an optional output file basename (used only for training) // language is the language code to load. // oem controls which engine(s) will operate on the image // configs (argv) is an array of config filenames to load variables from. // May be NULL. // configs_size (argc) is the number of elements in configs. // vars_vec is an optional vector of variables to set. // vars_values is an optional corresponding vector of values for the variables // in vars_vec. // If set_only_init_params is true, then only the initialization variables // will be set. int Tesseract::init_tesseract_internal( const char *arg0, const char *textbase, const char *language, OcrEngineMode oem, char **configs, int configs_size, const GenericVector<STRING> *vars_vec, const GenericVector<STRING> *vars_values, bool set_only_non_debug_params) { if (!init_tesseract_lang_data(arg0, textbase, language, oem, configs, configs_size, vars_vec, vars_values, set_only_non_debug_params)) { return -1; } if (tessedit_init_config_only) { tessdata_manager.End(); return 0; } // If only Cube will be used, skip loading Tesseract classifier's // pre-trained templates. bool init_tesseract_classifier = (tessedit_ocr_engine_mode == OEM_TESSERACT_ONLY || tessedit_ocr_engine_mode == OEM_TESSERACT_CUBE_COMBINED); // If only Cube will be used and if it has its own Unicharset, // skip initializing permuter and loading Tesseract Dawgs. bool init_dict = !(tessedit_ocr_engine_mode == OEM_CUBE_ONLY && tessdata_manager.SeekToStart(TESSDATA_CUBE_UNICHARSET)); program_editup(textbase, init_tesseract_classifier, init_dict); tessdata_manager.End(); return 0; //Normal exit } // Helper builds the all_fonts table by adding new fonts from new_fonts. static void CollectFonts(const UnicityTable<FontInfo>& new_fonts, UnicityTable<FontInfo>* all_fonts) { for (int i = 0; i < new_fonts.size(); ++i) { // UnicityTable uniques as we go. all_fonts->push_back(new_fonts.get(i)); } } // Helper assigns an id to lang_fonts using the index in all_fonts table. static void AssignIds(const UnicityTable<FontInfo>& all_fonts, UnicityTable<FontInfo>* lang_fonts) { for (int i = 0; i < lang_fonts->size(); ++i) { int index = all_fonts.get_id(lang_fonts->get(i)); lang_fonts->get_mutable(i)->universal_id = index; } } // Set the universal_id member of each font to be unique among all // instances of the same font loaded. void Tesseract::SetupUniversalFontIds() { // Note that we can get away with bitwise copying FontInfo in // all_fonts, as it is a temporary structure and we avoid setting the // delete callback. UnicityTable<FontInfo> all_fonts; all_fonts.set_compare_callback(NewPermanentTessCallback(CompareFontInfo)); // Create the universal ID table. CollectFonts(get_fontinfo_table(), &all_fonts); for (int i = 0; i < sub_langs_.size(); ++i) { CollectFonts(sub_langs_[i]->get_fontinfo_table(), &all_fonts); } // Assign ids from the table to each font table. AssignIds(all_fonts, &get_fontinfo_table()); for (int i = 0; i < sub_langs_.size(); ++i) { AssignIds(all_fonts, &sub_langs_[i]->get_fontinfo_table()); } font_table_size_ = all_fonts.size(); } // init the LM component int Tesseract::init_tesseract_lm(const char *arg0, const char *textbase, const char *language) { if (!init_tesseract_lang_data(arg0, textbase, language, OEM_TESSERACT_ONLY, NULL, 0, NULL, NULL, false)) return -1; getDict().Load(Dict::GlobalDawgCache()); tessdata_manager.End(); return 0; } void Tesseract::end_tesseract() { end_recog(); } /* Define command type identifiers */ enum CMD_EVENTS { ACTION_1_CMD_EVENT, RECOG_WERDS, RECOG_PSEUDO, ACTION_2_CMD_EVENT }; } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: recogtraining.cpp // Description: Functions for ambiguity and parameter training. // Author: Daria Antonova // Created: Mon Aug 13 11:26:43 PDT 2009 // // (C) Copyright 2009, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "tesseractclass.h" #include "boxread.h" #include "control.h" #include "cutil.h" #include "host.h" #include "ratngs.h" #include "reject.h" #include "stopper.h" namespace tesseract { const inT16 kMaxBoxEdgeDiff = 2; // Sets flags necessary for recognition in the training mode. // Opens and returns the pointer to the output file. FILE *Tesseract::init_recog_training(const STRING &fname) { if (tessedit_ambigs_training) { tessedit_tess_adaption_mode.set_value(0); // turn off adaption tessedit_enable_doc_dict.set_value(0); // turn off document dictionary // Explore all segmentations. getDict().stopper_no_acceptable_choices.set_value(1); } STRING output_fname = fname; const char *lastdot = strrchr(output_fname.string(), '.'); if (lastdot != NULL) output_fname[lastdot - output_fname.string()] = '\0'; output_fname += ".txt"; FILE *output_file = open_file(output_fname.string(), "a+"); return output_file; } // Copies the bounding box from page_res_it->word() to the given TBOX. bool read_t(PAGE_RES_IT *page_res_it, TBOX *tbox) { while (page_res_it->block() != NULL && page_res_it->word() == NULL) page_res_it->forward(); if (page_res_it->word() != NULL) { *tbox = page_res_it->word()->word->bounding_box(); // If tbox->left() is negative, the training image has vertical text and // all the coordinates of bounding boxes of page_res are rotated by 90 // degrees in a counterclockwise direction. We need to rotate the TBOX back // in order to compare with the TBOXes of box files. if (tbox->left() < 0) { tbox->rotate(FCOORD(0.0, -1.0)); } return true; } else { return false; } } // This function takes tif/box pair of files and runs recognition on the image, // while making sure that the word bounds that tesseract identified roughly // match to those specified by the input box file. For each word (ngram in a // single bounding box from the input box file) it outputs the ocred result, // the correct label, rating and certainty. void Tesseract::recog_training_segmented(const STRING &fname, PAGE_RES *page_res, volatile ETEXT_DESC *monitor, FILE *output_file) { STRING box_fname = fname; const char *lastdot = strrchr(box_fname.string(), '.'); if (lastdot != NULL) box_fname[lastdot - box_fname.string()] = '\0'; box_fname += ".box"; // read_next_box() will close box_file FILE *box_file = open_file(box_fname.string(), "r"); PAGE_RES_IT page_res_it; page_res_it.page_res = page_res; page_res_it.restart_page(); STRING label; // Process all the words on this page. TBOX tbox; // tesseract-identified box TBOX bbox; // box from the box file bool keep_going; int line_number = 0; int examined_words = 0; do { keep_going = read_t(&page_res_it, &tbox); keep_going &= ReadNextBox(applybox_page, &line_number, box_file, &label, &bbox); // Align bottom left points of the TBOXes. while (keep_going && !NearlyEqual<int>(tbox.bottom(), bbox.bottom(), kMaxBoxEdgeDiff)) { if (bbox.bottom() < tbox.bottom()) { page_res_it.forward(); keep_going = read_t(&page_res_it, &tbox); } else { keep_going = ReadNextBox(applybox_page, &line_number, box_file, &label, &bbox); } } while (keep_going && !NearlyEqual<int>(tbox.left(), bbox.left(), kMaxBoxEdgeDiff)) { if (bbox.left() > tbox.left()) { page_res_it.forward(); keep_going = read_t(&page_res_it, &tbox); } else { keep_going = ReadNextBox(applybox_page, &line_number, box_file, &label, &bbox); } } // OCR the word if top right points of the TBOXes are similar. if (keep_going && NearlyEqual<int>(tbox.right(), bbox.right(), kMaxBoxEdgeDiff) && NearlyEqual<int>(tbox.top(), bbox.top(), kMaxBoxEdgeDiff)) { ambigs_classify_and_output(label.string(), &page_res_it, output_file); examined_words++; } page_res_it.forward(); } while (keep_going); fclose(box_file); // Set up scripts on all of the words that did not get sent to // ambigs_classify_and_output. They all should have, but if all the // werd_res's don't get uch_sets, tesseract will crash when you try // to iterate over them. :-( int total_words = 0; for (page_res_it.restart_page(); page_res_it.block() != NULL; page_res_it.forward()) { if (page_res_it.word()) { if (page_res_it.word()->uch_set == NULL) page_res_it.word()->SetupFake(unicharset); total_words++; } } if (examined_words < 0.85 * total_words) { tprintf("TODO(antonova): clean up recog_training_segmented; " " It examined only a small fraction of the ambigs image.\n"); } tprintf("recog_training_segmented: examined %d / %d words.\n", examined_words, total_words); } // Helper prints the given set of blob choices. static void PrintPath(int length, const BLOB_CHOICE** blob_choices, const UNICHARSET& unicharset, const char *label, FILE *output_file) { float rating = 0.0f; float certainty = 0.0f; for (int i = 0; i < length; ++i) { const BLOB_CHOICE* blob_choice = blob_choices[i]; fprintf(output_file, "%s", unicharset.id_to_unichar(blob_choice->unichar_id())); rating += blob_choice->rating(); if (certainty > blob_choice->certainty()) certainty = blob_choice->certainty(); } fprintf(output_file, "\t%s\t%.4f\t%.4f\n", label, rating, certainty); } // Helper recursively prints all paths through the ratings matrix, starting // at column col. static void PrintMatrixPaths(int col, int dim, const MATRIX& ratings, int length, const BLOB_CHOICE** blob_choices, const UNICHARSET& unicharset, const char *label, FILE *output_file) { for (int row = col; row < dim && row - col < ratings.bandwidth(); ++row) { if (ratings.get(col, row) != NOT_CLASSIFIED) { BLOB_CHOICE_IT bc_it(ratings.get(col, row)); for (bc_it.mark_cycle_pt(); !bc_it.cycled_list(); bc_it.forward()) { blob_choices[length] = bc_it.data(); if (row + 1 < dim) { PrintMatrixPaths(row + 1, dim, ratings, length + 1, blob_choices, unicharset, label, output_file); } else { PrintPath(length + 1, blob_choices, unicharset, label, output_file); } } } } } // Runs classify_word_pass1() on the current word. Outputs Tesseract's // raw choice as a result of the classification. For words labeled with a // single unichar also outputs all alternatives from blob_choices of the // best choice. void Tesseract::ambigs_classify_and_output(const char *label, PAGE_RES_IT* pr_it, FILE *output_file) { // Classify word. fflush(stdout); WordData word_data(*pr_it); SetupWordPassN(1, &word_data); classify_word_and_language(&Tesseract::classify_word_pass1, pr_it, &word_data); WERD_RES* werd_res = word_data.word; WERD_CHOICE *best_choice = werd_res->best_choice; ASSERT_HOST(best_choice != NULL); // Compute the number of unichars in the label. GenericVector<UNICHAR_ID> encoding; if (!unicharset.encode_string(label, true, &encoding, NULL, NULL)) { tprintf("Not outputting illegal unichar %s\n", label); return; } // Dump all paths through the ratings matrix (which is normally small). int dim = werd_res->ratings->dimension(); const BLOB_CHOICE** blob_choices = new const BLOB_CHOICE*[dim]; PrintMatrixPaths(0, dim, *werd_res->ratings, 0, blob_choices, unicharset, label, output_file); delete [] blob_choices; } } // namespace tesseract
C++
/********************************************************************** * File: pagewalk.cpp (Formerly walkers.c) * Description: Block list processors * Author: Phil Cheatle * Created: Thu Oct 10 16:25:24 BST 1991 * * (C) Copyright 1991, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include "pageres.h" #include "tesseractclass.h" /** * process_selected_words() * * Walk the current block list applying the specified word processor function * to each word that overlaps the selection_box. */ namespace tesseract { void Tesseract::process_selected_words( PAGE_RES* page_res, // blocks to check TBOX & selection_box, BOOL8(tesseract::Tesseract::*word_processor)(PAGE_RES_IT* pr_it)) { for (PAGE_RES_IT page_res_it(page_res); page_res_it.word() != NULL; page_res_it.forward()) { WERD* word = page_res_it.word()->word; if (word->bounding_box().overlap(selection_box)) { if (!(this->*word_processor)(&page_res_it)) return; } } } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: tesseractclass.h // Description: The Tesseract class. It holds/owns everything needed // to run Tesseract on a single language, and also a set of // sub-Tesseracts to run sub-languages. For thread safety, *every* // global variable goes in here, directly, or indirectly. // This makes it safe to run multiple Tesseracts in different // threads in parallel, and keeps the different language // instances separate. // Author: Ray Smith // Created: Fri Mar 07 08:17:01 PST 2008 // // (C) Copyright 2008, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_TESSERACTCLASS_H__ #define TESSERACT_CCMAIN_TESSERACTCLASS_H__ #include "allheaders.h" #include "control.h" #include "docqual.h" #include "devanagari_processing.h" #include "genericvector.h" #include "params.h" #include "ocrclass.h" #include "textord.h" #include "wordrec.h" class BLOB_CHOICE_LIST_CLIST; class BLOCK_LIST; class CharSamp; struct OSResults; class PAGE_RES; class PAGE_RES_IT; struct Pix; class ROW; class SVMenuNode; class TBOX; class TO_BLOCK_LIST; class WERD; class WERD_CHOICE; class WERD_RES; // Top-level class for all tesseract global instance data. // This class either holds or points to all data used by an instance // of Tesseract, including the memory allocator. When this is // complete, Tesseract will be thread-safe. UNTIL THEN, IT IS NOT! // // NOTE to developers: Do not create cyclic dependencies through this class! // The directory dependency tree must remain a tree! The keep this clean, // lower-level code (eg in ccutil, the bottom level) must never need to // know about the content of a higher-level directory. // The following scheme will grant the easiest access to lower-level // global members without creating a cyclic dependency: // // Class Hierarchy (^ = inheritance): // // CCUtil (ccutil/ccutil.h) // ^ Members include: UNICHARSET // CUtil (cutil/cutil_class.h) // ^ Members include: TBLOB*, TEXTBLOCK* // CCStruct (ccstruct/ccstruct.h) // ^ Members include: Image // Classify (classify/classify.h) // ^ Members include: Dict // WordRec (wordrec/wordrec.h) // ^ Members include: WERD*, DENORM* // Tesseract (ccmain/tesseractclass.h) // Members include: Pix*, CubeRecoContext*, // TesseractCubeCombiner* // // Other important classes: // // TessBaseAPI (api/baseapi.h) // Members include: BLOCK_LIST*, PAGE_RES*, // Tesseract*, ImageThresholder* // Dict (dict/dict.h) // Members include: Image* (private) // // NOTE: that each level contains members that correspond to global // data that is defined (and used) at that level, not necessarily where // the type is defined so for instance: // BOOL_VAR_H(textord_show_blobs, false, "Display unsorted blobs"); // goes inside the Textord class, not the cc_util class. namespace tesseract { class ColumnFinder; class CubeLineObject; class CubeObject; class CubeRecoContext; class EquationDetect; class Tesseract; class TesseractCubeCombiner; // A collection of various variables for statistics and debugging. struct TesseractStats { TesseractStats() : adaption_word_number(0), doc_blob_quality(0), doc_outline_errs(0), doc_char_quality(0), good_char_count(0), doc_good_char_quality(0), word_count(0), dict_words(0), tilde_crunch_written(false), last_char_was_newline(true), last_char_was_tilde(false), write_results_empty_block(true) {} inT32 adaption_word_number; inT16 doc_blob_quality; inT16 doc_outline_errs; inT16 doc_char_quality; inT16 good_char_count; inT16 doc_good_char_quality; inT32 word_count; // count of word in the document inT32 dict_words; // number of dicitionary words in the document STRING dump_words_str; // accumulator used by dump_words() // Flags used by write_results() bool tilde_crunch_written; bool last_char_was_newline; bool last_char_was_tilde; bool write_results_empty_block; }; // Struct to hold all the pointers to relevant data for processing a word. struct WordData { WordData() : word(NULL), row(NULL), block(NULL), prev_word(NULL) {} explicit WordData(const PAGE_RES_IT& page_res_it) : word(page_res_it.word()), row(page_res_it.row()->row), block(page_res_it.block()->block), prev_word(NULL) {} WordData(BLOCK* block_in, ROW* row_in, WERD_RES* word_res) : word(word_res), row(row_in), block(block_in), prev_word(NULL) {} WERD_RES* word; ROW* row; BLOCK* block; WordData* prev_word; PointerVector<WERD_RES> lang_words; }; // Definition of a Tesseract WordRecognizer. The WordData provides the context // of row/block, in_word holds an initialized, possibly pre-classified word, // that the recognizer may or may not consume (but if so it sets *in_word=NULL) // and produces one or more output words in out_words, which may be the // consumed in_word, or may be generated independently. // This api allows both a conventional tesseract classifier to work, or a // line-level classifier that generates multiple words from a merged input. typedef void (Tesseract::*WordRecognizer)(const WordData& word_data, WERD_RES** in_word, PointerVector<WERD_RES>* out_words); class Tesseract : public Wordrec { public: Tesseract(); ~Tesseract(); // Clear as much used memory as possible without resetting the adaptive // classifier or losing any other classifier data. void Clear(); // Clear all memory of adaption for this and all subclassifiers. void ResetAdaptiveClassifier(); // Clear the document dictionary for this and all subclassifiers. void ResetDocumentDictionary(); // Set the equation detector. void SetEquationDetect(EquationDetect* detector); // Simple accessors. const FCOORD& reskew() const { return reskew_; } // Destroy any existing pix and return a pointer to the pointer. Pix** mutable_pix_binary() { Clear(); return &pix_binary_; } Pix* pix_binary() const { return pix_binary_; } Pix* pix_grey() const { return pix_grey_; } void set_pix_grey(Pix* grey_pix) { pixDestroy(&pix_grey_); pix_grey_ = grey_pix; } // Returns a pointer to a Pix representing the best available image of the // page. The image will be 8-bit grey if the input was grey or color. Note // that in grey 0 is black and 255 is white. If the input was binary, then // the returned Pix will be binary. Note that here black is 1 and white is 0. // To tell the difference pixGetDepth() will return 8 or 1. // In either case, the return value is a borrowed Pix, and should not be // deleted or pixDestroyed. Pix* BestPix() const { return pix_grey_ != NULL ? pix_grey_ : pix_binary_; } void set_pix_thresholds(Pix* thresholds) { pixDestroy(&pix_thresholds_); pix_thresholds_ = thresholds; } int source_resolution() const { return source_resolution_; } void set_source_resolution(int ppi) { source_resolution_ = ppi; } int ImageWidth() const { return pixGetWidth(pix_binary_); } int ImageHeight() const { return pixGetHeight(pix_binary_); } Pix* scaled_color() const { return scaled_color_; } int scaled_factor() const { return scaled_factor_; } void SetScaledColor(int factor, Pix* color) { scaled_factor_ = factor; scaled_color_ = color; } const Textord& textord() const { return textord_; } Textord* mutable_textord() { return &textord_; } bool right_to_left() const { return right_to_left_; } int num_sub_langs() const { return sub_langs_.size(); } Tesseract* get_sub_lang(int index) const { return sub_langs_[index]; } // Returns true if any language uses Tesseract (as opposed to cube). bool AnyTessLang() const { if (tessedit_ocr_engine_mode != OEM_CUBE_ONLY) return true; for (int i = 0; i < sub_langs_.size(); ++i) { if (sub_langs_[i]->tessedit_ocr_engine_mode != OEM_CUBE_ONLY) return true; } return false; } void SetBlackAndWhitelist(); // Perform steps to prepare underlying binary image/other data structures for // page segmentation. Uses the strategy specified in the global variable // pageseg_devanagari_split_strategy for perform splitting while preparing for // page segmentation. void PrepareForPageseg(); // Perform steps to prepare underlying binary image/other data structures for // Tesseract OCR. The current segmentation is required by this method. // Uses the strategy specified in the global variable // ocr_devanagari_split_strategy for performing splitting while preparing for // Tesseract ocr. void PrepareForTessOCR(BLOCK_LIST* block_list, Tesseract* osd_tess, OSResults* osr); int SegmentPage(const STRING* input_file, BLOCK_LIST* blocks, Tesseract* osd_tess, OSResults* osr); void SetupWordScripts(BLOCK_LIST* blocks); int AutoPageSeg(PageSegMode pageseg_mode, BLOCK_LIST* blocks, TO_BLOCK_LIST* to_blocks, Tesseract* osd_tess, OSResults* osr); ColumnFinder* SetupPageSegAndDetectOrientation( bool single_column, bool osd, bool only_osd, BLOCK_LIST* blocks, Tesseract* osd_tess, OSResults* osr, TO_BLOCK_LIST* to_blocks, Pix** photo_mask_pix, Pix** music_mask_pix); // par_control.cpp void PrerecAllWordsPar(const GenericVector<WordData>& words); //// control.h ///////////////////////////////////////////////////////// bool ProcessTargetWord(const TBOX& word_box, const TBOX& target_word_box, const char* word_config, int pass); // Sets up the words ready for whichever engine is to be run void SetupAllWordsPassN(int pass_n, const TBOX* target_word_box, const char* word_config, PAGE_RES* page_res, GenericVector<WordData>* words); // Sets up the single word ready for whichever engine is to be run. void SetupWordPassN(int pass_n, WordData* word); // Runs word recognition on all the words. bool RecogAllWordsPassN(int pass_n, ETEXT_DESC* monitor, PAGE_RES_IT* pr_it, GenericVector<WordData>* words); bool recog_all_words(PAGE_RES* page_res, ETEXT_DESC* monitor, const TBOX* target_word_box, const char* word_config, int dopasses); void rejection_passes(PAGE_RES* page_res, ETEXT_DESC* monitor, const TBOX* target_word_box, const char* word_config); void bigram_correction_pass(PAGE_RES *page_res); void blamer_pass(PAGE_RES* page_res); // Sets script positions and detects smallcaps on all output words. void script_pos_pass(PAGE_RES* page_res); // Helper to recognize the word using the given (language-specific) tesseract. // Returns positive if this recognizer found more new best words than the // number kept from best_words. int RetryWithLanguage(const WordData& word_data, WordRecognizer recognizer, WERD_RES** in_word, PointerVector<WERD_RES>* best_words); void classify_word_and_language(WordRecognizer recognizer, PAGE_RES_IT* pr_it, WordData* word_data); void classify_word_pass1(const WordData& word_data, WERD_RES** in_word, PointerVector<WERD_RES>* out_words); void recog_pseudo_word(PAGE_RES* page_res, // blocks to check TBOX &selection_box); void fix_rep_char(PAGE_RES_IT* page_res_it); ACCEPTABLE_WERD_TYPE acceptable_word_string(const UNICHARSET& char_set, const char *s, const char *lengths); void match_word_pass_n(int pass_n, WERD_RES *word, ROW *row, BLOCK* block); void classify_word_pass2(const WordData& word_data, WERD_RES** in_word, PointerVector<WERD_RES>* out_words); void ReportXhtFixResult(bool accept_new_word, float new_x_ht, WERD_RES* word, WERD_RES* new_word); bool RunOldFixXht(WERD_RES *word, BLOCK* block, ROW *row); bool TrainedXheightFix(WERD_RES *word, BLOCK* block, ROW *row); BOOL8 recog_interactive(PAGE_RES_IT* pr_it); // Set fonts of this word. void set_word_fonts(WERD_RES *word); void font_recognition_pass(PAGE_RES* page_res); void dictionary_correction_pass(PAGE_RES* page_res); BOOL8 check_debug_pt(WERD_RES *word, int location); //// superscript.cpp //////////////////////////////////////////////////// bool SubAndSuperscriptFix(WERD_RES *word_res); void GetSubAndSuperscriptCandidates(const WERD_RES *word, int *num_rebuilt_leading, ScriptPos *leading_pos, float *leading_certainty, int *num_rebuilt_trailing, ScriptPos *trailing_pos, float *trailing_certainty, float *avg_certainty, float *unlikely_threshold); WERD_RES *TrySuperscriptSplits(int num_chopped_leading, float leading_certainty, ScriptPos leading_pos, int num_chopped_trailing, float trailing_certainty, ScriptPos trailing_pos, WERD_RES *word, bool *is_good, int *retry_leading, int *retry_trailing); bool BelievableSuperscript(bool debug, const WERD_RES &word, float certainty_threshold, int *left_ok, int *right_ok) const; //// cube_control.cpp /////////////////////////////////////////////////// bool init_cube_objects(bool load_combiner, TessdataManager *tessdata_manager); // Iterates through tesseract's results and calls cube on each word, // combining the results with the existing tesseract result. void run_cube_combiner(PAGE_RES *page_res); // Recognizes a single word using (only) cube. Compatible with // Tesseract's classify_word_pass1/classify_word_pass2. void cube_word_pass1(BLOCK* block, ROW *row, WERD_RES *word); // Cube recognizer to recognize a single word as with classify_word_pass1 // but also returns the cube object in case the combiner is needed. CubeObject* cube_recognize_word(BLOCK* block, WERD_RES* word); // Combines the cube and tesseract results for a single word, leaving the // result in tess_word. void cube_combine_word(CubeObject* cube_obj, WERD_RES* cube_word, WERD_RES* tess_word); // Call cube on the current word, and write the result to word. // Sets up a fake result and returns false if something goes wrong. bool cube_recognize(CubeObject *cube_obj, BLOCK* block, WERD_RES *word); void fill_werd_res(const BoxWord& cube_box_word, const char* cube_best_str, WERD_RES* tess_werd_res); bool extract_cube_state(CubeObject* cube_obj, int* num_chars, Boxa** char_boxes, CharSamp*** char_samples); bool create_cube_box_word(Boxa *char_boxes, int num_chars, TBOX word_box, BoxWord* box_word); //// output.h ////////////////////////////////////////////////////////// void output_pass(PAGE_RES_IT &page_res_it, const TBOX *target_word_box); void write_results(PAGE_RES_IT &page_res_it, // full info char newline_type, // type of newline BOOL8 force_eol // override tilde crunch? ); void set_unlv_suspects(WERD_RES *word); UNICHAR_ID get_rep_char(WERD_RES *word); // what char is repeated? BOOL8 acceptable_number_string(const char *s, const char *lengths); inT16 count_alphanums(const WERD_CHOICE &word); inT16 count_alphas(const WERD_CHOICE &word); //// tessedit.h //////////////////////////////////////////////////////// void read_config_file(const char *filename, SetParamConstraint constraint); // Initialize for potentially a set of languages defined by the language // string and recursively any additional languages required by any language // traineddata file (via tessedit_load_sublangs in its config) that is loaded. // See init_tesseract_internal for args. int init_tesseract(const char *arg0, const char *textbase, const char *language, OcrEngineMode oem, char **configs, int configs_size, const GenericVector<STRING> *vars_vec, const GenericVector<STRING> *vars_values, bool set_only_init_params); int init_tesseract(const char *datapath, const char *language, OcrEngineMode oem) { return init_tesseract(datapath, NULL, language, oem, NULL, 0, NULL, NULL, false); } // Common initialization for a single language. // arg0 is the datapath for the tessdata directory, which could be the // path of the tessdata directory with no trailing /, or (if tessdata // lives in the same directory as the executable, the path of the executable, // hence the name arg0. // textbase is an optional output file basename (used only for training) // language is the language code to load. // oem controls which engine(s) will operate on the image // configs (argv) is an array of config filenames to load variables from. // May be NULL. // configs_size (argc) is the number of elements in configs. // vars_vec is an optional vector of variables to set. // vars_values is an optional corresponding vector of values for the variables // in vars_vec. // If set_only_init_params is true, then only the initialization variables // will be set. int init_tesseract_internal(const char *arg0, const char *textbase, const char *language, OcrEngineMode oem, char **configs, int configs_size, const GenericVector<STRING> *vars_vec, const GenericVector<STRING> *vars_values, bool set_only_init_params); // Set the universal_id member of each font to be unique among all // instances of the same font loaded. void SetupUniversalFontIds(); int init_tesseract_lm(const char *arg0, const char *textbase, const char *language); void recognize_page(STRING& image_name); void end_tesseract(); bool init_tesseract_lang_data(const char *arg0, const char *textbase, const char *language, OcrEngineMode oem, char **configs, int configs_size, const GenericVector<STRING> *vars_vec, const GenericVector<STRING> *vars_values, bool set_only_init_params); void ParseLanguageString(const char* lang_str, GenericVector<STRING>* to_load, GenericVector<STRING>* not_to_load); //// pgedit.h ////////////////////////////////////////////////////////// SVMenuNode *build_menu_new(); #ifndef GRAPHICS_DISABLED void pgeditor_main(int width, int height, PAGE_RES* page_res); #endif // GRAPHICS_DISABLED void process_image_event( // action in image win const SVEvent &event); BOOL8 process_cmd_win_event( // UI command semantics inT32 cmd_event, // which menu item? char *new_value // any prompt data ); void debug_word(PAGE_RES* page_res, const TBOX &selection_box); void do_re_display( BOOL8 (tesseract::Tesseract::*word_painter)(PAGE_RES_IT* pr_it)); BOOL8 word_display(PAGE_RES_IT* pr_it); BOOL8 word_bln_display(PAGE_RES_IT* pr_it); BOOL8 word_blank_and_set_display(PAGE_RES_IT* pr_its); BOOL8 word_set_display(PAGE_RES_IT* pr_it); // #ifndef GRAPHICS_DISABLED BOOL8 word_dumper(PAGE_RES_IT* pr_it); // #endif // GRAPHICS_DISABLED void blob_feature_display(PAGE_RES* page_res, const TBOX& selection_box); //// reject.h ////////////////////////////////////////////////////////// // make rej map for word void make_reject_map(WERD_RES *word, ROW *row, inT16 pass); BOOL8 one_ell_conflict(WERD_RES *word_res, BOOL8 update_map); inT16 first_alphanum_index(const char *word, const char *word_lengths); inT16 first_alphanum_offset(const char *word, const char *word_lengths); inT16 alpha_count(const char *word, const char *word_lengths); BOOL8 word_contains_non_1_digit(const char *word, const char *word_lengths); void dont_allow_1Il(WERD_RES *word); inT16 count_alphanums( //how many alphanums WERD_RES *word); void flip_0O(WERD_RES *word); BOOL8 non_0_digit(const UNICHARSET& ch_set, UNICHAR_ID unichar_id); BOOL8 non_O_upper(const UNICHARSET& ch_set, UNICHAR_ID unichar_id); BOOL8 repeated_nonalphanum_wd(WERD_RES *word, ROW *row); void nn_match_word( //Match a word WERD_RES *word, ROW *row); void nn_recover_rejects(WERD_RES *word, ROW *row); void set_done( //set done flag WERD_RES *word, inT16 pass); inT16 safe_dict_word(const WERD_RES *werd_res); // is best_choice in dict? void flip_hyphens(WERD_RES *word); void reject_I_1_L(WERD_RES *word); void reject_edge_blobs(WERD_RES *word); void reject_mostly_rejects(WERD_RES *word); //// adaptions.h /////////////////////////////////////////////////////// BOOL8 word_adaptable( //should we adapt? WERD_RES *word, uinT16 mode); //// tfacepp.cpp /////////////////////////////////////////////////////// void recog_word_recursive(WERD_RES* word); void recog_word(WERD_RES *word); void split_and_recog_word(WERD_RES* word); void split_word(WERD_RES *word, int split_pt, WERD_RES **right_piece, BlamerBundle **orig_blamer_bundle) const; void join_words(WERD_RES *word, WERD_RES *word2, BlamerBundle *orig_bb) const; //// fixspace.cpp /////////////////////////////////////////////////////// BOOL8 digit_or_numeric_punct(WERD_RES *word, int char_position); inT16 eval_word_spacing(WERD_RES_LIST &word_res_list); void match_current_words(WERD_RES_LIST &words, ROW *row, BLOCK* block); inT16 fp_eval_word_spacing(WERD_RES_LIST &word_res_list); void fix_noisy_space_list(WERD_RES_LIST &best_perm, ROW *row, BLOCK* block); void fix_fuzzy_space_list(WERD_RES_LIST &best_perm, ROW *row, BLOCK* block); void fix_sp_fp_word(WERD_RES_IT &word_res_it, ROW *row, BLOCK* block); void fix_fuzzy_spaces( //find fuzzy words ETEXT_DESC *monitor, //progress monitor inT32 word_count, //count of words in doc PAGE_RES *page_res); void dump_words(WERD_RES_LIST &perm, inT16 score, inT16 mode, BOOL8 improved); BOOL8 fixspace_thinks_word_done(WERD_RES *word); inT16 worst_noise_blob(WERD_RES *word_res, float *worst_noise_score); float blob_noise_score(TBLOB *blob); void break_noisiest_blob_word(WERD_RES_LIST &words); //// docqual.cpp //////////////////////////////////////////////////////// GARBAGE_LEVEL garbage_word(WERD_RES *word, BOOL8 ok_dict_word); BOOL8 potential_word_crunch(WERD_RES *word, GARBAGE_LEVEL garbage_level, BOOL8 ok_dict_word); void tilde_crunch(PAGE_RES_IT &page_res_it); void unrej_good_quality_words( //unreject potential PAGE_RES_IT &page_res_it); void doc_and_block_rejection( //reject big chunks PAGE_RES_IT &page_res_it, BOOL8 good_quality_doc); void quality_based_rejection(PAGE_RES_IT &page_res_it, BOOL8 good_quality_doc); void convert_bad_unlv_chs(WERD_RES *word_res); void tilde_delete(PAGE_RES_IT &page_res_it); inT16 word_blob_quality(WERD_RES *word, ROW *row); void word_char_quality(WERD_RES *word, ROW *row, inT16 *match_count, inT16 *accepted_match_count); void unrej_good_chs(WERD_RES *word, ROW *row); inT16 count_outline_errs(char c, inT16 outline_count); inT16 word_outline_errs(WERD_RES *word); BOOL8 terrible_word_crunch(WERD_RES *word, GARBAGE_LEVEL garbage_level); CRUNCH_MODE word_deletable(WERD_RES *word, inT16 &delete_mode); inT16 failure_count(WERD_RES *word); BOOL8 noise_outlines(TWERD *word); //// pagewalk.cpp /////////////////////////////////////////////////////// void process_selected_words ( PAGE_RES* page_res, // blocks to check //function to call TBOX & selection_box, BOOL8 (tesseract::Tesseract::*word_processor)(PAGE_RES_IT* pr_it)); //// tessbox.cpp /////////////////////////////////////////////////////// void tess_add_doc_word( //test acceptability WERD_CHOICE *word_choice //after context ); void tess_segment_pass_n(int pass_n, WERD_RES *word); bool tess_acceptable_word(WERD_RES *word); //// applybox.cpp ////////////////////////////////////////////////////// // Applies the box file based on the image name fname, and resegments // the words in the block_list (page), with: // blob-mode: one blob per line in the box file, words as input. // word/line-mode: one blob per space-delimited unit after the #, and one word // per line in the box file. (See comment above for box file format.) // If find_segmentation is true, (word/line mode) then the classifier is used // to re-segment words/lines to match the space-delimited truth string for // each box. In this case, the input box may be for a word or even a whole // text line, and the output words will contain multiple blobs corresponding // to the space-delimited input string. // With find_segmentation false, no classifier is needed, but the chopper // can still be used to correctly segment touching characters with the help // of the input boxes. // In the returned PAGE_RES, the WERD_RES are setup as they would be returned // from normal classification, ie. with a word, chopped_word, rebuild_word, // seam_array, denorm, box_word, and best_state, but NO best_choice or // raw_choice, as they would require a UNICHARSET, which we aim to avoid. // Instead, the correct_text member of WERD_RES is set, and this may be later // converted to a best_choice using CorrectClassifyWords. CorrectClassifyWords // is not required before calling ApplyBoxTraining. PAGE_RES* ApplyBoxes(const STRING& fname, bool find_segmentation, BLOCK_LIST *block_list); // Any row xheight that is significantly different from the median is set // to the median. void PreenXHeights(BLOCK_LIST *block_list); // Builds a PAGE_RES from the block_list in the way required for ApplyBoxes: // All fuzzy spaces are removed, and all the words are maximally chopped. PAGE_RES* SetupApplyBoxes(const GenericVector<TBOX>& boxes, BLOCK_LIST *block_list); // Tests the chopper by exhaustively running chop_one_blob. // The word_res will contain filled chopped_word, seam_array, denorm, // box_word and best_state for the maximally chopped word. void MaximallyChopWord(const GenericVector<TBOX>& boxes, BLOCK* block, ROW* row, WERD_RES* word_res); // Gather consecutive blobs that match the given box into the best_state // and corresponding correct_text. // Fights over which box owns which blobs are settled by pre-chopping and // applying the blobs to box or next_box with the least non-overlap. // Returns false if the box was in error, which can only be caused by // failing to find an appropriate blob for a box. // This means that occasionally, blobs may be incorrectly segmented if the // chopper fails to find a suitable chop point. bool ResegmentCharBox(PAGE_RES* page_res, const TBOX *prev_box, const TBOX& box, const TBOX& next_box, const char* correct_text); // Consume all source blobs that strongly overlap the given box, // putting them into a new word, with the correct_text label. // Fights over which box owns which blobs are settled by // applying the blobs to box or next_box with the least non-overlap. // Returns false if the box was in error, which can only be caused by // failing to find an overlapping blob for a box. bool ResegmentWordBox(BLOCK_LIST *block_list, const TBOX& box, const TBOX& next_box, const char* correct_text); // Resegments the words by running the classifier in an attempt to find the // correct segmentation that produces the required string. void ReSegmentByClassification(PAGE_RES* page_res); // Converts the space-delimited string of utf8 text to a vector of UNICHAR_ID. // Returns false if an invalid UNICHAR_ID is encountered. bool ConvertStringToUnichars(const char* utf8, GenericVector<UNICHAR_ID>* class_ids); // Resegments the word to achieve the target_text from the classifier. // Returns false if the re-segmentation fails. // Uses brute-force combination of upto kMaxGroupSize adjacent blobs, and // applies a full search on the classifier results to find the best classified // segmentation. As a compromise to obtain better recall, 1-1 ambigiguity // substitutions ARE used. bool FindSegmentation(const GenericVector<UNICHAR_ID>& target_text, WERD_RES* word_res); // Recursive helper to find a match to the target_text (from text_index // position) in the choices (from choices_pos position). // Choices is an array of GenericVectors, of length choices_length, with each // element representing a starting position in the word, and the // GenericVector holding classification results for a sequence of consecutive // blobs, with index 0 being a single blob, index 1 being 2 blobs etc. void SearchForText(const GenericVector<BLOB_CHOICE_LIST*>* choices, int choices_pos, int choices_length, const GenericVector<UNICHAR_ID>& target_text, int text_index, float rating, GenericVector<int>* segmentation, float* best_rating, GenericVector<int>* best_segmentation); // Counts up the labelled words and the blobs within. // Deletes all unused or emptied words, counting the unused ones. // Resets W_BOL and W_EOL flags correctly. // Builds the rebuild_word and rebuilds the box_word. void TidyUp(PAGE_RES* page_res); // Logs a bad box by line in the box file and box coords. void ReportFailedBox(int boxfile_lineno, TBOX box, const char *box_ch, const char *err_msg); // Creates a fake best_choice entry in each WERD_RES with the correct text. void CorrectClassifyWords(PAGE_RES* page_res); // Call LearnWord to extract features for labelled blobs within each word. // Features are written to the given filename. void ApplyBoxTraining(const STRING& filename, PAGE_RES* page_res); //// fixxht.cpp /////////////////////////////////////////////////////// // Returns the number of misfit blob tops in this word. int CountMisfitTops(WERD_RES *word_res); // Returns a new x-height in pixels (original image coords) that is // maximally compatible with the result in word_res. // Returns 0.0f if no x-height is found that is better than the current // estimate. float ComputeCompatibleXheight(WERD_RES *word_res); //// Data members /////////////////////////////////////////////////////// // TODO(ocr-team): Find and remove obsolete parameters. BOOL_VAR_H(tessedit_resegment_from_boxes, false, "Take segmentation and labeling from box file"); BOOL_VAR_H(tessedit_resegment_from_line_boxes, false, "Conversion of word/line box file to char box file"); BOOL_VAR_H(tessedit_train_from_boxes, false, "Generate training data from boxed chars"); BOOL_VAR_H(tessedit_make_boxes_from_boxes, false, "Generate more boxes from boxed chars"); BOOL_VAR_H(tessedit_dump_pageseg_images, false, "Dump intermediate images made during page segmentation"); INT_VAR_H(tessedit_pageseg_mode, PSM_SINGLE_BLOCK, "Page seg mode: 0=osd only, 1=auto+osd, 2=auto, 3=col, 4=block," " 5=line, 6=word, 7=char" " (Values from PageSegMode enum in publictypes.h)"); INT_VAR_H(tessedit_ocr_engine_mode, tesseract::OEM_TESSERACT_ONLY, "Which OCR engine(s) to run (Tesseract, Cube, both). Defaults" " to loading and running only Tesseract (no Cube, no combiner)." " (Values from OcrEngineMode enum in tesseractclass.h)"); STRING_VAR_H(tessedit_char_blacklist, "", "Blacklist of chars not to recognize"); STRING_VAR_H(tessedit_char_whitelist, "", "Whitelist of chars to recognize"); STRING_VAR_H(tessedit_char_unblacklist, "", "List of chars to override tessedit_char_blacklist"); BOOL_VAR_H(tessedit_ambigs_training, false, "Perform training for ambiguities"); INT_VAR_H(pageseg_devanagari_split_strategy, tesseract::ShiroRekhaSplitter::NO_SPLIT, "Whether to use the top-line splitting process for Devanagari " "documents while performing page-segmentation."); INT_VAR_H(ocr_devanagari_split_strategy, tesseract::ShiroRekhaSplitter::NO_SPLIT, "Whether to use the top-line splitting process for Devanagari " "documents while performing ocr."); STRING_VAR_H(tessedit_write_params_to_file, "", "Write all parameters to the given file."); BOOL_VAR_H(tessedit_adaption_debug, false, "Generate and print debug information for adaption"); INT_VAR_H(bidi_debug, 0, "Debug level for BiDi"); INT_VAR_H(applybox_debug, 1, "Debug level"); INT_VAR_H(applybox_page, 0, "Page number to apply boxes from"); STRING_VAR_H(applybox_exposure_pattern, ".exp", "Exposure value follows this pattern in the image" " filename. The name of the image files are expected" " to be in the form [lang].[fontname].exp[num].tif"); BOOL_VAR_H(applybox_learn_chars_and_char_frags_mode, false, "Learn both character fragments (as is done in the" " special low exposure mode) as well as unfragmented" " characters."); BOOL_VAR_H(applybox_learn_ngrams_mode, false, "Each bounding box is assumed to contain ngrams. Only" " learn the ngrams whose outlines overlap horizontally."); BOOL_VAR_H(tessedit_display_outwords, false, "Draw output words"); BOOL_VAR_H(tessedit_dump_choices, false, "Dump char choices"); BOOL_VAR_H(tessedit_timing_debug, false, "Print timing stats"); BOOL_VAR_H(tessedit_fix_fuzzy_spaces, true, "Try to improve fuzzy spaces"); BOOL_VAR_H(tessedit_unrej_any_wd, false, "Dont bother with word plausibility"); BOOL_VAR_H(tessedit_fix_hyphens, true, "Crunch double hyphens?"); BOOL_VAR_H(tessedit_redo_xheight, true, "Check/Correct x-height"); BOOL_VAR_H(tessedit_enable_doc_dict, true, "Add words to the document dictionary"); BOOL_VAR_H(tessedit_debug_fonts, false, "Output font info per char"); BOOL_VAR_H(tessedit_debug_block_rejection, false, "Block and Row stats"); BOOL_VAR_H(tessedit_enable_bigram_correction, true, "Enable correction based on the word bigram dictionary."); BOOL_VAR_H(tessedit_enable_dict_correction, false, "Enable single word correction based on the dictionary."); INT_VAR_H(tessedit_bigram_debug, 0, "Amount of debug output for bigram " "correction."); INT_VAR_H(debug_x_ht_level, 0, "Reestimate debug"); BOOL_VAR_H(debug_acceptable_wds, false, "Dump word pass/fail chk"); STRING_VAR_H(chs_leading_punct, "('`\"", "Leading punctuation"); STRING_VAR_H(chs_trailing_punct1, ").,;:?!", "1st Trailing punctuation"); STRING_VAR_H(chs_trailing_punct2, ")'`\"", "2nd Trailing punctuation"); double_VAR_H(quality_rej_pc, 0.08, "good_quality_doc lte rejection limit"); double_VAR_H(quality_blob_pc, 0.0, "good_quality_doc gte good blobs limit"); double_VAR_H(quality_outline_pc, 1.0, "good_quality_doc lte outline error limit"); double_VAR_H(quality_char_pc, 0.95, "good_quality_doc gte good char limit"); INT_VAR_H(quality_min_initial_alphas_reqd, 2, "alphas in a good word"); INT_VAR_H(tessedit_tess_adaption_mode, 0x27, "Adaptation decision algorithm for tess"); BOOL_VAR_H(tessedit_minimal_rej_pass1, false, "Do minimal rejection on pass 1 output"); BOOL_VAR_H(tessedit_test_adaption, false, "Test adaption criteria"); BOOL_VAR_H(tessedit_matcher_log, false, "Log matcher activity"); INT_VAR_H(tessedit_test_adaption_mode, 3, "Adaptation decision algorithm for tess"); BOOL_VAR_H(test_pt, false, "Test for point"); double_VAR_H(test_pt_x, 99999.99, "xcoord"); double_VAR_H(test_pt_y, 99999.99, "ycoord"); INT_VAR_H(paragraph_debug_level, 0, "Print paragraph debug info."); BOOL_VAR_H(paragraph_text_based, true, "Run paragraph detection on the post-text-recognition " "(more accurate)"); INT_VAR_H(cube_debug_level, 1, "Print cube debug info."); STRING_VAR_H(outlines_odd, "%| ", "Non standard number of outlines"); STRING_VAR_H(outlines_2, "ij!?%\":;", "Non standard number of outlines"); BOOL_VAR_H(docqual_excuse_outline_errs, false, "Allow outline errs in unrejection?"); BOOL_VAR_H(tessedit_good_quality_unrej, true, "Reduce rejection on good docs"); BOOL_VAR_H(tessedit_use_reject_spaces, true, "Reject spaces?"); double_VAR_H(tessedit_reject_doc_percent, 65.00, "%rej allowed before rej whole doc"); double_VAR_H(tessedit_reject_block_percent, 45.00, "%rej allowed before rej whole block"); double_VAR_H(tessedit_reject_row_percent, 40.00, "%rej allowed before rej whole row"); double_VAR_H(tessedit_whole_wd_rej_row_percent, 70.00, "Number of row rejects in whole word rejects" "which prevents whole row rejection"); BOOL_VAR_H(tessedit_preserve_blk_rej_perfect_wds, true, "Only rej partially rejected words in block rejection"); BOOL_VAR_H(tessedit_preserve_row_rej_perfect_wds, true, "Only rej partially rejected words in row rejection"); BOOL_VAR_H(tessedit_dont_blkrej_good_wds, false, "Use word segmentation quality metric"); BOOL_VAR_H(tessedit_dont_rowrej_good_wds, false, "Use word segmentation quality metric"); INT_VAR_H(tessedit_preserve_min_wd_len, 2, "Only preserve wds longer than this"); BOOL_VAR_H(tessedit_row_rej_good_docs, true, "Apply row rejection to good docs"); double_VAR_H(tessedit_good_doc_still_rowrej_wd, 1.1, "rej good doc wd if more than this fraction rejected"); BOOL_VAR_H(tessedit_reject_bad_qual_wds, true, "Reject all bad quality wds"); BOOL_VAR_H(tessedit_debug_doc_rejection, false, "Page stats"); BOOL_VAR_H(tessedit_debug_quality_metrics, false, "Output data to debug file"); BOOL_VAR_H(bland_unrej, false, "unrej potential with no chekcs"); double_VAR_H(quality_rowrej_pc, 1.1, "good_quality_doc gte good char limit"); BOOL_VAR_H(unlv_tilde_crunching, true, "Mark v.bad words for tilde crunch"); BOOL_VAR_H(hocr_font_info, false, "Add font info to hocr output"); BOOL_VAR_H(crunch_early_merge_tess_fails, true, "Before word crunch?"); BOOL_VAR_H(crunch_early_convert_bad_unlv_chs, false, "Take out ~^ early?"); double_VAR_H(crunch_terrible_rating, 80.0, "crunch rating lt this"); BOOL_VAR_H(crunch_terrible_garbage, true, "As it says"); double_VAR_H(crunch_poor_garbage_cert, -9.0, "crunch garbage cert lt this"); double_VAR_H(crunch_poor_garbage_rate, 60, "crunch garbage rating lt this"); double_VAR_H(crunch_pot_poor_rate, 40, "POTENTIAL crunch rating lt this"); double_VAR_H(crunch_pot_poor_cert, -8.0, "POTENTIAL crunch cert lt this"); BOOL_VAR_H(crunch_pot_garbage, true, "POTENTIAL crunch garbage"); double_VAR_H(crunch_del_rating, 60, "POTENTIAL crunch rating lt this"); double_VAR_H(crunch_del_cert, -10.0, "POTENTIAL crunch cert lt this"); double_VAR_H(crunch_del_min_ht, 0.7, "Del if word ht lt xht x this"); double_VAR_H(crunch_del_max_ht, 3.0, "Del if word ht gt xht x this"); double_VAR_H(crunch_del_min_width, 3.0, "Del if word width lt xht x this"); double_VAR_H(crunch_del_high_word, 1.5, "Del if word gt xht x this above bl"); double_VAR_H(crunch_del_low_word, 0.5, "Del if word gt xht x this below bl"); double_VAR_H(crunch_small_outlines_size, 0.6, "Small if lt xht x this"); INT_VAR_H(crunch_rating_max, 10, "For adj length in rating per ch"); INT_VAR_H(crunch_pot_indicators, 1, "How many potential indicators needed"); BOOL_VAR_H(crunch_leave_ok_strings, true, "Dont touch sensible strings"); BOOL_VAR_H(crunch_accept_ok, true, "Use acceptability in okstring"); BOOL_VAR_H(crunch_leave_accept_strings, false, "Dont pot crunch sensible strings"); BOOL_VAR_H(crunch_include_numerals, false, "Fiddle alpha figures"); INT_VAR_H(crunch_leave_lc_strings, 4, "Dont crunch words with long lower case strings"); INT_VAR_H(crunch_leave_uc_strings, 4, "Dont crunch words with long lower case strings"); INT_VAR_H(crunch_long_repetitions, 3, "Crunch words with long repetitions"); INT_VAR_H(crunch_debug, 0, "As it says"); INT_VAR_H(fixsp_non_noise_limit, 1, "How many non-noise blbs either side?"); double_VAR_H(fixsp_small_outlines_size, 0.28, "Small if lt xht x this"); BOOL_VAR_H(tessedit_prefer_joined_punct, false, "Reward punctation joins"); INT_VAR_H(fixsp_done_mode, 1, "What constitues done for spacing"); INT_VAR_H(debug_fix_space_level, 0, "Contextual fixspace debug"); STRING_VAR_H(numeric_punctuation, ".,", "Punct. chs expected WITHIN numbers"); INT_VAR_H(x_ht_acceptance_tolerance, 8, "Max allowed deviation of blob top outside of font data"); INT_VAR_H(x_ht_min_change, 8, "Min change in xht before actually trying it"); INT_VAR_H(superscript_debug, 0, "Debug level for sub & superscript fixer"); double_VAR_H(superscript_worse_certainty, 2.0, "How many times worse " "certainty does a superscript position glyph need to be for us " "to try classifying it as a char with a different baseline?"); double_VAR_H(superscript_bettered_certainty, 0.97, "What reduction in " "badness do we think sufficient to choose a superscript over " "what we'd thought. For example, a value of 0.6 means we want " "to reduce badness of certainty by 40%"); double_VAR_H(superscript_scaledown_ratio, 0.4, "A superscript scaled down more than this is unbelievably " "small. For example, 0.3 means we expect the font size to " "be no smaller than 30% of the text line font size."); double_VAR_H(subscript_max_y_top, 0.5, "Maximum top of a character measured as a multiple of x-height " "above the baseline for us to reconsider whether it's a " "subscript."); double_VAR_H(superscript_min_y_bottom, 0.3, "Minimum bottom of a character measured as a multiple of " "x-height above the baseline for us to reconsider whether it's " "a superscript."); BOOL_VAR_H(tessedit_write_block_separators, false, "Write block separators in output"); BOOL_VAR_H(tessedit_write_rep_codes, false, "Write repetition char code"); BOOL_VAR_H(tessedit_write_unlv, false, "Write .unlv output file"); BOOL_VAR_H(tessedit_create_txt, true, "Write .txt output file"); BOOL_VAR_H(tessedit_create_hocr, false, "Write .html hOCR output file"); BOOL_VAR_H(tessedit_create_pdf, false, "Write .pdf output file"); STRING_VAR_H(unrecognised_char, "|", "Output char for unidentified blobs"); INT_VAR_H(suspect_level, 99, "Suspect marker level"); INT_VAR_H(suspect_space_level, 100, "Min suspect level for rejecting spaces"); INT_VAR_H(suspect_short_words, 2, "Dont Suspect dict wds longer than this"); BOOL_VAR_H(suspect_constrain_1Il, false, "UNLV keep 1Il chars rejected"); double_VAR_H(suspect_rating_per_ch, 999.9, "Dont touch bad rating limit"); double_VAR_H(suspect_accept_rating, -999.9, "Accept good rating limit"); BOOL_VAR_H(tessedit_minimal_rejection, false, "Only reject tess failures"); BOOL_VAR_H(tessedit_zero_rejection, false, "Dont reject ANYTHING"); BOOL_VAR_H(tessedit_word_for_word, false, "Make output have exactly one word per WERD"); BOOL_VAR_H(tessedit_zero_kelvin_rejection, false, "Dont reject ANYTHING AT ALL"); BOOL_VAR_H(tessedit_consistent_reps, true, "Force all rep chars the same"); INT_VAR_H(tessedit_reject_mode, 0, "Rejection algorithm"); BOOL_VAR_H(tessedit_rejection_debug, false, "Adaption debug"); BOOL_VAR_H(tessedit_flip_0O, true, "Contextual 0O O0 flips"); double_VAR_H(tessedit_lower_flip_hyphen, 1.5, "Aspect ratio dot/hyphen test"); double_VAR_H(tessedit_upper_flip_hyphen, 1.8, "Aspect ratio dot/hyphen test"); BOOL_VAR_H(rej_trust_doc_dawg, false, "Use DOC dawg in 11l conf. detector"); BOOL_VAR_H(rej_1Il_use_dict_word, false, "Use dictword test"); BOOL_VAR_H(rej_1Il_trust_permuter_type, true, "Dont double check"); BOOL_VAR_H(rej_use_tess_accepted, true, "Individual rejection control"); BOOL_VAR_H(rej_use_tess_blanks, true, "Individual rejection control"); BOOL_VAR_H(rej_use_good_perm, true, "Individual rejection control"); BOOL_VAR_H(rej_use_sensible_wd, false, "Extend permuter check"); BOOL_VAR_H(rej_alphas_in_number_perm, false, "Extend permuter check"); double_VAR_H(rej_whole_of_mostly_reject_word_fract, 0.85, "if >this fract"); INT_VAR_H(tessedit_image_border, 2, "Rej blbs near image edge limit"); STRING_VAR_H(ok_repeated_ch_non_alphanum_wds, "-?*\075", "Allow NN to unrej"); STRING_VAR_H(conflict_set_I_l_1, "Il1[]", "Il1 conflict set"); INT_VAR_H(min_sane_x_ht_pixels, 8, "Reject any x-ht lt or eq than this"); BOOL_VAR_H(tessedit_create_boxfile, false, "Output text with boxes"); INT_VAR_H(tessedit_page_number, -1, "-1 -> All pages, else specifc page to process"); BOOL_VAR_H(tessedit_write_images, false, "Capture the image from the IPE"); BOOL_VAR_H(interactive_display_mode, false, "Run interactively?"); STRING_VAR_H(file_type, ".tif", "Filename extension"); BOOL_VAR_H(tessedit_override_permuter, true, "According to dict_word"); INT_VAR_H(tessdata_manager_debug_level, 0, "Debug level for TessdataManager functions."); STRING_VAR_H(tessedit_load_sublangs, "", "List of languages to load with this one"); BOOL_VAR_H(tessedit_use_primary_params_model, false, "In multilingual mode use params model of the primary language"); // Min acceptable orientation margin (difference in scores between top and 2nd // choice in OSResults::orientations) to believe the page orientation. double_VAR_H(min_orientation_margin, 7.0, "Min acceptable orientation margin"); BOOL_VAR_H(textord_tabfind_show_vlines, false, "Debug line finding"); BOOL_VAR_H(textord_use_cjk_fp_model, FALSE, "Use CJK fixed pitch model"); BOOL_VAR_H(poly_allow_detailed_fx, false, "Allow feature extractors to see the original outline"); BOOL_VAR_H(tessedit_init_config_only, false, "Only initialize with the config file. Useful if the instance is " "not going to be used for OCR but say only for layout analysis."); BOOL_VAR_H(textord_equation_detect, false, "Turn on equation detector"); BOOL_VAR_H(textord_tabfind_vertical_text, true, "Enable vertical detection"); BOOL_VAR_H(textord_tabfind_force_vertical_text, false, "Force using vertical text page mode"); double_VAR_H(textord_tabfind_vertical_text_ratio, 0.5, "Fraction of textlines deemed vertical to use vertical page " "mode"); double_VAR_H(textord_tabfind_aligned_gap_fraction, 0.75, "Fraction of height used as a minimum gap for aligned blobs."); INT_VAR_H(tessedit_parallelize, 0, "Run in parallel where possible"); BOOL_VAR_H(preserve_interword_spaces, false, "Preserve multiple interword spaces"); BOOL_VAR_H(include_page_breaks, false, "Include page separator string in output text after each " "image/page."); STRING_VAR_H(page_separator, "\f", "Page separator (default is form feed control character)"); // The following parameters were deprecated and removed from their original // locations. The parameters are temporarily kept here to give Tesseract // users a chance to updated their [lang].traineddata and config files // without introducing failures during Tesseract initialization. // TODO(ocr-team): remove these parameters from the code once we are // reasonably sure that Tesseract users have updated their data files. // // BEGIN DEPRECATED PARAMETERS BOOL_VAR_H(textord_tabfind_vertical_horizontal_mix, true, "find horizontal lines such as headers in vertical page mode"); INT_VAR_H(tessedit_ok_mode, 5, "Acceptance decision algorithm"); BOOL_VAR_H(load_fixed_length_dawgs, true, "Load fixed length" " dawgs (e.g. for non-space delimited languages)"); INT_VAR_H(segment_debug, 0, "Debug the whole segmentation process"); BOOL_VAR_H(permute_debug, 0, "char permutation debug"); double_VAR_H(bestrate_pruning_factor, 2.0, "Multiplying factor of" " current best rate to prune other hypotheses"); BOOL_VAR_H(permute_script_word, 0, "Turn on word script consistency permuter"); BOOL_VAR_H(segment_segcost_rating, 0, "incorporate segmentation cost in word rating?"); double_VAR_H(segment_reward_script, 0.95, "Score multipler for script consistency within a word. " "Being a 'reward' factor, it should be <= 1. " "Smaller value implies bigger reward."); BOOL_VAR_H(permute_fixed_length_dawg, 0, "Turn on fixed-length phrasebook search permuter"); BOOL_VAR_H(permute_chartype_word, 0, "Turn on character type (property) consistency permuter"); double_VAR_H(segment_reward_chartype, 0.97, "Score multipler for char type consistency within a word. "); double_VAR_H(segment_reward_ngram_best_choice, 0.99, "Score multipler for ngram permuter's best choice" " (only used in the Han script path)."); BOOL_VAR_H(ngram_permuter_activated, false, "Activate character-level n-gram-based permuter"); BOOL_VAR_H(permute_only_top, false, "Run only the top choice permuter"); INT_VAR_H(language_model_fixed_length_choices_depth, 3, "Depth of blob choice lists to explore" " when fixed length dawgs are on"); BOOL_VAR_H(use_new_state_cost, FALSE, "use new state cost heuristics for segmentation state evaluation"); double_VAR_H(heuristic_segcost_rating_base, 1.25, "base factor for adding segmentation cost into word rating." "It's a multiplying factor, the larger the value above 1, " "the bigger the effect of segmentation cost."); double_VAR_H(heuristic_weight_rating, 1, "weight associated with char rating in combined cost of state"); double_VAR_H(heuristic_weight_width, 1000.0, "weight associated with width evidence in combined cost of" " state"); double_VAR_H(heuristic_weight_seamcut, 0, "weight associated with seam cut in combined cost of state"); double_VAR_H(heuristic_max_char_wh_ratio, 2.0, "max char width-to-height ratio allowed in segmentation"); BOOL_VAR_H(enable_new_segsearch, false, "Enable new segmentation search path."); double_VAR_H(segsearch_max_fixed_pitch_char_wh_ratio, 2.0, "Maximum character width-to-height ratio for" "fixed pitch fonts"); // END DEPRECATED PARAMETERS //// ambigsrecog.cpp ///////////////////////////////////////////////////////// FILE *init_recog_training(const STRING &fname); void recog_training_segmented(const STRING &fname, PAGE_RES *page_res, volatile ETEXT_DESC *monitor, FILE *output_file); void ambigs_classify_and_output(const char *label, PAGE_RES_IT* pr_it, FILE *output_file); inline CubeRecoContext *GetCubeRecoContext() { return cube_cntxt_; } private: // The filename of a backup config file. If not null, then we currently // have a temporary debug config file loaded, and backup_config_file_ // will be loaded, and set to null when debug is complete. const char* backup_config_file_; // The filename of a config file to read when processing a debug word. STRING word_config_; // Image used for input to layout analysis and tesseract recognition. // May be modified by the ShiroRekhaSplitter to eliminate the top-line. Pix* pix_binary_; // Unmodified image used for input to cube. Always valid. Pix* cube_binary_; // Grey-level input image if the input was not binary, otherwise NULL. Pix* pix_grey_; // Thresholds that were used to generate the thresholded image from grey. Pix* pix_thresholds_; // Input image resolution after any scaling. The resolution is not well // transmitted by operations on Pix, so we keep an independent record here. int source_resolution_; // The shiro-rekha splitter object which is used to split top-lines in // Devanagari words to provide a better word and grapheme segmentation. ShiroRekhaSplitter splitter_; // Page segmentation/layout Textord textord_; // True if the primary language uses right_to_left reading order. bool right_to_left_; Pix* scaled_color_; int scaled_factor_; FCOORD deskew_; FCOORD reskew_; TesseractStats stats_; // Sub-languages to be tried in addition to this. GenericVector<Tesseract*> sub_langs_; // Most recently used Tesseract out of this and sub_langs_. The default // language for the next word. Tesseract* most_recently_used_; // The size of the font table, ie max possible font id + 1. int font_table_size_; // Cube objects. CubeRecoContext* cube_cntxt_; TesseractCubeCombiner *tess_cube_combiner_; // Equation detector. Note: this pointer is NOT owned by the class. EquationDetect* equ_detect_; }; } // namespace tesseract #endif // TESSERACT_CCMAIN_TESSERACTCLASS_H__
C++
/********************************************************************** * File: reject.cpp (Formerly reject.c) * Description: Rejection functions used in tessedit * Author: Phil Cheatle * Created: Wed Sep 23 16:50:21 BST 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #pragma warning(disable:4305) // int/float warnings #endif #include "tessvars.h" #ifdef __UNIX__ #include <assert.h> #include <errno.h> #endif #include "scanutils.h" #include <ctype.h> #include <string.h> #include "genericvector.h" #include "reject.h" #include "control.h" #include "docqual.h" #include "globaloc.h" // For err_exit. #include "globals.h" #include "helpers.h" #include "tesseractclass.h" // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif CLISTIZEH (STRING) CLISTIZE (STRING) /************************************************************************* * set_done() * * Set the done flag based on the word acceptability criteria *************************************************************************/ namespace tesseract { void Tesseract::set_done(WERD_RES *word, inT16 pass) { word->done = word->tess_accepted && (strchr(word->best_choice->unichar_string().string(), ' ') == NULL); bool word_is_ambig = word->best_choice->dangerous_ambig_found(); bool word_from_dict = word->best_choice->permuter() == SYSTEM_DAWG_PERM || word->best_choice->permuter() == FREQ_DAWG_PERM || word->best_choice->permuter() == USER_DAWG_PERM; if (word->done && (pass == 1) && (!word_from_dict || word_is_ambig) && one_ell_conflict(word, FALSE)) { if (tessedit_rejection_debug) tprintf("one_ell_conflict detected\n"); word->done = FALSE; } if (word->done && ((!word_from_dict && word->best_choice->permuter() != NUMBER_PERM) || word_is_ambig)) { if (tessedit_rejection_debug) tprintf("non-dict or ambig word detected\n"); word->done = FALSE; } if (tessedit_rejection_debug) { tprintf("set_done(): done=%d\n", word->done); word->best_choice->print(""); } } /************************************************************************* * make_reject_map() * * Sets the done flag to indicate whether the resylt is acceptable. * * Sets a reject map for the word. *************************************************************************/ void Tesseract::make_reject_map(WERD_RES *word, ROW *row, inT16 pass) { int i; int offset; flip_0O(word); check_debug_pt(word, -1); // For trap only set_done(word, pass); // Set acceptance word->reject_map.initialise(word->best_choice->unichar_lengths().length()); reject_blanks(word); /* 0: Rays original heuristic - the baseline */ if (tessedit_reject_mode == 0) { if (!word->done) reject_poor_matches(word); } else if (tessedit_reject_mode == 5) { /* 5: Reject I/1/l from words where there is no strong contextual confirmation; the whole of any unacceptable words (incl PERM rej of dubious 1/I/ls); and the whole of any words which are very small */ if (kBlnXHeight / word->denorm.y_scale() <= min_sane_x_ht_pixels) { word->reject_map.rej_word_small_xht(); } else { one_ell_conflict(word, TRUE); /* Originally the code here just used the done flag. Now I have duplicated and unpacked the conditions for setting the done flag so that each mechanism can be turned on or off independently. This works WITHOUT affecting the done flag setting. */ if (rej_use_tess_accepted && !word->tess_accepted) word->reject_map.rej_word_not_tess_accepted (); if (rej_use_tess_blanks && (strchr (word->best_choice->unichar_string().string (), ' ') != NULL)) word->reject_map.rej_word_contains_blanks (); WERD_CHOICE* best_choice = word->best_choice; if (rej_use_good_perm) { if ((best_choice->permuter() == SYSTEM_DAWG_PERM || best_choice->permuter() == FREQ_DAWG_PERM || best_choice->permuter() == USER_DAWG_PERM) && (!rej_use_sensible_wd || acceptable_word_string(*word->uch_set, best_choice->unichar_string().string(), best_choice->unichar_lengths().string()) != AC_UNACCEPTABLE)) { // PASSED TEST } else if (best_choice->permuter() == NUMBER_PERM) { if (rej_alphas_in_number_perm) { for (i = 0, offset = 0; best_choice->unichar_string()[offset] != '\0'; offset += best_choice->unichar_lengths()[i++]) { if (word->reject_map[i].accepted() && word->uch_set->get_isalpha( best_choice->unichar_string().string() + offset, best_choice->unichar_lengths()[i])) word->reject_map[i].setrej_bad_permuter(); // rej alpha } } } else { word->reject_map.rej_word_bad_permuter(); } } /* Ambig word rejection was here once !!*/ } } else { tprintf("BAD tessedit_reject_mode\n"); err_exit(); } if (tessedit_image_border > -1) reject_edge_blobs(word); check_debug_pt (word, 10); if (tessedit_rejection_debug) { tprintf("Permuter Type = %d\n", word->best_choice->permuter ()); tprintf("Certainty: %f Rating: %f\n", word->best_choice->certainty (), word->best_choice->rating ()); tprintf("Dict word: %d\n", dict_word(*(word->best_choice))); } flip_hyphens(word); check_debug_pt(word, 20); } } // namespace tesseract void reject_blanks(WERD_RES *word) { inT16 i; inT16 offset; for (i = 0, offset = 0; word->best_choice->unichar_string()[offset] != '\0'; offset += word->best_choice->unichar_lengths()[i], i += 1) { if (word->best_choice->unichar_string()[offset] == ' ') //rej unrecognised blobs word->reject_map[i].setrej_tess_failure (); } } namespace tesseract { void Tesseract::reject_I_1_L(WERD_RES *word) { inT16 i; inT16 offset; for (i = 0, offset = 0; word->best_choice->unichar_string()[offset] != '\0'; offset += word->best_choice->unichar_lengths()[i], i += 1) { if (STRING (conflict_set_I_l_1). contains (word->best_choice->unichar_string()[offset])) { //rej 1Il conflict word->reject_map[i].setrej_1Il_conflict (); } } } } // namespace tesseract void reject_poor_matches(WERD_RES *word) { float threshold = compute_reject_threshold(word->best_choice); for (int i = 0; i < word->best_choice->length(); ++i) { if (word->best_choice->unichar_id(i) == UNICHAR_SPACE) word->reject_map[i].setrej_tess_failure(); else if (word->best_choice->certainty(i) < threshold) word->reject_map[i].setrej_poor_match(); } } /********************************************************************** * compute_reject_threshold * * Set a rejection threshold for this word. * Initially this is a trivial function which looks for the largest * gap in the certainty value. **********************************************************************/ float compute_reject_threshold(WERD_CHOICE* word) { float threshold; // rejection threshold float bestgap = 0.0f; // biggest gap float gapstart; // bottom of gap // super iterator BLOB_CHOICE_IT choice_it; // real iterator int blob_count = word->length(); GenericVector<float> ratings; ratings.init_to_size(blob_count, 0.0f); for (int i = 0; i < blob_count; ++i) { ratings[i] = word->certainty(i); } ratings.sort(); gapstart = ratings[0] - 1; // all reject if none better if (blob_count >= 3) { for (int index = 0; index < blob_count - 1; index++) { if (ratings[index + 1] - ratings[index] > bestgap) { bestgap = ratings[index + 1] - ratings[index]; // find biggest gapstart = ratings[index]; } } } threshold = gapstart + bestgap / 2; return threshold; } /************************************************************************* * reject_edge_blobs() * * If the word is perilously close to the edge of the image, reject those blobs * in the word which are too close to the edge as they could be clipped. *************************************************************************/ namespace tesseract { void Tesseract::reject_edge_blobs(WERD_RES *word) { TBOX word_box = word->word->bounding_box(); // Use the box_word as it is already denormed back to image coordinates. int blobcount = word->box_word->length(); if (word_box.left() < tessedit_image_border || word_box.bottom() < tessedit_image_border || word_box.right() + tessedit_image_border > ImageWidth() - 1 || word_box.top() + tessedit_image_border > ImageHeight() - 1) { ASSERT_HOST(word->reject_map.length() == blobcount); for (int blobindex = 0; blobindex < blobcount; blobindex++) { TBOX blob_box = word->box_word->BlobBox(blobindex); if (blob_box.left() < tessedit_image_border || blob_box.bottom() < tessedit_image_border || blob_box.right() + tessedit_image_border > ImageWidth() - 1 || blob_box.top() + tessedit_image_border > ImageHeight() - 1) { word->reject_map[blobindex].setrej_edge_char(); // Close to edge } } } } /********************************************************************** * one_ell_conflict() * * Identify words where there is a potential I/l/1 error. * - A bundle of contextual heuristics! **********************************************************************/ BOOL8 Tesseract::one_ell_conflict(WERD_RES *word_res, BOOL8 update_map) { const char *word; const char *lengths; inT16 word_len; //its length inT16 first_alphanum_index_; inT16 first_alphanum_offset_; inT16 i; inT16 offset; BOOL8 non_conflict_set_char; //non conf set a/n? BOOL8 conflict = FALSE; BOOL8 allow_1s; ACCEPTABLE_WERD_TYPE word_type; BOOL8 dict_perm_type; BOOL8 dict_word_ok; int dict_word_type; word = word_res->best_choice->unichar_string().string (); lengths = word_res->best_choice->unichar_lengths().string(); word_len = strlen (lengths); /* If there are no occurrences of the conflict set characters then the word is OK. */ if (strpbrk (word, conflict_set_I_l_1.string ()) == NULL) return FALSE; /* There is a conflict if there are NO other (confirmed) alphanumerics apart from those in the conflict set. */ for (i = 0, offset = 0, non_conflict_set_char = FALSE; (i < word_len) && !non_conflict_set_char; offset += lengths[i++]) non_conflict_set_char = (word_res->uch_set->get_isalpha(word + offset, lengths[i]) || word_res->uch_set->get_isdigit(word + offset, lengths[i])) && !STRING (conflict_set_I_l_1).contains (word[offset]); if (!non_conflict_set_char) { if (update_map) reject_I_1_L(word_res); return TRUE; } /* If the word is accepted by a dawg permuter, and the first alpha character is "I" or "l", check to see if the alternative is also a dawg word. If it is, then there is a potential error otherwise the word is ok. */ dict_perm_type = (word_res->best_choice->permuter () == SYSTEM_DAWG_PERM) || (word_res->best_choice->permuter () == USER_DAWG_PERM) || (rej_trust_doc_dawg && (word_res->best_choice->permuter () == DOC_DAWG_PERM)) || (word_res->best_choice->permuter () == FREQ_DAWG_PERM); dict_word_type = dict_word(*(word_res->best_choice)); dict_word_ok = (dict_word_type > 0) && (rej_trust_doc_dawg || (dict_word_type != DOC_DAWG_PERM)); if ((rej_1Il_use_dict_word && dict_word_ok) || (rej_1Il_trust_permuter_type && dict_perm_type) || (dict_perm_type && dict_word_ok)) { first_alphanum_index_ = first_alphanum_index (word, lengths); first_alphanum_offset_ = first_alphanum_offset (word, lengths); if (lengths[first_alphanum_index_] == 1 && word[first_alphanum_offset_] == 'I') { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'l'; if (safe_dict_word(word_res) > 0) { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'I'; if (update_map) word_res->reject_map[first_alphanum_index_]. setrej_1Il_conflict(); return TRUE; } else { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'I'; return FALSE; } } if (lengths[first_alphanum_index_] == 1 && word[first_alphanum_offset_] == 'l') { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'I'; if (safe_dict_word(word_res) > 0) { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'l'; if (update_map) word_res->reject_map[first_alphanum_index_]. setrej_1Il_conflict(); return TRUE; } else { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'l'; return FALSE; } } return FALSE; } /* NEW 1Il code. The old code relied on permuter types too much. In fact, tess will use TOP_CHOICE permute for good things like "palette". In this code the string is examined independently to see if it looks like a well formed word. */ /* REGARDLESS OF PERMUTER, see if flipping a leading I/l generates a dictionary word. */ first_alphanum_index_ = first_alphanum_index (word, lengths); first_alphanum_offset_ = first_alphanum_offset (word, lengths); if (lengths[first_alphanum_index_] == 1 && word[first_alphanum_offset_] == 'l') { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'I'; if (safe_dict_word(word_res) > 0) return FALSE; else word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'l'; } else if (lengths[first_alphanum_index_] == 1 && word[first_alphanum_offset_] == 'I') { word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'l'; if (safe_dict_word(word_res) > 0) return FALSE; else word_res->best_choice->unichar_string()[first_alphanum_offset_] = 'I'; } /* For strings containing digits: If there are no alphas OR the numeric permuter liked the word, reject any non 1 conflict chs Else reject all conflict chs */ if (word_contains_non_1_digit (word, lengths)) { allow_1s = (alpha_count (word, lengths) == 0) || (word_res->best_choice->permuter () == NUMBER_PERM); inT16 offset; conflict = FALSE; for (i = 0, offset = 0; word[offset] != '\0'; offset += word_res->best_choice->unichar_lengths()[i++]) { if ((!allow_1s || (word[offset] != '1')) && STRING (conflict_set_I_l_1).contains (word[offset])) { if (update_map) word_res->reject_map[i].setrej_1Il_conflict (); conflict = TRUE; } } return conflict; } /* For anything else. See if it conforms to an acceptable word type. If so, treat accordingly. */ word_type = acceptable_word_string(*word_res->uch_set, word, lengths); if ((word_type == AC_LOWER_CASE) || (word_type == AC_INITIAL_CAP)) { first_alphanum_index_ = first_alphanum_index (word, lengths); first_alphanum_offset_ = first_alphanum_offset (word, lengths); if (STRING (conflict_set_I_l_1).contains (word[first_alphanum_offset_])) { if (update_map) word_res->reject_map[first_alphanum_index_]. setrej_1Il_conflict (); return TRUE; } else return FALSE; } else if (word_type == AC_UPPER_CASE) { return FALSE; } else { if (update_map) reject_I_1_L(word_res); return TRUE; } } inT16 Tesseract::first_alphanum_index(const char *word, const char *word_lengths) { inT16 i; inT16 offset; for (i = 0, offset = 0; word[offset] != '\0'; offset += word_lengths[i++]) { if (unicharset.get_isalpha(word + offset, word_lengths[i]) || unicharset.get_isdigit(word + offset, word_lengths[i])) return i; } return -1; } inT16 Tesseract::first_alphanum_offset(const char *word, const char *word_lengths) { inT16 i; inT16 offset; for (i = 0, offset = 0; word[offset] != '\0'; offset += word_lengths[i++]) { if (unicharset.get_isalpha(word + offset, word_lengths[i]) || unicharset.get_isdigit(word + offset, word_lengths[i])) return offset; } return -1; } inT16 Tesseract::alpha_count(const char *word, const char *word_lengths) { inT16 i; inT16 offset; inT16 count = 0; for (i = 0, offset = 0; word[offset] != '\0'; offset += word_lengths[i++]) { if (unicharset.get_isalpha (word + offset, word_lengths[i])) count++; } return count; } BOOL8 Tesseract::word_contains_non_1_digit(const char *word, const char *word_lengths) { inT16 i; inT16 offset; for (i = 0, offset = 0; word[offset] != '\0'; offset += word_lengths[i++]) { if (unicharset.get_isdigit (word + offset, word_lengths[i]) && (word_lengths[i] != 1 || word[offset] != '1')) return TRUE; } return FALSE; } /************************************************************************* * dont_allow_1Il() * Dont unreject LONE accepted 1Il conflict set chars *************************************************************************/ void Tesseract::dont_allow_1Il(WERD_RES *word) { int i = 0; int offset; int word_len = word->reject_map.length(); const char *s = word->best_choice->unichar_string().string(); const char *lengths = word->best_choice->unichar_lengths().string(); BOOL8 accepted_1Il = FALSE; for (i = 0, offset = 0; i < word_len; offset += word->best_choice->unichar_lengths()[i++]) { if (word->reject_map[i].accepted()) { if (STRING(conflict_set_I_l_1).contains(s[offset])) { accepted_1Il = TRUE; } else { if (word->uch_set->get_isalpha(s + offset, lengths[i]) || word->uch_set->get_isdigit(s + offset, lengths[i])) return; // >=1 non 1Il ch accepted } } } if (!accepted_1Il) return; //Nothing to worry about for (i = 0, offset = 0; i < word_len; offset += word->best_choice->unichar_lengths()[i++]) { if (STRING(conflict_set_I_l_1).contains(s[offset]) && word->reject_map[i].accepted()) word->reject_map[i].setrej_postNN_1Il(); } } inT16 Tesseract::count_alphanums(WERD_RES *word_res) { int count = 0; const WERD_CHOICE *best_choice = word_res->best_choice; for (int i = 0; i < word_res->reject_map.length(); ++i) { if ((word_res->reject_map[i].accepted()) && (word_res->uch_set->get_isalpha(best_choice->unichar_id(i)) || word_res->uch_set->get_isdigit(best_choice->unichar_id(i)))) { count++; } } return count; } // reject all if most rejected. void Tesseract::reject_mostly_rejects(WERD_RES *word) { /* Reject the whole of the word if the fraction of rejects exceeds a limit */ if ((float) word->reject_map.reject_count() / word->reject_map.length() >= rej_whole_of_mostly_reject_word_fract) word->reject_map.rej_word_mostly_rej(); } BOOL8 Tesseract::repeated_nonalphanum_wd(WERD_RES *word, ROW *row) { inT16 char_quality; inT16 accepted_char_quality; if (word->best_choice->unichar_lengths().length() <= 1) return FALSE; if (!STRING(ok_repeated_ch_non_alphanum_wds). contains(word->best_choice->unichar_string()[0])) return FALSE; UNICHAR_ID uch_id = word->best_choice->unichar_id(0); for (int i = 1; i < word->best_choice->length(); ++i) { if (word->best_choice->unichar_id(i) != uch_id) return FALSE; } word_char_quality(word, row, &char_quality, &accepted_char_quality); if ((word->best_choice->unichar_lengths().length () == char_quality) && (char_quality == accepted_char_quality)) return TRUE; else return FALSE; } inT16 Tesseract::safe_dict_word(const WERD_RES *werd_res) { const WERD_CHOICE &word = *werd_res->best_choice; int dict_word_type = werd_res->tesseract->dict_word(word); return dict_word_type == DOC_DAWG_PERM ? 0 : dict_word_type; } // Note: After running this function word_res->ratings // might not contain the right BLOB_CHOICE corresponding to each character // in word_res->best_choice. void Tesseract::flip_hyphens(WERD_RES *word_res) { WERD_CHOICE *best_choice = word_res->best_choice; int i; int prev_right = -9999; int next_left; TBOX out_box; float aspect_ratio; if (tessedit_lower_flip_hyphen <= 1) return; int num_blobs = word_res->rebuild_word->NumBlobs(); UNICHAR_ID unichar_dash = word_res->uch_set->unichar_to_id("-"); for (i = 0; i < best_choice->length() && i < num_blobs; ++i) { TBLOB* blob = word_res->rebuild_word->blobs[i]; out_box = blob->bounding_box(); if (i + 1 == num_blobs) next_left = 9999; else next_left = word_res->rebuild_word->blobs[i + 1]->bounding_box().left(); // Dont touch small or touching blobs - it is too dangerous. if ((out_box.width() > 8 * word_res->denorm.x_scale()) && (out_box.left() > prev_right) && (out_box.right() < next_left)) { aspect_ratio = out_box.width() / (float) out_box.height(); if (word_res->uch_set->eq(best_choice->unichar_id(i), ".")) { if (aspect_ratio >= tessedit_upper_flip_hyphen && word_res->uch_set->contains_unichar_id(unichar_dash) && word_res->uch_set->get_enabled(unichar_dash)) { /* Certain HYPHEN */ best_choice->set_unichar_id(unichar_dash, i); if (word_res->reject_map[i].rejected()) word_res->reject_map[i].setrej_hyphen_accept(); } if ((aspect_ratio > tessedit_lower_flip_hyphen) && word_res->reject_map[i].accepted()) //Suspected HYPHEN word_res->reject_map[i].setrej_hyphen (); } else if (best_choice->unichar_id(i) == unichar_dash) { if ((aspect_ratio >= tessedit_upper_flip_hyphen) && (word_res->reject_map[i].rejected())) word_res->reject_map[i].setrej_hyphen_accept(); //Certain HYPHEN if ((aspect_ratio <= tessedit_lower_flip_hyphen) && (word_res->reject_map[i].accepted())) //Suspected HYPHEN word_res->reject_map[i].setrej_hyphen(); } } prev_right = out_box.right(); } } // Note: After running this function word_res->ratings // might not contain the right BLOB_CHOICE corresponding to each character // in word_res->best_choice. void Tesseract::flip_0O(WERD_RES *word_res) { WERD_CHOICE *best_choice = word_res->best_choice; int i; TBOX out_box; if (!tessedit_flip_0O) return; int num_blobs = word_res->rebuild_word->NumBlobs(); for (i = 0; i < best_choice->length() && i < num_blobs; ++i) { TBLOB* blob = word_res->rebuild_word->blobs[i]; if (word_res->uch_set->get_isupper(best_choice->unichar_id(i)) || word_res->uch_set->get_isdigit(best_choice->unichar_id(i))) { out_box = blob->bounding_box(); if ((out_box.top() < kBlnBaselineOffset + kBlnXHeight) || (out_box.bottom() > kBlnBaselineOffset + kBlnXHeight / 4)) return; //Beware words with sub/superscripts } } UNICHAR_ID unichar_0 = word_res->uch_set->unichar_to_id("0"); UNICHAR_ID unichar_O = word_res->uch_set->unichar_to_id("O"); if (unichar_0 == INVALID_UNICHAR_ID || !word_res->uch_set->get_enabled(unichar_0) || unichar_O == INVALID_UNICHAR_ID || !word_res->uch_set->get_enabled(unichar_O)) { return; // 0 or O are not present/enabled in unicharset } for (i = 1; i < best_choice->length(); ++i) { if (best_choice->unichar_id(i) == unichar_0 || best_choice->unichar_id(i) == unichar_O) { /* A0A */ if ((i+1) < best_choice->length() && non_O_upper(*word_res->uch_set, best_choice->unichar_id(i-1)) && non_O_upper(*word_res->uch_set, best_choice->unichar_id(i+1))) { best_choice->set_unichar_id(unichar_O, i); } /* A00A */ if (non_O_upper(*word_res->uch_set, best_choice->unichar_id(i-1)) && (i+1) < best_choice->length() && (best_choice->unichar_id(i+1) == unichar_0 || best_choice->unichar_id(i+1) == unichar_O) && (i+2) < best_choice->length() && non_O_upper(*word_res->uch_set, best_choice->unichar_id(i+2))) { best_choice->set_unichar_id(unichar_O, i); i++; } /* AA0<non digit or end of word> */ if ((i > 1) && non_O_upper(*word_res->uch_set, best_choice->unichar_id(i-2)) && non_O_upper(*word_res->uch_set, best_choice->unichar_id(i-1)) && (((i+1) < best_choice->length() && !word_res->uch_set->get_isdigit(best_choice->unichar_id(i+1)) && !word_res->uch_set->eq(best_choice->unichar_id(i+1), "l") && !word_res->uch_set->eq(best_choice->unichar_id(i+1), "I")) || (i == best_choice->length() - 1))) { best_choice->set_unichar_id(unichar_O, i); } /* 9O9 */ if (non_0_digit(*word_res->uch_set, best_choice->unichar_id(i-1)) && (i+1) < best_choice->length() && non_0_digit(*word_res->uch_set, best_choice->unichar_id(i+1))) { best_choice->set_unichar_id(unichar_0, i); } /* 9OOO */ if (non_0_digit(*word_res->uch_set, best_choice->unichar_id(i-1)) && (i+2) < best_choice->length() && (best_choice->unichar_id(i+1) == unichar_0 || best_choice->unichar_id(i+1) == unichar_O) && (best_choice->unichar_id(i+2) == unichar_0 || best_choice->unichar_id(i+2) == unichar_O)) { best_choice->set_unichar_id(unichar_0, i); best_choice->set_unichar_id(unichar_0, i+1); best_choice->set_unichar_id(unichar_0, i+2); i += 2; } /* 9OO<non upper> */ if (non_0_digit(*word_res->uch_set, best_choice->unichar_id(i-1)) && (i+2) < best_choice->length() && (best_choice->unichar_id(i+1) == unichar_0 || best_choice->unichar_id(i+1) == unichar_O) && !word_res->uch_set->get_isupper(best_choice->unichar_id(i+2))) { best_choice->set_unichar_id(unichar_0, i); best_choice->set_unichar_id(unichar_0, i+1); i++; } /* 9O<non upper> */ if (non_0_digit(*word_res->uch_set, best_choice->unichar_id(i-1)) && (i+1) < best_choice->length() && !word_res->uch_set->get_isupper(best_choice->unichar_id(i+1))) { best_choice->set_unichar_id(unichar_0, i); } /* 9[.,]OOO.. */ if ((i > 1) && (word_res->uch_set->eq(best_choice->unichar_id(i-1), ".") || word_res->uch_set->eq(best_choice->unichar_id(i-1), ",")) && (word_res->uch_set->get_isdigit(best_choice->unichar_id(i-2)) || best_choice->unichar_id(i-2) == unichar_O)) { if (best_choice->unichar_id(i-2) == unichar_O) { best_choice->set_unichar_id(unichar_0, i-2); } while (i < best_choice->length() && (best_choice->unichar_id(i) == unichar_O || best_choice->unichar_id(i) == unichar_0)) { best_choice->set_unichar_id(unichar_0, i); i++; } i--; } } } } BOOL8 Tesseract::non_O_upper(const UNICHARSET& ch_set, UNICHAR_ID unichar_id) { return ch_set.get_isupper(unichar_id) && !ch_set.eq(unichar_id, "O"); } BOOL8 Tesseract::non_0_digit(const UNICHARSET& ch_set, UNICHAR_ID unichar_id) { return ch_set.get_isdigit(unichar_id) && !ch_set.eq(unichar_id, "0"); } } // namespace tesseract
C++
/////////////////////////////////////////////////////////////////////// // File: equationdetect.h // Description: The equation detection class that inherits equationdetectbase. // Author: Zongyi (Joe) Liu (joeliu@google.com) // Created: Fri Aug 31 11:13:01 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_EQUATIONDETECT_H__ #define TESSERACT_CCMAIN_EQUATIONDETECT_H__ #include "blobbox.h" #include "equationdetectbase.h" #include "genericvector.h" #include "unichar.h" class BLOBNBOX; class BLOB_CHOICE; class BLOB_CHOICE_LIST; class TO_BLOCK_LIST; class TBOX; class UNICHARSET; namespace tesseract { class Tesseract; class ColPartition; class ColPartitionGrid; class ColPartitionSet; class EquationDetect : public EquationDetectBase { public: EquationDetect(const char* equ_datapath, const char* equ_language); ~EquationDetect(); enum IndentType { NO_INDENT, LEFT_INDENT, RIGHT_INDENT, BOTH_INDENT, INDENT_TYPE_COUNT }; // Reset the lang_tesseract_ pointer. This function should be called before we // do any detector work. void SetLangTesseract(Tesseract* lang_tesseract); // Iterate over the blobs inside to_block, and set the blobs that we want to // process to BSTT_NONE. (By default, they should be BSTT_SKIP). The function // returns 0 upon success. int LabelSpecialText(TO_BLOCK* to_block); // Find possible equation partitions from part_grid. Should be called // after the special_text_type of blobs are set. // It returns 0 upon success. int FindEquationParts(ColPartitionGrid* part_grid, ColPartitionSet** best_columns); // Reset the resolution of the processing image. TEST only function. void SetResolution(const int resolution); protected: // Identify the special text type for one blob, and update its field. When // height_th is set (> 0), we will label the blob as BSTT_NONE if its height // is less than height_th. void IdentifySpecialText(BLOBNBOX *blob, const int height_th); // Estimate the type for one unichar. BlobSpecialTextType EstimateTypeForUnichar( const UNICHARSET& unicharset, const UNICHAR_ID id) const; // Compute special text type for each blobs in part_grid_. void IdentifySpecialText(); // Identify blobs that we want to skip during special blob type // classification. void IdentifyBlobsToSkip(ColPartition* part); // The ColPartitions in part_grid_ maybe over-segmented, particularly in the // block equation regions. So we like to identify these partitions and merge // them before we do the searching. void MergePartsByLocation(); // Staring from the seed center, we do radius search. And for partitions that // have large overlaps with seed, we remove them from part_grid_ and add into // parts_overlap. Note: this function may update the part_grid_, so if the // caller is also running ColPartitionGridSearch, use the RepositionIterator // to continue. void SearchByOverlap(ColPartition* seed, GenericVector<ColPartition*>* parts_overlap); // Insert part back into part_grid_, after it absorbs some other parts. void InsertPartAfterAbsorb(ColPartition* part); // Identify the colparitions in part_grid_, label them as PT_EQUATION, and // save them into cp_seeds_. void IdentifySeedParts(); // Check the blobs count for a seed region candidate. bool CheckSeedBlobsCount(ColPartition* part); // Compute the foreground pixel density for a tbox area. float ComputeForegroundDensity(const TBOX& tbox); // Check if part from seed2 label: with low math density and left indented. We // are using two checks: // 1. If its left is aligned with any coordinates in indented_texts_left, // which we assume have been sorted. // 2. If its foreground density is over foreground_density_th. bool CheckForSeed2( const GenericVector<int>& indented_texts_left, const float foreground_density_th, ColPartition* part); // Count the number of values in sorted_vec that is close to val, used to // check if a partition is aligned with text partitions. int CountAlignment( const GenericVector<int>& sorted_vec, const int val) const; // Check for a seed candidate using the foreground pixel density. And we // return true if the density is below a certain threshold, because characters // in equation regions usually are apart with more white spaces. bool CheckSeedFgDensity(const float density_th, ColPartition* part); // A light version of SplitCPHor: instead of really doing the part split, we // simply compute the union bounding box of each splitted part. void SplitCPHorLite(ColPartition* part, GenericVector<TBOX>* splitted_boxes); // Split the part (horizontally), and save the splitted result into // parts_splitted. Note that it is caller's responsibility to release the // memory owns by parts_splitted. On the other hand, the part is unchanged // during this process and still owns the blobs, so do NOT call DeleteBoxes // when freeing the colpartitions in parts_splitted. void SplitCPHor(ColPartition* part, GenericVector<ColPartition*>* parts_splitted); // Check the density for a seed candidate (part) using its math density and // italic density, returns true if the check passed. bool CheckSeedDensity(const float math_density_high, const float math_density_low, const ColPartition* part) const; // Check if part is indented. IndentType IsIndented(ColPartition* part); // Identify inline partitions from cp_seeds_, and re-label them. void IdentifyInlineParts(); // Comute the super bounding box for all colpartitions inside part_grid_. void ComputeCPsSuperBBox(); // Identify inline partitions from cp_seeds_ using the horizontal search. void IdentifyInlinePartsHorizontal(); // Estimate the line spacing between two text partitions. Returns -1 if not // enough data. int EstimateTextPartLineSpacing(); // Identify inline partitions from cp_seeds_ using vertical search. void IdentifyInlinePartsVertical(const bool top_to_bottom, const int textPartsLineSpacing); // Check if part is an inline equation zone. This should be called after we // identified the seed regions. bool IsInline(const bool search_bottom, const int textPartsLineSpacing, ColPartition* part); // For a given seed partition, we search the part_grid_ and see if there is // any partition can be merged with it. It returns true if the seed has been // expanded. bool ExpandSeed(ColPartition* seed); // Starting from the seed position, we search the part_grid_ // horizontally/vertically, find all parititions that can be // merged with seed, remove them from part_grid_, and put them into // parts_to_merge. void ExpandSeedHorizontal(const bool search_left, ColPartition* seed, GenericVector<ColPartition*>* parts_to_merge); void ExpandSeedVertical(const bool search_bottom, ColPartition* seed, GenericVector<ColPartition*>* parts_to_merge); // Check if a part_box is the small neighbor of seed_box. bool IsNearSmallNeighbor(const TBOX& seed_box, const TBOX& part_box) const; // Perform the density check for part, which we assume is nearing a seed // partition. It returns true if the check passed. bool CheckSeedNeighborDensity(const ColPartition* part) const; // After identify the math blocks, we do one more scanning on all text // partitions, and check if any of them is the satellite of: // math blocks: here a p is the satellite of q if: // 1. q is the nearest vertical neighbor of p, and // 2. y_gap(p, q) is less than a threshold, and // 3. x_overlap(p, q) is over a threshold. // Note that p can be the satellites of two blocks: its top neighbor and // bottom neighbor. void ProcessMathBlockSatelliteParts(); // Check if part is the satellite of one/two math blocks. If it is, we return // true, and save the blocks into math_blocks. bool IsMathBlockSatellite( ColPartition* part, GenericVector<ColPartition*>* math_blocks); // Search the nearest neighbor of part in one vertical direction as defined in // search_bottom. It returns the neighbor found that major x overlap with it, // or NULL when not found. ColPartition* SearchNNVertical(const bool search_bottom, const ColPartition* part); // Check if the neighbor with vertical distance of y_gap is a near and math // block partition. bool IsNearMathNeighbor(const int y_gap, const ColPartition *neighbor) const; // Generate the tiff file name for output/debug file. void GetOutputTiffName(const char* name, STRING* image_name) const; // Debugger function that renders ColPartitions on the input image, where: // parts labeled as PT_EQUATION will be painted in red, PT_INLINE_EQUATION // will be painted in green, and other parts will be painted in blue. void PaintColParts(const STRING& outfile) const; // Debugger function that renders the blobs in part_grid_ over the input // image. void PaintSpecialTexts(const STRING& outfile) const; // Debugger function that print the math blobs density values for a // ColPartition object. void PrintSpecialBlobsDensity(const ColPartition* part) const; // The tesseract engine intialized from equation training data. Tesseract* equ_tesseract_; // The tesseract engine used for OCR. This pointer is passed in by the caller, // so do NOT destroy it in this class. Tesseract* lang_tesseract_; // The ColPartitionGrid that we are processing. This pointer is passed in from // the caller, so do NOT destroy it in the class. ColPartitionGrid* part_grid_; // A simple array of pointers to the best assigned column division at // each grid y coordinate. This pointer is passed in from the caller, so do // NOT destroy it in the class. ColPartitionSet** best_columns_; // The super bounding box of all cps in the part_grid_. TBOX* cps_super_bbox_; // The seed ColPartition for equation region. GenericVector<ColPartition*> cp_seeds_; // The resolution (dpi) of the processing image. int resolution_; // The number of pages we have processed. int page_count_; }; } // namespace tesseract #endif // TESSERACT_CCMAIN_EQUATIONDETECT_H_
C++
// Copyright 2011 Google Inc. All Rights Reserved. // Author: rays@google.com (Ray Smith) /////////////////////////////////////////////////////////////////////// // File: cubeclassifier.h // Description: Cube implementation of a ShapeClassifier. // Author: Ray Smith // Created: Wed Nov 23 10:36:32 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef THIRD_PARTY_TESSERACT_CCMAIN_CUBECLASSIFIER_H_ #define THIRD_PARTY_TESSERACT_CCMAIN_CUBECLASSIFIER_H_ #include "shapeclassifier.h" namespace tesseract { class Classify; class CubeRecoContext; class ShapeTable; class TessClassifier; class Tesseract; class TrainingSample; struct UnicharRating; // Cube implementation of a ShapeClassifier. class CubeClassifier : public ShapeClassifier { public: explicit CubeClassifier(Tesseract* tesseract); virtual ~CubeClassifier(); // Classifies the given [training] sample, writing to results. // See ShapeClassifier for a full description. virtual int UnicharClassifySample(const TrainingSample& sample, Pix* page_pix, int debug, UNICHAR_ID keep_this, GenericVector<UnicharRating>* results); // Provides access to the ShapeTable that this classifier works with. virtual const ShapeTable* GetShapeTable() const; private: // Cube objects. CubeRecoContext* cube_cntxt_; const ShapeTable& shape_table_; }; // Combination of Tesseract class pruner with scoring by cube. class CubeTessClassifier : public ShapeClassifier { public: explicit CubeTessClassifier(Tesseract* tesseract); virtual ~CubeTessClassifier(); // Classifies the given [training] sample, writing to results. // See ShapeClassifier for a full description. virtual int UnicharClassifySample(const TrainingSample& sample, Pix* page_pix, int debug, UNICHAR_ID keep_this, GenericVector<UnicharRating>* results); // Provides access to the ShapeTable that this classifier works with. virtual const ShapeTable* GetShapeTable() const; private: // Cube objects. CubeRecoContext* cube_cntxt_; const ShapeTable& shape_table_; TessClassifier* pruner_; }; } // namespace tesseract #endif /* THIRD_PARTY_TESSERACT_CCMAIN_CUBECLASSIFIER_H_ */
C++
// Copyright 2011 Google Inc. All Rights Reserved. // Author: rays@google.com (Ray Smith) /////////////////////////////////////////////////////////////////////// // File: cubeclassifier.cpp // Description: Cube implementation of a ShapeClassifier. // Author: Ray Smith // Created: Wed Nov 23 10:39:45 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "cubeclassifier.h" #include "char_altlist.h" #include "char_set.h" #include "cube_object.h" #include "cube_reco_context.h" #include "tessclassifier.h" #include "tesseractclass.h" #include "trainingsample.h" #include "unicharset.h" namespace tesseract { CubeClassifier::CubeClassifier(tesseract::Tesseract* tesseract) : cube_cntxt_(tesseract->GetCubeRecoContext()), shape_table_(*tesseract->shape_table()) { } CubeClassifier::~CubeClassifier() { } // Classifies the given [training] sample, writing to results. // See ShapeClassifier for a full description. int CubeClassifier::UnicharClassifySample( const TrainingSample& sample, Pix* page_pix, int debug, UNICHAR_ID keep_this, GenericVector<UnicharRating>* results) { results->clear(); if (page_pix == NULL) return 0; ASSERT_HOST(cube_cntxt_ != NULL); const TBOX& char_box = sample.bounding_box(); CubeObject* cube_obj = new tesseract::CubeObject( cube_cntxt_, page_pix, char_box.left(), pixGetHeight(page_pix) - char_box.top(), char_box.width(), char_box.height()); CharAltList* alt_list = cube_obj->RecognizeChar(); if (alt_list != NULL) { alt_list->Sort(); CharSet* char_set = cube_cntxt_->CharacterSet(); for (int i = 0; i < alt_list->AltCount(); ++i) { // Convert cube representation to a shape_id. int alt_id = alt_list->Alt(i); int unichar_id = char_set->UnicharID(char_set->ClassString(alt_id)); if (unichar_id >= 0) results->push_back(UnicharRating(unichar_id, alt_list->AltProb(i))); } delete alt_list; } delete cube_obj; return results->size(); } // Provides access to the ShapeTable that this classifier works with. const ShapeTable* CubeClassifier::GetShapeTable() const { return &shape_table_; } CubeTessClassifier::CubeTessClassifier(tesseract::Tesseract* tesseract) : cube_cntxt_(tesseract->GetCubeRecoContext()), shape_table_(*tesseract->shape_table()), pruner_(new TessClassifier(true, tesseract)) { } CubeTessClassifier::~CubeTessClassifier() { delete pruner_; } // Classifies the given [training] sample, writing to results. // See ShapeClassifier for a full description. int CubeTessClassifier::UnicharClassifySample( const TrainingSample& sample, Pix* page_pix, int debug, UNICHAR_ID keep_this, GenericVector<UnicharRating>* results) { int num_results = pruner_->UnicharClassifySample(sample, page_pix, debug, keep_this, results); if (page_pix == NULL) return num_results; ASSERT_HOST(cube_cntxt_ != NULL); const TBOX& char_box = sample.bounding_box(); CubeObject* cube_obj = new tesseract::CubeObject( cube_cntxt_, page_pix, char_box.left(), pixGetHeight(page_pix) - char_box.top(), char_box.width(), char_box.height()); CharAltList* alt_list = cube_obj->RecognizeChar(); CharSet* char_set = cube_cntxt_->CharacterSet(); if (alt_list != NULL) { for (int r = 0; r < num_results; ++r) { // Get the best cube probability of the unichar in the result. double best_prob = 0.0; for (int i = 0; i < alt_list->AltCount(); ++i) { int alt_id = alt_list->Alt(i); int unichar_id = char_set->UnicharID(char_set->ClassString(alt_id)); if (unichar_id == (*results)[r].unichar_id && alt_list->AltProb(i) > best_prob) { best_prob = alt_list->AltProb(i); } } (*results)[r].rating = best_prob; } delete alt_list; // Re-sort by rating. results->sort(&UnicharRating::SortDescendingRating); } delete cube_obj; return results->size(); } // Provides access to the ShapeTable that this classifier works with. const ShapeTable* CubeTessClassifier::GetShapeTable() const { return &shape_table_; } } // namespace tesseract
C++
/********************************************************************** * File: paragraphs.h * Description: Paragraph Detection internal data structures. * Author: David Eger * Created: 11 March 2011 * * (C) Copyright 2011, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifndef TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_ #define TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_ #include "paragraphs.h" #ifdef _MSC_VER #include <string> #else #include "strings.h" #endif // NO CODE OUTSIDE OF paragraphs.cpp AND TESTS SHOULD NEED TO ACCESS // DATA STRUCTURES OR FUNCTIONS IN THIS FILE. class WERD_CHOICE; namespace tesseract { // Return whether the given word is likely to be a list item start word. bool AsciiLikelyListItem(const STRING &word); // Return the first Unicode Codepoint from werd[pos]. int UnicodeFor(const UNICHARSET *u, const WERD_CHOICE *werd, int pos); // Set right word attributes given either a unicharset and werd or a utf8 // string. void RightWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea); // Set left word attributes given either a unicharset and werd or a utf8 string. void LeftWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea); enum LineType { LT_START = 'S', // First line of a paragraph. LT_BODY = 'C', // Continuation line of a paragraph. LT_UNKNOWN = 'U', // No clues. LT_MULTIPLE = 'M', // Matches for both LT_START and LT_BODY. }; // The first paragraph in a page of body text is often un-indented. // This is a typographic convention which is common to indicate either that: // (1) The paragraph is the continuation of a previous paragraph, or // (2) The paragraph is the first paragraph in a chapter. // // I refer to such paragraphs as "crown"s, and the output of the paragraph // detection algorithm attempts to give them the same paragraph model as // the rest of the body text. // // Nonetheless, while building hypotheses, it is useful to mark the lines // of crown paragraphs temporarily as crowns, either aligned left or right. extern const ParagraphModel *kCrownLeft; extern const ParagraphModel *kCrownRight; inline bool StrongModel(const ParagraphModel *model) { return model != NULL && model != kCrownLeft && model != kCrownRight; } struct LineHypothesis { LineHypothesis() : ty(LT_UNKNOWN), model(NULL) {} LineHypothesis(LineType line_type, const ParagraphModel *m) : ty(line_type), model(m) {} LineHypothesis(const LineHypothesis &other) : ty(other.ty), model(other.model) {} bool operator==(const LineHypothesis &other) const { return ty == other.ty && model == other.model; } LineType ty; const ParagraphModel *model; }; class ParagraphTheory; // Forward Declaration typedef GenericVectorEqEq<const ParagraphModel *> SetOfModels; // Row Scratch Registers are data generated by the paragraph detection // algorithm based on a RowInfo input. class RowScratchRegisters { public: // We presume row will outlive us. void Init(const RowInfo &row); LineType GetLineType() const; LineType GetLineType(const ParagraphModel *model) const; // Mark this as a start line type, sans model. This is useful for the // initial marking of probable body lines or paragraph start lines. void SetStartLine(); // Mark this as a body line type, sans model. This is useful for the // initial marking of probably body lines or paragraph start lines. void SetBodyLine(); // Record that this row fits as a paragraph start line in the given model, void AddStartLine(const ParagraphModel *model); // Record that this row fits as a paragraph body line in the given model, void AddBodyLine(const ParagraphModel *model); // Clear all hypotheses about this line. void SetUnknown() { hypotheses_.truncate(0); } // Append all hypotheses of strong models that match this row as a start. void StartHypotheses(SetOfModels *models) const; // Append all hypotheses of strong models matching this row. void StrongHypotheses(SetOfModels *models) const; // Append all hypotheses for this row. void NonNullHypotheses(SetOfModels *models) const; // Discard any hypotheses whose model is not in the given list. void DiscardNonMatchingHypotheses(const SetOfModels &models); // If we have only one hypothesis and that is that this line is a paragraph // start line of a certain model, return that model. Else return NULL. const ParagraphModel *UniqueStartHypothesis() const; // If we have only one hypothesis and that is that this line is a paragraph // body line of a certain model, return that model. Else return NULL. const ParagraphModel *UniqueBodyHypothesis() const; // Return the indentation for the side opposite of the aligned side. int OffsideIndent(tesseract::ParagraphJustification just) const { switch (just) { case tesseract::JUSTIFICATION_RIGHT: return lindent_; case tesseract::JUSTIFICATION_LEFT: return rindent_; default: return lindent_ > rindent_ ? lindent_ : rindent_; } } // Return the indentation for the side the text is aligned to. int AlignsideIndent(tesseract::ParagraphJustification just) const { switch (just) { case tesseract::JUSTIFICATION_RIGHT: return rindent_; case tesseract::JUSTIFICATION_LEFT: return lindent_; default: return lindent_ > rindent_ ? lindent_ : rindent_; } } // Append header fields to a vector of row headings. static void AppendDebugHeaderFields(GenericVector<STRING> *header); // Append data for this row to a vector of debug strings. void AppendDebugInfo(const ParagraphTheory &theory, GenericVector<STRING> *dbg) const; const RowInfo *ri_; // These four constants form a horizontal box model for the white space // on the edges of each line. At each point in the algorithm, the following // shall hold: // ri_->pix_ldistance = lmargin_ + lindent_ // ri_->pix_rdistance = rindent_ + rmargin_ int lmargin_; int lindent_; int rindent_; int rmargin_; private: // Hypotheses of either LT_START or LT_BODY GenericVectorEqEq<LineHypothesis> hypotheses_; }; // A collection of convenience functions for wrapping the set of // Paragraph Models we believe correctly model the paragraphs in the image. class ParagraphTheory { public: // We presume models will outlive us, and that models will take ownership // of any ParagraphModel *'s we add. explicit ParagraphTheory(GenericVector<ParagraphModel *> *models) : models_(models) {} GenericVector<ParagraphModel *> &models() { return *models_; } const GenericVector<ParagraphModel *> &models() const { return *models_; } // Return an existing model if one that is Comparable() can be found. // Else, allocate a new copy of model to save and return a pointer to it. const ParagraphModel *AddModel(const ParagraphModel &model); // Discard any models we've made that are not in the list of used models. void DiscardUnusedModels(const SetOfModels &used_models); // Return the set of all non-centered models. void NonCenteredModels(SetOfModels *models); // If any of the non-centered paragraph models we know about fit // rows[start, end), return it. Else NULL. const ParagraphModel *Fits(const GenericVector<RowScratchRegisters> *rows, int start, int end) const; int IndexOf(const ParagraphModel *model) const; private: GenericVector<ParagraphModel *> *models_; GenericVectorEqEq<ParagraphModel *> models_we_added_; }; bool ValidFirstLine(const GenericVector<RowScratchRegisters> *rows, int row, const ParagraphModel *model); bool ValidBodyLine(const GenericVector<RowScratchRegisters> *rows, int row, const ParagraphModel *model); bool CrownCompatible(const GenericVector<RowScratchRegisters> *rows, int a, int b, const ParagraphModel *model); // A class for smearing Paragraph Model hypotheses to surrounding rows. // The idea here is that StrongEvidenceClassify first marks only exceedingly // obvious start and body rows and constructs models of them. Thereafter, // we may have left over unmarked lines (mostly end-of-paragraph lines) which // were too short to have much confidence about, but which fit the models we've // constructed perfectly and which we ought to mark. This class is used to // "smear" our models over the text. class ParagraphModelSmearer { public: ParagraphModelSmearer(GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, ParagraphTheory *theory); // Smear forward paragraph models from existing row markings to subsequent // text lines if they fit, and mark any thereafter still unmodeled rows // with any model in the theory that fits them. void Smear(); private: // Record in open_models_ for rows [start_row, end_row) the list of models // currently open at each row. // A model is still open in a row if some previous row has said model as a // start hypothesis, and all rows since (including this row) would fit as // either a body or start line in that model. void CalculateOpenModels(int row_start, int row_end); SetOfModels &OpenModels(int row) { return open_models_[row - row_start_ + 1]; } ParagraphTheory *theory_; GenericVector<RowScratchRegisters> *rows_; int row_start_; int row_end_; // open_models_ corresponds to rows[start_row_ - 1, end_row_] // // open_models_: Contains models which there was an active (open) paragraph // as of the previous line and for which the left and right // indents admit the possibility that this text line continues // to fit the same model. // TODO(eger): Think about whether we can get rid of "Open" models and just // use the current hypotheses on RowScratchRegisters. GenericVector<SetOfModels> open_models_; }; // Clear all hypotheses about lines [start, end) and reset the margins to the // percentile (0..100) value of the left and right row edges for this run of // rows. void RecomputeMarginsAndClearHypotheses( GenericVector<RowScratchRegisters> *rows, int start, int end, int percentile); // Return the median inter-word space in rows[row_start, row_end). int InterwordSpace(const GenericVector<RowScratchRegisters> &rows, int row_start, int row_end); // Return whether the first word on the after line can fit in the space at // the end of the before line (knowing which way the text is aligned and read). bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after, tesseract::ParagraphJustification justification); // Return whether the first word on the after line can fit in the space at // the end of the before line (not knowing the text alignment). bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after); // Do rows[start, end) form a single instance of the given paragraph model? bool RowsFitModel(const GenericVector<RowScratchRegisters> *rows, int start, int end, const ParagraphModel *model); // Do the text and geometry of two rows support a paragraph break between them? bool LikelyParagraphStart(const RowScratchRegisters &before, const RowScratchRegisters &after, tesseract::ParagraphJustification j); // Given a set of row_owners pointing to PARAs or NULL (no paragraph known), // normalize each row_owner to point to an actual PARA, and output the // paragraphs in order onto paragraphs. void CanonicalizeDetectionResults( GenericVector<PARA *> *row_owners, PARA_LIST *paragraphs); } // namespace #endif // TESSERACT_CCMAIN_PARAGRAPHS_INTERNAL_H_
C++
/////////////////////////////////////////////////////////////////////// // File: mutableiterator.h // Description: Iterator for tesseract results providing access to // both high-level API and Tesseract internal data structures. // Author: David Eger // Created: Thu Feb 24 19:01:06 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_MUTABLEITERATOR_H__ #define TESSERACT_CCMAIN_MUTABLEITERATOR_H__ #include "resultiterator.h" class BLOB_CHOICE_IT; namespace tesseract { class Tesseract; // Class to iterate over tesseract results, providing access to all levels // of the page hierarchy, without including any tesseract headers or having // to handle any tesseract structures. // WARNING! This class points to data held within the TessBaseAPI class, and // therefore can only be used while the TessBaseAPI class still exists and // has not been subjected to a call of Init, SetImage, Recognize, Clear, End // DetectOS, or anything else that changes the internal PAGE_RES. // See apitypes.h for the definition of PageIteratorLevel. // See also base class PageIterator, which contains the bulk of the interface. // ResultIterator adds text-specific methods for access to OCR output. // MutableIterator adds access to internal data structures. class MutableIterator : public ResultIterator { public: // See argument descriptions in ResultIterator() MutableIterator(PAGE_RES* page_res, Tesseract* tesseract, int scale, int scaled_yres, int rect_left, int rect_top, int rect_width, int rect_height) : ResultIterator( LTRResultIterator(page_res, tesseract, scale, scaled_yres, rect_left, rect_top, rect_width, rect_height)) {} virtual ~MutableIterator() {} // See PageIterator and ResultIterator for most calls. // Return access to Tesseract internals. const PAGE_RES_IT *PageResIt() const { return it_; } }; } // namespace tesseract. #endif // TESSERACT_CCMAIN_MUTABLEITERATOR_H__
C++
/********************************************************************** * File: cube_reco_context.cpp * Description: Implementation of the Cube Recognition Context Class * Author: Ahmad Abdulkader * Created: 2007 * * (C) Copyright 2008, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include <string> #include <limits.h> #include "cube_reco_context.h" #include "classifier_factory.h" #include "cube_tuning_params.h" #include "dict.h" #include "feature_bmp.h" #include "tessdatamanager.h" #include "tesseractclass.h" #include "tess_lang_model.h" namespace tesseract { // Instantiate a CubeRecoContext object using a Tesseract object. // CubeRecoContext will not take ownership of tess_obj, but will // record the pointer to it and will make use of various Tesseract // components (language model, flags, etc). Thus the caller should // keep tess_obj alive so long as the instantiated CubeRecoContext is used. CubeRecoContext::CubeRecoContext(Tesseract *tess_obj) { tess_obj_ = tess_obj; lang_ = ""; loaded_ = false; lang_mod_ = NULL; params_ = NULL; char_classifier_ = NULL; char_set_ = NULL; word_size_model_ = NULL; char_bigrams_ = NULL; word_unigrams_ = NULL; noisy_input_ = false; size_normalization_ = false; } CubeRecoContext::~CubeRecoContext() { if (char_classifier_ != NULL) { delete char_classifier_; char_classifier_ = NULL; } if (word_size_model_ != NULL) { delete word_size_model_; word_size_model_ = NULL; } if (char_set_ != NULL) { delete char_set_; char_set_ = NULL; } if (char_bigrams_ != NULL) { delete char_bigrams_; char_bigrams_ = NULL; } if (word_unigrams_ != NULL) { delete word_unigrams_; word_unigrams_ = NULL; } if (lang_mod_ != NULL) { delete lang_mod_; lang_mod_ = NULL; } if (params_ != NULL) { delete params_; params_ = NULL; } } // Returns the path of the data files by looking up the TESSDATA_PREFIX // environment variable and appending a "tessdata" directory to it bool CubeRecoContext::GetDataFilePath(string *path) const { *path = tess_obj_->datadir.string(); return true; } // The object initialization function that loads all the necessary // components of a RecoContext. TessdataManager is used to load the // data from [lang].traineddata file. If TESSDATA_CUBE_UNICHARSET // component is present, Cube will be instantiated with the unicharset // specified in this component and the corresponding dictionary // (TESSDATA_CUBE_SYSTEM_DAWG), and will map Cube's unicharset to // Tesseract's. Otherwise, TessdataManager will assume that Cube will // be using Tesseract's unicharset and dawgs, and will load the // unicharset from the TESSDATA_UNICHARSET component and will load the // dawgs from TESSDATA_*_DAWG components. bool CubeRecoContext::Load(TessdataManager *tessdata_manager, UNICHARSET *tess_unicharset) { ASSERT_HOST(tess_obj_ != NULL); tess_unicharset_ = tess_unicharset; string data_file_path; // Get the data file path. if (GetDataFilePath(&data_file_path) == false) { fprintf(stderr, "Unable to get data file path\n"); return false; } // Get the language from the Tesseract object. lang_ = tess_obj_->lang.string(); // Create the char set. if ((char_set_ = CharSet::Create(tessdata_manager, tess_unicharset)) == NULL) { fprintf(stderr, "Cube ERROR (CubeRecoContext::Load): unable to load " "CharSet\n"); return false; } // Create the language model. string lm_file_name = data_file_path + lang_ + ".cube.lm"; string lm_params; if (!CubeUtils::ReadFileToString(lm_file_name, &lm_params)) { fprintf(stderr, "Cube ERROR (CubeRecoContext::Load): unable to read cube " "language model params from %s\n", lm_file_name.c_str()); return false; } lang_mod_ = new TessLangModel(lm_params, data_file_path, tess_obj_->getDict().load_system_dawg, tessdata_manager, this); if (lang_mod_ == NULL) { fprintf(stderr, "Cube ERROR (CubeRecoContext::Load): unable to create " "TessLangModel\n"); return false; } // Create the optional char bigrams object. char_bigrams_ = CharBigrams::Create(data_file_path, lang_); // Create the optional word unigrams object. word_unigrams_ = WordUnigrams::Create(data_file_path, lang_); // Create the optional size model. word_size_model_ = WordSizeModel::Create(data_file_path, lang_, char_set_, Contextual()); // Load tuning params. params_ = CubeTuningParams::Create(data_file_path, lang_); if (params_ == NULL) { fprintf(stderr, "Cube ERROR (CubeRecoContext::Load): unable to read " "CubeTuningParams from %s\n", data_file_path.c_str()); return false; } // Create the char classifier. char_classifier_ = CharClassifierFactory::Create(data_file_path, lang_, lang_mod_, char_set_, params_); if (char_classifier_ == NULL) { fprintf(stderr, "Cube ERROR (CubeRecoContext::Load): unable to load " "CharClassifierFactory object from %s\n", data_file_path.c_str()); return false; } loaded_ = true; return true; } // Creates a CubeRecoContext object using a tesseract object CubeRecoContext * CubeRecoContext::Create(Tesseract *tess_obj, TessdataManager *tessdata_manager, UNICHARSET *tess_unicharset) { // create the object CubeRecoContext *cntxt = new CubeRecoContext(tess_obj); if (cntxt == NULL) { fprintf(stderr, "Cube ERROR (CubeRecoContext::Create): unable to create " "CubeRecoContext object\n"); return NULL; } // load the necessary components if (cntxt->Load(tessdata_manager, tess_unicharset) == false) { fprintf(stderr, "Cube ERROR (CubeRecoContext::Create): unable to init " "CubeRecoContext object\n"); delete cntxt; return NULL; } // success return cntxt; } } // tesseract}
C++
/********************************************************************** * File: applybox.cpp (Formerly applybox.c) * Description: Re segment rows according to box file data * Author: Phil Cheatle * Created: Wed Nov 24 09:11:23 GMT 1993 * * (C) Copyright 1993, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #endif #include <ctype.h> #include <string.h> #ifdef __UNIX__ #include <assert.h> #include <errno.h> #endif #include "allheaders.h" #include "boxread.h" #include "chopper.h" #include "pageres.h" #include "unichar.h" #include "unicharset.h" #include "tesseractclass.h" #include "genericvector.h" // Max number of blobs to classify together in FindSegmentation. const int kMaxGroupSize = 4; // Max fraction of median allowed as deviation in xheight before switching // to median. const double kMaxXHeightDeviationFraction = 0.125; /************************************************************************* * The box file is assumed to contain box definitions, one per line, of the * following format for blob-level boxes: * <UTF8 str> <left> <bottom> <right> <top> <page id> * and for word/line-level boxes: * WordStr <left> <bottom> <right> <top> <page id> #<space-delimited word str> * NOTES: * The boxes use tesseract coordinates, i.e. 0,0 is at BOTTOM-LEFT. * * <page id> is 0-based, and the page number is used for multipage input (tiff). * * In the blob-level form, each line represents a recognizable unit, which may * be several UTF-8 bytes, but there is a bounding box around each recognizable * unit, and no classifier is needed to train in this mode (bootstrapping.) * * In the word/line-level form, the line begins with the literal "WordStr", and * the bounding box bounds either a whole line or a whole word. The recognizable * units in the word/line are listed after the # at the end of the line and * are space delimited, ignoring any original spaces on the line. * Eg. * word -> #w o r d * multi word line -> #m u l t i w o r d l i n e * The recognizable units must be space-delimited in order to allow multiple * unicodes to be used for a single recognizable unit, eg Hindi. * In this mode, the classifier must have been pre-trained with the desired * character set, or it will not be able to find the character segmentations. *************************************************************************/ namespace tesseract { static void clear_any_old_text(BLOCK_LIST *block_list) { BLOCK_IT block_it(block_list); for (block_it.mark_cycle_pt(); !block_it.cycled_list(); block_it.forward()) { ROW_IT row_it(block_it.data()->row_list()); for (row_it.mark_cycle_pt(); !row_it.cycled_list(); row_it.forward()) { WERD_IT word_it(row_it.data()->word_list()); for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) { word_it.data()->set_text(""); } } } } // Applies the box file based on the image name fname, and resegments // the words in the block_list (page), with: // blob-mode: one blob per line in the box file, words as input. // word/line-mode: one blob per space-delimited unit after the #, and one word // per line in the box file. (See comment above for box file format.) // If find_segmentation is true, (word/line mode) then the classifier is used // to re-segment words/lines to match the space-delimited truth string for // each box. In this case, the input box may be for a word or even a whole // text line, and the output words will contain multiple blobs corresponding // to the space-delimited input string. // With find_segmentation false, no classifier is needed, but the chopper // can still be used to correctly segment touching characters with the help // of the input boxes. // In the returned PAGE_RES, the WERD_RES are setup as they would be returned // from normal classification, ie. with a word, chopped_word, rebuild_word, // seam_array, denorm, box_word, and best_state, but NO best_choice or // raw_choice, as they would require a UNICHARSET, which we aim to avoid. // Instead, the correct_text member of WERD_RES is set, and this may be later // converted to a best_choice using CorrectClassifyWords. CorrectClassifyWords // is not required before calling ApplyBoxTraining. PAGE_RES* Tesseract::ApplyBoxes(const STRING& fname, bool find_segmentation, BLOCK_LIST *block_list) { GenericVector<TBOX> boxes; GenericVector<STRING> texts, full_texts; if (!ReadAllBoxes(applybox_page, true, fname, &boxes, &texts, &full_texts, NULL)) { return NULL; // Can't do it. } int box_count = boxes.size(); int box_failures = 0; // Add an empty everything to the end. boxes.push_back(TBOX()); texts.push_back(STRING()); full_texts.push_back(STRING()); // In word mode, we use the boxes to make a word for each box, but // in blob mode we use the existing words and maximally chop them first. PAGE_RES* page_res = find_segmentation ? NULL : SetupApplyBoxes(boxes, block_list); clear_any_old_text(block_list); for (int i = 0; i < boxes.size() - 1; i++) { bool foundit = false; if (page_res != NULL) { if (i == 0) { foundit = ResegmentCharBox(page_res, NULL, boxes[i], boxes[i + 1], full_texts[i].string()); } else { foundit = ResegmentCharBox(page_res, &boxes[i-1], boxes[i], boxes[i + 1], full_texts[i].string()); } } else { foundit = ResegmentWordBox(block_list, boxes[i], boxes[i + 1], texts[i].string()); } if (!foundit) { box_failures++; ReportFailedBox(i, boxes[i], texts[i].string(), "FAILURE! Couldn't find a matching blob"); } } if (page_res == NULL) { // In word/line mode, we now maximally chop all the words and resegment // them with the classifier. page_res = SetupApplyBoxes(boxes, block_list); ReSegmentByClassification(page_res); } if (applybox_debug > 0) { tprintf("APPLY_BOXES:\n"); tprintf(" Boxes read from boxfile: %6d\n", box_count); if (box_failures > 0) tprintf(" Boxes failed resegmentation: %6d\n", box_failures); } TidyUp(page_res); return page_res; } // Helper computes median xheight in the image. static double MedianXHeight(BLOCK_LIST *block_list) { BLOCK_IT block_it(block_list); STATS xheights(0, block_it.data()->bounding_box().height()); for (block_it.mark_cycle_pt(); !block_it.cycled_list(); block_it.forward()) { ROW_IT row_it(block_it.data()->row_list()); for (row_it.mark_cycle_pt(); !row_it.cycled_list(); row_it.forward()) { xheights.add(IntCastRounded(row_it.data()->x_height()), 1); } } return xheights.median(); } // Any row xheight that is significantly different from the median is set // to the median. void Tesseract::PreenXHeights(BLOCK_LIST *block_list) { double median_xheight = MedianXHeight(block_list); double max_deviation = kMaxXHeightDeviationFraction * median_xheight; // Strip all fuzzy space markers to simplify the PAGE_RES. BLOCK_IT b_it(block_list); for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) { BLOCK* block = b_it.data(); ROW_IT r_it(block->row_list()); for (r_it.mark_cycle_pt(); !r_it.cycled_list(); r_it.forward ()) { ROW* row = r_it.data(); float diff = fabs(row->x_height() - median_xheight); if (diff > max_deviation) { if (applybox_debug) { tprintf("row xheight=%g, but median xheight = %g\n", row->x_height(), median_xheight); } row->set_x_height(static_cast<float>(median_xheight)); } } } } // Builds a PAGE_RES from the block_list in the way required for ApplyBoxes: // All fuzzy spaces are removed, and all the words are maximally chopped. PAGE_RES* Tesseract::SetupApplyBoxes(const GenericVector<TBOX>& boxes, BLOCK_LIST *block_list) { PreenXHeights(block_list); // Strip all fuzzy space markers to simplify the PAGE_RES. BLOCK_IT b_it(block_list); for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) { BLOCK* block = b_it.data(); ROW_IT r_it(block->row_list()); for (r_it.mark_cycle_pt(); !r_it.cycled_list(); r_it.forward ()) { ROW* row = r_it.data(); WERD_IT w_it(row->word_list()); for (w_it.mark_cycle_pt(); !w_it.cycled_list(); w_it.forward()) { WERD* word = w_it.data(); if (word->cblob_list()->empty()) { delete w_it.extract(); } else { word->set_flag(W_FUZZY_SP, false); word->set_flag(W_FUZZY_NON, false); } } } } PAGE_RES* page_res = new PAGE_RES(false, block_list, NULL); PAGE_RES_IT pr_it(page_res); WERD_RES* word_res; while ((word_res = pr_it.word()) != NULL) { MaximallyChopWord(boxes, pr_it.block()->block, pr_it.row()->row, word_res); pr_it.forward(); } return page_res; } // Tests the chopper by exhaustively running chop_one_blob. // The word_res will contain filled chopped_word, seam_array, denorm, // box_word and best_state for the maximally chopped word. void Tesseract::MaximallyChopWord(const GenericVector<TBOX>& boxes, BLOCK* block, ROW* row, WERD_RES* word_res) { if (!word_res->SetupForRecognition(unicharset, this, BestPix(), tessedit_ocr_engine_mode, NULL, classify_bln_numeric_mode, textord_use_cjk_fp_model, poly_allow_detailed_fx, row, block)) { word_res->CloneChoppedToRebuild(); return; } if (chop_debug) { tprintf("Maximally chopping word at:"); word_res->word->bounding_box().print(); } GenericVector<BLOB_CHOICE*> blob_choices; ASSERT_HOST(!word_res->chopped_word->blobs.empty()); float rating = static_cast<float>(MAX_INT8); for (int i = 0; i < word_res->chopped_word->NumBlobs(); ++i) { // The rating and certainty are not quite arbitrary. Since // select_blob_to_chop uses the worst certainty to choose, they all have // to be different, so starting with MAX_INT8, subtract 1/8 for each blob // in here, and then divide by e each time they are chopped, which // should guarantee a set of unequal values for the whole tree of blobs // produced, however much chopping is required. The chops are thus only // limited by the ability of the chopper to find suitable chop points, // and not by the value of the certainties. BLOB_CHOICE* choice = new BLOB_CHOICE(0, rating, -rating, -1, -1, 0, 0, 0, 0, BCC_FAKE); blob_choices.push_back(choice); rating -= 0.125f; } const double e = exp(1.0); // The base of natural logs. int blob_number; int right_chop_index = 0; if (!assume_fixed_pitch_char_segment) { // We only chop if the language is not fixed pitch like CJK. SEAM* seam = NULL; while ((seam = chop_one_blob(boxes, blob_choices, word_res, &blob_number)) != NULL) { word_res->InsertSeam(blob_number, seam); BLOB_CHOICE* left_choice = blob_choices[blob_number]; rating = left_choice->rating() / e; left_choice->set_rating(rating); left_choice->set_certainty(-rating); // combine confidence w/ serial # BLOB_CHOICE* right_choice = new BLOB_CHOICE(++right_chop_index, rating - 0.125f, -rating, -1, -1, 0, 0, 0, 0, BCC_FAKE); blob_choices.insert(right_choice, blob_number + 1); } } word_res->CloneChoppedToRebuild(); word_res->FakeClassifyWord(blob_choices.size(), &blob_choices[0]); } // Helper to compute the dispute resolution metric. // Disputed blob resolution. The aim is to give the blob to the most // appropriate boxfile box. Most of the time it is obvious, but if // two boxfile boxes overlap significantly it is not. If a small boxfile // box takes most of the blob, and a large boxfile box does too, then // we want the small boxfile box to get it, but if the small box // is much smaller than the blob, we don't want it to get it. // Details of the disputed blob resolution: // Given a box with area A, and a blob with area B, with overlap area C, // then the miss metric is (A-C)(B-C)/(AB) and the box with minimum // miss metric gets the blob. static double BoxMissMetric(const TBOX& box1, const TBOX& box2) { int overlap_area = box1.intersection(box2).area(); double miss_metric = box1.area()- overlap_area; miss_metric /= box1.area(); miss_metric *= box2.area() - overlap_area; miss_metric /= box2.area(); return miss_metric; } // Gather consecutive blobs that match the given box into the best_state // and corresponding correct_text. // Fights over which box owns which blobs are settled by pre-chopping and // applying the blobs to box or next_box with the least non-overlap. // Returns false if the box was in error, which can only be caused by // failing to find an appropriate blob for a box. // This means that occasionally, blobs may be incorrectly segmented if the // chopper fails to find a suitable chop point. bool Tesseract::ResegmentCharBox(PAGE_RES* page_res, const TBOX *prev_box, const TBOX& box, const TBOX& next_box, const char* correct_text) { if (applybox_debug > 1) { tprintf("\nAPPLY_BOX: in ResegmentCharBox() for %s\n", correct_text); } PAGE_RES_IT page_res_it(page_res); WERD_RES* word_res; for (word_res = page_res_it.word(); word_res != NULL; word_res = page_res_it.forward()) { if (!word_res->box_word->bounding_box().major_overlap(box)) continue; if (applybox_debug > 1) { tprintf("Checking word box:"); word_res->box_word->bounding_box().print(); } int word_len = word_res->box_word->length(); for (int i = 0; i < word_len; ++i) { TBOX char_box = TBOX(); int blob_count = 0; for (blob_count = 0; i + blob_count < word_len; ++blob_count) { TBOX blob_box = word_res->box_word->BlobBox(i + blob_count); if (!blob_box.major_overlap(box)) break; if (word_res->correct_text[i + blob_count].length() > 0) break; // Blob is claimed already. double current_box_miss_metric = BoxMissMetric(blob_box, box); double next_box_miss_metric = BoxMissMetric(blob_box, next_box); if (applybox_debug > 2) { tprintf("Checking blob:"); blob_box.print(); tprintf("Current miss metric = %g, next = %g\n", current_box_miss_metric, next_box_miss_metric); } if (current_box_miss_metric > next_box_miss_metric) break; // Blob is a better match for next box. char_box += blob_box; } if (blob_count > 0) { if (applybox_debug > 1) { tprintf("Index [%d, %d) seem good.\n", i, i + blob_count); } if (!char_box.almost_equal(box, 3) && (box.x_gap(next_box) < -3 || (prev_box != NULL && prev_box->x_gap(box) < -3))) { return false; } // We refine just the box_word, best_state and correct_text here. // The rebuild_word is made in TidyUp. // blob_count blobs are put together to match the box. Merge the // box_word boxes, save the blob_count in the state and the text. word_res->box_word->MergeBoxes(i, i + blob_count); word_res->best_state[i] = blob_count; word_res->correct_text[i] = correct_text; if (applybox_debug > 2) { tprintf("%d Blobs match: blob box:", blob_count); word_res->box_word->BlobBox(i).print(); tprintf("Matches box:"); box.print(); tprintf("With next box:"); next_box.print(); } // Eliminated best_state and correct_text entries for the consumed // blobs. for (int j = 1; j < blob_count; ++j) { word_res->best_state.remove(i + 1); word_res->correct_text.remove(i + 1); } // Assume that no box spans multiple source words, so we are done with // this box. if (applybox_debug > 1) { tprintf("Best state = "); for (int j = 0; j < word_res->best_state.size(); ++j) { tprintf("%d ", word_res->best_state[j]); } tprintf("\n"); tprintf("Correct text = [[ "); for (int j = 0; j < word_res->correct_text.size(); ++j) { tprintf("%s ", word_res->correct_text[j].string()); } tprintf("]]\n"); } return true; } } } if (applybox_debug > 0) { tprintf("FAIL!\n"); } return false; // Failure. } // Consume all source blobs that strongly overlap the given box, // putting them into a new word, with the correct_text label. // Fights over which box owns which blobs are settled by // applying the blobs to box or next_box with the least non-overlap. // Returns false if the box was in error, which can only be caused by // failing to find an overlapping blob for a box. bool Tesseract::ResegmentWordBox(BLOCK_LIST *block_list, const TBOX& box, const TBOX& next_box, const char* correct_text) { if (applybox_debug > 1) { tprintf("\nAPPLY_BOX: in ResegmentWordBox() for %s\n", correct_text); } WERD* new_word = NULL; BLOCK_IT b_it(block_list); for (b_it.mark_cycle_pt(); !b_it.cycled_list(); b_it.forward()) { BLOCK* block = b_it.data(); if (!box.major_overlap(block->bounding_box())) continue; ROW_IT r_it(block->row_list()); for (r_it.mark_cycle_pt(); !r_it.cycled_list(); r_it.forward()) { ROW* row = r_it.data(); if (!box.major_overlap(row->bounding_box())) continue; WERD_IT w_it(row->word_list()); for (w_it.mark_cycle_pt(); !w_it.cycled_list(); w_it.forward()) { WERD* word = w_it.data(); if (applybox_debug > 2) { tprintf("Checking word:"); word->bounding_box().print(); } if (word->text() != NULL && word->text()[0] != '\0') continue; // Ignore words that are already done. if (!box.major_overlap(word->bounding_box())) continue; C_BLOB_IT blob_it(word->cblob_list()); for (blob_it.mark_cycle_pt(); !blob_it.cycled_list(); blob_it.forward()) { C_BLOB* blob = blob_it.data(); TBOX blob_box = blob->bounding_box(); if (!blob_box.major_overlap(box)) continue; double current_box_miss_metric = BoxMissMetric(blob_box, box); double next_box_miss_metric = BoxMissMetric(blob_box, next_box); if (applybox_debug > 2) { tprintf("Checking blob:"); blob_box.print(); tprintf("Current miss metric = %g, next = %g\n", current_box_miss_metric, next_box_miss_metric); } if (current_box_miss_metric > next_box_miss_metric) continue; // Blob is a better match for next box. if (applybox_debug > 2) { tprintf("Blob match: blob:"); blob_box.print(); tprintf("Matches box:"); box.print(); tprintf("With next box:"); next_box.print(); } if (new_word == NULL) { // Make a new word with a single blob. new_word = word->shallow_copy(); new_word->set_text(correct_text); w_it.add_to_end(new_word); } C_BLOB_IT new_blob_it(new_word->cblob_list()); new_blob_it.add_to_end(blob_it.extract()); } } } } if (new_word == NULL && applybox_debug > 0) tprintf("FAIL!\n"); return new_word != NULL; } // Resegments the words by running the classifier in an attempt to find the // correct segmentation that produces the required string. void Tesseract::ReSegmentByClassification(PAGE_RES* page_res) { PAGE_RES_IT pr_it(page_res); WERD_RES* word_res; for (; (word_res = pr_it.word()) != NULL; pr_it.forward()) { WERD* word = word_res->word; if (word->text() == NULL || word->text()[0] == '\0') continue; // Ignore words that have no text. // Convert the correct text to a vector of UNICHAR_ID GenericVector<UNICHAR_ID> target_text; if (!ConvertStringToUnichars(word->text(), &target_text)) { tprintf("APPLY_BOX: FAILURE: can't find class_id for '%s'\n", word->text()); pr_it.DeleteCurrentWord(); continue; } if (!FindSegmentation(target_text, word_res)) { tprintf("APPLY_BOX: FAILURE: can't find segmentation for '%s'\n", word->text()); pr_it.DeleteCurrentWord(); continue; } } } // Converts the space-delimited string of utf8 text to a vector of UNICHAR_ID. // Returns false if an invalid UNICHAR_ID is encountered. bool Tesseract::ConvertStringToUnichars(const char* utf8, GenericVector<UNICHAR_ID>* class_ids) { for (int step = 0; *utf8 != '\0'; utf8 += step) { const char* next_space = strchr(utf8, ' '); if (next_space == NULL) next_space = utf8 + strlen(utf8); step = next_space - utf8; UNICHAR_ID class_id = unicharset.unichar_to_id(utf8, step); if (class_id == INVALID_UNICHAR_ID) { return false; } while (utf8[step] == ' ') ++step; class_ids->push_back(class_id); } return true; } // Resegments the word to achieve the target_text from the classifier. // Returns false if the re-segmentation fails. // Uses brute-force combination of up to kMaxGroupSize adjacent blobs, and // applies a full search on the classifier results to find the best classified // segmentation. As a compromise to obtain better recall, 1-1 ambiguity // substitutions ARE used. bool Tesseract::FindSegmentation(const GenericVector<UNICHAR_ID>& target_text, WERD_RES* word_res) { // Classify all required combinations of blobs and save results in choices. int word_length = word_res->box_word->length(); GenericVector<BLOB_CHOICE_LIST*>* choices = new GenericVector<BLOB_CHOICE_LIST*>[word_length]; for (int i = 0; i < word_length; ++i) { for (int j = 1; j <= kMaxGroupSize && i + j <= word_length; ++j) { BLOB_CHOICE_LIST* match_result = classify_piece( word_res->seam_array, i, i + j - 1, "Applybox", word_res->chopped_word, word_res->blamer_bundle); if (applybox_debug > 2) { tprintf("%d+%d:", i, j); print_ratings_list("Segment:", match_result, unicharset); } choices[i].push_back(match_result); } } // Search the segmentation graph for the target text. Must be an exact // match. Using wildcards makes it difficult to find the correct // segmentation even when it is there. word_res->best_state.clear(); GenericVector<int> search_segmentation; float best_rating = 0.0f; SearchForText(choices, 0, word_length, target_text, 0, 0.0f, &search_segmentation, &best_rating, &word_res->best_state); for (int i = 0; i < word_length; ++i) choices[i].delete_data_pointers(); delete [] choices; if (word_res->best_state.empty()) { // Build the original segmentation and if it is the same length as the // truth, assume it will do. int blob_count = 1; for (int s = 0; s < word_res->seam_array.size(); ++s) { SEAM* seam = word_res->seam_array[s]; if (seam->split1 == NULL) { word_res->best_state.push_back(blob_count); blob_count = 1; } else { ++blob_count; } } word_res->best_state.push_back(blob_count); if (word_res->best_state.size() != target_text.size()) { word_res->best_state.clear(); // No good. Original segmentation bad size. return false; } } word_res->correct_text.clear(); for (int i = 0; i < target_text.size(); ++i) { word_res->correct_text.push_back( STRING(unicharset.id_to_unichar(target_text[i]))); } return true; } // Recursive helper to find a match to the target_text (from text_index // position) in the choices (from choices_pos position). // Choices is an array of GenericVectors, of length choices_length, with each // element representing a starting position in the word, and the // GenericVector holding classification results for a sequence of consecutive // blobs, with index 0 being a single blob, index 1 being 2 blobs etc. void Tesseract::SearchForText(const GenericVector<BLOB_CHOICE_LIST*>* choices, int choices_pos, int choices_length, const GenericVector<UNICHAR_ID>& target_text, int text_index, float rating, GenericVector<int>* segmentation, float* best_rating, GenericVector<int>* best_segmentation) { const UnicharAmbigsVector& table = getDict().getUnicharAmbigs().dang_ambigs(); for (int length = 1; length <= choices[choices_pos].size(); ++length) { // Rating of matching choice or worst choice if no match. float choice_rating = 0.0f; // Find the corresponding best BLOB_CHOICE. BLOB_CHOICE_IT choice_it(choices[choices_pos][length - 1]); for (choice_it.mark_cycle_pt(); !choice_it.cycled_list(); choice_it.forward()) { BLOB_CHOICE* choice = choice_it.data(); choice_rating = choice->rating(); UNICHAR_ID class_id = choice->unichar_id(); if (class_id == target_text[text_index]) { break; } // Search ambigs table. if (class_id < table.size() && table[class_id] != NULL) { AmbigSpec_IT spec_it(table[class_id]); for (spec_it.mark_cycle_pt(); !spec_it.cycled_list(); spec_it.forward()) { const AmbigSpec *ambig_spec = spec_it.data(); // We'll only do 1-1. if (ambig_spec->wrong_ngram[1] == INVALID_UNICHAR_ID && ambig_spec->correct_ngram_id == target_text[text_index]) break; } if (!spec_it.cycled_list()) break; // Found an ambig. } } if (choice_it.cycled_list()) continue; // No match. segmentation->push_back(length); if (choices_pos + length == choices_length && text_index + 1 == target_text.size()) { // This is a complete match. If the rating is good record a new best. if (applybox_debug > 2) { tprintf("Complete match, rating = %g, best=%g, seglength=%d, best=%d\n", rating + choice_rating, *best_rating, segmentation->size(), best_segmentation->size()); } if (best_segmentation->empty() || rating + choice_rating < *best_rating) { *best_segmentation = *segmentation; *best_rating = rating + choice_rating; } } else if (choices_pos + length < choices_length && text_index + 1 < target_text.size()) { if (applybox_debug > 3) { tprintf("Match found for %d=%s:%s, at %d+%d, recursing...\n", target_text[text_index], unicharset.id_to_unichar(target_text[text_index]), choice_it.data()->unichar_id() == target_text[text_index] ? "Match" : "Ambig", choices_pos, length); } SearchForText(choices, choices_pos + length, choices_length, target_text, text_index + 1, rating + choice_rating, segmentation, best_rating, best_segmentation); if (applybox_debug > 3) { tprintf("End recursion for %d=%s\n", target_text[text_index], unicharset.id_to_unichar(target_text[text_index])); } } segmentation->truncate(segmentation->size() - 1); } } // Counts up the labelled words and the blobs within. // Deletes all unused or emptied words, counting the unused ones. // Resets W_BOL and W_EOL flags correctly. // Builds the rebuild_word and rebuilds the box_word and the best_choice. void Tesseract::TidyUp(PAGE_RES* page_res) { int ok_blob_count = 0; int bad_blob_count = 0; int ok_word_count = 0; int unlabelled_words = 0; PAGE_RES_IT pr_it(page_res); WERD_RES* word_res; for (; (word_res = pr_it.word()) != NULL; pr_it.forward()) { int ok_in_word = 0; int blob_count = word_res->correct_text.size(); WERD_CHOICE* word_choice = new WERD_CHOICE(word_res->uch_set, blob_count); word_choice->set_permuter(TOP_CHOICE_PERM); for (int c = 0; c < blob_count; ++c) { if (word_res->correct_text[c].length() > 0) { ++ok_in_word; } // Since we only need a fake word_res->best_choice, the actual // unichar_ids do not matter. Which is fortunate, since TidyUp() // can be called while training Tesseract, at the stage where // unicharset is not meaningful yet. word_choice->append_unichar_id_space_allocated( INVALID_UNICHAR_ID, word_res->best_state[c], 1.0f, -1.0f); } if (ok_in_word > 0) { ok_blob_count += ok_in_word; bad_blob_count += word_res->correct_text.size() - ok_in_word; word_res->LogNewRawChoice(word_choice); word_res->LogNewCookedChoice(1, false, word_choice); } else { ++unlabelled_words; if (applybox_debug > 0) { tprintf("APPLY_BOXES: Unlabelled word at :"); word_res->word->bounding_box().print(); } pr_it.DeleteCurrentWord(); delete word_choice; } } pr_it.restart_page(); for (; (word_res = pr_it.word()) != NULL; pr_it.forward()) { // Denormalize back to a BoxWord. word_res->RebuildBestState(); word_res->SetupBoxWord(); word_res->word->set_flag(W_BOL, pr_it.prev_row() != pr_it.row()); word_res->word->set_flag(W_EOL, pr_it.next_row() != pr_it.row()); } if (applybox_debug > 0) { tprintf(" Found %d good blobs.\n", ok_blob_count); if (bad_blob_count > 0) { tprintf(" Leaving %d unlabelled blobs in %d words.\n", bad_blob_count, ok_word_count); } if (unlabelled_words > 0) tprintf(" %d remaining unlabelled words deleted.\n", unlabelled_words); } } // Logs a bad box by line in the box file and box coords. void Tesseract::ReportFailedBox(int boxfile_lineno, TBOX box, const char *box_ch, const char *err_msg) { tprintf("APPLY_BOXES: boxfile line %d/%s ((%d,%d),(%d,%d)): %s\n", boxfile_lineno + 1, box_ch, box.left(), box.bottom(), box.right(), box.top(), err_msg); } // Creates a fake best_choice entry in each WERD_RES with the correct text. void Tesseract::CorrectClassifyWords(PAGE_RES* page_res) { PAGE_RES_IT pr_it(page_res); for (WERD_RES *word_res = pr_it.word(); word_res != NULL; word_res = pr_it.forward()) { WERD_CHOICE* choice = new WERD_CHOICE(word_res->uch_set, word_res->correct_text.size()); for (int i = 0; i < word_res->correct_text.size(); ++i) { // The part before the first space is the real ground truth, and the // rest is the bounding box location and page number. GenericVector<STRING> tokens; word_res->correct_text[i].split(' ', &tokens); UNICHAR_ID char_id = unicharset.unichar_to_id(tokens[0].string()); choice->append_unichar_id_space_allocated(char_id, word_res->best_state[i], 0.0f, 0.0f); } word_res->ClearWordChoices(); word_res->LogNewRawChoice(choice); word_res->LogNewCookedChoice(1, false, choice); } } // Calls LearnWord to extract features for labelled blobs within each word. // Features are written to the given filename. void Tesseract::ApplyBoxTraining(const STRING& filename, PAGE_RES* page_res) { PAGE_RES_IT pr_it(page_res); int word_count = 0; for (WERD_RES *word_res = pr_it.word(); word_res != NULL; word_res = pr_it.forward()) { LearnWord(filename.string(), word_res); ++word_count; } tprintf("Generated training data for %d words\n", word_count); } } // namespace tesseract
C++
/****************************************************************** * File: output.cpp (Formerly output.c) * Description: Output pass * Author: Phil Cheatle * Created: Thu Aug 4 10:56:08 BST 1994 * * (C) Copyright 1994, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #endif #include <string.h> #include <ctype.h> #ifdef __UNIX__ #include <assert.h> #include <unistd.h> #include <errno.h> #endif #include "helpers.h" #include "tessvars.h" #include "control.h" #include "reject.h" #include "docqual.h" #include "output.h" #include "globals.h" #include "tesseractclass.h" #define EPAPER_EXT ".ep" #define PAGE_YSIZE 3508 #define CTRL_INSET '\024' //dc4=text inset #define CTRL_FONT '\016' //so=font change #define CTRL_DEFAULT '\017' //si=default font #define CTRL_SHIFT '\022' //dc2=x shift #define CTRL_TAB '\011' //tab #define CTRL_NEWLINE '\012' //newline #define CTRL_HARDLINE '\015' //cr /********************************************************************** * pixels_to_pts * * Convert an integer number of pixels to the nearest integer * number of points. **********************************************************************/ inT32 pixels_to_pts( //convert coords inT32 pixels, inT32 pix_res //resolution ) { float pts; //converted value pts = pixels * 72.0 / pix_res; return (inT32) (pts + 0.5); //round it } namespace tesseract { void Tesseract::output_pass( //Tess output pass //send to api PAGE_RES_IT &page_res_it, const TBOX *target_word_box) { BLOCK_RES *block_of_last_word; BOOL8 force_eol; //During output BLOCK *nextblock; //block of next word WERD *nextword; //next word page_res_it.restart_page (); block_of_last_word = NULL; while (page_res_it.word () != NULL) { check_debug_pt (page_res_it.word (), 120); if (target_word_box) { TBOX current_word_box=page_res_it.word ()->word->bounding_box(); FCOORD center_pt((current_word_box.right()+current_word_box.left())/2,(current_word_box.bottom()+current_word_box.top())/2); if (!target_word_box->contains(center_pt)) { page_res_it.forward (); continue; } } if (tessedit_write_block_separators && block_of_last_word != page_res_it.block ()) { block_of_last_word = page_res_it.block (); } force_eol = (tessedit_write_block_separators && (page_res_it.block () != page_res_it.next_block ())) || (page_res_it.next_word () == NULL); if (page_res_it.next_word () != NULL) nextword = page_res_it.next_word ()->word; else nextword = NULL; if (page_res_it.next_block () != NULL) nextblock = page_res_it.next_block ()->block; else nextblock = NULL; //regardless of tilde crunching write_results(page_res_it, determine_newline_type(page_res_it.word()->word, page_res_it.block()->block, nextword, nextblock), force_eol); page_res_it.forward(); } } /************************************************************************* * write_results() * * All recognition and rejection has now been done. Generate the following: * .txt file - giving the final best choices with NO highlighting * .raw file - giving the tesseract top choice output for each word * .map file - showing how the .txt file has been rejected in the .ep file * epchoice list - a list of one element per word, containing the text for the * epaper. Reject strings are inserted. * inset list - a list of bounding boxes of reject insets - indexed by the * reject strings in the epchoice text. *************************************************************************/ void Tesseract::write_results(PAGE_RES_IT &page_res_it, char newline_type, // type of newline BOOL8 force_eol) { // override tilde crunch? WERD_RES *word = page_res_it.word(); const UNICHARSET &uchset = *word->uch_set; int i; BOOL8 need_reject = FALSE; UNICHAR_ID space = uchset.unichar_to_id(" "); if ((word->unlv_crunch_mode != CR_NONE || word->best_choice->length() == 0) && !tessedit_zero_kelvin_rejection && !tessedit_word_for_word) { if ((word->unlv_crunch_mode != CR_DELETE) && (!stats_.tilde_crunch_written || ((word->unlv_crunch_mode == CR_KEEP_SPACE) && (word->word->space () > 0) && !word->word->flag (W_FUZZY_NON) && !word->word->flag (W_FUZZY_SP)))) { if (!word->word->flag (W_BOL) && (word->word->space () > 0) && !word->word->flag (W_FUZZY_NON) && !word->word->flag (W_FUZZY_SP)) { stats_.last_char_was_tilde = false; } need_reject = TRUE; } if ((need_reject && !stats_.last_char_was_tilde) || (force_eol && stats_.write_results_empty_block)) { /* Write a reject char - mark as rejected unless zero_rejection mode */ stats_.last_char_was_tilde = TRUE; stats_.tilde_crunch_written = true; stats_.last_char_was_newline = false; stats_.write_results_empty_block = false; } if ((word->word->flag (W_EOL) && !stats_.last_char_was_newline) || force_eol) { stats_.tilde_crunch_written = false; stats_.last_char_was_newline = true; stats_.last_char_was_tilde = false; } if (force_eol) stats_.write_results_empty_block = true; return; } /* NORMAL PROCESSING of non tilde crunched words */ stats_.tilde_crunch_written = false; if (newline_type) stats_.last_char_was_newline = true; else stats_.last_char_was_newline = false; stats_.write_results_empty_block = force_eol; // about to write a real word if (unlv_tilde_crunching && stats_.last_char_was_tilde && (word->word->space() == 0) && !(word->word->flag(W_REP_CHAR) && tessedit_write_rep_codes) && (word->best_choice->unichar_id(0) == space)) { /* Prevent adjacent tilde across words - we know that adjacent tildes within words have been removed */ word->MergeAdjacentBlobs(0); } if (newline_type || (word->word->flag (W_REP_CHAR) && tessedit_write_rep_codes)) stats_.last_char_was_tilde = false; else { if (word->reject_map.length () > 0) { if (word->best_choice->unichar_id(word->reject_map.length() - 1) == space) stats_.last_char_was_tilde = true; else stats_.last_char_was_tilde = false; } else if (word->word->space () > 0) stats_.last_char_was_tilde = false; /* else it is unchanged as there are no output chars */ } ASSERT_HOST (word->best_choice->length() == word->reject_map.length()); set_unlv_suspects(word); check_debug_pt (word, 120); if (tessedit_rejection_debug) { tprintf ("Dict word: \"%s\": %d\n", word->best_choice->debug_string().string(), dict_word(*(word->best_choice))); } if (!word->word->flag(W_REP_CHAR) || !tessedit_write_rep_codes) { if (tessedit_zero_rejection) { /* OVERRIDE ALL REJECTION MECHANISMS - ONLY REJECT TESS FAILURES */ for (i = 0; i < word->best_choice->length(); ++i) { if (word->reject_map[i].rejected()) word->reject_map[i].setrej_minimal_rej_accept(); } } if (tessedit_minimal_rejection) { /* OVERRIDE ALL REJECTION MECHANISMS - ONLY REJECT TESS FAILURES */ for (i = 0; i < word->best_choice->length(); ++i) { if ((word->best_choice->unichar_id(i) != space) && word->reject_map[i].rejected()) word->reject_map[i].setrej_minimal_rej_accept(); } } } } } // namespace tesseract /********************************************************************** * determine_newline_type * * Find whether we have a wrapping or hard newline. * Return FALSE if not at end of line. **********************************************************************/ char determine_newline_type( //test line ends WERD *word, //word to do BLOCK *block, //current block WERD *next_word, //next word BLOCK *next_block //block of next word ) { inT16 end_gap; //to right edge inT16 width; //of next word TBOX word_box; //bounding TBOX next_box; //next word TBOX block_box; //block bounding if (!word->flag (W_EOL)) return FALSE; //not end of line if (next_word == NULL || next_block == NULL || block != next_block) return CTRL_NEWLINE; if (next_word->space () > 0) return CTRL_HARDLINE; //it is tabbed word_box = word->bounding_box (); next_box = next_word->bounding_box (); block_box = block->bounding_box (); //gap to eol end_gap = block_box.right () - word_box.right (); end_gap -= (inT32) block->space (); width = next_box.right () - next_box.left (); // tprintf("end_gap=%d-%d=%d, width=%d-%d=%d, nl=%d\n", // block_box.right(),word_box.right(),end_gap, // next_box.right(),next_box.left(),width, // end_gap>width ? CTRL_HARDLINE : CTRL_NEWLINE); return end_gap > width ? CTRL_HARDLINE : CTRL_NEWLINE; } /************************************************************************* * get_rep_char() * Return the first accepted character from the repetition string. This is the * character which is repeated - as determined earlier by fix_rep_char() *************************************************************************/ namespace tesseract { UNICHAR_ID Tesseract::get_rep_char(WERD_RES *word) { // what char is repeated? int i; for (i = 0; ((i < word->reject_map.length()) && (word->reject_map[i].rejected())); ++i); if (i < word->reject_map.length()) { return word->best_choice->unichar_id(i); } else { return word->uch_set->unichar_to_id(unrecognised_char.string()); } } /************************************************************************* * SUSPECT LEVELS * * 0 - dont reject ANYTHING * 1,2 - partial rejection * 3 - BEST * * NOTE: to reject JUST tess failures in the .map file set suspect_level 3 and * tessedit_minimal_rejection. *************************************************************************/ void Tesseract::set_unlv_suspects(WERD_RES *word_res) { int len = word_res->reject_map.length(); const WERD_CHOICE &word = *(word_res->best_choice); const UNICHARSET &uchset = *word.unicharset(); int i; float rating_per_ch; if (suspect_level == 0) { for (i = 0; i < len; i++) { if (word_res->reject_map[i].rejected()) word_res->reject_map[i].setrej_minimal_rej_accept(); } return; } if (suspect_level >= 3) return; //Use defaults /* NOW FOR LEVELS 1 and 2 Find some stuff to unreject*/ if (safe_dict_word(word_res) && (count_alphas(word) > suspect_short_words)) { /* Unreject alphas in dictionary words */ for (i = 0; i < len; ++i) { if (word_res->reject_map[i].rejected() && uchset.get_isalpha(word.unichar_id(i))) word_res->reject_map[i].setrej_minimal_rej_accept(); } } rating_per_ch = word.rating() / word_res->reject_map.length(); if (rating_per_ch >= suspect_rating_per_ch) return; //Dont touch bad ratings if ((word_res->tess_accepted) || (rating_per_ch < suspect_accept_rating)) { /* Unreject any Tess Acceptable word - but NOT tess reject chs*/ for (i = 0; i < len; ++i) { if (word_res->reject_map[i].rejected() && (!uchset.eq(word.unichar_id(i), " "))) word_res->reject_map[i].setrej_minimal_rej_accept(); } } for (i = 0; i < len; i++) { if (word_res->reject_map[i].rejected()) { if (word_res->reject_map[i].flag(R_DOC_REJ)) word_res->reject_map[i].setrej_minimal_rej_accept(); if (word_res->reject_map[i].flag(R_BLOCK_REJ)) word_res->reject_map[i].setrej_minimal_rej_accept(); if (word_res->reject_map[i].flag(R_ROW_REJ)) word_res->reject_map[i].setrej_minimal_rej_accept(); } } if (suspect_level == 2) return; if (!suspect_constrain_1Il || (word_res->reject_map.length() <= suspect_short_words)) { for (i = 0; i < len; i++) { if (word_res->reject_map[i].rejected()) { if ((word_res->reject_map[i].flag(R_1IL_CONFLICT) || word_res->reject_map[i].flag(R_POSTNN_1IL))) word_res->reject_map[i].setrej_minimal_rej_accept(); if (!suspect_constrain_1Il && word_res->reject_map[i].flag(R_MM_REJECT)) word_res->reject_map[i].setrej_minimal_rej_accept(); } } } if (acceptable_word_string(*word_res->uch_set, word.unichar_string().string(), word.unichar_lengths().string()) != AC_UNACCEPTABLE || acceptable_number_string(word.unichar_string().string(), word.unichar_lengths().string())) { if (word_res->reject_map.length() > suspect_short_words) { for (i = 0; i < len; i++) { if (word_res->reject_map[i].rejected() && (!word_res->reject_map[i].perm_rejected() || word_res->reject_map[i].flag (R_1IL_CONFLICT) || word_res->reject_map[i].flag (R_POSTNN_1IL) || word_res->reject_map[i].flag (R_MM_REJECT))) { word_res->reject_map[i].setrej_minimal_rej_accept(); } } } } } inT16 Tesseract::count_alphas(const WERD_CHOICE &word) { int count = 0; for (int i = 0; i < word.length(); ++i) { if (word.unicharset()->get_isalpha(word.unichar_id(i))) count++; } return count; } inT16 Tesseract::count_alphanums(const WERD_CHOICE &word) { int count = 0; for (int i = 0; i < word.length(); ++i) { if (word.unicharset()->get_isalpha(word.unichar_id(i)) || word.unicharset()->get_isdigit(word.unichar_id(i))) count++; } return count; } BOOL8 Tesseract::acceptable_number_string(const char *s, const char *lengths) { BOOL8 prev_digit = FALSE; if (*lengths == 1 && *s == '(') s++; if (*lengths == 1 && ((*s == '$') || (*s == '.') || (*s == '+') || (*s == '-'))) s++; for (; *s != '\0'; s += *(lengths++)) { if (unicharset.get_isdigit(s, *lengths)) prev_digit = TRUE; else if (prev_digit && (*lengths == 1 && ((*s == '.') || (*s == ',') || (*s == '-')))) prev_digit = FALSE; else if (prev_digit && *lengths == 1 && (*(s + *lengths) == '\0') && ((*s == '%') || (*s == ')'))) return TRUE; else if (prev_digit && *lengths == 1 && (*s == '%') && (*(lengths + 1) == 1 && *(s + *lengths) == ')') && (*(s + *lengths + *(lengths + 1)) == '\0')) return TRUE; else return FALSE; } return TRUE; } } // namespace tesseract
C++
/********************************************************************** * File: pagesegmain.cpp * Description: Top-level page segmenter for Tesseract. * Author: Ray Smith * Created: Thu Sep 25 17:12:01 PDT 2008 * * (C) Copyright 2008, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _WIN32 #ifndef __GNUC__ #include <windows.h> #endif // __GNUC__ #ifndef unlink #include <io.h> #endif #else #include <unistd.h> #endif // _WIN32 #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #endif // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif #include "allheaders.h" #include "blobbox.h" #include "blread.h" #include "colfind.h" #include "equationdetect.h" #include "imagefind.h" #include "linefind.h" #include "makerow.h" #include "osdetect.h" #include "tabvector.h" #include "tesseractclass.h" #include "tessvars.h" #include "textord.h" #include "tordmain.h" #include "wordseg.h" namespace tesseract { /// Minimum believable resolution. const int kMinCredibleResolution = 70; /// Default resolution used if input in not believable. const int kDefaultResolution = 300; // Max erosions to perform in removing an enclosing circle. const int kMaxCircleErosions = 8; // Helper to remove an enclosing circle from an image. // If there isn't one, then the image will most likely get badly mangled. // The returned pix must be pixDestroyed after use. NULL may be returned // if the image doesn't meet the trivial conditions that it uses to determine // success. static Pix* RemoveEnclosingCircle(Pix* pixs) { Pix* pixsi = pixInvert(NULL, pixs); Pix* pixc = pixCreateTemplate(pixs); pixSetOrClearBorder(pixc, 1, 1, 1, 1, PIX_SET); pixSeedfillBinary(pixc, pixc, pixsi, 4); pixInvert(pixc, pixc); pixDestroy(&pixsi); Pix* pixt = pixAnd(NULL, pixs, pixc); l_int32 max_count; pixCountConnComp(pixt, 8, &max_count); // The count has to go up before we start looking for the minimum. l_int32 min_count = MAX_INT32; Pix* pixout = NULL; for (int i = 1; i < kMaxCircleErosions; i++) { pixDestroy(&pixt); pixErodeBrick(pixc, pixc, 3, 3); pixt = pixAnd(NULL, pixs, pixc); l_int32 count; pixCountConnComp(pixt, 8, &count); if (i == 1 || count > max_count) { max_count = count; min_count = count; } else if (i > 1 && count < min_count) { min_count = count; pixDestroy(&pixout); pixout = pixCopy(NULL, pixt); // Save the best. } else if (count >= min_count) { break; // We have passed by the best. } } pixDestroy(&pixt); pixDestroy(&pixc); return pixout; } /** * Segment the page according to the current value of tessedit_pageseg_mode. * pix_binary_ is used as the source image and should not be NULL. * On return the blocks list owns all the constructed page layout. */ int Tesseract::SegmentPage(const STRING* input_file, BLOCK_LIST* blocks, Tesseract* osd_tess, OSResults* osr) { ASSERT_HOST(pix_binary_ != NULL); int width = pixGetWidth(pix_binary_); int height = pixGetHeight(pix_binary_); // Get page segmentation mode. PageSegMode pageseg_mode = static_cast<PageSegMode>( static_cast<int>(tessedit_pageseg_mode)); // If a UNLV zone file can be found, use that instead of segmentation. if (!PSM_COL_FIND_ENABLED(pageseg_mode) && input_file != NULL && input_file->length() > 0) { STRING name = *input_file; const char* lastdot = strrchr(name.string(), '.'); if (lastdot != NULL) name[lastdot - name.string()] = '\0'; read_unlv_file(name, width, height, blocks); } if (blocks->empty()) { // No UNLV file present. Work according to the PageSegMode. // First make a single block covering the whole image. BLOCK_IT block_it(blocks); BLOCK* block = new BLOCK("", TRUE, 0, 0, 0, 0, width, height); block->set_right_to_left(right_to_left()); block_it.add_to_end(block); } else { // UNLV file present. Use PSM_SINGLE_BLOCK. pageseg_mode = PSM_SINGLE_BLOCK; } int auto_page_seg_ret_val = 0; TO_BLOCK_LIST to_blocks; if (PSM_OSD_ENABLED(pageseg_mode) || PSM_BLOCK_FIND_ENABLED(pageseg_mode) || PSM_SPARSE(pageseg_mode)) { auto_page_seg_ret_val = AutoPageSeg(pageseg_mode, blocks, &to_blocks, osd_tess, osr); if (pageseg_mode == PSM_OSD_ONLY) return auto_page_seg_ret_val; // To create blobs from the image region bounds uncomment this line: // to_blocks.clear(); // Uncomment to go back to the old mode. } else { deskew_ = FCOORD(1.0f, 0.0f); reskew_ = FCOORD(1.0f, 0.0f); if (pageseg_mode == PSM_CIRCLE_WORD) { Pix* pixcleaned = RemoveEnclosingCircle(pix_binary_); if (pixcleaned != NULL) { pixDestroy(&pix_binary_); pix_binary_ = pixcleaned; } } } if (auto_page_seg_ret_val < 0) { return -1; } if (blocks->empty()) { if (textord_debug_tabfind) tprintf("Empty page\n"); return 0; // AutoPageSeg found an empty page. } bool splitting = pageseg_devanagari_split_strategy != ShiroRekhaSplitter::NO_SPLIT; bool cjk_mode = textord_use_cjk_fp_model; textord_.TextordPage(pageseg_mode, reskew_, width, height, pix_binary_, pix_thresholds_, pix_grey_, splitting || cjk_mode, blocks, &to_blocks); return auto_page_seg_ret_val; } // Helper writes a grey image to a file for use by scrollviewer. // Normally for speed we don't display the image in the layout debug windows. // If textord_debug_images is true, we draw the image as a background to some // of the debug windows. printable determines whether these // images are optimized for printing instead of screen display. static void WriteDebugBackgroundImage(bool printable, Pix* pix_binary) { Pix* grey_pix = pixCreate(pixGetWidth(pix_binary), pixGetHeight(pix_binary), 8); // Printable images are light grey on white, but for screen display // they are black on dark grey so the other colors show up well. if (printable) { pixSetAll(grey_pix); pixSetMasked(grey_pix, pix_binary, 192); } else { pixSetAllArbitrary(grey_pix, 64); pixSetMasked(grey_pix, pix_binary, 0); } AlignedBlob::IncrementDebugPix(); pixWrite(AlignedBlob::textord_debug_pix().string(), grey_pix, IFF_PNG); pixDestroy(&grey_pix); } /** * Auto page segmentation. Divide the page image into blocks of uniform * text linespacing and images. * * Resolution (in ppi) is derived from the input image. * * The output goes in the blocks list with corresponding TO_BLOCKs in the * to_blocks list. * * If single_column is true, then no attempt is made to divide the image * into columns, but multiple blocks are still made if the text is of * non-uniform linespacing. * * If osd (orientation and script detection) is true then that is performed * as well. If only_osd is true, then only orientation and script detection is * performed. If osd is desired, (osd or only_osd) then osr_tess must be * another Tesseract that was initialized especially for osd, and the results * will be output into osr (orientation and script result). */ int Tesseract::AutoPageSeg(PageSegMode pageseg_mode, BLOCK_LIST* blocks, TO_BLOCK_LIST* to_blocks, Tesseract* osd_tess, OSResults* osr) { if (textord_debug_images) { WriteDebugBackgroundImage(textord_debug_printable, pix_binary_); } Pix* photomask_pix = NULL; Pix* musicmask_pix = NULL; // The blocks made by the ColumnFinder. Moved to blocks before return. BLOCK_LIST found_blocks; TO_BLOCK_LIST temp_blocks; bool single_column = !PSM_COL_FIND_ENABLED(pageseg_mode); bool osd_enabled = PSM_OSD_ENABLED(pageseg_mode); bool osd_only = pageseg_mode == PSM_OSD_ONLY; ColumnFinder* finder = SetupPageSegAndDetectOrientation( single_column, osd_enabled, osd_only, blocks, osd_tess, osr, &temp_blocks, &photomask_pix, &musicmask_pix); int result = 0; if (finder != NULL) { TO_BLOCK_IT to_block_it(&temp_blocks); TO_BLOCK* to_block = to_block_it.data(); if (musicmask_pix != NULL) { // TODO(rays) pass the musicmask_pix into FindBlocks and mark music // blocks separately. For now combine with photomask_pix. pixOr(photomask_pix, photomask_pix, musicmask_pix); } if (equ_detect_) { finder->SetEquationDetect(equ_detect_); } result = finder->FindBlocks(pageseg_mode, scaled_color_, scaled_factor_, to_block, photomask_pix, pix_thresholds_, pix_grey_, &found_blocks, to_blocks); if (result >= 0) finder->GetDeskewVectors(&deskew_, &reskew_); delete finder; } pixDestroy(&photomask_pix); pixDestroy(&musicmask_pix); if (result < 0) return result; blocks->clear(); BLOCK_IT block_it(blocks); // Move the found blocks to the input/output blocks. block_it.add_list_after(&found_blocks); if (textord_debug_images) { // The debug image is no longer needed so delete it. unlink(AlignedBlob::textord_debug_pix().string()); } return result; } // Helper adds all the scripts from sid_set converted to ids from osd_set to // allowed_ids. static void AddAllScriptsConverted(const UNICHARSET& sid_set, const UNICHARSET& osd_set, GenericVector<int>* allowed_ids) { for (int i = 0; i < sid_set.get_script_table_size(); ++i) { if (i != sid_set.null_sid()) { const char* script = sid_set.get_script_from_script_id(i); allowed_ids->push_back(osd_set.get_script_id_from_name(script)); } } } /** * Sets up auto page segmentation, determines the orientation, and corrects it. * Somewhat arbitrary chunk of functionality, factored out of AutoPageSeg to * facilitate testing. * photo_mask_pix is a pointer to a NULL pointer that will be filled on return * with the leptonica photo mask, which must be pixDestroyed by the caller. * to_blocks is an empty list that will be filled with (usually a single) * block that is used during layout analysis. This ugly API is required * because of the possibility of a unlv zone file. * TODO(rays) clean this up. * See AutoPageSeg for other arguments. * The returned ColumnFinder must be deleted after use. */ ColumnFinder* Tesseract::SetupPageSegAndDetectOrientation( bool single_column, bool osd, bool only_osd, BLOCK_LIST* blocks, Tesseract* osd_tess, OSResults* osr, TO_BLOCK_LIST* to_blocks, Pix** photo_mask_pix, Pix** music_mask_pix) { int vertical_x = 0; int vertical_y = 1; TabVector_LIST v_lines; TabVector_LIST h_lines; ICOORD bleft(0, 0); ASSERT_HOST(pix_binary_ != NULL); if (tessedit_dump_pageseg_images) { pixWrite("tessinput.png", pix_binary_, IFF_PNG); } // Leptonica is used to find the rule/separator lines in the input. LineFinder::FindAndRemoveLines(source_resolution_, textord_tabfind_show_vlines, pix_binary_, &vertical_x, &vertical_y, music_mask_pix, &v_lines, &h_lines); if (tessedit_dump_pageseg_images) pixWrite("tessnolines.png", pix_binary_, IFF_PNG); // Leptonica is used to find a mask of the photo regions in the input. *photo_mask_pix = ImageFind::FindImages(pix_binary_); if (tessedit_dump_pageseg_images) pixWrite("tessnoimages.png", pix_binary_, IFF_PNG); if (single_column) v_lines.clear(); // The rest of the algorithm uses the usual connected components. textord_.find_components(pix_binary_, blocks, to_blocks); TO_BLOCK_IT to_block_it(to_blocks); // There must be exactly one input block. // TODO(rays) handle new textline finding with a UNLV zone file. ASSERT_HOST(to_blocks->singleton()); TO_BLOCK* to_block = to_block_it.data(); TBOX blkbox = to_block->block->bounding_box(); ColumnFinder* finder = NULL; if (to_block->line_size >= 2) { finder = new ColumnFinder(static_cast<int>(to_block->line_size), blkbox.botleft(), blkbox.topright(), source_resolution_, textord_use_cjk_fp_model, textord_tabfind_aligned_gap_fraction, &v_lines, &h_lines, vertical_x, vertical_y); finder->SetupAndFilterNoise(*photo_mask_pix, to_block); if (equ_detect_) { equ_detect_->LabelSpecialText(to_block); } BLOBNBOX_CLIST osd_blobs; // osd_orientation is the number of 90 degree rotations to make the // characters upright. (See osdetect.h for precise definition.) // We want the text lines horizontal, (vertical text indicates vertical // textlines) which may conflict (eg vertically written CJK). int osd_orientation = 0; bool vertical_text = textord_tabfind_force_vertical_text; if (!vertical_text && textord_tabfind_vertical_text) { vertical_text = finder->IsVerticallyAlignedText(textord_tabfind_vertical_text_ratio, to_block, &osd_blobs); } if (osd && osd_tess != NULL && osr != NULL) { GenericVector<int> osd_scripts; if (osd_tess != this) { // We are running osd as part of layout analysis, so constrain the // scripts to those allowed by *this. AddAllScriptsConverted(unicharset, osd_tess->unicharset, &osd_scripts); for (int s = 0; s < sub_langs_.size(); ++s) { AddAllScriptsConverted(sub_langs_[s]->unicharset, osd_tess->unicharset, &osd_scripts); } } os_detect_blobs(&osd_scripts, &osd_blobs, osr, osd_tess); if (only_osd) { delete finder; return NULL; } osd_orientation = osr->best_result.orientation_id; double osd_score = osr->orientations[osd_orientation]; double osd_margin = min_orientation_margin * 2; for (int i = 0; i < 4; ++i) { if (i != osd_orientation && osd_score - osr->orientations[i] < osd_margin) { osd_margin = osd_score - osr->orientations[i]; } } int best_script_id = osr->best_result.script_id; const char* best_script_str = osd_tess->unicharset.get_script_from_script_id(best_script_id); bool cjk = best_script_id == osd_tess->unicharset.han_sid() || best_script_id == osd_tess->unicharset.hiragana_sid() || best_script_id == osd_tess->unicharset.katakana_sid() || strcmp("Japanese", best_script_str) == 0 || strcmp("Korean", best_script_str) == 0 || strcmp("Hangul", best_script_str) == 0; if (cjk) { finder->set_cjk_script(true); } if (osd_margin < min_orientation_margin) { // The margin is weak. if (!cjk && !vertical_text && osd_orientation == 2) { // upside down latin text is improbable with such a weak margin. tprintf("OSD: Weak margin (%.2f), horiz textlines, not CJK: " "Don't rotate.\n", osd_margin); osd_orientation = 0; } else { tprintf("OSD: Weak margin (%.2f) for %d blob text block, " "but using orientation anyway: %d\n", osd_blobs.length(), osd_margin, osd_orientation); } } } osd_blobs.shallow_clear(); finder->CorrectOrientation(to_block, vertical_text, osd_orientation); } return finder; } } // namespace tesseract.
C++
/********************************************************************** * File: tesseract_cube_combiner.h * Description: Declaration of the Tesseract & Cube results combiner Class * Author: Ahmad Abdulkader * Created: 2008 * * (C) Copyright 2008, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ // The TesseractCubeCombiner class provides the functionality of combining // the recognition results of Tesseract and Cube at the word level #include <algorithm> #include <string> #include <vector> #include <wctype.h> #include "tesseract_cube_combiner.h" #include "cube_object.h" #include "cube_reco_context.h" #include "cube_utils.h" #include "neural_net.h" #include "tesseractclass.h" #include "word_altlist.h" namespace tesseract { TesseractCubeCombiner::TesseractCubeCombiner(CubeRecoContext *cube_cntxt) { cube_cntxt_ = cube_cntxt; combiner_net_ = NULL; } TesseractCubeCombiner::~TesseractCubeCombiner() { if (combiner_net_ != NULL) { delete combiner_net_; combiner_net_ = NULL; } } bool TesseractCubeCombiner::LoadCombinerNet() { ASSERT_HOST(cube_cntxt_); // Compute the path of the combiner net string data_path; cube_cntxt_->GetDataFilePath(&data_path); string net_file_name = data_path + cube_cntxt_->Lang() + ".tesseract_cube.nn"; // Return false if file does not exist FILE *fp = fopen(net_file_name.c_str(), "rb"); if (fp == NULL) return false; else fclose(fp); // Load and validate net combiner_net_ = NeuralNet::FromFile(net_file_name); if (combiner_net_ == NULL) { tprintf("Could not read combiner net file %s", net_file_name.c_str()); return false; } else if (combiner_net_->out_cnt() != 2) { tprintf("Invalid combiner net file %s! Output count != 2\n", net_file_name.c_str()); delete combiner_net_; combiner_net_ = NULL; return false; } return true; } // Normalize a UTF-8 string. Converts the UTF-8 string to UTF32 and optionally // strips punc and/or normalizes case and then converts back string TesseractCubeCombiner::NormalizeString(const string &str, bool remove_punc, bool norm_case) { // convert to UTF32 string_32 str32; CubeUtils::UTF8ToUTF32(str.c_str(), &str32); // strip punc and normalize string_32 new_str32; for (int idx = 0; idx < str32.length(); idx++) { // if no punc removal is required or not a punctuation character if (!remove_punc || iswpunct(str32[idx]) == 0) { char_32 norm_char = str32[idx]; // normalize case if required if (norm_case && iswalpha(norm_char)) { norm_char = towlower(norm_char); } new_str32.push_back(norm_char); } } // convert back to UTF8 string new_str; CubeUtils::UTF32ToUTF8(new_str32.c_str(), &new_str); return new_str; } // Compares 2 strings optionally ignoring punctuation int TesseractCubeCombiner::CompareStrings(const string &str1, const string &str2, bool ignore_punc, bool ignore_case) { if (!ignore_punc && !ignore_case) { return str1.compare(str2); } string norm_str1 = NormalizeString(str1, ignore_punc, ignore_case); string norm_str2 = NormalizeString(str2, ignore_punc, ignore_case); return norm_str1.compare(norm_str2); } // Check if a string is a valid Tess dict word or not bool TesseractCubeCombiner::ValidWord(const string &str) { return (cube_cntxt_->TesseractObject()->getDict().valid_word(str.c_str()) > 0); } // Public method for computing the combiner features. The agreement // output parameter will be true if both answers are identical, // and false otherwise. bool TesseractCubeCombiner::ComputeCombinerFeatures(const string &tess_str, int tess_confidence, CubeObject *cube_obj, WordAltList *cube_alt_list, vector<double> *features, bool *agreement) { features->clear(); *agreement = false; if (cube_alt_list == NULL || cube_alt_list->AltCount() <= 0) return false; // Get Cube's best string; return false if empty char_32 *cube_best_str32 = cube_alt_list->Alt(0); if (cube_best_str32 == NULL || CubeUtils::StrLen(cube_best_str32) < 1) return false; string cube_best_str; int cube_best_cost = cube_alt_list->AltCost(0); int cube_best_bigram_cost = 0; bool cube_best_bigram_cost_valid = true; if (cube_cntxt_->Bigrams()) cube_best_bigram_cost = cube_cntxt_->Bigrams()-> Cost(cube_best_str32, cube_cntxt_->CharacterSet()); else cube_best_bigram_cost_valid = false; CubeUtils::UTF32ToUTF8(cube_best_str32, &cube_best_str); // Get Tesseract's UTF32 string string_32 tess_str32; CubeUtils::UTF8ToUTF32(tess_str.c_str(), &tess_str32); // Compute agreement flag *agreement = (tess_str.compare(cube_best_str) == 0); // Get Cube's second best string; if empty, return false char_32 *cube_next_best_str32; string cube_next_best_str; int cube_next_best_cost = WORST_COST; if (cube_alt_list->AltCount() > 1) { cube_next_best_str32 = cube_alt_list->Alt(1); if (cube_next_best_str32 == NULL || CubeUtils::StrLen(cube_next_best_str32) == 0) { return false; } cube_next_best_cost = cube_alt_list->AltCost(1); CubeUtils::UTF32ToUTF8(cube_next_best_str32, &cube_next_best_str); } // Rank of Tesseract's top result in Cube's alternate list int tess_rank = 0; for (tess_rank = 0; tess_rank < cube_alt_list->AltCount(); tess_rank++) { string alt_str; CubeUtils::UTF32ToUTF8(cube_alt_list->Alt(tess_rank), &alt_str); if (alt_str == tess_str) break; } // Cube's cost for tesseract's result. Note that this modifies the // state of cube_obj, including its alternate list by calling RecognizeWord() int tess_cost = cube_obj->WordCost(tess_str.c_str()); // Cube's bigram cost of Tesseract's string int tess_bigram_cost = 0; int tess_bigram_cost_valid = true; if (cube_cntxt_->Bigrams()) tess_bigram_cost = cube_cntxt_->Bigrams()-> Cost(tess_str32.c_str(), cube_cntxt_->CharacterSet()); else tess_bigram_cost_valid = false; // Tesseract confidence features->push_back(tess_confidence); // Cube cost of Tesseract string features->push_back(tess_cost); // Cube Rank of Tesseract string features->push_back(tess_rank); // length of Tesseract OCR string features->push_back(tess_str.length()); // Tesseract OCR string in dictionary features->push_back(ValidWord(tess_str)); if (tess_bigram_cost_valid) { // bigram cost of Tesseract string features->push_back(tess_bigram_cost); } // Cube tess_cost of Cube best string features->push_back(cube_best_cost); // Cube tess_cost of Cube next best string features->push_back(cube_next_best_cost); // length of Cube string features->push_back(cube_best_str.length()); // Cube string in dictionary features->push_back(ValidWord(cube_best_str)); if (cube_best_bigram_cost_valid) { // bigram cost of Cube string features->push_back(cube_best_bigram_cost); } // case-insensitive string comparison, including punctuation int compare_nocase_punc = CompareStrings(cube_best_str, tess_str, false, true); features->push_back(compare_nocase_punc == 0); // case-sensitive string comparison, ignoring punctuation int compare_case_nopunc = CompareStrings(cube_best_str, tess_str, true, false); features->push_back(compare_case_nopunc == 0); // case-insensitive string comparison, ignoring punctuation int compare_nocase_nopunc = CompareStrings(cube_best_str, tess_str, true, true); features->push_back(compare_nocase_nopunc == 0); return true; } // The CubeObject parameter is used for 2 purposes: 1) to retrieve // cube's alt list, and 2) to compute cube's word cost for the // tesseract result. The call to CubeObject::WordCost() modifies // the object's alternate list, so previous state will be lost. float TesseractCubeCombiner::CombineResults(WERD_RES *tess_res, CubeObject *cube_obj) { // If no combiner is loaded or the cube object is undefined, // tesseract wins with probability 1.0 if (combiner_net_ == NULL || cube_obj == NULL) { tprintf("Cube WARNING (TesseractCubeCombiner::CombineResults): " "Cube objects not initialized; defaulting to Tesseract\n"); return 1.0; } // Retrieve the alternate list from the CubeObject's current state. // If the alt list empty, tesseract wins with probability 1.0 WordAltList *cube_alt_list = cube_obj->AlternateList(); if (cube_alt_list == NULL) cube_alt_list = cube_obj->RecognizeWord(); if (cube_alt_list == NULL || cube_alt_list->AltCount() <= 0) { tprintf("Cube WARNING (TesseractCubeCombiner::CombineResults): " "Cube returned no results; defaulting to Tesseract\n"); return 1.0; } return CombineResults(tess_res, cube_obj, cube_alt_list); } // The alt_list parameter is expected to have been extracted from the // CubeObject that recognized the word to be combined. The cube_obj // parameter passed may be either same instance or a separate instance to // be used only by the combiner. In both cases, its alternate // list will be modified by an internal call to RecognizeWord(). float TesseractCubeCombiner::CombineResults(WERD_RES *tess_res, CubeObject *cube_obj, WordAltList *cube_alt_list) { // If no combiner is loaded or the cube object is undefined, or the // alt list is empty, tesseract wins with probability 1.0 if (combiner_net_ == NULL || cube_obj == NULL || cube_alt_list == NULL || cube_alt_list->AltCount() <= 0) { tprintf("Cube WARNING (TesseractCubeCombiner::CombineResults): " "Cube result cannot be retrieved; defaulting to Tesseract\n"); return 1.0; } // Tesseract result string, tesseract confidence, and cost of // tesseract result according to cube string tess_str = tess_res->best_choice->unichar_string().string(); // Map certainty [-20.0, 0.0] to confidence [0, 100] int tess_confidence = MIN(100, MAX(1, static_cast<int>( 100 + (5 * tess_res->best_choice->certainty())))); // Compute the combiner features. If feature computation fails or // answers are identical, tesseract wins with probability 1.0 vector<double> features; bool agreement; bool combiner_success = ComputeCombinerFeatures(tess_str, tess_confidence, cube_obj, cube_alt_list, &features, &agreement); if (!combiner_success || agreement) return 1.0; // Classify combiner feature vector and return output (probability // of tesseract class). double net_out[2]; if (!combiner_net_->FeedForward(&features[0], net_out)) return 1.0; return net_out[1]; } }
C++
/****************************************************************** * File: docqual.cpp (Formerly docqual.c) * Description: Document Quality Metrics * Author: Phil Cheatle * Created: Mon May 9 11:27:28 BST 1994 * * (C) Copyright 1994, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #endif #include <ctype.h> #include "docqual.h" #include "reject.h" #include "tesscallback.h" #include "tessvars.h" #include "globals.h" #include "tesseractclass.h" namespace tesseract{ // A little class to provide the callbacks as we have no pre-bound args. struct DocQualCallbacks { explicit DocQualCallbacks(WERD_RES* word0) : word(word0), match_count(0), accepted_match_count(0) {} void CountMatchingBlobs(int index) { ++match_count; } void CountAcceptedBlobs(int index) { if (word->reject_map[index].accepted()) ++accepted_match_count; ++match_count; } void AcceptIfGoodQuality(int index) { if (word->reject_map[index].accept_if_good_quality()) word->reject_map[index].setrej_quality_accept(); } WERD_RES* word; inT16 match_count; inT16 accepted_match_count; }; /************************************************************************* * word_blob_quality() * How many blobs in the box_word are identical to those of the inword? * ASSUME blobs in both initial word and box_word are in ascending order of * left hand blob edge. *************************************************************************/ inT16 Tesseract::word_blob_quality(WERD_RES *word, ROW *row) { if (word->bln_boxes == NULL || word->rebuild_word == NULL || word->rebuild_word->blobs.empty()) return 0; DocQualCallbacks cb(word); word->bln_boxes->ProcessMatchedBlobs( *word->rebuild_word, NewPermanentTessCallback(&cb, &DocQualCallbacks::CountMatchingBlobs)); return cb.match_count; } inT16 Tesseract::word_outline_errs(WERD_RES *word) { inT16 i = 0; inT16 err_count = 0; if (word->rebuild_word != NULL) { for (int b = 0; b < word->rebuild_word->NumBlobs(); ++b) { TBLOB* blob = word->rebuild_word->blobs[b]; err_count += count_outline_errs(word->best_choice->unichar_string()[i], blob->NumOutlines()); i++; } } return err_count; } /************************************************************************* * word_char_quality() * Combination of blob quality and outline quality - how many good chars are * there? - I.e chars which pass the blob AND outline tests. *************************************************************************/ void Tesseract::word_char_quality(WERD_RES *word, ROW *row, inT16 *match_count, inT16 *accepted_match_count) { if (word->bln_boxes == NULL || word->rebuild_word == NULL || word->rebuild_word->blobs.empty()) return; DocQualCallbacks cb(word); word->bln_boxes->ProcessMatchedBlobs( *word->rebuild_word, NewPermanentTessCallback(&cb, &DocQualCallbacks::CountAcceptedBlobs)); *match_count = cb.match_count; *accepted_match_count = cb.accepted_match_count; } /************************************************************************* * unrej_good_chs() * Unreject POTENTIAL rejects if the blob passes the blob and outline checks *************************************************************************/ void Tesseract::unrej_good_chs(WERD_RES *word, ROW *row) { if (word->bln_boxes == NULL || word->rebuild_word == NULL || word->rebuild_word->blobs.empty()) return; DocQualCallbacks cb(word); word->bln_boxes->ProcessMatchedBlobs( *word->rebuild_word, NewPermanentTessCallback(&cb, &DocQualCallbacks::AcceptIfGoodQuality)); } inT16 Tesseract::count_outline_errs(char c, inT16 outline_count) { int expected_outline_count; if (STRING (outlines_odd).contains (c)) return 0; //Dont use this char else if (STRING (outlines_2).contains (c)) expected_outline_count = 2; else expected_outline_count = 1; return abs (outline_count - expected_outline_count); } void Tesseract::quality_based_rejection(PAGE_RES_IT &page_res_it, BOOL8 good_quality_doc) { if ((tessedit_good_quality_unrej && good_quality_doc)) unrej_good_quality_words(page_res_it); doc_and_block_rejection(page_res_it, good_quality_doc); if (unlv_tilde_crunching) { tilde_crunch(page_res_it); tilde_delete(page_res_it); } } /************************************************************************* * unrej_good_quality_words() * Accept potential rejects in words which pass the following checks: * - Contains a potential reject * - Word looks like a sensible alpha word. * - Word segmentation is the same as the original image * - All characters have the expected number of outlines * NOTE - the rejection counts are recalculated after unrejection * - CANT do it in a single pass without a bit of fiddling * - keep it simple but inefficient *************************************************************************/ void Tesseract::unrej_good_quality_words( //unreject potential PAGE_RES_IT &page_res_it) { WERD_RES *word; ROW_RES *current_row; BLOCK_RES *current_block; int i; page_res_it.restart_page (); while (page_res_it.word () != NULL) { check_debug_pt (page_res_it.word (), 100); if (bland_unrej) { word = page_res_it.word (); for (i = 0; i < word->reject_map.length (); i++) { if (word->reject_map[i].accept_if_good_quality ()) word->reject_map[i].setrej_quality_accept (); } page_res_it.forward (); } else if ((page_res_it.row ()->char_count > 0) && ((page_res_it.row ()->rej_count / (float) page_res_it.row ()->char_count) <= quality_rowrej_pc)) { word = page_res_it.word (); if (word->reject_map.quality_recoverable_rejects() && (tessedit_unrej_any_wd || acceptable_word_string(*word->uch_set, word->best_choice->unichar_string().string(), word->best_choice->unichar_lengths().string()) != AC_UNACCEPTABLE)) { unrej_good_chs(word, page_res_it.row ()->row); } page_res_it.forward (); } else { /* Skip to end of dodgy row */ current_row = page_res_it.row (); while ((page_res_it.word () != NULL) && (page_res_it.row () == current_row)) page_res_it.forward (); } check_debug_pt (page_res_it.word (), 110); } page_res_it.restart_page (); page_res_it.page_res->char_count = 0; page_res_it.page_res->rej_count = 0; current_block = NULL; current_row = NULL; while (page_res_it.word () != NULL) { if (current_block != page_res_it.block ()) { current_block = page_res_it.block (); current_block->char_count = 0; current_block->rej_count = 0; } if (current_row != page_res_it.row ()) { current_row = page_res_it.row (); current_row->char_count = 0; current_row->rej_count = 0; current_row->whole_word_rej_count = 0; } page_res_it.rej_stat_word (); page_res_it.forward (); } } /************************************************************************* * doc_and_block_rejection() * * If the page has too many rejects - reject all of it. * If any block has too many rejects - reject all words in the block *************************************************************************/ void Tesseract::doc_and_block_rejection( //reject big chunks PAGE_RES_IT &page_res_it, BOOL8 good_quality_doc) { inT16 block_no = 0; inT16 row_no = 0; BLOCK_RES *current_block; ROW_RES *current_row; BOOL8 rej_word; BOOL8 prev_word_rejected; inT16 char_quality = 0; inT16 accepted_char_quality; if (page_res_it.page_res->rej_count * 100.0 / page_res_it.page_res->char_count > tessedit_reject_doc_percent) { reject_whole_page(page_res_it); if (tessedit_debug_doc_rejection) { tprintf("REJECT ALL #chars: %d #Rejects: %d; \n", page_res_it.page_res->char_count, page_res_it.page_res->rej_count); } } else { if (tessedit_debug_doc_rejection) { tprintf("NO PAGE REJECTION #chars: %d # Rejects: %d; \n", page_res_it.page_res->char_count, page_res_it.page_res->rej_count); } /* Walk blocks testing for block rejection */ page_res_it.restart_page(); WERD_RES* word; while ((word = page_res_it.word()) != NULL) { current_block = page_res_it.block(); block_no = current_block->block->index(); if (current_block->char_count > 0 && (current_block->rej_count * 100.0 / current_block->char_count) > tessedit_reject_block_percent) { if (tessedit_debug_block_rejection) { tprintf("REJECTING BLOCK %d #chars: %d; #Rejects: %d\n", block_no, current_block->char_count, current_block->rej_count); } prev_word_rejected = FALSE; while ((word = page_res_it.word()) != NULL && (page_res_it.block() == current_block)) { if (tessedit_preserve_blk_rej_perfect_wds) { rej_word = word->reject_map.reject_count() > 0 || word->reject_map.length () < tessedit_preserve_min_wd_len; if (rej_word && tessedit_dont_blkrej_good_wds && word->reject_map.length() >= tessedit_preserve_min_wd_len && acceptable_word_string( *word->uch_set, word->best_choice->unichar_string().string(), word->best_choice->unichar_lengths().string()) != AC_UNACCEPTABLE) { word_char_quality(word, page_res_it.row()->row, &char_quality, &accepted_char_quality); rej_word = char_quality != word->reject_map.length(); } } else { rej_word = TRUE; } if (rej_word) { /* Reject spacing if both current and prev words are rejected. NOTE - this is NOT restricted to FUZZY spaces. - When tried this generated more space errors. */ if (tessedit_use_reject_spaces && prev_word_rejected && page_res_it.prev_row() == page_res_it.row() && word->word->space() == 1) word->reject_spaces = TRUE; word->reject_map.rej_word_block_rej(); } prev_word_rejected = rej_word; page_res_it.forward(); } } else { if (tessedit_debug_block_rejection) { tprintf("NOT REJECTING BLOCK %d #chars: %d # Rejects: %d; \n", block_no, page_res_it.block()->char_count, page_res_it.block()->rej_count); } /* Walk rows in block testing for row rejection */ row_no = 0; while (page_res_it.word() != NULL && page_res_it.block() == current_block) { current_row = page_res_it.row(); row_no++; /* Reject whole row if: fraction of chars on row which are rejected exceed a limit AND fraction rejects which occur in WHOLE WERD rejects is LESS THAN a limit */ if (current_row->char_count > 0 && (current_row->rej_count * 100.0 / current_row->char_count) > tessedit_reject_row_percent && (current_row->whole_word_rej_count * 100.0 / current_row->rej_count) < tessedit_whole_wd_rej_row_percent) { if (tessedit_debug_block_rejection) { tprintf("REJECTING ROW %d #chars: %d; #Rejects: %d\n", row_no, current_row->char_count, current_row->rej_count); } prev_word_rejected = FALSE; while ((word = page_res_it.word()) != NULL && page_res_it.row () == current_row) { /* Preserve words on good docs unless they are mostly rejected*/ if (!tessedit_row_rej_good_docs && good_quality_doc) { rej_word = word->reject_map.reject_count() / static_cast<float>(word->reject_map.length()) > tessedit_good_doc_still_rowrej_wd; } else if (tessedit_preserve_row_rej_perfect_wds) { /* Preserve perfect words anyway */ rej_word = word->reject_map.reject_count() > 0 || word->reject_map.length () < tessedit_preserve_min_wd_len; if (rej_word && tessedit_dont_rowrej_good_wds && word->reject_map.length() >= tessedit_preserve_min_wd_len && acceptable_word_string(*word->uch_set, word->best_choice->unichar_string().string(), word->best_choice->unichar_lengths().string()) != AC_UNACCEPTABLE) { word_char_quality(word, page_res_it.row()->row, &char_quality, &accepted_char_quality); rej_word = char_quality != word->reject_map.length(); } } else { rej_word = TRUE; } if (rej_word) { /* Reject spacing if both current and prev words are rejected. NOTE - this is NOT restricted to FUZZY spaces. - When tried this generated more space errors. */ if (tessedit_use_reject_spaces && prev_word_rejected && page_res_it.prev_row() == page_res_it.row() && word->word->space () == 1) word->reject_spaces = TRUE; word->reject_map.rej_word_row_rej(); } prev_word_rejected = rej_word; page_res_it.forward(); } } else { if (tessedit_debug_block_rejection) { tprintf("NOT REJECTING ROW %d #chars: %d # Rejects: %d; \n", row_no, current_row->char_count, current_row->rej_count); } while (page_res_it.word() != NULL && page_res_it.row() == current_row) page_res_it.forward(); } } } } } } } // namespace tesseract /************************************************************************* * reject_whole_page() * Dont believe any of it - set the reject map to 00..00 in all words * *************************************************************************/ void reject_whole_page(PAGE_RES_IT &page_res_it) { page_res_it.restart_page (); while (page_res_it.word () != NULL) { page_res_it.word ()->reject_map.rej_word_doc_rej (); page_res_it.forward (); } //whole page is rejected page_res_it.page_res->rejected = TRUE; } namespace tesseract { void Tesseract::tilde_crunch(PAGE_RES_IT &page_res_it) { WERD_RES *word; GARBAGE_LEVEL garbage_level; PAGE_RES_IT copy_it; BOOL8 prev_potential_marked = FALSE; BOOL8 found_terrible_word = FALSE; BOOL8 ok_dict_word; page_res_it.restart_page(); while (page_res_it.word() != NULL) { POLY_BLOCK* pb = page_res_it.block()->block->poly_block(); if (pb != NULL && !pb->IsText()) { page_res_it.forward(); continue; } word = page_res_it.word(); if (crunch_early_convert_bad_unlv_chs) convert_bad_unlv_chs(word); if (crunch_early_merge_tess_fails) word->merge_tess_fails(); if (word->reject_map.accept_count () != 0) { found_terrible_word = FALSE; //Forget earlier potential crunches prev_potential_marked = FALSE; } else { ok_dict_word = safe_dict_word(word); garbage_level = garbage_word (word, ok_dict_word); if ((garbage_level != G_NEVER_CRUNCH) && (terrible_word_crunch (word, garbage_level))) { if (crunch_debug > 0) { tprintf ("T CRUNCHING: \"%s\"\n", word->best_choice->unichar_string().string()); } word->unlv_crunch_mode = CR_KEEP_SPACE; if (prev_potential_marked) { while (copy_it.word () != word) { if (crunch_debug > 0) { tprintf ("P1 CRUNCHING: \"%s\"\n", copy_it.word()->best_choice->unichar_string().string()); } copy_it.word ()->unlv_crunch_mode = CR_KEEP_SPACE; copy_it.forward (); } prev_potential_marked = FALSE; } found_terrible_word = TRUE; } else if ((garbage_level != G_NEVER_CRUNCH) && (potential_word_crunch (word, garbage_level, ok_dict_word))) { if (found_terrible_word) { if (crunch_debug > 0) { tprintf ("P2 CRUNCHING: \"%s\"\n", word->best_choice->unichar_string().string()); } word->unlv_crunch_mode = CR_KEEP_SPACE; } else if (!prev_potential_marked) { copy_it = page_res_it; prev_potential_marked = TRUE; if (crunch_debug > 1) { tprintf ("P3 CRUNCHING: \"%s\"\n", word->best_choice->unichar_string().string()); } } } else { found_terrible_word = FALSE; //Forget earlier potential crunches prev_potential_marked = FALSE; if (crunch_debug > 2) { tprintf ("NO CRUNCH: \"%s\"\n", word->best_choice->unichar_string().string()); } } } page_res_it.forward (); } } BOOL8 Tesseract::terrible_word_crunch(WERD_RES *word, GARBAGE_LEVEL garbage_level) { float rating_per_ch; int adjusted_len; int crunch_mode = 0; if ((word->best_choice->unichar_string().length () == 0) || (strspn (word->best_choice->unichar_string().string(), " ") == word->best_choice->unichar_string().length ())) crunch_mode = 1; else { adjusted_len = word->reject_map.length (); if (adjusted_len > crunch_rating_max) adjusted_len = crunch_rating_max; rating_per_ch = word->best_choice->rating () / adjusted_len; if (rating_per_ch > crunch_terrible_rating) crunch_mode = 2; else if (crunch_terrible_garbage && (garbage_level == G_TERRIBLE)) crunch_mode = 3; else if ((word->best_choice->certainty () < crunch_poor_garbage_cert) && (garbage_level != G_OK)) crunch_mode = 4; else if ((rating_per_ch > crunch_poor_garbage_rate) && (garbage_level != G_OK)) crunch_mode = 5; } if (crunch_mode > 0) { if (crunch_debug > 2) { tprintf ("Terrible_word_crunch (%d) on \"%s\"\n", crunch_mode, word->best_choice->unichar_string().string()); } return TRUE; } else return FALSE; } BOOL8 Tesseract::potential_word_crunch(WERD_RES *word, GARBAGE_LEVEL garbage_level, BOOL8 ok_dict_word) { float rating_per_ch; int adjusted_len; const char *str = word->best_choice->unichar_string().string(); const char *lengths = word->best_choice->unichar_lengths().string(); BOOL8 word_crunchable; int poor_indicator_count = 0; word_crunchable = !crunch_leave_accept_strings || word->reject_map.length() < 3 || (acceptable_word_string(*word->uch_set, str, lengths) == AC_UNACCEPTABLE && !ok_dict_word); adjusted_len = word->reject_map.length(); if (adjusted_len > 10) adjusted_len = 10; rating_per_ch = word->best_choice->rating() / adjusted_len; if (rating_per_ch > crunch_pot_poor_rate) { if (crunch_debug > 2) { tprintf("Potential poor rating on \"%s\"\n", word->best_choice->unichar_string().string()); } poor_indicator_count++; } if (word_crunchable && word->best_choice->certainty() < crunch_pot_poor_cert) { if (crunch_debug > 2) { tprintf("Potential poor cert on \"%s\"\n", word->best_choice->unichar_string().string()); } poor_indicator_count++; } if (garbage_level != G_OK) { if (crunch_debug > 2) { tprintf("Potential garbage on \"%s\"\n", word->best_choice->unichar_string().string()); } poor_indicator_count++; } return poor_indicator_count >= crunch_pot_indicators; } void Tesseract::tilde_delete(PAGE_RES_IT &page_res_it) { WERD_RES *word; PAGE_RES_IT copy_it; BOOL8 deleting_from_bol = FALSE; BOOL8 marked_delete_point = FALSE; inT16 debug_delete_mode; CRUNCH_MODE delete_mode; inT16 x_debug_delete_mode; CRUNCH_MODE x_delete_mode; page_res_it.restart_page(); while (page_res_it.word() != NULL) { word = page_res_it.word(); delete_mode = word_deletable (word, debug_delete_mode); if (delete_mode != CR_NONE) { if (word->word->flag (W_BOL) || deleting_from_bol) { if (crunch_debug > 0) { tprintf ("BOL CRUNCH DELETING(%d): \"%s\"\n", debug_delete_mode, word->best_choice->unichar_string().string()); } word->unlv_crunch_mode = delete_mode; deleting_from_bol = TRUE; } else if (word->word->flag(W_EOL)) { if (marked_delete_point) { while (copy_it.word() != word) { x_delete_mode = word_deletable (copy_it.word (), x_debug_delete_mode); if (crunch_debug > 0) { tprintf ("EOL CRUNCH DELETING(%d): \"%s\"\n", x_debug_delete_mode, copy_it.word()->best_choice->unichar_string().string()); } copy_it.word ()->unlv_crunch_mode = x_delete_mode; copy_it.forward (); } } if (crunch_debug > 0) { tprintf ("EOL CRUNCH DELETING(%d): \"%s\"\n", debug_delete_mode, word->best_choice->unichar_string().string()); } word->unlv_crunch_mode = delete_mode; deleting_from_bol = FALSE; marked_delete_point = FALSE; } else { if (!marked_delete_point) { copy_it = page_res_it; marked_delete_point = TRUE; } } } else { deleting_from_bol = FALSE; //Forget earlier potential crunches marked_delete_point = FALSE; } /* The following step has been left till now as the tess fails are used to determine if the word is deletable. */ if (!crunch_early_merge_tess_fails) word->merge_tess_fails(); page_res_it.forward (); } } void Tesseract::convert_bad_unlv_chs(WERD_RES *word_res) { int i; UNICHAR_ID unichar_dash = word_res->uch_set->unichar_to_id("-"); UNICHAR_ID unichar_space = word_res->uch_set->unichar_to_id(" "); UNICHAR_ID unichar_tilde = word_res->uch_set->unichar_to_id("~"); UNICHAR_ID unichar_pow = word_res->uch_set->unichar_to_id("^"); for (i = 0; i < word_res->reject_map.length(); ++i) { if (word_res->best_choice->unichar_id(i) == unichar_tilde) { word_res->best_choice->set_unichar_id(unichar_dash, i); if (word_res->reject_map[i].accepted ()) word_res->reject_map[i].setrej_unlv_rej (); } if (word_res->best_choice->unichar_id(i) == unichar_pow) { word_res->best_choice->set_unichar_id(unichar_space, i); if (word_res->reject_map[i].accepted ()) word_res->reject_map[i].setrej_unlv_rej (); } } } GARBAGE_LEVEL Tesseract::garbage_word(WERD_RES *word, BOOL8 ok_dict_word) { enum STATES { JUNK, FIRST_UPPER, FIRST_LOWER, FIRST_NUM, SUBSEQUENT_UPPER, SUBSEQUENT_LOWER, SUBSEQUENT_NUM }; const char *str = word->best_choice->unichar_string().string(); const char *lengths = word->best_choice->unichar_lengths().string(); STATES state = JUNK; int len = 0; int isolated_digits = 0; int isolated_alphas = 0; int bad_char_count = 0; int tess_rejs = 0; int dodgy_chars = 0; int ok_chars; UNICHAR_ID last_char = -1; int alpha_repetition_count = 0; int longest_alpha_repetition_count = 0; int longest_lower_run_len = 0; int lower_string_count = 0; int longest_upper_run_len = 0; int upper_string_count = 0; int total_alpha_count = 0; int total_digit_count = 0; for (; *str != '\0'; str += *(lengths++)) { len++; if (word->uch_set->get_isupper (str, *lengths)) { total_alpha_count++; switch (state) { case SUBSEQUENT_UPPER: case FIRST_UPPER: state = SUBSEQUENT_UPPER; upper_string_count++; if (longest_upper_run_len < upper_string_count) longest_upper_run_len = upper_string_count; if (last_char == word->uch_set->unichar_to_id(str, *lengths)) { alpha_repetition_count++; if (longest_alpha_repetition_count < alpha_repetition_count) { longest_alpha_repetition_count = alpha_repetition_count; } } else { last_char = word->uch_set->unichar_to_id(str, *lengths); alpha_repetition_count = 1; } break; case FIRST_NUM: isolated_digits++; default: state = FIRST_UPPER; last_char = word->uch_set->unichar_to_id(str, *lengths); alpha_repetition_count = 1; upper_string_count = 1; break; } } else if (word->uch_set->get_islower (str, *lengths)) { total_alpha_count++; switch (state) { case SUBSEQUENT_LOWER: case FIRST_LOWER: state = SUBSEQUENT_LOWER; lower_string_count++; if (longest_lower_run_len < lower_string_count) longest_lower_run_len = lower_string_count; if (last_char == word->uch_set->unichar_to_id(str, *lengths)) { alpha_repetition_count++; if (longest_alpha_repetition_count < alpha_repetition_count) { longest_alpha_repetition_count = alpha_repetition_count; } } else { last_char = word->uch_set->unichar_to_id(str, *lengths); alpha_repetition_count = 1; } break; case FIRST_NUM: isolated_digits++; default: state = FIRST_LOWER; last_char = word->uch_set->unichar_to_id(str, *lengths); alpha_repetition_count = 1; lower_string_count = 1; break; } } else if (word->uch_set->get_isdigit (str, *lengths)) { total_digit_count++; switch (state) { case FIRST_NUM: state = SUBSEQUENT_NUM; case SUBSEQUENT_NUM: break; case FIRST_UPPER: case FIRST_LOWER: isolated_alphas++; default: state = FIRST_NUM; break; } } else { if (*lengths == 1 && *str == ' ') tess_rejs++; else bad_char_count++; switch (state) { case FIRST_NUM: isolated_digits++; break; case FIRST_UPPER: case FIRST_LOWER: isolated_alphas++; default: break; } state = JUNK; } } switch (state) { case FIRST_NUM: isolated_digits++; break; case FIRST_UPPER: case FIRST_LOWER: isolated_alphas++; default: break; } if (crunch_include_numerals) { total_alpha_count += total_digit_count - isolated_digits; } if (crunch_leave_ok_strings && len >= 4 && 2 * (total_alpha_count - isolated_alphas) > len && longest_alpha_repetition_count < crunch_long_repetitions) { if ((crunch_accept_ok && acceptable_word_string(*word->uch_set, str, lengths) != AC_UNACCEPTABLE) || longest_lower_run_len > crunch_leave_lc_strings || longest_upper_run_len > crunch_leave_uc_strings) return G_NEVER_CRUNCH; } if (word->reject_map.length() > 1 && strpbrk(str, " ") == NULL && (word->best_choice->permuter() == SYSTEM_DAWG_PERM || word->best_choice->permuter() == FREQ_DAWG_PERM || word->best_choice->permuter() == USER_DAWG_PERM || word->best_choice->permuter() == NUMBER_PERM || acceptable_word_string(*word->uch_set, str, lengths) != AC_UNACCEPTABLE || ok_dict_word)) return G_OK; ok_chars = len - bad_char_count - isolated_digits - isolated_alphas - tess_rejs; if (crunch_debug > 3) { tprintf("garbage_word: \"%s\"\n", word->best_choice->unichar_string().string()); tprintf("LEN: %d bad: %d iso_N: %d iso_A: %d rej: %d\n", len, bad_char_count, isolated_digits, isolated_alphas, tess_rejs); } if (bad_char_count == 0 && tess_rejs == 0 && (len > isolated_digits + isolated_alphas || len <= 2)) return G_OK; if (tess_rejs > ok_chars || (tess_rejs > 0 && (bad_char_count + tess_rejs) * 2 > len)) return G_TERRIBLE; if (len > 4) { dodgy_chars = 2 * tess_rejs + bad_char_count + isolated_digits + isolated_alphas; if (dodgy_chars > 5 || (dodgy_chars / (float) len) > 0.5) return G_DODGY; else return G_OK; } else { dodgy_chars = 2 * tess_rejs + bad_char_count; if ((len == 4 && dodgy_chars > 2) || (len == 3 && dodgy_chars > 2) || dodgy_chars >= len) return G_DODGY; else return G_OK; } } /************************************************************************* * word_deletable() * DELETE WERDS AT ENDS OF ROWS IF * Word is crunched && * ( string length = 0 OR * > 50% of chars are "|" (before merging) OR * certainty < -10 OR * rating /char > 60 OR * TOP of word is more than 0.5 xht BELOW baseline OR * BOTTOM of word is more than 0.5 xht ABOVE xht OR * length of word < 3xht OR * height of word < 0.7 xht OR * height of word > 3.0 xht OR * >75% of the outline BBs have longest dimension < 0.5xht *************************************************************************/ CRUNCH_MODE Tesseract::word_deletable(WERD_RES *word, inT16 &delete_mode) { int word_len = word->reject_map.length (); float rating_per_ch; TBOX box; //BB of word if (word->unlv_crunch_mode == CR_NONE) { delete_mode = 0; return CR_NONE; } if (word_len == 0) { delete_mode = 1; return CR_DELETE; } if (word->rebuild_word != NULL) { // Cube leaves rebuild_word NULL. box = word->rebuild_word->bounding_box(); if (box.height () < crunch_del_min_ht * kBlnXHeight) { delete_mode = 4; return CR_DELETE; } if (noise_outlines(word->rebuild_word)) { delete_mode = 5; return CR_DELETE; } } if ((failure_count (word) * 1.5) > word_len) { delete_mode = 2; return CR_LOOSE_SPACE; } if (word->best_choice->certainty () < crunch_del_cert) { delete_mode = 7; return CR_LOOSE_SPACE; } rating_per_ch = word->best_choice->rating () / word_len; if (rating_per_ch > crunch_del_rating) { delete_mode = 8; return CR_LOOSE_SPACE; } if (box.top () < kBlnBaselineOffset - crunch_del_low_word * kBlnXHeight) { delete_mode = 9; return CR_LOOSE_SPACE; } if (box.bottom () > kBlnBaselineOffset + crunch_del_high_word * kBlnXHeight) { delete_mode = 10; return CR_LOOSE_SPACE; } if (box.height () > crunch_del_max_ht * kBlnXHeight) { delete_mode = 11; return CR_LOOSE_SPACE; } if (box.width () < crunch_del_min_width * kBlnXHeight) { delete_mode = 3; return CR_LOOSE_SPACE; } delete_mode = 0; return CR_NONE; } inT16 Tesseract::failure_count(WERD_RES *word) { const char *str = word->best_choice->unichar_string().string(); int tess_rejs = 0; for (; *str != '\0'; str++) { if (*str == ' ') tess_rejs++; } return tess_rejs; } BOOL8 Tesseract::noise_outlines(TWERD *word) { TBOX box; // BB of outline inT16 outline_count = 0; inT16 small_outline_count = 0; inT16 max_dimension; float small_limit = kBlnXHeight * crunch_small_outlines_size; for (int b = 0; b < word->NumBlobs(); ++b) { TBLOB* blob = word->blobs[b]; for (TESSLINE* ol = blob->outlines; ol != NULL; ol = ol->next) { outline_count++; box = ol->bounding_box(); if (box.height() > box.width()) max_dimension = box.height(); else max_dimension = box.width(); if (max_dimension < small_limit) small_outline_count++; } } return small_outline_count >= outline_count; } } // namespace tesseract
C++
/********************************************************************** * File: tesseract_cube_combiner.h * Description: Declaration of the Tesseract & Cube results combiner Class * Author: Ahmad Abdulkader * Created: 2008 * * (C) Copyright 2008, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ // The TesseractCubeCombiner class provides the functionality of combining // the recognition results of Tesseract and Cube at the word level #ifndef TESSERACT_CCMAIN_TESSERACT_CUBE_COMBINER_H #define TESSERACT_CCMAIN_TESSERACT_CUBE_COMBINER_H #include <string> #include <vector> #include "pageres.h" #ifdef _WIN32 #include <windows.h> using namespace std; #endif #ifdef USE_STD_NAMESPACE using std::string; using std::vector; #endif namespace tesseract { class CubeObject; class NeuralNet; class CubeRecoContext; class WordAltList; class TesseractCubeCombiner { public: explicit TesseractCubeCombiner(CubeRecoContext *cube_cntxt); virtual ~TesseractCubeCombiner(); // There are 2 public methods for combining the results of tesseract // and cube. Both return the probability that the Tesseract result is // correct. The difference between the two interfaces is in how the // passed-in CubeObject is used. // The CubeObject parameter is used for 2 purposes: 1) to retrieve // cube's alt list, and 2) to compute cube's word cost for the // tesseract result. Both uses may modify the state of the // CubeObject (including the BeamSearch state) with a call to // RecognizeWord(). float CombineResults(WERD_RES *tess_res, CubeObject *cube_obj); // The alt_list parameter is expected to have been extracted from the // CubeObject that recognized the word to be combined. The cube_obj // parameter passed in is a separate instance to be used only by // the combiner. float CombineResults(WERD_RES *tess_res, CubeObject *cube_obj, WordAltList *alt_list); // Public method for computing the combiner features. The agreement // output parameter will be true if both answers are identical, // false otherwise. Modifies the cube_alt_list, so no assumptions // should be made about its state upon return. bool ComputeCombinerFeatures(const string &tess_res, int tess_confidence, CubeObject *cube_obj, WordAltList *cube_alt_list, vector<double> *features, bool *agreement); // Is the word valid according to Tesseract's language model bool ValidWord(const string &str); // Loads the combiner neural network from file, using cube_cntxt_ // to find path. bool LoadCombinerNet(); private: // Normalize a UTF-8 string. Converts the UTF-8 string to UTF32 and optionally // strips punc and/or normalizes case and then converts back string NormalizeString(const string &str, bool remove_punc, bool norm_case); // Compares 2 strings after optionally normalizing them and or stripping // punctuation int CompareStrings(const string &str1, const string &str2, bool ignore_punc, bool norm_case); NeuralNet *combiner_net_; // pointer to the combiner NeuralNet object CubeRecoContext *cube_cntxt_; // used for language ID and data paths }; } #endif // TESSERACT_CCMAIN_TESSERACT_CUBE_COMBINER_H
C++
/********************************************************************** * File: paragraphs.cpp * Description: Paragraph detection for tesseract. * Author: David Eger * Created: 25 February 2011 * * (C) Copyright 2011, Google Inc. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #define __func__ __FUNCTION__ #endif #include <ctype.h> #include "genericvector.h" #include "helpers.h" #include "mutableiterator.h" #include "ocrpara.h" #include "pageres.h" #include "paragraphs.h" #include "paragraphs_internal.h" #include "publictypes.h" #include "ratngs.h" #include "rect.h" #include "statistc.h" #include "strngs.h" #include "tprintf.h" #include "unicharset.h" #include "unicodes.h" namespace tesseract { // Special "weak" ParagraphModels. const ParagraphModel *kCrownLeft = reinterpret_cast<ParagraphModel *>(0xDEAD111F); const ParagraphModel *kCrownRight = reinterpret_cast<ParagraphModel *>(0xDEAD888F); // Given the width of a typical space between words, what is the threshold // by which by which we think left and right alignments for paragraphs // can vary and still be aligned. static int Epsilon(int space_pix) { return space_pix * 4 / 5; } static bool AcceptableRowArgs( int debug_level, int min_num_rows, const char *function_name, const GenericVector<RowScratchRegisters> *rows, int row_start, int row_end) { if (row_start < 0 || row_end > rows->size() || row_start > row_end) { tprintf("Invalid arguments rows[%d, %d) while rows is of size %d.\n", row_start, row_end, rows->size()); return false; } if (row_end - row_start < min_num_rows) { if (debug_level > 1) { tprintf("# Too few rows[%d, %d) for %s.\n", row_start, row_end, function_name); } return false; } return true; } // =============================== Debug Code ================================ // Convert an integer to a decimal string. static STRING StrOf(int num) { char buffer[30]; snprintf(buffer, sizeof(buffer), "%d", num); return STRING(buffer); } // Given a row-major matrix of unicode text and a column separator, print // a formatted table. For ASCII, we get good column alignment. static void PrintTable(const GenericVector<GenericVector<STRING> > &rows, const STRING &colsep) { GenericVector<int> max_col_widths; for (int r = 0; r < rows.size(); r++) { int num_columns = rows[r].size(); for (int c = 0; c < num_columns; c++) { int num_unicodes = 0; for (int i = 0; i < rows[r][c].size(); i++) { if ((rows[r][c][i] & 0xC0) != 0x80) num_unicodes++; } if (c >= max_col_widths.size()) { max_col_widths.push_back(num_unicodes); } else { if (num_unicodes > max_col_widths[c]) max_col_widths[c] = num_unicodes; } } } GenericVector<STRING> col_width_patterns; for (int c = 0; c < max_col_widths.size(); c++) { col_width_patterns.push_back( STRING("%-") + StrOf(max_col_widths[c]) + "s"); } for (int r = 0; r < rows.size(); r++) { for (int c = 0; c < rows[r].size(); c++) { if (c > 0) tprintf("%s", colsep.string()); tprintf(col_width_patterns[c].string(), rows[r][c].string()); } tprintf("\n"); } } STRING RtlEmbed(const STRING &word, bool rtlify) { if (rtlify) return STRING(kRLE) + word + STRING(kPDF); return word; } // Print the current thoughts of the paragraph detector. static void PrintDetectorState(const ParagraphTheory &theory, const GenericVector<RowScratchRegisters> &rows) { GenericVector<GenericVector<STRING> > output; output.push_back(GenericVector<STRING>()); output.back().push_back("#row"); output.back().push_back("space"); output.back().push_back(".."); output.back().push_back("lword[widthSEL]"); output.back().push_back("rword[widthSEL]"); RowScratchRegisters::AppendDebugHeaderFields(&output.back()); output.back().push_back("text"); for (int i = 0; i < rows.size(); i++) { output.push_back(GenericVector<STRING>()); GenericVector<STRING> &row = output.back(); const RowInfo& ri = *rows[i].ri_; row.push_back(StrOf(i)); row.push_back(StrOf(ri.average_interword_space)); row.push_back(ri.has_leaders ? ".." : " "); row.push_back(RtlEmbed(ri.lword_text, !ri.ltr) + "[" + StrOf(ri.lword_box.width()) + (ri.lword_likely_starts_idea ? "S" : "s") + (ri.lword_likely_ends_idea ? "E" : "e") + (ri.lword_indicates_list_item ? "L" : "l") + "]"); row.push_back(RtlEmbed(ri.rword_text, !ri.ltr) + "[" + StrOf(ri.rword_box.width()) + (ri.rword_likely_starts_idea ? "S" : "s") + (ri.rword_likely_ends_idea ? "E" : "e") + (ri.rword_indicates_list_item ? "L" : "l") + "]"); rows[i].AppendDebugInfo(theory, &row); row.push_back(RtlEmbed(ri.text, !ri.ltr)); } PrintTable(output, " "); tprintf("Active Paragraph Models:\n"); for (int m = 0; m < theory.models().size(); m++) { tprintf(" %d: %s\n", m + 1, theory.models()[m]->ToString().string()); } } static void DebugDump( bool should_print, const STRING &phase, const ParagraphTheory &theory, const GenericVector<RowScratchRegisters> &rows) { if (!should_print) return; tprintf("# %s\n", phase.string()); PrintDetectorState(theory, rows); } // Print out the text for rows[row_start, row_end) static void PrintRowRange(const GenericVector<RowScratchRegisters> &rows, int row_start, int row_end) { tprintf("======================================\n"); for (int row = row_start; row < row_end; row++) { tprintf("%s\n", rows[row].ri_->text.string()); } tprintf("======================================\n"); } // ============= Brain Dead Language Model (ASCII Version) =================== bool IsLatinLetter(int ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'); } bool IsDigitLike(int ch) { return ch == 'o' || ch == 'O' || ch == 'l' || ch == 'I'; } bool IsOpeningPunct(int ch) { return strchr("'\"({[", ch) != NULL; } bool IsTerminalPunct(int ch) { return strchr(":'\".?!]})", ch) != NULL; } // Return a pointer after consuming as much text as qualifies as roman numeral. const char *SkipChars(const char *str, const char *toskip) { while (*str != '\0' && strchr(toskip, *str)) { str++; } return str; } const char *SkipChars(const char *str, bool (*skip)(int)) { while (*str != '\0' && skip(*str)) { str++; } return str; } const char *SkipOne(const char *str, const char *toskip) { if (*str != '\0' && strchr(toskip, *str)) return str + 1; return str; } // Return whether it is very likely that this is a numeral marker that could // start a list item. Some examples include: // A I iii. VI (2) 3.5. [C-4] bool LikelyListNumeral(const STRING &word) { const char *kRomans = "ivxlmdIVXLMD"; const char *kDigits = "012345789"; const char *kOpen = "[{("; const char *kSep = ":;-.,"; const char *kClose = "]})"; int num_segments = 0; const char *pos = word.string(); while (*pos != '\0' && num_segments < 3) { // skip up to two open parens. const char *numeral_start = SkipOne(SkipOne(pos, kOpen), kOpen); const char *numeral_end = SkipChars(numeral_start, kRomans); if (numeral_end != numeral_start) { // Got Roman Numeral. Great. } else { numeral_end = SkipChars(numeral_start, kDigits); if (numeral_end == numeral_start) { // If there's a single latin letter, we can use that. numeral_end = SkipChars(numeral_start, IsLatinLetter); if (numeral_end - numeral_start != 1) break; } } // We got some sort of numeral. num_segments++; // Skip any trailing parens or punctuation. pos = SkipChars(SkipChars(numeral_end, kClose), kSep); if (pos == numeral_end) break; } return *pos == '\0'; } bool LikelyListMark(const STRING &word) { const char *kListMarks = "0Oo*.,+."; return word.size() == 1 && strchr(kListMarks, word[0]) != NULL; } bool AsciiLikelyListItem(const STRING &word) { return LikelyListMark(word) || LikelyListNumeral(word); } // ========== Brain Dead Language Model (Tesseract Version) ================ // Return the first Unicode Codepoint from werd[pos]. int UnicodeFor(const UNICHARSET *u, const WERD_CHOICE *werd, int pos) { if (!u || !werd || pos > werd->length()) return 0; return UNICHAR(u->id_to_unichar(werd->unichar_id(pos)), -1).first_uni(); } // A useful helper class for finding the first j >= i so that word[j] // does not have given character type. class UnicodeSpanSkipper { public: UnicodeSpanSkipper(const UNICHARSET *unicharset, const WERD_CHOICE *word) : u_(unicharset), word_(word) { wordlen_ = word->length(); } // Given an input position, return the first position >= pos not punc. int SkipPunc(int pos); // Given an input position, return the first position >= pos not digit. int SkipDigits(int pos); // Given an input position, return the first position >= pos not roman. int SkipRomans(int pos); // Given an input position, return the first position >= pos not alpha. int SkipAlpha(int pos); private: const UNICHARSET *u_; const WERD_CHOICE *word_; int wordlen_; }; int UnicodeSpanSkipper::SkipPunc(int pos) { while (pos < wordlen_ && u_->get_ispunctuation(word_->unichar_id(pos))) pos++; return pos; } int UnicodeSpanSkipper::SkipDigits(int pos) { while (pos < wordlen_ && (u_->get_isdigit(word_->unichar_id(pos)) || IsDigitLike(UnicodeFor(u_, word_, pos)))) pos++; return pos; } int UnicodeSpanSkipper::SkipRomans(int pos) { const char *kRomans = "ivxlmdIVXLMD"; while (pos < wordlen_) { int ch = UnicodeFor(u_, word_, pos); if (ch >= 0xF0 || strchr(kRomans, ch) == 0) break; pos++; } return pos; } int UnicodeSpanSkipper::SkipAlpha(int pos) { while (pos < wordlen_ && u_->get_isalpha(word_->unichar_id(pos))) pos++; return pos; } bool LikelyListMarkUnicode(int ch) { if (ch < 0x80) { STRING single_ch; single_ch += ch; return LikelyListMark(single_ch); } switch (ch) { // TODO(eger) expand this list of unicodes as needed. case 0x00B0: // degree sign case 0x2022: // bullet case 0x25E6: // white bullet case 0x00B7: // middle dot case 0x25A1: // white square case 0x25A0: // black square case 0x25AA: // black small square case 0x2B1D: // black very small square case 0x25BA: // black right-pointing pointer case 0x25CF: // black circle case 0x25CB: // white circle return true; default: break; // fall through } return false; } // Return whether it is very likely that this is a numeral marker that could // start a list item. Some examples include: // A I iii. VI (2) 3.5. [C-4] bool UniLikelyListItem(const UNICHARSET *u, const WERD_CHOICE *werd) { if (werd->length() == 1 && LikelyListMarkUnicode(UnicodeFor(u, werd, 0))) return true; UnicodeSpanSkipper m(u, werd); int num_segments = 0; int pos = 0; while (pos < werd->length() && num_segments < 3) { int numeral_start = m.SkipPunc(pos); if (numeral_start > pos + 1) break; int numeral_end = m.SkipRomans(numeral_start); if (numeral_end == numeral_start) { numeral_end = m.SkipDigits(numeral_start); if (numeral_end == numeral_start) { // If there's a single latin letter, we can use that. numeral_end = m.SkipAlpha(numeral_start); if (numeral_end - numeral_start != 1) break; } } // We got some sort of numeral. num_segments++; // Skip any trailing punctuation. pos = m.SkipPunc(numeral_end); if (pos == numeral_end) break; } return pos == werd->length(); } // ========= Brain Dead Language Model (combined entry points) ================ // Given the leftmost word of a line either as a Tesseract unicharset + werd // or a utf8 string, set the following attributes for it: // is_list - this word might be a list number or bullet. // starts_idea - this word is likely to start a sentence. // ends_idea - this word is likely to end a sentence. void LeftWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea) { *is_list = false; *starts_idea = false; *ends_idea = false; if (utf8.size() == 0 || (werd != NULL && werd->length() == 0)) { // Empty *ends_idea = true; return; } if (unicharset && werd) { // We have a proper werd and unicharset so use it. if (UniLikelyListItem(unicharset, werd)) { *is_list = true; *starts_idea = true; *ends_idea = true; } if (unicharset->get_isupper(werd->unichar_id(0))) { *starts_idea = true; } if (unicharset->get_ispunctuation(werd->unichar_id(0))) { *starts_idea = true; *ends_idea = true; } } else { // Assume utf8 is mostly ASCII if (AsciiLikelyListItem(utf8)) { *is_list = true; *starts_idea = true; } int start_letter = utf8[0]; if (IsOpeningPunct(start_letter)) { *starts_idea = true; } if (IsTerminalPunct(start_letter)) { *ends_idea = true; } if (start_letter >= 'A' && start_letter <= 'Z') { *starts_idea = true; } } } // Given the rightmost word of a line either as a Tesseract unicharset + werd // or a utf8 string, set the following attributes for it: // is_list - this word might be a list number or bullet. // starts_idea - this word is likely to start a sentence. // ends_idea - this word is likely to end a sentence. void RightWordAttributes(const UNICHARSET *unicharset, const WERD_CHOICE *werd, const STRING &utf8, bool *is_list, bool *starts_idea, bool *ends_idea) { *is_list = false; *starts_idea = false; *ends_idea = false; if (utf8.size() == 0 || (werd != NULL && werd->length() == 0)) { // Empty *ends_idea = true; return; } if (unicharset && werd) { // We have a proper werd and unicharset so use it. if (UniLikelyListItem(unicharset, werd)) { *is_list = true; *starts_idea = true; } UNICHAR_ID last_letter = werd->unichar_id(werd->length() - 1); if (unicharset->get_ispunctuation(last_letter)) { *ends_idea = true; } } else { // Assume utf8 is mostly ASCII if (AsciiLikelyListItem(utf8)) { *is_list = true; *starts_idea = true; } int last_letter = utf8[utf8.size() - 1]; if (IsOpeningPunct(last_letter) || IsTerminalPunct(last_letter)) { *ends_idea = true; } } } // =============== Implementation of RowScratchRegisters ===================== /* static */ void RowScratchRegisters::AppendDebugHeaderFields( GenericVector<STRING> *header) { header->push_back("[lmarg,lind;rind,rmarg]"); header->push_back("model"); } void RowScratchRegisters::AppendDebugInfo(const ParagraphTheory &theory, GenericVector<STRING> *dbg) const { char s[30]; snprintf(s, sizeof(s), "[%3d,%3d;%3d,%3d]", lmargin_, lindent_, rindent_, rmargin_); dbg->push_back(s); STRING model_string; model_string += static_cast<char>(GetLineType()); model_string += ":"; int model_numbers = 0; for (int h = 0; h < hypotheses_.size(); h++) { if (hypotheses_[h].model == NULL) continue; if (model_numbers > 0) model_string += ","; if (StrongModel(hypotheses_[h].model)) { model_string += StrOf(1 + theory.IndexOf(hypotheses_[h].model)); } else if (hypotheses_[h].model == kCrownLeft) { model_string += "CrL"; } else if (hypotheses_[h].model == kCrownRight) { model_string += "CrR"; } model_numbers++; } if (model_numbers == 0) model_string += "0"; dbg->push_back(model_string); } void RowScratchRegisters::Init(const RowInfo &row) { ri_ = &row; lmargin_ = 0; lindent_ = row.pix_ldistance; rmargin_ = 0; rindent_ = row.pix_rdistance; } LineType RowScratchRegisters::GetLineType() const { if (hypotheses_.empty()) return LT_UNKNOWN; bool has_start = false; bool has_body = false; for (int i = 0; i < hypotheses_.size(); i++) { switch (hypotheses_[i].ty) { case LT_START: has_start = true; break; case LT_BODY: has_body = true; break; default: tprintf("Encountered bad value in hypothesis list: %c\n", hypotheses_[i].ty); break; } } if (has_start && has_body) return LT_MULTIPLE; return has_start ? LT_START : LT_BODY; } LineType RowScratchRegisters::GetLineType(const ParagraphModel *model) const { if (hypotheses_.empty()) return LT_UNKNOWN; bool has_start = false; bool has_body = false; for (int i = 0; i < hypotheses_.size(); i++) { if (hypotheses_[i].model != model) continue; switch (hypotheses_[i].ty) { case LT_START: has_start = true; break; case LT_BODY: has_body = true; break; default: tprintf("Encountered bad value in hypothesis list: %c\n", hypotheses_[i].ty); break; } } if (has_start && has_body) return LT_MULTIPLE; return has_start ? LT_START : LT_BODY; } void RowScratchRegisters::SetStartLine() { LineType current_lt = GetLineType(); if (current_lt != LT_UNKNOWN && current_lt != LT_START) { tprintf("Trying to set a line to be START when it's already BODY.\n"); } if (current_lt == LT_UNKNOWN || current_lt == LT_BODY) { hypotheses_.push_back_new(LineHypothesis(LT_START, NULL)); } } void RowScratchRegisters::SetBodyLine() { LineType current_lt = GetLineType(); if (current_lt != LT_UNKNOWN && current_lt != LT_BODY) { tprintf("Trying to set a line to be BODY when it's already START.\n"); } if (current_lt == LT_UNKNOWN || current_lt == LT_START) { hypotheses_.push_back_new(LineHypothesis(LT_BODY, NULL)); } } void RowScratchRegisters::AddStartLine(const ParagraphModel *model) { hypotheses_.push_back_new(LineHypothesis(LT_START, model)); int old_idx = hypotheses_.get_index(LineHypothesis(LT_START, NULL)); if (old_idx >= 0) hypotheses_.remove(old_idx); } void RowScratchRegisters::AddBodyLine(const ParagraphModel *model) { hypotheses_.push_back_new(LineHypothesis(LT_BODY, model)); int old_idx = hypotheses_.get_index(LineHypothesis(LT_BODY, NULL)); if (old_idx >= 0) hypotheses_.remove(old_idx); } void RowScratchRegisters::StartHypotheses(SetOfModels *models) const { for (int h = 0; h < hypotheses_.size(); h++) { if (hypotheses_[h].ty == LT_START && StrongModel(hypotheses_[h].model)) models->push_back_new(hypotheses_[h].model); } } void RowScratchRegisters::StrongHypotheses(SetOfModels *models) const { for (int h = 0; h < hypotheses_.size(); h++) { if (StrongModel(hypotheses_[h].model)) models->push_back_new(hypotheses_[h].model); } } void RowScratchRegisters::NonNullHypotheses(SetOfModels *models) const { for (int h = 0; h < hypotheses_.size(); h++) { if (hypotheses_[h].model != NULL) models->push_back_new(hypotheses_[h].model); } } const ParagraphModel *RowScratchRegisters::UniqueStartHypothesis() const { if (hypotheses_.size() != 1 || hypotheses_[0].ty != LT_START) return NULL; return hypotheses_[0].model; } const ParagraphModel *RowScratchRegisters::UniqueBodyHypothesis() const { if (hypotheses_.size() != 1 || hypotheses_[0].ty != LT_BODY) return NULL; return hypotheses_[0].model; } // Discard any hypotheses whose model is not in the given list. void RowScratchRegisters::DiscardNonMatchingHypotheses( const SetOfModels &models) { if (models.empty()) return; for (int h = hypotheses_.size() - 1; h >= 0; h--) { if (!models.contains(hypotheses_[h].model)) { hypotheses_.remove(h); } } } // ============ Geometry based Paragraph Detection Algorithm ================= struct Cluster { Cluster() : center(0), count(0) {} Cluster(int cen, int num) : center(cen), count(num) {} int center; // The center of the cluster. int count; // The number of entries within the cluster. }; class SimpleClusterer { public: explicit SimpleClusterer(int max_cluster_width) : max_cluster_width_(max_cluster_width) {} void Add(int value) { values_.push_back(value); } int size() const { return values_.size(); } void GetClusters(GenericVector<Cluster> *clusters); private: int max_cluster_width_; GenericVectorEqEq<int> values_; }; // Return the index of the cluster closest to value. int ClosestCluster(const GenericVector<Cluster> &clusters, int value) { int best_index = 0; for (int i = 0; i < clusters.size(); i++) { if (abs(value - clusters[i].center) < abs(value - clusters[best_index].center)) best_index = i; } return best_index; } void SimpleClusterer::GetClusters(GenericVector<Cluster> *clusters) { clusters->clear(); values_.sort(); for (int i = 0; i < values_.size();) { int orig_i = i; int lo = values_[i]; int hi = lo; while (++i < values_.size() && values_[i] <= lo + max_cluster_width_) { hi = values_[i]; } clusters->push_back(Cluster((hi + lo) / 2, i - orig_i)); } } // Calculate left- and right-indent tab stop values seen in // rows[row_start, row_end) given a tolerance of tolerance. void CalculateTabStops(GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, int tolerance, GenericVector<Cluster> *left_tabs, GenericVector<Cluster> *right_tabs) { if (!AcceptableRowArgs(0, 1, __func__, rows, row_start, row_end)) return; // First pass: toss all left and right indents into clusterers. SimpleClusterer initial_lefts(tolerance); SimpleClusterer initial_rights(tolerance); GenericVector<Cluster> initial_left_tabs; GenericVector<Cluster> initial_right_tabs; for (int i = row_start; i < row_end; i++) { initial_lefts.Add((*rows)[i].lindent_); initial_rights.Add((*rows)[i].rindent_); } initial_lefts.GetClusters(&initial_left_tabs); initial_rights.GetClusters(&initial_right_tabs); // Second pass: cluster only lines that are not "stray" // An example of a stray line is a page number -- a line whose start // and end tab-stops are far outside the typical start and end tab-stops // for the block. // Put another way, we only cluster data from lines whose start or end // tab stop is frequent. SimpleClusterer lefts(tolerance); SimpleClusterer rights(tolerance); // Outlier elimination. We might want to switch this to test outlier-ness // based on how strange a position an outlier is in instead of or in addition // to how rare it is. These outliers get re-added if we end up having too // few tab stops, to work with, however. int infrequent_enough_to_ignore = 0; if (row_end - row_start >= 8) infrequent_enough_to_ignore = 1; if (row_end - row_start >= 20) infrequent_enough_to_ignore = 2; for (int i = row_start; i < row_end; i++) { int lidx = ClosestCluster(initial_left_tabs, (*rows)[i].lindent_); int ridx = ClosestCluster(initial_right_tabs, (*rows)[i].rindent_); if (initial_left_tabs[lidx].count > infrequent_enough_to_ignore || initial_right_tabs[ridx].count > infrequent_enough_to_ignore) { lefts.Add((*rows)[i].lindent_); rights.Add((*rows)[i].rindent_); } } lefts.GetClusters(left_tabs); rights.GetClusters(right_tabs); if ((left_tabs->size() == 1 && right_tabs->size() >= 4) || (right_tabs->size() == 1 && left_tabs->size() >= 4)) { // One side is really ragged, and the other only has one tab stop, // so those "insignificant outliers" are probably important, actually. // This often happens on a page of an index. Add back in the ones // we omitted in the first pass. for (int i = row_start; i < row_end; i++) { int lidx = ClosestCluster(initial_left_tabs, (*rows)[i].lindent_); int ridx = ClosestCluster(initial_right_tabs, (*rows)[i].rindent_); if (!(initial_left_tabs[lidx].count > infrequent_enough_to_ignore || initial_right_tabs[ridx].count > infrequent_enough_to_ignore)) { lefts.Add((*rows)[i].lindent_); rights.Add((*rows)[i].rindent_); } } } lefts.GetClusters(left_tabs); rights.GetClusters(right_tabs); // If one side is almost a two-indent aligned side, and the other clearly // isn't, try to prune out the least frequent tab stop from that side. if (left_tabs->size() == 3 && right_tabs->size() >= 4) { int to_prune = -1; for (int i = left_tabs->size() - 1; i >= 0; i--) { if (to_prune < 0 || (*left_tabs)[i].count < (*left_tabs)[to_prune].count) { to_prune = i; } } if (to_prune >= 0 && (*left_tabs)[to_prune].count <= infrequent_enough_to_ignore) { left_tabs->remove(to_prune); } } if (right_tabs->size() == 3 && left_tabs->size() >= 4) { int to_prune = -1; for (int i = right_tabs->size() - 1; i >= 0; i--) { if (to_prune < 0 || (*right_tabs)[i].count < (*right_tabs)[to_prune].count) { to_prune = i; } } if (to_prune >= 0 && (*right_tabs)[to_prune].count <= infrequent_enough_to_ignore) { right_tabs->remove(to_prune); } } } // Given a paragraph model mark rows[row_start, row_end) as said model // start or body lines. // // Case 1: model->first_indent_ != model->body_indent_ // Differentiating the paragraph start lines from the paragraph body lines in // this case is easy, we just see how far each line is indented. // // Case 2: model->first_indent_ == model->body_indent_ // Here, we find end-of-paragraph lines by looking for "short lines." // What constitutes a "short line" changes depending on whether the text // ragged-right[left] or fully justified (aligned left and right). // // Case 2a: Ragged Right (or Left) text. (eop_threshold == 0) // We have a new paragraph it the first word would have at the end // of the previous line. // // Case 2b: Fully Justified. (eop_threshold > 0) // We mark a line as short (end of paragraph) if the offside indent // is greater than eop_threshold. void MarkRowsWithModel(GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, const ParagraphModel *model, bool ltr, int eop_threshold) { if (!AcceptableRowArgs(0, 0, __func__, rows, row_start, row_end)) return; for (int row = row_start; row < row_end; row++) { bool valid_first = ValidFirstLine(rows, row, model); bool valid_body = ValidBodyLine(rows, row, model); if (valid_first && !valid_body) { (*rows)[row].AddStartLine(model); } else if (valid_body && !valid_first) { (*rows)[row].AddBodyLine(model); } else if (valid_body && valid_first) { bool after_eop = (row == row_start); if (row > row_start) { if (eop_threshold > 0) { if (model->justification() == JUSTIFICATION_LEFT) { after_eop = (*rows)[row - 1].rindent_ > eop_threshold; } else { after_eop = (*rows)[row - 1].lindent_ > eop_threshold; } } else { after_eop = FirstWordWouldHaveFit((*rows)[row - 1], (*rows)[row], model->justification()); } } if (after_eop) { (*rows)[row].AddStartLine(model); } else { (*rows)[row].AddBodyLine(model); } } else { // Do nothing. Stray row. } } } // GeometricClassifierState holds all of the information we'll use while // trying to determine a paragraph model for the text lines in a block of // text: // + the rows under consideration [row_start, row_end) // + the common left- and right-indent tab stops // + does the block start out left-to-right or right-to-left // Further, this struct holds the data we amass for the (single) ParagraphModel // we'll assign to the text lines (assuming we get that far). struct GeometricClassifierState { GeometricClassifierState(int dbg_level, GenericVector<RowScratchRegisters> *r, int r_start, int r_end) : debug_level(dbg_level), rows(r), row_start(r_start), row_end(r_end), margin(0) { tolerance = InterwordSpace(*r, r_start, r_end); CalculateTabStops(r, r_start, r_end, tolerance, &left_tabs, &right_tabs); if (debug_level >= 3) { tprintf("Geometry: TabStop cluster tolerance = %d; " "%d left tabs; %d right tabs\n", tolerance, left_tabs.size(), right_tabs.size()); } ltr = (*r)[r_start].ri_->ltr; } void AssumeLeftJustification() { just = tesseract::JUSTIFICATION_LEFT; margin = (*rows)[row_start].lmargin_; } void AssumeRightJustification() { just = tesseract::JUSTIFICATION_RIGHT; margin = (*rows)[row_start].rmargin_; } // Align tabs are the tab stops the text is aligned to. const GenericVector<Cluster> &AlignTabs() const { if (just == tesseract::JUSTIFICATION_RIGHT) return right_tabs; return left_tabs; } // Offside tabs are the tab stops opposite the tabs used to align the text. // // Note that for a left-to-right text which is aligned to the right such as // this function comment, the offside tabs are the horizontal tab stops // marking the beginning of ("Note", "this" and "marking"). const GenericVector<Cluster> &OffsideTabs() const { if (just == tesseract::JUSTIFICATION_RIGHT) return left_tabs; return right_tabs; } // Return whether the i'th row extends from the leftmost left tab stop // to the right most right tab stop. bool IsFullRow(int i) const { return ClosestCluster(left_tabs, (*rows)[i].lindent_) == 0 && ClosestCluster(right_tabs, (*rows)[i].rindent_) == 0; } int AlignsideTabIndex(int row_idx) const { return ClosestCluster(AlignTabs(), (*rows)[row_idx].AlignsideIndent(just)); } // Given what we know about the paragraph justification (just), would the // first word of row_b have fit at the end of row_a? bool FirstWordWouldHaveFit(int row_a, int row_b) { return ::tesseract::FirstWordWouldHaveFit( (*rows)[row_a], (*rows)[row_b], just); } void PrintRows() const { PrintRowRange(*rows, row_start, row_end); } void Fail(int min_debug_level, const char *why) const { if (debug_level < min_debug_level) return; tprintf("# %s\n", why); PrintRows(); } ParagraphModel Model() const { return ParagraphModel(just, margin, first_indent, body_indent, tolerance); } // We print out messages with a debug level at least as great as debug_level. int debug_level; // The Geometric Classifier was asked to find a single paragraph model // to fit the text rows (*rows)[row_start, row_end) GenericVector<RowScratchRegisters> *rows; int row_start; int row_end; // The amount by which we expect the text edge can vary and still be aligned. int tolerance; // Is the script in this text block left-to-right? // HORRIBLE ROUGH APPROXIMATION. TODO(eger): Improve bool ltr; // These left and right tab stops were determined to be the common tab // stops for the given text. GenericVector<Cluster> left_tabs; GenericVector<Cluster> right_tabs; // These are parameters we must determine to create a ParagraphModel. tesseract::ParagraphJustification just; int margin; int first_indent; int body_indent; // eop_threshold > 0 if the text is fully justified. See MarkRowsWithModel() int eop_threshold; }; // Given a section of text where strong textual clues did not help identifying // paragraph breaks, and for which the left and right indents have exactly // three tab stops between them, attempt to find the paragraph breaks based // solely on the outline of the text and whether the script is left-to-right. // // Algorithm Detail: // The selected rows are in the form of a rectangle except // for some number of "short lines" of the same length: // // (A1) xxxxxxxxxxxxx (B1) xxxxxxxxxxxx // xxxxxxxxxxx xxxxxxxxxx # A "short" line. // xxxxxxxxxxxxx xxxxxxxxxxxx // xxxxxxxxxxxxx xxxxxxxxxxxx // // We have a slightly different situation if the only short // line is at the end of the excerpt. // // (A2) xxxxxxxxxxxxx (B2) xxxxxxxxxxxx // xxxxxxxxxxxxx xxxxxxxxxxxx // xxxxxxxxxxxxx xxxxxxxxxxxx // xxxxxxxxxxx xxxxxxxxxx # A "short" line. // // We'll interpret these as follows based on the reasoning in the comment for // GeometricClassify(): // [script direction: first indent, body indent] // (A1) LtR: 2,0 RtL: 0,0 (B1) LtR: 0,0 RtL: 2,0 // (A2) LtR: 2,0 RtL: CrR (B2) LtR: CrL RtL: 2,0 void GeometricClassifyThreeTabStopTextBlock( int debug_level, GeometricClassifierState &s, ParagraphTheory *theory) { int num_rows = s.row_end - s.row_start; int num_full_rows = 0; int last_row_full = 0; for (int i = s.row_start; i < s.row_end; i++) { if (s.IsFullRow(i)) { num_full_rows++; if (i == s.row_end - 1) last_row_full++; } } if (num_full_rows < 0.7 * num_rows) { s.Fail(1, "Not enough full lines to know which lines start paras."); return; } // eop_threshold gets set if we're fully justified; see MarkRowsWithModel() s.eop_threshold = 0; if (s.ltr) { s.AssumeLeftJustification(); } else { s.AssumeRightJustification(); } if (debug_level > 0) { tprintf("# Not enough variety for clear outline classification. " "Guessing these are %s aligned based on script.\n", s.ltr ? "left" : "right"); s.PrintRows(); } if (s.AlignTabs().size() == 2) { // case A1 or A2 s.first_indent = s.AlignTabs()[1].center; s.body_indent = s.AlignTabs()[0].center; } else { // case B1 or B2 if (num_rows - 1 == num_full_rows - last_row_full) { // case B2 const ParagraphModel *model = s.ltr ? kCrownLeft : kCrownRight; (*s.rows)[s.row_start].AddStartLine(model); for (int i = s.row_start + 1; i < s.row_end; i++) { (*s.rows)[i].AddBodyLine(model); } return; } else { // case B1 s.first_indent = s.body_indent = s.AlignTabs()[0].center; s.eop_threshold = (s.OffsideTabs()[0].center + s.OffsideTabs()[1].center) / 2; } } const ParagraphModel *model = theory->AddModel(s.Model()); MarkRowsWithModel(s.rows, s.row_start, s.row_end, model, s.ltr, s.eop_threshold); return; } // This function is called if strong textual clues were not available, but // the caller hopes that the paragraph breaks will be super obvious just // by the outline of the text. // // The particularly difficult case is figuring out what's going on if you // don't have enough short paragraph end lines to tell us what's going on. // // For instance, let's say you have the following outline: // // (A1) xxxxxxxxxxxxxxxxxxxxxx // xxxxxxxxxxxxxxxxxxxx // xxxxxxxxxxxxxxxxxxxxxx // xxxxxxxxxxxxxxxxxxxxxx // // Even if we know that the text is left-to-right and so will probably be // left-aligned, both of the following are possible texts: // // (A1a) 1. Here our list item // with two full lines. // 2. Here a second item. // 3. Here our third one. // // (A1b) so ends paragraph one. // Here starts another // paragraph we want to // read. This continues // // These examples are obvious from the text and should have been caught // by the StrongEvidenceClassify pass. However, for languages where we don't // have capital letters to go on (e.g. Hebrew, Arabic, Hindi, Chinese), // it's worth guessing that (A1b) is the correct interpretation if there are // far more "full" lines than "short" lines. void GeometricClassify(int debug_level, GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, ParagraphTheory *theory) { if (!AcceptableRowArgs(debug_level, 4, __func__, rows, row_start, row_end)) return; if (debug_level > 1) { tprintf("###############################################\n"); tprintf("##### GeometricClassify( rows[%d:%d) ) ####\n", row_start, row_end); tprintf("###############################################\n"); } RecomputeMarginsAndClearHypotheses(rows, row_start, row_end, 10); GeometricClassifierState s(debug_level, rows, row_start, row_end); if (s.left_tabs.size() > 2 && s.right_tabs.size() > 2) { s.Fail(2, "Too much variety for simple outline classification."); return; } if (s.left_tabs.size() <= 1 && s.right_tabs.size() <= 1) { s.Fail(1, "Not enough variety for simple outline classification."); return; } if (s.left_tabs.size() + s.right_tabs.size() == 3) { GeometricClassifyThreeTabStopTextBlock(debug_level, s, theory); return; } // At this point, we know that one side has at least two tab stops, and the // other side has one or two tab stops. // Left to determine: // (1) Which is the body indent and which is the first line indent? // (2) Is the text fully justified? // If one side happens to have three or more tab stops, assume that side // is opposite of the aligned side. if (s.right_tabs.size() > 2) { s.AssumeLeftJustification(); } else if (s.left_tabs.size() > 2) { s.AssumeRightJustification(); } else if (s.ltr) { // guess based on script direction s.AssumeLeftJustification(); } else { s.AssumeRightJustification(); } if (s.AlignTabs().size() == 2) { // For each tab stop on the aligned side, how many of them appear // to be paragraph start lines? [first lines] int firsts[2] = {0, 0}; // Count the first line as a likely paragraph start line. firsts[s.AlignsideTabIndex(s.row_start)]++; // For each line, if the first word would have fit on the previous // line count it as a likely paragraph start line. bool jam_packed = true; for (int i = s.row_start + 1; i < s.row_end; i++) { if (s.FirstWordWouldHaveFit(i - 1, i)) { firsts[s.AlignsideTabIndex(i)]++; jam_packed = false; } } // Make an extra accounting for the last line of the paragraph just // in case it's the only short line in the block. That is, take its // first word as typical and see if this looks like the *last* line // of a paragraph. If so, mark the *other* indent as probably a first. if (jam_packed && s.FirstWordWouldHaveFit(s.row_end - 1, s.row_end - 1)) { firsts[1 - s.AlignsideTabIndex(s.row_end - 1)]++; } int percent0firsts, percent1firsts; percent0firsts = (100 * firsts[0]) / s.AlignTabs()[0].count; percent1firsts = (100 * firsts[1]) / s.AlignTabs()[1].count; // TODO(eger): Tune these constants if necessary. if ((percent0firsts < 20 && 30 < percent1firsts) || percent0firsts + 30 < percent1firsts) { s.first_indent = s.AlignTabs()[1].center; s.body_indent = s.AlignTabs()[0].center; } else if ((percent1firsts < 20 && 30 < percent0firsts) || percent1firsts + 30 < percent0firsts) { s.first_indent = s.AlignTabs()[0].center; s.body_indent = s.AlignTabs()[1].center; } else { // Ambiguous! Probably lineated (poetry) if (debug_level > 1) { tprintf("# Cannot determine %s indent likely to start paragraphs.\n", s.just == tesseract::JUSTIFICATION_LEFT ? "left" : "right"); tprintf("# Indent of %d looks like a first line %d%% of the time.\n", s.AlignTabs()[0].center, percent0firsts); tprintf("# Indent of %d looks like a first line %d%% of the time.\n", s.AlignTabs()[1].center, percent1firsts); s.PrintRows(); } return; } } else { // There's only one tab stop for the "aligned to" side. s.first_indent = s.body_indent = s.AlignTabs()[0].center; } // At this point, we have our model. const ParagraphModel *model = theory->AddModel(s.Model()); // Now all we have to do is figure out if the text is fully justified or not. // eop_threshold: default to fully justified unless we see evidence below. // See description on MarkRowsWithModel() s.eop_threshold = (s.OffsideTabs()[0].center + s.OffsideTabs()[1].center) / 2; // If the text is not fully justified, re-set the eop_threshold to 0. if (s.AlignTabs().size() == 2) { // Paragraphs with a paragraph-start indent. for (int i = s.row_start; i < s.row_end - 1; i++) { if (ValidFirstLine(s.rows, i + 1, model) && !NearlyEqual(s.OffsideTabs()[0].center, (*s.rows)[i].OffsideIndent(s.just), s.tolerance)) { // We found a non-end-of-paragraph short line: not fully justified. s.eop_threshold = 0; break; } } } else { // Paragraphs with no paragraph-start indent. for (int i = s.row_start; i < s.row_end - 1; i++) { if (!s.FirstWordWouldHaveFit(i, i + 1) && !NearlyEqual(s.OffsideTabs()[0].center, (*s.rows)[i].OffsideIndent(s.just), s.tolerance)) { // We found a non-end-of-paragraph short line: not fully justified. s.eop_threshold = 0; break; } } } MarkRowsWithModel(rows, row_start, row_end, model, s.ltr, s.eop_threshold); } // =============== Implementation of ParagraphTheory ===================== const ParagraphModel *ParagraphTheory::AddModel(const ParagraphModel &model) { for (int i = 0; i < models_->size(); i++) { if ((*models_)[i]->Comparable(model)) return (*models_)[i]; } ParagraphModel *m = new ParagraphModel(model); models_->push_back(m); models_we_added_.push_back_new(m); return m; } void ParagraphTheory::DiscardUnusedModels(const SetOfModels &used_models) { for (int i = models_->size() - 1; i >= 0; i--) { ParagraphModel *m = (*models_)[i]; if (!used_models.contains(m) && models_we_added_.contains(m)) { models_->remove(i); models_we_added_.remove(models_we_added_.get_index(m)); delete m; } } } // Examine rows[start, end) and try to determine if an existing non-centered // paragraph model would fit them perfectly. If so, return a pointer to it. // If not, return NULL. const ParagraphModel *ParagraphTheory::Fits( const GenericVector<RowScratchRegisters> *rows, int start, int end) const { for (int m = 0; m < models_->size(); m++) { const ParagraphModel *model = (*models_)[m]; if (model->justification() != JUSTIFICATION_CENTER && RowsFitModel(rows, start, end, model)) return model; } return NULL; } void ParagraphTheory::NonCenteredModels(SetOfModels *models) { for (int m = 0; m < models_->size(); m++) { const ParagraphModel *model = (*models_)[m]; if (model->justification() != JUSTIFICATION_CENTER) models->push_back_new(model); } } int ParagraphTheory::IndexOf(const ParagraphModel *model) const { for (int i = 0; i < models_->size(); i++) { if ((*models_)[i] == model) return i; } return -1; } bool ValidFirstLine(const GenericVector<RowScratchRegisters> *rows, int row, const ParagraphModel *model) { if (!StrongModel(model)) { tprintf("ValidFirstLine() should only be called with strong models!\n"); } return StrongModel(model) && model->ValidFirstLine( (*rows)[row].lmargin_, (*rows)[row].lindent_, (*rows)[row].rindent_, (*rows)[row].rmargin_); } bool ValidBodyLine(const GenericVector<RowScratchRegisters> *rows, int row, const ParagraphModel *model) { if (!StrongModel(model)) { tprintf("ValidBodyLine() should only be called with strong models!\n"); } return StrongModel(model) && model->ValidBodyLine( (*rows)[row].lmargin_, (*rows)[row].lindent_, (*rows)[row].rindent_, (*rows)[row].rmargin_); } bool CrownCompatible(const GenericVector<RowScratchRegisters> *rows, int a, int b, const ParagraphModel *model) { if (model != kCrownRight && model != kCrownLeft) { tprintf("CrownCompatible() should only be called with crown models!\n"); return false; } RowScratchRegisters &row_a = (*rows)[a]; RowScratchRegisters &row_b = (*rows)[b]; if (model == kCrownRight) { return NearlyEqual(row_a.rindent_ + row_a.rmargin_, row_b.rindent_ + row_b.rmargin_, Epsilon(row_a.ri_->average_interword_space)); } return NearlyEqual(row_a.lindent_ + row_a.lmargin_, row_b.lindent_ + row_b.lmargin_, Epsilon(row_a.ri_->average_interword_space)); } // =============== Implementation of ParagraphModelSmearer ==================== ParagraphModelSmearer::ParagraphModelSmearer( GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, ParagraphTheory *theory) : theory_(theory), rows_(rows), row_start_(row_start), row_end_(row_end) { if (!AcceptableRowArgs(0, 0, __func__, rows, row_start, row_end)) { row_start_ = 0; row_end_ = 0; return; } SetOfModels no_models; for (int row = row_start - 1; row <= row_end; row++) { open_models_.push_back(no_models); } } // see paragraphs_internal.h void ParagraphModelSmearer::CalculateOpenModels(int row_start, int row_end) { SetOfModels no_models; if (row_start < row_start_) row_start = row_start_; if (row_end > row_end_) row_end = row_end_; for (int row = (row_start > 0) ? row_start - 1 : row_start; row < row_end; row++) { if ((*rows_)[row].ri_->num_words == 0) { OpenModels(row + 1) = no_models; } else { SetOfModels &opened = OpenModels(row); (*rows_)[row].StartHypotheses(&opened); // Which models survive the transition from row to row + 1? SetOfModels still_open; for (int m = 0; m < opened.size(); m++) { if (ValidFirstLine(rows_, row, opened[m]) || ValidBodyLine(rows_, row, opened[m])) { // This is basic filtering; we check likely paragraph starty-ness down // below in Smear() -- you know, whether the first word would have fit // and such. still_open.push_back_new(opened[m]); } } OpenModels(row + 1) = still_open; } } } // see paragraphs_internal.h void ParagraphModelSmearer::Smear() { CalculateOpenModels(row_start_, row_end_); // For each row which we're unsure about (that is, it is LT_UNKNOWN or // we have multiple LT_START hypotheses), see if there's a model that // was recently used (an "open" model) which might model it well. for (int i = row_start_; i < row_end_; i++) { RowScratchRegisters &row = (*rows_)[i]; if (row.ri_->num_words == 0) continue; // Step One: // Figure out if there are "open" models which are left-alined or // right-aligned. This is important for determining whether the // "first" word in a row would fit at the "end" of the previous row. bool left_align_open = false; bool right_align_open = false; for (int m = 0; m < OpenModels(i).size(); m++) { switch (OpenModels(i)[m]->justification()) { case JUSTIFICATION_LEFT: left_align_open = true; break; case JUSTIFICATION_RIGHT: right_align_open = true; break; default: left_align_open = right_align_open = true; } } // Step Two: // Use that knowledge to figure out if this row is likely to // start a paragraph. bool likely_start; if (i == 0) { likely_start = true; } else { if ((left_align_open && right_align_open) || (!left_align_open && !right_align_open)) { likely_start = LikelyParagraphStart((*rows_)[i - 1], row, JUSTIFICATION_LEFT) || LikelyParagraphStart((*rows_)[i - 1], row, JUSTIFICATION_RIGHT); } else if (left_align_open) { likely_start = LikelyParagraphStart((*rows_)[i - 1], row, JUSTIFICATION_LEFT); } else { likely_start = LikelyParagraphStart((*rows_)[i - 1], row, JUSTIFICATION_RIGHT); } } // Step Three: // If this text line seems like an obvious first line of an // open model, or an obvious continuation of an existing // modelled paragraph, mark it up. if (likely_start) { // Add Start Hypotheses for all Open models that fit. for (int m = 0; m < OpenModels(i).size(); m++) { if (ValidFirstLine(rows_, i, OpenModels(i)[m])) { row.AddStartLine(OpenModels(i)[m]); } } } else { // Add relevant body line hypotheses. SetOfModels last_line_models; if (i > 0) { (*rows_)[i - 1].StrongHypotheses(&last_line_models); } else { theory_->NonCenteredModels(&last_line_models); } for (int m = 0; m < last_line_models.size(); m++) { const ParagraphModel *model = last_line_models[m]; if (ValidBodyLine(rows_, i, model)) row.AddBodyLine(model); } } // Step Four: // If we're still quite unsure about this line, go through all // models in our theory and see if this row could be the start // of any of our models. if (row.GetLineType() == LT_UNKNOWN || (row.GetLineType() == LT_START && !row.UniqueStartHypothesis())) { SetOfModels all_models; theory_->NonCenteredModels(&all_models); for (int m = 0; m < all_models.size(); m++) { if (ValidFirstLine(rows_, i, all_models[m])) { row.AddStartLine(all_models[m]); } } } // Step Five: // Since we may have updated the hypotheses about this row, we need // to recalculate the Open models for the rest of rows[i + 1, row_end) if (row.GetLineType() != LT_UNKNOWN) { CalculateOpenModels(i + 1, row_end_); } } } // ================ Main Paragraph Detection Algorithm ======================= // Find out what ParagraphModels are actually used, and discard any // that are not. void DiscardUnusedModels(const GenericVector<RowScratchRegisters> &rows, ParagraphTheory *theory) { SetOfModels used_models; for (int i = 0; i < rows.size(); i++) { rows[i].StrongHypotheses(&used_models); } theory->DiscardUnusedModels(used_models); } // DowngradeWeakestToCrowns: // Forget any flush-{left, right} models unless we see two or more // of them in sequence. // // In pass 3, we start to classify even flush-left paragraphs (paragraphs // where the first line and body indent are the same) as having proper Models. // This is generally dangerous, since if you start imagining that flush-left // is a typical paragraph model when it is not, it will lead you to chop normal // indented paragraphs in the middle whenever a sentence happens to start on a // new line (see "This" above). What to do? // What we do is to take any paragraph which is flush left and is not // preceded by another paragraph of the same model and convert it to a "Crown" // paragraph. This is a weak pseudo-ParagraphModel which is a placeholder // for later. It means that the paragraph is flush, but it would be desirable // to mark it as the same model as following text if it fits. This downgrade // FlushLeft -> CrownLeft -> Model of following paragraph. Means that we // avoid making flush left Paragraph Models whenever we see a top-of-the-page // half-of-a-paragraph. and instead we mark it the same as normal body text. // // Implementation: // // Comb backwards through the row scratch registers, and turn any // sequences of body lines of equivalent type abutted against the beginning // or a body or start line of a different type into a crown paragraph. void DowngradeWeakestToCrowns(int debug_level, ParagraphTheory *theory, GenericVector<RowScratchRegisters> *rows) { int start; for (int end = rows->size(); end > 0; end = start) { // Search back for a body line of a unique type. const ParagraphModel *model = NULL; while (end > 0 && (model = (*rows)[end - 1].UniqueBodyHypothesis()) == NULL) { end--; } if (end == 0) break; start = end - 1; while (start >= 0 && (*rows)[start].UniqueBodyHypothesis() == model) { start--; // walk back to the first line that is not the same body type. } if (start >= 0 && (*rows)[start].UniqueStartHypothesis() == model && StrongModel(model) && NearlyEqual(model->first_indent(), model->body_indent(), model->tolerance())) { start--; } start++; // Now rows[start, end) is a sequence of unique body hypotheses of model. if (StrongModel(model) && model->justification() == JUSTIFICATION_CENTER) continue; if (!StrongModel(model)) { while (start > 0 && CrownCompatible(rows, start - 1, start, model)) start--; } if (start == 0 || (!StrongModel(model)) || (StrongModel(model) && !ValidFirstLine(rows, start - 1, model))) { // crownify rows[start, end) const ParagraphModel *crown_model = model; if (StrongModel(model)) { if (model->justification() == JUSTIFICATION_LEFT) crown_model = kCrownLeft; else crown_model = kCrownRight; } (*rows)[start].SetUnknown(); (*rows)[start].AddStartLine(crown_model); for (int row = start + 1; row < end; row++) { (*rows)[row].SetUnknown(); (*rows)[row].AddBodyLine(crown_model); } } } DiscardUnusedModels(*rows, theory); } // Clear all hypotheses about lines [start, end) and reset margins. // // The empty space between the left of a row and the block boundary (and // similarly for the right) is split into two pieces: margin and indent. // In initial processing, we assume the block is tight and the margin for // all lines is set to zero. However, if our first pass does not yield // models for everything, it may be due to an inset paragraph like a // block-quote. In that case, we make a second pass over that unmarked // section of the page and reset the "margin" portion of the empty space // to the common amount of space at the ends of the lines under consid- // eration. This would be equivalent to percentile set to 0. However, // sometimes we have a single character sticking out in the right margin // of a text block (like the 'r' in 'for' on line 3 above), and we can // really just ignore it as an outlier. To express this, we allow the // user to specify the percentile (0..100) of indent values to use as // the common margin for each row in the run of rows[start, end). void RecomputeMarginsAndClearHypotheses( GenericVector<RowScratchRegisters> *rows, int start, int end, int percentile) { if (!AcceptableRowArgs(0, 0, __func__, rows, start, end)) return; int lmin, lmax, rmin, rmax; lmin = lmax = (*rows)[start].lmargin_ + (*rows)[start].lindent_; rmin = rmax = (*rows)[start].rmargin_ + (*rows)[start].rindent_; for (int i = start; i < end; i++) { RowScratchRegisters &sr = (*rows)[i]; sr.SetUnknown(); if (sr.ri_->num_words == 0) continue; UpdateRange(sr.lmargin_ + sr.lindent_, &lmin, &lmax); UpdateRange(sr.rmargin_ + sr.rindent_, &rmin, &rmax); } STATS lefts(lmin, lmax + 1); STATS rights(rmin, rmax + 1); for (int i = start; i < end; i++) { RowScratchRegisters &sr = (*rows)[i]; if (sr.ri_->num_words == 0) continue; lefts.add(sr.lmargin_ + sr.lindent_, 1); rights.add(sr.rmargin_ + sr.rindent_, 1); } int ignorable_left = lefts.ile(ClipToRange(percentile, 0, 100) / 100.0); int ignorable_right = rights.ile(ClipToRange(percentile, 0, 100) / 100.0); for (int i = start; i < end; i++) { RowScratchRegisters &sr = (*rows)[i]; int ldelta = ignorable_left - sr.lmargin_; sr.lmargin_ += ldelta; sr.lindent_ -= ldelta; int rdelta = ignorable_right - sr.rmargin_; sr.rmargin_ += rdelta; sr.rindent_ -= rdelta; } } // Return the median inter-word space in rows[row_start, row_end). int InterwordSpace(const GenericVector<RowScratchRegisters> &rows, int row_start, int row_end) { if (row_end < row_start + 1) return 1; int word_height = (rows[row_start].ri_->lword_box.height() + rows[row_end - 1].ri_->lword_box.height()) / 2; int word_width = (rows[row_start].ri_->lword_box.width() + rows[row_end - 1].ri_->lword_box.width()) / 2; STATS spacing_widths(0, 5 + word_width); for (int i = row_start; i < row_end; i++) { if (rows[i].ri_->num_words > 1) { spacing_widths.add(rows[i].ri_->average_interword_space, 1); } } int minimum_reasonable_space = word_height / 3; if (minimum_reasonable_space < 2) minimum_reasonable_space = 2; int median = spacing_widths.median(); return (median > minimum_reasonable_space) ? median : minimum_reasonable_space; } // Return whether the first word on the after line can fit in the space at // the end of the before line (knowing which way the text is aligned and read). bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after, tesseract::ParagraphJustification justification) { if (before.ri_->num_words == 0 || after.ri_->num_words == 0) return true; if (justification == JUSTIFICATION_UNKNOWN) { tprintf("Don't call FirstWordWouldHaveFit(r, s, JUSTIFICATION_UNKNOWN).\n"); } int available_space; if (justification == JUSTIFICATION_CENTER) { available_space = before.lindent_ + before.rindent_; } else { available_space = before.OffsideIndent(justification); } available_space -= before.ri_->average_interword_space; if (before.ri_->ltr) return after.ri_->lword_box.width() < available_space; return after.ri_->rword_box.width() < available_space; } // Return whether the first word on the after line can fit in the space at // the end of the before line (not knowing which way the text goes) in a left // or right alignemnt. bool FirstWordWouldHaveFit(const RowScratchRegisters &before, const RowScratchRegisters &after) { if (before.ri_->num_words == 0 || after.ri_->num_words == 0) return true; int available_space = before.lindent_; if (before.rindent_ > available_space) available_space = before.rindent_; available_space -= before.ri_->average_interword_space; if (before.ri_->ltr) return after.ri_->lword_box.width() < available_space; return after.ri_->rword_box.width() < available_space; } bool TextSupportsBreak(const RowScratchRegisters &before, const RowScratchRegisters &after) { if (before.ri_->ltr) { return before.ri_->rword_likely_ends_idea && after.ri_->lword_likely_starts_idea; } else { return before.ri_->lword_likely_ends_idea && after.ri_->rword_likely_starts_idea; } } bool LikelyParagraphStart(const RowScratchRegisters &before, const RowScratchRegisters &after) { return before.ri_->num_words == 0 || (FirstWordWouldHaveFit(before, after) && TextSupportsBreak(before, after)); } bool LikelyParagraphStart(const RowScratchRegisters &before, const RowScratchRegisters &after, tesseract::ParagraphJustification j) { return before.ri_->num_words == 0 || (FirstWordWouldHaveFit(before, after, j) && TextSupportsBreak(before, after)); } // Examine rows[start, end) and try to determine what sort of ParagraphModel // would fit them as a single paragraph. // If we can't produce a unique model justification_ = JUSTIFICATION_UNKNOWN. // If the rows given could be a consistent start to a paragraph, set *consistent // true. ParagraphModel InternalParagraphModelByOutline( const GenericVector<RowScratchRegisters> *rows, int start, int end, int tolerance, bool *consistent) { int ltr_line_count = 0; for (int i = start; i < end; i++) { ltr_line_count += static_cast<int>((*rows)[i].ri_->ltr); } bool ltr = (ltr_line_count >= (end - start) / 2); *consistent = true; if (!AcceptableRowArgs(0, 2, __func__, rows, start, end)) return ParagraphModel(); // Ensure the caller only passed us a region with a common rmargin and // lmargin. int lmargin = (*rows)[start].lmargin_; int rmargin = (*rows)[start].rmargin_; int lmin, lmax, rmin, rmax, cmin, cmax; lmin = lmax = (*rows)[start + 1].lindent_; rmin = rmax = (*rows)[start + 1].rindent_; cmin = cmax = 0; for (int i = start + 1; i < end; i++) { if ((*rows)[i].lmargin_ != lmargin || (*rows)[i].rmargin_ != rmargin) { tprintf("Margins don't match! Software error.\n"); *consistent = false; return ParagraphModel(); } UpdateRange((*rows)[i].lindent_, &lmin, &lmax); UpdateRange((*rows)[i].rindent_, &rmin, &rmax); UpdateRange((*rows)[i].rindent_ - (*rows)[i].lindent_, &cmin, &cmax); } int ldiff = lmax - lmin; int rdiff = rmax - rmin; int cdiff = cmax - cmin; if (rdiff > tolerance && ldiff > tolerance) { if (cdiff < tolerance * 2) { if (end - start < 3) return ParagraphModel(); return ParagraphModel(JUSTIFICATION_CENTER, 0, 0, 0, tolerance); } *consistent = false; return ParagraphModel(); } if (end - start < 3) // Don't return a model for two line paras. return ParagraphModel(); // These booleans keep us from saying something is aligned left when the body // left variance is too large. bool body_admits_left_alignment = ldiff < tolerance; bool body_admits_right_alignment = rdiff < tolerance; ParagraphModel left_model = ParagraphModel(JUSTIFICATION_LEFT, lmargin, (*rows)[start].lindent_, (lmin + lmax) / 2, tolerance); ParagraphModel right_model = ParagraphModel(JUSTIFICATION_RIGHT, rmargin, (*rows)[start].rindent_, (rmin + rmax) / 2, tolerance); // These booleans keep us from having an indent on the "wrong side" for the // first line. bool text_admits_left_alignment = ltr || left_model.is_flush(); bool text_admits_right_alignment = !ltr || right_model.is_flush(); // At least one of the edges is less than tolerance in variance. // If the other is obviously ragged, it can't be the one aligned to. // [Note the last line is included in this raggedness.] if (tolerance < rdiff) { if (body_admits_left_alignment && text_admits_left_alignment) return left_model; *consistent = false; return ParagraphModel(); } if (tolerance < ldiff) { if (body_admits_right_alignment && text_admits_right_alignment) return right_model; *consistent = false; return ParagraphModel(); } // At this point, we know the body text doesn't vary much on either side. // If the first line juts out oddly in one direction or the other, // that likely indicates the side aligned to. int first_left = (*rows)[start].lindent_; int first_right = (*rows)[start].rindent_; if (ltr && body_admits_left_alignment && (first_left < lmin || first_left > lmax)) return left_model; if (!ltr && body_admits_right_alignment && (first_right < rmin || first_right > rmax)) return right_model; *consistent = false; return ParagraphModel(); } // Examine rows[start, end) and try to determine what sort of ParagraphModel // would fit them as a single paragraph. If nothing fits, // justification_ = JUSTIFICATION_UNKNOWN and print the paragraph to debug // output if we're debugging. ParagraphModel ParagraphModelByOutline( int debug_level, const GenericVector<RowScratchRegisters> *rows, int start, int end, int tolerance) { bool unused_consistent; ParagraphModel retval = InternalParagraphModelByOutline( rows, start, end, tolerance, &unused_consistent); if (debug_level >= 2 && retval.justification() == JUSTIFICATION_UNKNOWN) { tprintf("Could not determine a model for this paragraph:\n"); PrintRowRange(*rows, start, end); } return retval; } // Do rows[start, end) form a single instance of the given paragraph model? bool RowsFitModel(const GenericVector<RowScratchRegisters> *rows, int start, int end, const ParagraphModel *model) { if (!AcceptableRowArgs(0, 1, __func__, rows, start, end)) return false; if (!ValidFirstLine(rows, start, model)) return false; for (int i = start + 1 ; i < end; i++) { if (!ValidBodyLine(rows, i, model)) return false; } return true; } // Examine rows[row_start, row_end) as an independent section of text, // and mark rows that are exceptionally clear as start-of-paragraph // and paragraph-body lines. // // We presume that any lines surrounding rows[row_start, row_end) may // have wildly different paragraph models, so we don't key any data off // of those lines. // // We only take the very strongest signals, as we don't want to get // confused and marking up centered text, poetry, or source code as // clearly part of a typical paragraph. void MarkStrongEvidence(GenericVector<RowScratchRegisters> *rows, int row_start, int row_end) { // Record patently obvious body text. for (int i = row_start + 1; i < row_end; i++) { const RowScratchRegisters &prev = (*rows)[i - 1]; RowScratchRegisters &curr = (*rows)[i]; tesseract::ParagraphJustification typical_justification = prev.ri_->ltr ? JUSTIFICATION_LEFT : JUSTIFICATION_RIGHT; if (!curr.ri_->rword_likely_starts_idea && !curr.ri_->lword_likely_starts_idea && !FirstWordWouldHaveFit(prev, curr, typical_justification)) { curr.SetBodyLine(); } } // Record patently obvious start paragraph lines. // // It's an extremely good signal of the start of a paragraph that // the first word would have fit on the end of the previous line. // However, applying just that signal would have us mark random // start lines of lineated text (poetry and source code) and some // centered headings as paragraph start lines. Therefore, we use // a second qualification for a paragraph start: Not only should // the first word of this line have fit on the previous line, // but also, this line should go full to the right of the block, // disallowing a subsequent word from having fit on this line. // First row: { RowScratchRegisters &curr = (*rows)[row_start]; RowScratchRegisters &next = (*rows)[row_start + 1]; tesseract::ParagraphJustification j = curr.ri_->ltr ? JUSTIFICATION_LEFT : JUSTIFICATION_RIGHT; if (curr.GetLineType() == LT_UNKNOWN && !FirstWordWouldHaveFit(curr, next, j) && (curr.ri_->lword_likely_starts_idea || curr.ri_->rword_likely_starts_idea)) { curr.SetStartLine(); } } // Middle rows for (int i = row_start + 1; i < row_end - 1; i++) { RowScratchRegisters &prev = (*rows)[i - 1]; RowScratchRegisters &curr = (*rows)[i]; RowScratchRegisters &next = (*rows)[i + 1]; tesseract::ParagraphJustification j = curr.ri_->ltr ? JUSTIFICATION_LEFT : JUSTIFICATION_RIGHT; if (curr.GetLineType() == LT_UNKNOWN && !FirstWordWouldHaveFit(curr, next, j) && LikelyParagraphStart(prev, curr, j)) { curr.SetStartLine(); } } // Last row { // the short circuit at the top means we have at least two lines. RowScratchRegisters &prev = (*rows)[row_end - 2]; RowScratchRegisters &curr = (*rows)[row_end - 1]; tesseract::ParagraphJustification j = curr.ri_->ltr ? JUSTIFICATION_LEFT : JUSTIFICATION_RIGHT; if (curr.GetLineType() == LT_UNKNOWN && !FirstWordWouldHaveFit(curr, curr, j) && LikelyParagraphStart(prev, curr, j)) { curr.SetStartLine(); } } } // Look for sequences of a start line followed by some body lines in // rows[row_start, row_end) and create ParagraphModels for them if // they seem coherent. void ModelStrongEvidence(int debug_level, GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, bool allow_flush_models, ParagraphTheory *theory) { if (!AcceptableRowArgs(debug_level, 2, __func__, rows, row_start, row_end)) return; int start = row_start; while (start < row_end) { while (start < row_end && (*rows)[start].GetLineType() != LT_START) start++; if (start >= row_end - 1) break; int tolerance = Epsilon((*rows)[start + 1].ri_->average_interword_space); int end = start; ParagraphModel last_model; bool next_consistent; do { ++end; // rows[row, end) was consistent. // If rows[row, end + 1) is not consistent, // just model rows[row, end) if (end < row_end - 1) { RowScratchRegisters &next = (*rows)[end]; LineType lt = next.GetLineType(); next_consistent = lt == LT_BODY || (lt == LT_UNKNOWN && !FirstWordWouldHaveFit((*rows)[end - 1], (*rows)[end])); } else { next_consistent = false; } if (next_consistent) { ParagraphModel next_model = InternalParagraphModelByOutline( rows, start, end + 1, tolerance, &next_consistent); if (((*rows)[start].ri_->ltr && last_model.justification() == JUSTIFICATION_LEFT && next_model.justification() != JUSTIFICATION_LEFT) || (!(*rows)[start].ri_->ltr && last_model.justification() == JUSTIFICATION_RIGHT && next_model.justification() != JUSTIFICATION_RIGHT)) { next_consistent = false; } last_model = next_model; } else { next_consistent = false; } } while (next_consistent && end < row_end); // At this point, rows[start, end) looked like it could have been a // single paragraph. If we can make a good ParagraphModel for it, // do so and mark this sequence with that model. if (end > start + 1) { // emit a new paragraph if we have more than one line. const ParagraphModel *model = NULL; ParagraphModel new_model = ParagraphModelByOutline( debug_level, rows, start, end, Epsilon(InterwordSpace(*rows, start, end))); if (new_model.justification() == JUSTIFICATION_UNKNOWN) { // couldn't create a good model, oh well. } else if (new_model.is_flush()) { if (end == start + 2) { // It's very likely we just got two paragraph starts in a row. end = start + 1; } else if (start == row_start) { // Mark this as a Crown. if (new_model.justification() == JUSTIFICATION_LEFT) { model = kCrownLeft; } else { model = kCrownRight; } } else if (allow_flush_models) { model = theory->AddModel(new_model); } } else { model = theory->AddModel(new_model); } if (model) { (*rows)[start].AddStartLine(model); for (int i = start + 1; i < end; i++) { (*rows)[i].AddBodyLine(model); } } } start = end; } } // We examine rows[row_start, row_end) and do the following: // (1) Clear all existing hypotheses for the rows being considered. // (2) Mark up any rows as exceptionally likely to be paragraph starts // or paragraph body lines as such using both geometric and textual // clues. // (3) Form models for any sequence of start + continuation lines. // (4) Smear the paragraph models to cover surrounding text. void StrongEvidenceClassify(int debug_level, GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, ParagraphTheory *theory) { if (!AcceptableRowArgs(debug_level, 2, __func__, rows, row_start, row_end)) return; if (debug_level > 1) { tprintf("#############################################\n"); tprintf("# StrongEvidenceClassify( rows[%d:%d) )\n", row_start, row_end); tprintf("#############################################\n"); } RecomputeMarginsAndClearHypotheses(rows, row_start, row_end, 10); MarkStrongEvidence(rows, row_start, row_end); DebugDump(debug_level > 2, "Initial strong signals.", *theory, *rows); // Create paragraph models. ModelStrongEvidence(debug_level, rows, row_start, row_end, false, theory); DebugDump(debug_level > 2, "Unsmeared hypotheses.s.", *theory, *rows); // At this point, some rows are marked up as paragraphs with model numbers, // and some rows are marked up as either LT_START or LT_BODY. Now let's // smear any good paragraph hypotheses forward and backward. ParagraphModelSmearer smearer(rows, row_start, row_end, theory); smearer.Smear(); } void SeparateSimpleLeaderLines(GenericVector<RowScratchRegisters> *rows, int row_start, int row_end, ParagraphTheory *theory) { for (int i = row_start + 1; i < row_end - 1; i++) { if ((*rows)[i - 1].ri_->has_leaders && (*rows)[i].ri_->has_leaders && (*rows)[i + 1].ri_->has_leaders) { const ParagraphModel *model = theory->AddModel( ParagraphModel(JUSTIFICATION_UNKNOWN, 0, 0, 0, 0)); (*rows)[i].AddStartLine(model); } } } // Collect sequences of unique hypotheses in row registers and create proper // paragraphs for them, referencing the paragraphs in row_owners. void ConvertHypothesizedModelRunsToParagraphs( int debug_level, const GenericVector<RowScratchRegisters> &rows, GenericVector<PARA *> *row_owners, ParagraphTheory *theory) { int end = rows.size(); int start; for (; end > 0; end = start) { start = end - 1; const ParagraphModel *model = NULL; // TODO(eger): Be smarter about dealing with multiple hypotheses. bool single_line_paragraph = false; SetOfModels models; rows[start].NonNullHypotheses(&models); if (models.size() > 0) { model = models[0]; if (rows[start].GetLineType(model) != LT_BODY) single_line_paragraph = true; } if (model && !single_line_paragraph) { // walk back looking for more body lines and then a start line. while (--start > 0 && rows[start].GetLineType(model) == LT_BODY) { // do nothing } if (start < 0 || rows[start].GetLineType(model) != LT_START) { model = NULL; } } if (model == NULL) { continue; } // rows[start, end) should be a paragraph. PARA *p = new PARA(); if (model == kCrownLeft || model == kCrownRight) { p->is_very_first_or_continuation = true; // Crown paragraph. // If we can find an existing ParagraphModel that fits, use it, // else create a new one. for (int row = end; row < rows.size(); row++) { if ((*row_owners)[row] && (ValidBodyLine(&rows, start, (*row_owners)[row]->model) && (start == 0 || ValidFirstLine(&rows, start, (*row_owners)[row]->model)))) { model = (*row_owners)[row]->model; break; } } if (model == kCrownLeft) { // No subsequent model fits, so cons one up. model = theory->AddModel(ParagraphModel( JUSTIFICATION_LEFT, rows[start].lmargin_ + rows[start].lindent_, 0, 0, Epsilon(rows[start].ri_->average_interword_space))); } else if (model == kCrownRight) { // No subsequent model fits, so cons one up. model = theory->AddModel(ParagraphModel( JUSTIFICATION_RIGHT, rows[start].rmargin_ + rows[start].rmargin_, 0, 0, Epsilon(rows[start].ri_->average_interword_space))); } } rows[start].SetUnknown(); rows[start].AddStartLine(model); for (int i = start + 1; i < end; i++) { rows[i].SetUnknown(); rows[i].AddBodyLine(model); } p->model = model; p->has_drop_cap = rows[start].ri_->has_drop_cap; p->is_list_item = model->justification() == JUSTIFICATION_RIGHT ? rows[start].ri_->rword_indicates_list_item : rows[start].ri_->lword_indicates_list_item; for (int row = start; row < end; row++) { if ((*row_owners)[row] != NULL) { tprintf("Memory leak! ConvertHypothesizeModelRunsToParagraphs() called " "more than once!\n"); } (*row_owners)[row] = p; } } } struct Interval { Interval() : begin(0), end(0) {} Interval(int b, int e) : begin(b), end(e) {} int begin; int end; }; // Return whether rows[row] appears to be stranded, meaning that the evidence // for this row is very weak due to context. For instance, two lines of source // code may happen to be indented at the same tab vector as body text starts, // leading us to think they are two start-of-paragraph lines. This is not // optimal. However, we also don't want to mark a sequence of short dialog // as "weak," so our heuristic is: // (1) If a line is surrounded by lines of unknown type, it's weak. // (2) If two lines in a row are start lines for a given paragraph type, but // after that the same paragraph type does not continue, they're weak. bool RowIsStranded(const GenericVector<RowScratchRegisters> &rows, int row) { SetOfModels row_models; rows[row].StrongHypotheses(&row_models); for (int m = 0; m < row_models.size(); m++) { bool all_starts = rows[row].GetLineType(); int run_length = 1; bool continues = true; for (int i = row - 1; i >= 0 && continues; i--) { SetOfModels models; rows[i].NonNullHypotheses(&models); switch (rows[i].GetLineType(row_models[m])) { case LT_START: run_length++; break; case LT_MULTIPLE: // explicit fall-through case LT_BODY: run_length++; all_starts = false; break; case LT_UNKNOWN: // explicit fall-through default: continues = false; } } continues = true; for (int i = row + 1; i < rows.size() && continues; i++) { SetOfModels models; rows[i].NonNullHypotheses(&models); switch (rows[i].GetLineType(row_models[m])) { case LT_START: run_length++; break; case LT_MULTIPLE: // explicit fall-through case LT_BODY: run_length++; all_starts = false; break; case LT_UNKNOWN: // explicit fall-through default: continues = false; } } if (run_length > 2 || (!all_starts && run_length > 1)) return false; } return true; } // Go through rows[row_start, row_end) and gather up sequences that need better // classification. // + Sequences of non-empty rows without hypotheses. // + Crown paragraphs not immediately followed by a strongly modeled line. // + Single line paragraphs surrounded by text that doesn't match the // model. void LeftoverSegments(const GenericVector<RowScratchRegisters> &rows, GenericVector<Interval> *to_fix, int row_start, int row_end) { to_fix->clear(); for (int i = row_start; i < row_end; i++) { bool needs_fixing = false; SetOfModels models; SetOfModels models_w_crowns; rows[i].StrongHypotheses(&models); rows[i].NonNullHypotheses(&models_w_crowns); if (models.empty() && models_w_crowns.size() > 0) { // Crown paragraph. Is it followed by a modeled line? for (int end = i + 1; end < rows.size(); end++) { SetOfModels end_models; SetOfModels strong_end_models; rows[end].NonNullHypotheses(&end_models); rows[end].StrongHypotheses(&strong_end_models); if (end_models.size() == 0) { needs_fixing = true; break; } else if (strong_end_models.size() > 0) { needs_fixing = false; break; } } } else if (models.empty() && rows[i].ri_->num_words > 0) { // No models at all. needs_fixing = true; } if (!needs_fixing && !models.empty()) { needs_fixing = RowIsStranded(rows, i); } if (needs_fixing) { if (!to_fix->empty() && to_fix->back().end == i - 1) to_fix->back().end = i; else to_fix->push_back(Interval(i, i)); } } // Convert inclusive intervals to half-open intervals. for (int i = 0; i < to_fix->size(); i++) { (*to_fix)[i].end = (*to_fix)[i].end + 1; } } // Given a set of row_owners pointing to PARAs or NULL (no paragraph known), // normalize each row_owner to point to an actual PARA, and output the // paragraphs in order onto paragraphs. void CanonicalizeDetectionResults( GenericVector<PARA *> *row_owners, PARA_LIST *paragraphs) { GenericVector<PARA *> &rows = *row_owners; paragraphs->clear(); PARA_IT out(paragraphs); PARA *formerly_null = NULL; for (int i = 0; i < rows.size(); i++) { if (rows[i] == NULL) { if (i == 0 || rows[i - 1] != formerly_null) { rows[i] = formerly_null = new PARA(); } else { rows[i] = formerly_null; continue; } } else if (i > 0 && rows[i - 1] == rows[i]) { continue; } out.add_after_then_move(rows[i]); } } // Main entry point for Paragraph Detection Algorithm. // // Given a set of equally spaced textlines (described by row_infos), // Split them into paragraphs. // // Output: // row_owners - one pointer for each row, to the paragraph it belongs to. // paragraphs - this is the actual list of PARA objects. // models - the list of paragraph models referenced by the PARA objects. // caller is responsible for deleting the models. void DetectParagraphs(int debug_level, GenericVector<RowInfo> *row_infos, GenericVector<PARA *> *row_owners, PARA_LIST *paragraphs, GenericVector<ParagraphModel *> *models) { GenericVector<RowScratchRegisters> rows; ParagraphTheory theory(models); // Initialize row_owners to be a bunch of NULL pointers. row_owners->init_to_size(row_infos->size(), NULL); // Set up row scratch registers for the main algorithm. rows.init_to_size(row_infos->size(), RowScratchRegisters()); for (int i = 0; i < row_infos->size(); i++) { rows[i].Init((*row_infos)[i]); } // Pass 1: // Detect sequences of lines that all contain leader dots (.....) // These are likely Tables of Contents. If there are three text lines in // a row with leader dots, it's pretty safe to say the middle one should // be a paragraph of its own. SeparateSimpleLeaderLines(&rows, 0, rows.size(), &theory); DebugDump(debug_level > 1, "End of Pass 1", theory, rows); GenericVector<Interval> leftovers; LeftoverSegments(rows, &leftovers, 0, rows.size()); for (int i = 0; i < leftovers.size(); i++) { // Pass 2a: // Find any strongly evidenced start-of-paragraph lines. If they're // followed by two lines that look like body lines, make a paragraph // model for that and see if that model applies throughout the text // (that is, "smear" it). StrongEvidenceClassify(debug_level, &rows, leftovers[i].begin, leftovers[i].end, &theory); // Pass 2b: // If we had any luck in pass 2a, we got part of the page and didn't // know how to classify a few runs of rows. Take the segments that // didn't find a model and reprocess them individually. GenericVector<Interval> leftovers2; LeftoverSegments(rows, &leftovers2, leftovers[i].begin, leftovers[i].end); bool pass2a_was_useful = leftovers2.size() > 1 || (leftovers2.size() == 1 && (leftovers2[0].begin != 0 || leftovers2[0].end != rows.size())); if (pass2a_was_useful) { for (int j = 0; j < leftovers2.size(); j++) { StrongEvidenceClassify(debug_level, &rows, leftovers2[j].begin, leftovers2[j].end, &theory); } } } DebugDump(debug_level > 1, "End of Pass 2", theory, rows); // Pass 3: // These are the dregs for which we didn't have enough strong textual // and geometric clues to form matching models for. Let's see if // the geometric clues are simple enough that we could just use those. LeftoverSegments(rows, &leftovers, 0, rows.size()); for (int i = 0; i < leftovers.size(); i++) { GeometricClassify(debug_level, &rows, leftovers[i].begin, leftovers[i].end, &theory); } // Undo any flush models for which there's little evidence. DowngradeWeakestToCrowns(debug_level, &theory, &rows); DebugDump(debug_level > 1, "End of Pass 3", theory, rows); // Pass 4: // Take everything that's still not marked up well and clear all markings. LeftoverSegments(rows, &leftovers, 0, rows.size()); for (int i = 0; i < leftovers.size(); i++) { for (int j = leftovers[i].begin; j < leftovers[i].end; j++) { rows[j].SetUnknown(); } } DebugDump(debug_level > 1, "End of Pass 4", theory, rows); // Convert all of the unique hypothesis runs to PARAs. ConvertHypothesizedModelRunsToParagraphs(debug_level, rows, row_owners, &theory); DebugDump(debug_level > 0, "Final Paragraph Segmentation", theory, rows); // Finally, clean up any dangling NULL row paragraph parents. CanonicalizeDetectionResults(row_owners, paragraphs); } // ============ Code interfacing with the rest of Tesseract ================== void InitializeTextAndBoxesPreRecognition(const MutableIterator &it, RowInfo *info) { // Set up text, lword_text, and rword_text (mostly for debug printing). STRING fake_text; PageIterator pit(static_cast<const PageIterator&>(it)); bool first_word = true; if (!pit.Empty(RIL_WORD)) { do { fake_text += "x"; if (first_word) info->lword_text += "x"; info->rword_text += "x"; if (pit.IsAtFinalElement(RIL_WORD, RIL_SYMBOL) && !pit.IsAtFinalElement(RIL_TEXTLINE, RIL_SYMBOL)) { fake_text += " "; info->rword_text = ""; first_word = false; } } while (!pit.IsAtFinalElement(RIL_TEXTLINE, RIL_SYMBOL) && pit.Next(RIL_SYMBOL)); } if (fake_text.size() == 0) return; int lspaces = info->pix_ldistance / info->average_interword_space; for (int i = 0; i < lspaces; i++) { info->text += ' '; } info->text += fake_text; // Set up lword_box, rword_box, and num_words. PAGE_RES_IT page_res_it = *it.PageResIt(); WERD_RES *word_res = page_res_it.restart_row(); ROW_RES *this_row = page_res_it.row(); WERD_RES *lword = NULL; WERD_RES *rword = NULL; info->num_words = 0; do { if (word_res) { if (!lword) lword = word_res; if (rword != word_res) info->num_words++; rword = word_res; } word_res = page_res_it.forward(); } while (page_res_it.row() == this_row); info->lword_box = lword->word->bounding_box(); info->rword_box = rword->word->bounding_box(); } // Given a Tesseract Iterator pointing to a text line, fill in the paragraph // detector RowInfo with all relevant information from the row. void InitializeRowInfo(bool after_recognition, const MutableIterator &it, RowInfo *info) { if (it.PageResIt()->row() != NULL) { ROW *row = it.PageResIt()->row()->row; info->pix_ldistance = row->lmargin(); info->pix_rdistance = row->rmargin(); info->average_interword_space = row->space() > 0 ? row->space() : MAX(row->x_height(), 1); info->pix_xheight = row->x_height(); info->has_leaders = false; info->has_drop_cap = row->has_drop_cap(); info->ltr = true; // set below depending on word scripts } else { info->pix_ldistance = info->pix_rdistance = 0; info->average_interword_space = 1; info->pix_xheight = 1.0; info->has_leaders = false; info->has_drop_cap = false; info->ltr = true; } info->num_words = 0; info->lword_indicates_list_item = false; info->lword_likely_starts_idea = false; info->lword_likely_ends_idea = false; info->rword_indicates_list_item = false; info->rword_likely_starts_idea = false; info->rword_likely_ends_idea = false; info->has_leaders = false; info->ltr = 1; if (!after_recognition) { InitializeTextAndBoxesPreRecognition(it, info); return; } info->text = ""; char *text = it.GetUTF8Text(RIL_TEXTLINE); int trailing_ws_idx = strlen(text); // strip trailing space while (trailing_ws_idx > 0 && // isspace() only takes ASCII ((text[trailing_ws_idx - 1] & 0x80) == 0) && isspace(text[trailing_ws_idx - 1])) trailing_ws_idx--; if (trailing_ws_idx > 0) { int lspaces = info->pix_ldistance / info->average_interword_space; for (int i = 0; i < lspaces; i++) info->text += ' '; for (int i = 0; i < trailing_ws_idx; i++) info->text += text[i]; } delete []text; if (info->text.size() == 0) { return; } PAGE_RES_IT page_res_it = *it.PageResIt(); GenericVector<WERD_RES *> werds; WERD_RES *word_res = page_res_it.restart_row(); ROW_RES *this_row = page_res_it.row(); int num_leaders = 0; int ltr = 0; int rtl = 0; do { if (word_res && word_res->best_choice->unichar_string().length() > 0) { werds.push_back(word_res); ltr += word_res->AnyLtrCharsInWord() ? 1 : 0; rtl += word_res->AnyRtlCharsInWord() ? 1 : 0; if (word_res->word->flag(W_REP_CHAR)) num_leaders++; } word_res = page_res_it.forward(); } while (page_res_it.row() == this_row); info->ltr = ltr >= rtl; info->has_leaders = num_leaders > 3; info->num_words = werds.size(); if (werds.size() > 0) { WERD_RES *lword = werds[0], *rword = werds[werds.size() - 1]; info->lword_text = lword->best_choice->unichar_string().string(); info->rword_text = rword->best_choice->unichar_string().string(); info->lword_box = lword->word->bounding_box(); info->rword_box = rword->word->bounding_box(); LeftWordAttributes(lword->uch_set, lword->best_choice, info->lword_text, &info->lword_indicates_list_item, &info->lword_likely_starts_idea, &info->lword_likely_ends_idea); RightWordAttributes(rword->uch_set, rword->best_choice, info->rword_text, &info->rword_indicates_list_item, &info->rword_likely_starts_idea, &info->rword_likely_ends_idea); } } // This is called after rows have been identified and words are recognized. // Much of this could be implemented before word recognition, but text helps // to identify bulleted lists and gives good signals for sentence boundaries. void DetectParagraphs(int debug_level, bool after_text_recognition, const MutableIterator *block_start, GenericVector<ParagraphModel *> *models) { // Clear out any preconceived notions. if (block_start->Empty(RIL_TEXTLINE)) { return; } BLOCK *block = block_start->PageResIt()->block()->block; block->para_list()->clear(); bool is_image_block = block->poly_block() && !block->poly_block()->IsText(); // Convert the Tesseract structures to RowInfos // for the paragraph detection algorithm. MutableIterator row(*block_start); if (row.Empty(RIL_TEXTLINE)) return; // end of input already. GenericVector<RowInfo> row_infos; do { if (!row.PageResIt()->row()) continue; // empty row. row.PageResIt()->row()->row->set_para(NULL); row_infos.push_back(RowInfo()); RowInfo &ri = row_infos.back(); InitializeRowInfo(after_text_recognition, row, &ri); } while (!row.IsAtFinalElement(RIL_BLOCK, RIL_TEXTLINE) && row.Next(RIL_TEXTLINE)); // If we're called before text recognition, we might not have // tight block bounding boxes, so trim by the minimum on each side. if (row_infos.size() > 0) { int min_lmargin = row_infos[0].pix_ldistance; int min_rmargin = row_infos[0].pix_rdistance; for (int i = 1; i < row_infos.size(); i++) { if (row_infos[i].pix_ldistance < min_lmargin) min_lmargin = row_infos[i].pix_ldistance; if (row_infos[i].pix_rdistance < min_rmargin) min_rmargin = row_infos[i].pix_rdistance; } if (min_lmargin > 0 || min_rmargin > 0) { for (int i = 0; i < row_infos.size(); i++) { row_infos[i].pix_ldistance -= min_lmargin; row_infos[i].pix_rdistance -= min_rmargin; } } } // Run the paragraph detection algorithm. GenericVector<PARA *> row_owners; GenericVector<PARA *> the_paragraphs; if (!is_image_block) { DetectParagraphs(debug_level, &row_infos, &row_owners, block->para_list(), models); } else { row_owners.init_to_size(row_infos.size(), NULL); CanonicalizeDetectionResults(&row_owners, block->para_list()); } // Now stitch in the row_owners into the rows. row = *block_start; for (int i = 0; i < row_owners.size(); i++) { while (!row.PageResIt()->row()) row.Next(RIL_TEXTLINE); row.PageResIt()->row()->row->set_para(row_owners[i]); row.Next(RIL_TEXTLINE); } } } // namespace
C++
/////////////////////////////////////////////////////////////////////// // File: ltrresultiterator.h // Description: Iterator for tesseract results in strict left-to-right // order that avoids using tesseract internal data structures. // Author: Ray Smith // Created: Fri Feb 26 11:01:06 PST 2010 // // (C) Copyright 2010, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H__ #define TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H__ #include "platform.h" #include "pageiterator.h" #include "unichar.h" class BLOB_CHOICE_IT; class WERD_RES; namespace tesseract { class Tesseract; // Class to iterate over tesseract results, providing access to all levels // of the page hierarchy, without including any tesseract headers or having // to handle any tesseract structures. // WARNING! This class points to data held within the TessBaseAPI class, and // therefore can only be used while the TessBaseAPI class still exists and // has not been subjected to a call of Init, SetImage, Recognize, Clear, End // DetectOS, or anything else that changes the internal PAGE_RES. // See apitypes.h for the definition of PageIteratorLevel. // See also base class PageIterator, which contains the bulk of the interface. // LTRResultIterator adds text-specific methods for access to OCR output. class TESS_API LTRResultIterator : public PageIterator { friend class ChoiceIterator; public: // page_res and tesseract come directly from the BaseAPI. // The rectangle parameters are copied indirectly from the Thresholder, // via the BaseAPI. They represent the coordinates of some rectangle in an // original image (in top-left-origin coordinates) and therefore the top-left // needs to be added to any output boxes in order to specify coordinates // in the original image. See TessBaseAPI::SetRectangle. // The scale and scaled_yres are in case the Thresholder scaled the image // rectangle prior to thresholding. Any coordinates in tesseract's image // must be divided by scale before adding (rect_left, rect_top). // The scaled_yres indicates the effective resolution of the binary image // that tesseract has been given by the Thresholder. // After the constructor, Begin has already been called. LTRResultIterator(PAGE_RES* page_res, Tesseract* tesseract, int scale, int scaled_yres, int rect_left, int rect_top, int rect_width, int rect_height); virtual ~LTRResultIterator(); // LTRResultIterators may be copied! This makes it possible to iterate over // all the objects at a lower level, while maintaining an iterator to // objects at a higher level. These constructors DO NOT CALL Begin, so // iterations will continue from the location of src. // TODO: For now the copy constructor and operator= only need the base class // versions, but if new data members are added, don't forget to add them! // ============= Moving around within the page ============. // See PageIterator. // ============= Accessing data ==============. // Returns the null terminated UTF-8 encoded text string for the current // object at the given level. Use delete [] to free after use. char* GetUTF8Text(PageIteratorLevel level) const; // Set the string inserted at the end of each text line. "\n" by default. void SetLineSeparator(const char *new_line); // Set the string inserted at the end of each paragraph. "\n" by default. void SetParagraphSeparator(const char *new_para); // Returns the mean confidence of the current object at the given level. // The number should be interpreted as a percent probability. (0.0f-100.0f) float Confidence(PageIteratorLevel level) const; // ============= Functions that refer to words only ============. // Returns the font attributes of the current word. If iterating at a higher // level object than words, eg textlines, then this will return the // attributes of the first word in that textline. // The actual return value is a string representing a font name. It points // to an internal table and SHOULD NOT BE DELETED. Lifespan is the same as // the iterator itself, ie rendered invalid by various members of // TessBaseAPI, including Init, SetImage, End or deleting the TessBaseAPI. // Pointsize is returned in printers points (1/72 inch.) const char* WordFontAttributes(bool* is_bold, bool* is_italic, bool* is_underlined, bool* is_monospace, bool* is_serif, bool* is_smallcaps, int* pointsize, int* font_id) const; // Return the name of the language used to recognize this word. // On error, NULL. Do not delete this pointer. const char* WordRecognitionLanguage() const; // Return the overall directionality of this word. StrongScriptDirection WordDirection() const; // Returns true if the current word was found in a dictionary. bool WordIsFromDictionary() const; // Returns true if the current word is numeric. bool WordIsNumeric() const; // Returns true if the word contains blamer information. bool HasBlamerInfo() const; // Returns the pointer to ParamsTrainingBundle stored in the BlamerBundle // of the current word. const void *GetParamsTrainingBundle() const; // Returns a pointer to the string with blamer information for this word. // Assumes that the word's blamer_bundle is not NULL. const char *GetBlamerDebug() const; // Returns a pointer to the string with misadaption information for this word. // Assumes that the word's blamer_bundle is not NULL. const char *GetBlamerMisadaptionDebug() const; // Returns true if a truth string was recorded for the current word. bool HasTruthString() const; // Returns true if the given string is equivalent to the truth string for // the current word. bool EquivalentToTruth(const char *str) const; // Returns a null terminated UTF-8 encoded truth string for the current word. // Use delete [] to free after use. char* WordTruthUTF8Text() const; // Returns a null terminated UTF-8 encoded normalized OCR string for the // current word. Use delete [] to free after use. char* WordNormedUTF8Text() const; // Returns a pointer to serialized choice lattice. // Fills lattice_size with the number of bytes in lattice data. const char *WordLattice(int *lattice_size) const; // ============= Functions that refer to symbols only ============. // Returns true if the current symbol is a superscript. // If iterating at a higher level object than symbols, eg words, then // this will return the attributes of the first symbol in that word. bool SymbolIsSuperscript() const; // Returns true if the current symbol is a subscript. // If iterating at a higher level object than symbols, eg words, then // this will return the attributes of the first symbol in that word. bool SymbolIsSubscript() const; // Returns true if the current symbol is a dropcap. // If iterating at a higher level object than symbols, eg words, then // this will return the attributes of the first symbol in that word. bool SymbolIsDropcap() const; protected: const char *line_separator_; const char *paragraph_separator_; }; // Class to iterate over the classifier choices for a single RIL_SYMBOL. class ChoiceIterator { public: // Construction is from a LTRResultIterator that points to the symbol of // interest. The ChoiceIterator allows a one-shot iteration over the // choices for this symbol and after that is is useless. explicit ChoiceIterator(const LTRResultIterator& result_it); ~ChoiceIterator(); // Moves to the next choice for the symbol and returns false if there // are none left. bool Next(); // ============= Accessing data ==============. // Returns the null terminated UTF-8 encoded text string for the current // choice. // NOTE: Unlike LTRResultIterator::GetUTF8Text, the return points to an // internal structure and should NOT be delete[]ed to free after use. const char* GetUTF8Text() const; // Returns the confidence of the current choice. // The number should be interpreted as a percent probability. (0.0f-100.0f) float Confidence() const; private: // Pointer to the WERD_RES object owned by the API. WERD_RES* word_res_; // Iterator over the blob choices. BLOB_CHOICE_IT* choice_it_; }; } // namespace tesseract. #endif // TESSERACT_CCMAIN_LTR_RESULT_ITERATOR_H__
C++
/////////////////////////////////////////////////////////////////////// // File: osdetect.cpp // Description: Orientation and script detection. // Author: Samuel Charron // Ranjith Unnikrishnan // // (C) Copyright 2008, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "osdetect.h" #include "blobbox.h" #include "blread.h" #include "colfind.h" #include "fontinfo.h" #include "imagefind.h" #include "linefind.h" #include "oldlist.h" #include "qrsequence.h" #include "ratngs.h" #include "strngs.h" #include "tabvector.h" #include "tesseractclass.h" #include "textord.h" const int kMinCharactersToTry = 50; const int kMaxCharactersToTry = 5 * kMinCharactersToTry; const float kSizeRatioToReject = 2.0; const int kMinAcceptableBlobHeight = 10; const float kOrientationAcceptRatio = 1.3; const float kScriptAcceptRatio = 1.3; const float kHanRatioInKorean = 0.7; const float kHanRatioInJapanese = 0.3; const float kNonAmbiguousMargin = 1.0; // General scripts static const char* han_script = "Han"; static const char* latin_script = "Latin"; static const char* katakana_script = "Katakana"; static const char* hiragana_script = "Hiragana"; static const char* hangul_script = "Hangul"; // Pseudo-scripts Name const char* ScriptDetector::korean_script_ = "Korean"; const char* ScriptDetector::japanese_script_ = "Japanese"; const char* ScriptDetector::fraktur_script_ = "Fraktur"; // Minimum believable resolution. const int kMinCredibleResolution = 70; // Default resolution used if input is not believable. const int kDefaultResolution = 300; void OSResults::update_best_orientation() { float first = orientations[0]; float second = orientations[1]; best_result.orientation_id = 0; if (orientations[0] < orientations[1]) { first = orientations[1]; second = orientations[0]; best_result.orientation_id = 1; } for (int i = 2; i < 4; ++i) { if (orientations[i] > first) { second = first; first = orientations[i]; best_result.orientation_id = i; } else if (orientations[i] > second) { second = orientations[i]; } } // Store difference of top two orientation scores. best_result.oconfidence = first - second; } void OSResults::set_best_orientation(int orientation_id) { best_result.orientation_id = orientation_id; best_result.oconfidence = 0; } void OSResults::update_best_script(int orientation) { // We skip index 0 to ignore the "Common" script. float first = scripts_na[orientation][1]; float second = scripts_na[orientation][2]; best_result.script_id = 1; if (scripts_na[orientation][1] < scripts_na[orientation][2]) { first = scripts_na[orientation][2]; second = scripts_na[orientation][1]; best_result.script_id = 2; } for (int i = 3; i < kMaxNumberOfScripts; ++i) { if (scripts_na[orientation][i] > first) { best_result.script_id = i; second = first; first = scripts_na[orientation][i]; } else if (scripts_na[orientation][i] > second) { second = scripts_na[orientation][i]; } } best_result.sconfidence = (first / second - 1.0) / (kScriptAcceptRatio - 1.0); } int OSResults::get_best_script(int orientation_id) const { int max_id = -1; for (int j = 0; j < kMaxNumberOfScripts; ++j) { const char *script = unicharset->get_script_from_script_id(j); if (strcmp(script, "Common") && strcmp(script, "NULL")) { if (max_id == -1 || scripts_na[orientation_id][j] > scripts_na[orientation_id][max_id]) max_id = j; } } return max_id; } // Print the script scores for all possible orientations. void OSResults::print_scores(void) const { for (int i = 0; i < 4; ++i) { tprintf("Orientation id #%d", i); print_scores(i); } } // Print the script scores for the given candidate orientation. void OSResults::print_scores(int orientation_id) const { for (int j = 0; j < kMaxNumberOfScripts; ++j) { if (scripts_na[orientation_id][j]) { tprintf("%12s\t: %f\n", unicharset->get_script_from_script_id(j), scripts_na[orientation_id][j]); } } } // Accumulate scores with given OSResults instance and update the best script. void OSResults::accumulate(const OSResults& osr) { for (int i = 0; i < 4; ++i) { orientations[i] += osr.orientations[i]; for (int j = 0; j < kMaxNumberOfScripts; ++j) scripts_na[i][j] += osr.scripts_na[i][j]; } unicharset = osr.unicharset; update_best_orientation(); update_best_script(best_result.orientation_id); } // Detect and erase horizontal/vertical lines and picture regions from the // image, so that non-text blobs are removed from consideration. void remove_nontext_regions(tesseract::Tesseract *tess, BLOCK_LIST *blocks, TO_BLOCK_LIST *to_blocks) { Pix *pix = tess->pix_binary(); ASSERT_HOST(pix != NULL); int vertical_x = 0; int vertical_y = 1; tesseract::TabVector_LIST v_lines; tesseract::TabVector_LIST h_lines; const int kMinCredibleResolution = 70; int resolution = (kMinCredibleResolution > pixGetXRes(pix)) ? kMinCredibleResolution : pixGetXRes(pix); tesseract::LineFinder::FindAndRemoveLines(resolution, false, pix, &vertical_x, &vertical_y, NULL, &v_lines, &h_lines); Pix* im_pix = tesseract::ImageFind::FindImages(pix); if (im_pix != NULL) { pixSubtract(pix, pix, im_pix); pixDestroy(&im_pix); } tess->mutable_textord()->find_components(tess->pix_binary(), blocks, to_blocks); } // Find connected components in the page and process a subset until finished or // a stopping criterion is met. // Returns the number of blobs used in making the estimate. 0 implies failure. int orientation_and_script_detection(STRING& filename, OSResults* osr, tesseract::Tesseract* tess) { STRING name = filename; //truncated name const char *lastdot; //of name TBOX page_box; lastdot = strrchr (name.string (), '.'); if (lastdot != NULL) name[lastdot-name.string()] = '\0'; ASSERT_HOST(tess->pix_binary() != NULL) int width = pixGetWidth(tess->pix_binary()); int height = pixGetHeight(tess->pix_binary()); BLOCK_LIST blocks; if (!read_unlv_file(name, width, height, &blocks)) FullPageBlock(width, height, &blocks); // Try to remove non-text regions from consideration. TO_BLOCK_LIST land_blocks, port_blocks; remove_nontext_regions(tess, &blocks, &port_blocks); if (port_blocks.empty()) { // page segmentation did not succeed, so we need to find_components first. tess->mutable_textord()->find_components(tess->pix_binary(), &blocks, &port_blocks); } else { page_box.set_left(0); page_box.set_bottom(0); page_box.set_right(width); page_box.set_top(height); // Filter_blobs sets up the TO_BLOCKs the same as find_components does. tess->mutable_textord()->filter_blobs(page_box.topright(), &port_blocks, true); } return os_detect(&port_blocks, osr, tess); } // Filter and sample the blobs. // Returns a non-zero number of blobs if the page was successfully processed, or // zero if the page had too few characters to be reliable int os_detect(TO_BLOCK_LIST* port_blocks, OSResults* osr, tesseract::Tesseract* tess) { int blobs_total = 0; TO_BLOCK_IT block_it; block_it.set_to_list(port_blocks); BLOBNBOX_CLIST filtered_list; BLOBNBOX_C_IT filtered_it(&filtered_list); for (block_it.mark_cycle_pt(); !block_it.cycled_list(); block_it.forward ()) { TO_BLOCK* to_block = block_it.data(); if (to_block->block->poly_block() && !to_block->block->poly_block()->IsText()) continue; BLOBNBOX_IT bbox_it; bbox_it.set_to_list(&to_block->blobs); for (bbox_it.mark_cycle_pt (); !bbox_it.cycled_list (); bbox_it.forward ()) { BLOBNBOX* bbox = bbox_it.data(); C_BLOB* blob = bbox->cblob(); TBOX box = blob->bounding_box(); ++blobs_total; float y_x = fabs((box.height() * 1.0) / box.width()); float x_y = 1.0f / y_x; // Select a >= 1.0 ratio float ratio = x_y > y_x ? x_y : y_x; // Blob is ambiguous if (ratio > kSizeRatioToReject) continue; if (box.height() < kMinAcceptableBlobHeight) continue; filtered_it.add_to_end(bbox); } } return os_detect_blobs(NULL, &filtered_list, osr, tess); } // Detect orientation and script from a list of blobs. // Returns a non-zero number of blobs if the list was successfully processed, or // zero if the list had too few characters to be reliable. // If allowed_scripts is non-null and non-empty, it is a list of scripts that // constrains both orientation and script detection to consider only scripts // from the list. int os_detect_blobs(const GenericVector<int>* allowed_scripts, BLOBNBOX_CLIST* blob_list, OSResults* osr, tesseract::Tesseract* tess) { OSResults osr_; if (osr == NULL) osr = &osr_; osr->unicharset = &tess->unicharset; OrientationDetector o(allowed_scripts, osr); ScriptDetector s(allowed_scripts, osr, tess); BLOBNBOX_C_IT filtered_it(blob_list); int real_max = MIN(filtered_it.length(), kMaxCharactersToTry); // tprintf("Total blobs found = %d\n", blobs_total); // tprintf("Number of blobs post-filtering = %d\n", filtered_it.length()); // tprintf("Number of blobs to try = %d\n", real_max); // If there are too few characters, skip this page entirely. if (real_max < kMinCharactersToTry / 2) { tprintf("Too few characters. Skipping this page\n"); return 0; } BLOBNBOX** blobs = new BLOBNBOX*[filtered_it.length()]; int number_of_blobs = 0; for (filtered_it.mark_cycle_pt (); !filtered_it.cycled_list (); filtered_it.forward ()) { blobs[number_of_blobs++] = (BLOBNBOX*)filtered_it.data(); } QRSequenceGenerator sequence(number_of_blobs); int num_blobs_evaluated = 0; for (int i = 0; i < real_max; ++i) { if (os_detect_blob(blobs[sequence.GetVal()], &o, &s, osr, tess) && i > kMinCharactersToTry) { break; } ++num_blobs_evaluated; } delete [] blobs; // Make sure the best_result is up-to-date int orientation = o.get_orientation(); osr->update_best_script(orientation); return num_blobs_evaluated; } // Processes a single blob to estimate script and orientation. // Return true if estimate of orientation and script satisfies stopping // criteria. bool os_detect_blob(BLOBNBOX* bbox, OrientationDetector* o, ScriptDetector* s, OSResults* osr, tesseract::Tesseract* tess) { tess->tess_cn_matching.set_value(true); // turn it on tess->tess_bn_matching.set_value(false); C_BLOB* blob = bbox->cblob(); TBLOB* tblob = TBLOB::PolygonalCopy(tess->poly_allow_detailed_fx, blob); TBOX box = tblob->bounding_box(); FCOORD current_rotation(1.0f, 0.0f); FCOORD rotation90(0.0f, 1.0f); BLOB_CHOICE_LIST ratings[4]; // Test the 4 orientations for (int i = 0; i < 4; ++i) { // Normalize the blob. Set the origin to the place we want to be the // bottom-middle after rotation. // Scaling is to make the rotated height the x-height. float scaling = static_cast<float>(kBlnXHeight) / box.height(); float x_origin = (box.left() + box.right()) / 2.0f; float y_origin = (box.bottom() + box.top()) / 2.0f; if (i == 0 || i == 2) { // Rotation is 0 or 180. y_origin = i == 0 ? box.bottom() : box.top(); } else { // Rotation is 90 or 270. scaling = static_cast<float>(kBlnXHeight) / box.width(); x_origin = i == 1 ? box.left() : box.right(); } TBLOB* rotated_blob = new TBLOB(*tblob); rotated_blob->Normalize(NULL, &current_rotation, NULL, x_origin, y_origin, scaling, scaling, 0.0f, static_cast<float>(kBlnBaselineOffset), false, NULL); tess->AdaptiveClassifier(rotated_blob, ratings + i); delete rotated_blob; current_rotation.rotate(rotation90); } delete tblob; bool stop = o->detect_blob(ratings); s->detect_blob(ratings); int orientation = o->get_orientation(); stop = s->must_stop(orientation) && stop; return stop; } OrientationDetector::OrientationDetector( const GenericVector<int>* allowed_scripts, OSResults* osr) { osr_ = osr; allowed_scripts_ = allowed_scripts; } // Score the given blob and return true if it is now sure of the orientation // after adding this block. bool OrientationDetector::detect_blob(BLOB_CHOICE_LIST* scores) { float blob_o_score[4] = {0.0f, 0.0f, 0.0f, 0.0f}; float total_blob_o_score = 0.0f; for (int i = 0; i < 4; ++i) { BLOB_CHOICE_IT choice_it(scores + i); if (!choice_it.empty()) { BLOB_CHOICE* choice = NULL; if (allowed_scripts_ != NULL && !allowed_scripts_->empty()) { // Find the top choice in an allowed script. for (choice_it.mark_cycle_pt(); !choice_it.cycled_list() && choice == NULL; choice_it.forward()) { int choice_script = choice_it.data()->script_id(); int s = 0; for (s = 0; s < allowed_scripts_->size(); ++s) { if ((*allowed_scripts_)[s] == choice_script) { choice = choice_it.data(); break; } } } } else { choice = choice_it.data(); } if (choice != NULL) { // The certainty score ranges between [-20,0]. This is converted here to // [0,1], with 1 indicating best match. blob_o_score[i] = 1 + 0.05 * choice->certainty(); total_blob_o_score += blob_o_score[i]; } } } if (total_blob_o_score == 0.0) return false; // Fill in any blanks with the worst score of the others. This is better than // picking an arbitrary probability for it and way better than -inf. float worst_score = 0.0f; int num_good_scores = 0; for (int i = 0; i < 4; ++i) { if (blob_o_score[i] > 0.0f) { ++num_good_scores; if (worst_score == 0.0f || blob_o_score[i] < worst_score) worst_score = blob_o_score[i]; } } if (num_good_scores == 1) { // Lower worst if there is only one. worst_score /= 2.0f; } for (int i = 0; i < 4; ++i) { if (blob_o_score[i] == 0.0f) { blob_o_score[i] = worst_score; total_blob_o_score += worst_score; } } // Normalize the orientation scores for the blob and use them to // update the aggregated orientation score. for (int i = 0; total_blob_o_score != 0 && i < 4; ++i) { osr_->orientations[i] += log(blob_o_score[i] / total_blob_o_score); } // TODO(ranjith) Add an early exit test, based on min_orientation_margin, // as used in pagesegmain.cpp. return false; } int OrientationDetector::get_orientation() { osr_->update_best_orientation(); return osr_->best_result.orientation_id; } ScriptDetector::ScriptDetector(const GenericVector<int>* allowed_scripts, OSResults* osr, tesseract::Tesseract* tess) { osr_ = osr; tess_ = tess; allowed_scripts_ = allowed_scripts; katakana_id_ = tess_->unicharset.add_script(katakana_script); hiragana_id_ = tess_->unicharset.add_script(hiragana_script); han_id_ = tess_->unicharset.add_script(han_script); hangul_id_ = tess_->unicharset.add_script(hangul_script); japanese_id_ = tess_->unicharset.add_script(japanese_script_); korean_id_ = tess_->unicharset.add_script(korean_script_); latin_id_ = tess_->unicharset.add_script(latin_script); fraktur_id_ = tess_->unicharset.add_script(fraktur_script_); } // Score the given blob and return true if it is now sure of the script after // adding this blob. void ScriptDetector::detect_blob(BLOB_CHOICE_LIST* scores) { bool done[kMaxNumberOfScripts]; for (int i = 0; i < 4; ++i) { for (int j = 0; j < kMaxNumberOfScripts; ++j) done[j] = false; BLOB_CHOICE_IT choice_it; choice_it.set_to_list(scores + i); float prev_score = -1; int script_count = 0; int prev_id = -1; int prev_fontinfo_id = -1; const char* prev_unichar = ""; const char* unichar = ""; for (choice_it.mark_cycle_pt(); !choice_it.cycled_list(); choice_it.forward()) { BLOB_CHOICE* choice = choice_it.data(); int id = choice->script_id(); if (allowed_scripts_ != NULL && !allowed_scripts_->empty()) { // Check that the choice is in an allowed script. int s = 0; for (s = 0; s < allowed_scripts_->size(); ++s) { if ((*allowed_scripts_)[s] == id) break; } if (s == allowed_scripts_->size()) continue; // Not found in list. } // Script already processed before. if (done[id]) continue; done[id] = true; unichar = tess_->unicharset.id_to_unichar(choice->unichar_id()); // Save data from the first match if (prev_score < 0) { prev_score = -choice->certainty(); script_count = 1; prev_id = id; prev_unichar = unichar; prev_fontinfo_id = choice->fontinfo_id(); } else if (-choice->certainty() < prev_score + kNonAmbiguousMargin) { ++script_count; } if (strlen(prev_unichar) == 1) if (unichar[0] >= '0' && unichar[0] <= '9') break; // if script_count is >= 2, character is ambiguous, skip other matches // since they are useless. if (script_count >= 2) break; } // Character is non ambiguous if (script_count == 1) { // Update the score of the winning script osr_->scripts_na[i][prev_id] += 1.0; // Workaround for Fraktur if (prev_id == latin_id_) { if (prev_fontinfo_id >= 0) { const tesseract::FontInfo &fi = tess_->get_fontinfo_table().get(prev_fontinfo_id); //printf("Font: %s i:%i b:%i f:%i s:%i k:%i (%s)\n", fi.name, // fi.is_italic(), fi.is_bold(), fi.is_fixed_pitch(), // fi.is_serif(), fi.is_fraktur(), // prev_unichar); if (fi.is_fraktur()) { osr_->scripts_na[i][prev_id] -= 1.0; osr_->scripts_na[i][fraktur_id_] += 1.0; } } } // Update Japanese / Korean pseudo-scripts if (prev_id == katakana_id_) osr_->scripts_na[i][japanese_id_] += 1.0; if (prev_id == hiragana_id_) osr_->scripts_na[i][japanese_id_] += 1.0; if (prev_id == hangul_id_) osr_->scripts_na[i][korean_id_] += 1.0; if (prev_id == han_id_) { osr_->scripts_na[i][korean_id_] += kHanRatioInKorean; osr_->scripts_na[i][japanese_id_] += kHanRatioInJapanese; } } } // iterate over each orientation } bool ScriptDetector::must_stop(int orientation) { osr_->update_best_script(orientation); return osr_->best_result.sconfidence > 1; } // Helper method to convert an orientation index to its value in degrees. // The value represents the amount of clockwise rotation in degrees that must be // applied for the text to be upright (readable). const int OrientationIdToValue(const int& id) { switch (id) { case 0: return 0; case 1: return 270; case 2: return 180; case 3: return 90; default: return -1; } }
C++
/********************************************************************** * File: adaptions.cpp (Formerly adaptions.c) * Description: Functions used to adapt to blobs already confidently * identified * Author: Chris Newton * Created: Thu Oct 7 10:17:28 BST 1993 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #ifdef _MSC_VER #pragma warning(disable:4244) // Conversion warnings #pragma warning(disable:4305) // int/float warnings #endif #ifdef __UNIX__ #include <assert.h> #endif #include <ctype.h> #include <string.h> #include "tessbox.h" #include "tessvars.h" #include "memry.h" #include "reject.h" #include "control.h" #include "stopper.h" #include "tesseractclass.h" // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif namespace tesseract { BOOL8 Tesseract::word_adaptable( //should we adapt? WERD_RES *word, uinT16 mode) { if (tessedit_adaption_debug) { tprintf("Running word_adaptable() for %s rating %.4f certainty %.4f\n", word->best_choice == NULL ? "" : word->best_choice->unichar_string().string(), word->best_choice->rating(), word->best_choice->certainty()); } BOOL8 status = FALSE; BITS16 flags(mode); enum MODES { ADAPTABLE_WERD, ACCEPTABLE_WERD, CHECK_DAWGS, CHECK_SPACES, CHECK_ONE_ELL_CONFLICT, CHECK_AMBIG_WERD }; /* 0: NO adaption */ if (mode == 0) { if (tessedit_adaption_debug) tprintf("adaption disabled\n"); return FALSE; } if (flags.bit (ADAPTABLE_WERD)) { status |= word->tess_would_adapt; // result of Classify::AdaptableWord() if (tessedit_adaption_debug && !status) { tprintf("tess_would_adapt bit is false\n"); } } if (flags.bit (ACCEPTABLE_WERD)) { status |= word->tess_accepted; if (tessedit_adaption_debug && !status) { tprintf("tess_accepted bit is false\n"); } } if (!status) { // If not set then return FALSE; // ignore other checks } if (flags.bit (CHECK_DAWGS) && (word->best_choice->permuter () != SYSTEM_DAWG_PERM) && (word->best_choice->permuter () != FREQ_DAWG_PERM) && (word->best_choice->permuter () != USER_DAWG_PERM) && (word->best_choice->permuter () != NUMBER_PERM)) { if (tessedit_adaption_debug) tprintf("word not in dawgs\n"); return FALSE; } if (flags.bit (CHECK_ONE_ELL_CONFLICT) && one_ell_conflict (word, FALSE)) { if (tessedit_adaption_debug) tprintf("word has ell conflict\n"); return FALSE; } if (flags.bit (CHECK_SPACES) && (strchr(word->best_choice->unichar_string().string(), ' ') != NULL)) { if (tessedit_adaption_debug) tprintf("word contains spaces\n"); return FALSE; } if (flags.bit (CHECK_AMBIG_WERD) && word->best_choice->dangerous_ambig_found()) { if (tessedit_adaption_debug) tprintf("word is ambiguous\n"); return FALSE; } if (tessedit_adaption_debug) { tprintf("returning status %d\n", status); } return status; } } // namespace tesseract
C++
/********************************************************************** * File: tessvars.cpp (Formerly tessvars.c) * Description: Variables and other globals for tessedit. * Author: Ray Smith * Created: Mon Apr 13 13:13:23 BST 1992 * * (C) Copyright 1992, Hewlett-Packard Ltd. ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** http://www.apache.org/licenses/LICENSE-2.0 ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. * **********************************************************************/ #include <stdio.h> #include "tessvars.h" FILE *debug_fp = stderr; // write debug stuff here
C++
/////////////////////////////////////////////////////////////////////// // File: pageiterator.h // Description: Iterator for tesseract page structure that avoids using // tesseract internal data structures. // Author: Ray Smith // Created: Fri Feb 26 11:01:06 PST 2010 // // (C) Copyright 2010, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #ifndef TESSERACT_CCMAIN_PAGEITERATOR_H__ #define TESSERACT_CCMAIN_PAGEITERATOR_H__ #include "publictypes.h" #include "platform.h" struct BlamerBundle; class C_BLOB_IT; class PAGE_RES; class PAGE_RES_IT; class WERD; struct Pix; struct Pta; namespace tesseract { class Tesseract; /** * Class to iterate over tesseract page structure, providing access to all * levels of the page hierarchy, without including any tesseract headers or * having to handle any tesseract structures. * WARNING! This class points to data held within the TessBaseAPI class, and * therefore can only be used while the TessBaseAPI class still exists and * has not been subjected to a call of Init, SetImage, Recognize, Clear, End * DetectOS, or anything else that changes the internal PAGE_RES. * See apitypes.h for the definition of PageIteratorLevel. * See also ResultIterator, derived from PageIterator, which adds in the * ability to access OCR output with text-specific methods. */ class TESS_API PageIterator { public: /** * page_res and tesseract come directly from the BaseAPI. * The rectangle parameters are copied indirectly from the Thresholder, * via the BaseAPI. They represent the coordinates of some rectangle in an * original image (in top-left-origin coordinates) and therefore the top-left * needs to be added to any output boxes in order to specify coordinates * in the original image. See TessBaseAPI::SetRectangle. * The scale and scaled_yres are in case the Thresholder scaled the image * rectangle prior to thresholding. Any coordinates in tesseract's image * must be divided by scale before adding (rect_left, rect_top). * The scaled_yres indicates the effective resolution of the binary image * that tesseract has been given by the Thresholder. * After the constructor, Begin has already been called. */ PageIterator(PAGE_RES* page_res, Tesseract* tesseract, int scale, int scaled_yres, int rect_left, int rect_top, int rect_width, int rect_height); virtual ~PageIterator(); /** * Page/ResultIterators may be copied! This makes it possible to iterate over * all the objects at a lower level, while maintaining an iterator to * objects at a higher level. These constructors DO NOT CALL Begin, so * iterations will continue from the location of src. */ PageIterator(const PageIterator& src); const PageIterator& operator=(const PageIterator& src); /** Are we positioned at the same location as other? */ bool PositionedAtSameWord(const PAGE_RES_IT* other) const; // ============= Moving around within the page ============. /** * Moves the iterator to point to the start of the page to begin an * iteration. */ virtual void Begin(); /** * Moves the iterator to the beginning of the paragraph. * This class implements this functionality by moving it to the zero indexed * blob of the first (leftmost) word on the first row of the paragraph. */ virtual void RestartParagraph(); /** * Return whether this iterator points anywhere in the first textline of a * paragraph. */ bool IsWithinFirstTextlineOfParagraph() const; /** * Moves the iterator to the beginning of the text line. * This class implements this functionality by moving it to the zero indexed * blob of the first (leftmost) word of the row. */ virtual void RestartRow(); /** * Moves to the start of the next object at the given level in the * page hierarchy, and returns false if the end of the page was reached. * NOTE that RIL_SYMBOL will skip non-text blocks, but all other * PageIteratorLevel level values will visit each non-text block once. * Think of non text blocks as containing a single para, with a single line, * with a single imaginary word. * Calls to Next with different levels may be freely intermixed. * This function iterates words in right-to-left scripts correctly, if * the appropriate language has been loaded into Tesseract. */ virtual bool Next(PageIteratorLevel level); /** * Returns true if the iterator is at the start of an object at the given * level. * * For instance, suppose an iterator it is pointed to the first symbol of the * first word of the third line of the second paragraph of the first block in * a page, then: * it.IsAtBeginningOf(RIL_BLOCK) = false * it.IsAtBeginningOf(RIL_PARA) = false * it.IsAtBeginningOf(RIL_TEXTLINE) = true * it.IsAtBeginningOf(RIL_WORD) = true * it.IsAtBeginningOf(RIL_SYMBOL) = true */ virtual bool IsAtBeginningOf(PageIteratorLevel level) const; /** * Returns whether the iterator is positioned at the last element in a * given level. (e.g. the last word in a line, the last line in a block) * * Here's some two-paragraph example * text. It starts off innocuously * enough but quickly turns bizarre. * The author inserts a cornucopia * of words to guard against confused * references. * * Now take an iterator it pointed to the start of "bizarre." * it.IsAtFinalElement(RIL_PARA, RIL_SYMBOL) = false * it.IsAtFinalElement(RIL_PARA, RIL_WORD) = true * it.IsAtFinalElement(RIL_BLOCK, RIL_WORD) = false */ virtual bool IsAtFinalElement(PageIteratorLevel level, PageIteratorLevel element) const; /** * Returns whether this iterator is positioned * before other: -1 * equal to other: 0 * after other: 1 */ int Cmp(const PageIterator &other) const; // ============= Accessing data ==============. // Coordinate system: // Integer coordinates are at the cracks between the pixels. // The top-left corner of the top-left pixel in the image is at (0,0). // The bottom-right corner of the bottom-right pixel in the image is at // (width, height). // Every bounding box goes from the top-left of the top-left contained // pixel to the bottom-right of the bottom-right contained pixel, so // the bounding box of the single top-left pixel in the image is: // (0,0)->(1,1). // If an image rectangle has been set in the API, then returned coordinates // relate to the original (full) image, rather than the rectangle. /** * Returns the bounding rectangle of the current object at the given level. * See comment on coordinate system above. * Returns false if there is no such object at the current position. * The returned bounding box is guaranteed to match the size and position * of the image returned by GetBinaryImage, but may clip foreground pixels * from a grey image. The padding argument to GetImage can be used to expand * the image to include more foreground pixels. See GetImage below. */ bool BoundingBox(PageIteratorLevel level, int* left, int* top, int* right, int* bottom) const; bool BoundingBox(PageIteratorLevel level, const int padding, int* left, int* top, int* right, int* bottom) const; /** * Returns the bounding rectangle of the object in a coordinate system of the * working image rectangle having its origin at (rect_left_, rect_top_) with * respect to the original image and is scaled by a factor scale_. */ bool BoundingBoxInternal(PageIteratorLevel level, int* left, int* top, int* right, int* bottom) const; /** Returns whether there is no object of a given level. */ bool Empty(PageIteratorLevel level) const; /** * Returns the type of the current block. See apitypes.h for * PolyBlockType. */ PolyBlockType BlockType() const; /** * Returns the polygon outline of the current block. The returned Pta must * be ptaDestroy-ed after use. Note that the returned Pta lists the vertices * of the polygon, and the last edge is the line segment between the last * point and the first point. NULL will be returned if the iterator is * at the end of the document or layout analysis was not used. */ Pta* BlockPolygon() const; /** * Returns a binary image of the current object at the given level. * The position and size match the return from BoundingBoxInternal, and so * this could be upscaled with respect to the original input image. * Use pixDestroy to delete the image after use. */ Pix* GetBinaryImage(PageIteratorLevel level) const; /** * Returns an image of the current object at the given level in greyscale * if available in the input. To guarantee a binary image use BinaryImage. * NOTE that in order to give the best possible image, the bounds are * expanded slightly over the binary connected component, by the supplied * padding, so the top-left position of the returned image is returned * in (left,top). These will most likely not match the coordinates * returned by BoundingBox. * If you do not supply an original image, you will get a binary one. * Use pixDestroy to delete the image after use. */ Pix* GetImage(PageIteratorLevel level, int padding, Pix* original_img, int* left, int* top) const; /** * Returns the baseline of the current object at the given level. * The baseline is the line that passes through (x1, y1) and (x2, y2). * WARNING: with vertical text, baselines may be vertical! * Returns false if there is no baseline at the current position. */ bool Baseline(PageIteratorLevel level, int* x1, int* y1, int* x2, int* y2) const; /** * Returns orientation for the block the iterator points to. * orientation, writing_direction, textline_order: see publictypes.h * deskew_angle: after rotating the block so the text orientation is * upright, how many radians does one have to rotate the * block anti-clockwise for it to be level? * -Pi/4 <= deskew_angle <= Pi/4 */ void Orientation(tesseract::Orientation *orientation, tesseract::WritingDirection *writing_direction, tesseract::TextlineOrder *textline_order, float *deskew_angle) const; /** * Returns information about the current paragraph, if available. * * justification - * LEFT if ragged right, or fully justified and script is left-to-right. * RIGHT if ragged left, or fully justified and script is right-to-left. * unknown if it looks like source code or we have very few lines. * is_list_item - * true if we believe this is a member of an ordered or unordered list. * is_crown - * true if the first line of the paragraph is aligned with the other * lines of the paragraph even though subsequent paragraphs have first * line indents. This typically indicates that this is the continuation * of a previous paragraph or that it is the very first paragraph in * the chapter. * first_line_indent - * For LEFT aligned paragraphs, the first text line of paragraphs of * this kind are indented this many pixels from the left edge of the * rest of the paragraph. * for RIGHT aligned paragraphs, the first text line of paragraphs of * this kind are indented this many pixels from the right edge of the * rest of the paragraph. * NOTE 1: This value may be negative. * NOTE 2: if *is_crown == true, the first line of this paragraph is * actually flush, and first_line_indent is set to the "common" * first_line_indent for subsequent paragraphs in this block * of text. */ void ParagraphInfo(tesseract::ParagraphJustification *justification, bool *is_list_item, bool *is_crown, int *first_line_indent) const; // If the current WERD_RES (it_->word()) is not NULL, sets the BlamerBundle // of the current word to the given pointer (takes ownership of the pointer) // and returns true. // Can only be used when iterating on the word level. bool SetWordBlamerBundle(BlamerBundle *blamer_bundle); protected: /** * Sets up the internal data for iterating the blobs of a new word, then * moves the iterator to the given offset. */ TESS_LOCAL void BeginWord(int offset); /** Pointer to the page_res owned by the API. */ PAGE_RES* page_res_; /** Pointer to the Tesseract object owned by the API. */ Tesseract* tesseract_; /** * The iterator to the page_res_. Owned by this ResultIterator. * A pointer just to avoid dragging in Tesseract includes. */ PAGE_RES_IT* it_; /** * The current input WERD being iterated. If there is an output from OCR, * then word_ is NULL. Owned by the API */ WERD* word_; /** The length of the current word_. */ int word_length_; /** The current blob index within the word. */ int blob_index_; /** * Iterator to the blobs within the word. If NULL, then we are iterating * OCR results in the box_word. * Owned by this ResultIterator. */ C_BLOB_IT* cblob_it_; /** Parameters saved from the Thresholder. Needed to rebuild coordinates.*/ int scale_; int scaled_yres_; int rect_left_; int rect_top_; int rect_width_; int rect_height_; }; } // namespace tesseract. #endif // TESSERACT_CCMAIN_PAGEITERATOR_H__
C++
/////////////////////////////////////////////////////////////////////// // File: paramsd.cpp // Description: Tesseract parameter Editor // Author: Joern Wanke // Created: Wed Jul 18 10:05:01 PDT 2007 // // (C) Copyright 2007, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// // // The parameters editor is used to edit all the parameters used within // tesseract from the ui. #ifdef _WIN32 #else #include <stdlib.h> #include <stdio.h> #endif #include <map> // Include automatically generated configuration file if running autoconf. #ifdef HAVE_CONFIG_H #include "config_auto.h" #endif #ifndef GRAPHICS_DISABLED #include "paramsd.h" #include "params.h" #include "scrollview.h" #include "svmnode.h" #define VARDIR "configs/" /*parameters files */ #define MAX_ITEMS_IN_SUBMENU 30 // The following variables should remain static globals, since they // are used by debug editor, which uses a single Tesseract instance. // // Contains the mappings from unique VC ids to their actual pointers. static std::map<int, ParamContent*> vcMap; static int nrParams = 0; static int writeCommands[2]; ELISTIZE(ParamContent) // Constructors for the various ParamTypes. ParamContent::ParamContent(tesseract::StringParam* it) { my_id_ = nrParams; nrParams++; param_type_ = VT_STRING; sIt = it; vcMap[my_id_] = this; } // Constructors for the various ParamTypes. ParamContent::ParamContent(tesseract::IntParam* it) { my_id_ = nrParams; nrParams++; param_type_ = VT_INTEGER; iIt = it; vcMap[my_id_] = this; } // Constructors for the various ParamTypes. ParamContent::ParamContent(tesseract::BoolParam* it) { my_id_ = nrParams; nrParams++; param_type_ = VT_BOOLEAN; bIt = it; vcMap[my_id_] = this; } // Constructors for the various ParamTypes. ParamContent::ParamContent(tesseract::DoubleParam* it) { my_id_ = nrParams; nrParams++; param_type_ = VT_DOUBLE; dIt = it; vcMap[my_id_] = this; } // Gets a VC object identified by its ID. ParamContent* ParamContent::GetParamContentById(int id) { return vcMap[id]; } // Copy the first N words from the source string to the target string. // Words are delimited by "_". void ParamsEditor::GetFirstWords( const char *s, // source string int n, // number of words char *t // target string ) { int full_length = strlen(s); int reqd_len = 0; // No. of chars requird const char *next_word = s; while ((n > 0) && reqd_len < full_length) { reqd_len += strcspn(next_word, "_") + 1; next_word += reqd_len; n--; } strncpy(t, s, reqd_len); t[reqd_len] = '\0'; // ensure null terminal } // Getter for the name. const char* ParamContent::GetName() const { if (param_type_ == VT_INTEGER) { return iIt->name_str(); } else if (param_type_ == VT_BOOLEAN) { return bIt->name_str(); } else if (param_type_ == VT_DOUBLE) { return dIt->name_str(); } else if (param_type_ == VT_STRING) { return sIt->name_str(); } else return "ERROR: ParamContent::GetName()"; } // Getter for the description. const char* ParamContent::GetDescription() const { if (param_type_ == VT_INTEGER) { return iIt->info_str(); } else if (param_type_ == VT_BOOLEAN) { return bIt->info_str(); } else if (param_type_ == VT_DOUBLE) { return dIt->info_str(); } else if (param_type_ == VT_STRING) { return sIt->info_str(); } else return NULL; } // Getter for the value. STRING ParamContent::GetValue() const { STRING result; if (param_type_ == VT_INTEGER) { result.add_str_int("", *iIt); } else if (param_type_ == VT_BOOLEAN) { result.add_str_int("", *bIt); } else if (param_type_ == VT_DOUBLE) { result.add_str_double("", *dIt); } else if (param_type_ == VT_STRING) { if (((STRING) * (sIt)).string() != NULL) { result = sIt->string(); } else { result = "Null"; } } return result; } // Setter for the value. void ParamContent::SetValue(const char* val) { // TODO (wanke) Test if the values actually are properly converted. // (Quickly visible impacts?) changed_ = TRUE; if (param_type_ == VT_INTEGER) { iIt->set_value(atoi(val)); } else if (param_type_ == VT_BOOLEAN) { bIt->set_value(atoi(val)); } else if (param_type_ == VT_DOUBLE) { dIt->set_value(strtod(val, NULL)); } else if (param_type_ == VT_STRING) { sIt->set_value(val); } } // Gets the up to the first 3 prefixes from s (split by _). // For example, tesseract_foo_bar will be split into tesseract,foo and bar. void ParamsEditor::GetPrefixes(const char* s, STRING* level_one, STRING* level_two, STRING* level_three) { char* p = new char[1024]; GetFirstWords(s, 1, p); *level_one = p; GetFirstWords(s, 2, p); *level_two = p; GetFirstWords(s, 3, p); *level_three = p; delete[] p; } // Compare two VC objects by their name. int ParamContent::Compare(const void* v1, const void* v2) { const ParamContent* one = *reinterpret_cast<const ParamContent* const *>(v1); const ParamContent* two = *reinterpret_cast<const ParamContent* const *>(v2); return strcmp(one->GetName(), two->GetName()); } // Find all editable parameters used within tesseract and create a // SVMenuNode tree from it. // TODO (wanke): This is actually sort of hackish. SVMenuNode* ParamsEditor::BuildListOfAllLeaves(tesseract::Tesseract *tess) { SVMenuNode* mr = new SVMenuNode(); ParamContent_LIST vclist; ParamContent_IT vc_it(&vclist); // Amount counts the number of entries for a specific char*. // TODO(rays) get rid of the use of std::map. std::map<const char*, int> amount; // Add all parameters to a list. int v, i; int num_iterations = (tess->params() == NULL) ? 1 : 2; for (v = 0; v < num_iterations; ++v) { tesseract::ParamsVectors *vec = (v == 0) ? GlobalParams() : tess->params(); for (i = 0; i < vec->int_params.size(); ++i) { vc_it.add_after_then_move(new ParamContent(vec->int_params[i])); } for (i = 0; i < vec->bool_params.size(); ++i) { vc_it.add_after_then_move(new ParamContent(vec->bool_params[i])); } for (i = 0; i < vec->string_params.size(); ++i) { vc_it.add_after_then_move(new ParamContent(vec->string_params[i])); } for (i = 0; i < vec->double_params.size(); ++i) { vc_it.add_after_then_move(new ParamContent(vec->double_params[i])); } } // Count the # of entries starting with a specific prefix. for (vc_it.mark_cycle_pt(); !vc_it.cycled_list(); vc_it.forward()) { ParamContent* vc = vc_it.data(); STRING tag; STRING tag2; STRING tag3; GetPrefixes(vc->GetName(), &tag, &tag2, &tag3); amount[tag.string()]++; amount[tag2.string()]++; amount[tag3.string()]++; } vclist.sort(ParamContent::Compare); // Sort the list alphabetically. SVMenuNode* other = mr->AddChild("OTHER"); // go through the list again and this time create the menu structure. vc_it.move_to_first(); for (vc_it.mark_cycle_pt(); !vc_it.cycled_list(); vc_it.forward()) { ParamContent* vc = vc_it.data(); STRING tag; STRING tag2; STRING tag3; GetPrefixes(vc->GetName(), &tag, &tag2, &tag3); if (amount[tag.string()] == 1) { other->AddChild(vc->GetName(), vc->GetId(), vc->GetValue().string(), vc->GetDescription()); } else { // More than one would use this submenu -> create submenu. SVMenuNode* sv = mr->AddChild(tag.string()); if ((amount[tag.string()] <= MAX_ITEMS_IN_SUBMENU) || (amount[tag2.string()] <= 1)) { sv->AddChild(vc->GetName(), vc->GetId(), vc->GetValue().string(), vc->GetDescription()); } else { // Make subsubmenus. SVMenuNode* sv2 = sv->AddChild(tag2.string()); sv2->AddChild(vc->GetName(), vc->GetId(), vc->GetValue().string(), vc->GetDescription()); } } } return mr; } // Event listener. Waits for SVET_POPUP events and processes them. void ParamsEditor::Notify(const SVEvent* sve) { if (sve->type == SVET_POPUP) { // only catch SVET_POPUP! char* param = sve->parameter; if (sve->command_id == writeCommands[0]) { WriteParams(param, false); } else if (sve->command_id == writeCommands[1]) { WriteParams(param, true); } else { ParamContent* vc = ParamContent::GetParamContentById( sve->command_id); vc->SetValue(param); sv_window_->AddMessage("Setting %s to %s", vc->GetName(), vc->GetValue().string()); } } } // Integrate the parameters editor as popupmenu into the existing scrollview // window (usually the pg editor). If sv == null, create a new empty // empty window and attach the parameters editor to that window (ugly). ParamsEditor::ParamsEditor(tesseract::Tesseract* tess, ScrollView* sv) { if (sv == NULL) { const char* name = "ParamEditorMAIN"; sv = new ScrollView(name, 1, 1, 200, 200, 300, 200); } sv_window_ = sv; //Only one event handler per window. //sv->AddEventHandler((SVEventHandler*) this); SVMenuNode* svMenuRoot = BuildListOfAllLeaves(tess); STRING paramfile; paramfile = tess->datadir; paramfile += VARDIR; // parameters dir paramfile += "edited"; // actual name SVMenuNode* std_menu = svMenuRoot->AddChild ("Build Config File"); writeCommands[0] = nrParams+1; std_menu->AddChild("All Parameters", writeCommands[0], paramfile.string(), "Config file name?"); writeCommands[1] = nrParams+2; std_menu->AddChild ("changed_ Parameters Only", writeCommands[1], paramfile.string(), "Config file name?"); svMenuRoot->BuildMenu(sv, false); } // Write all (changed_) parameters to a config file. void ParamsEditor::WriteParams(char *filename, bool changes_only) { FILE *fp; // input file char msg_str[255]; // if file exists if ((fp = fopen (filename, "rb")) != NULL) { fclose(fp); sprintf (msg_str, "Overwrite file " "%s" "? (Y/N)", filename); int a = sv_window_->ShowYesNoDialog(msg_str); if (a == 'n') { return; } // dont write } fp = fopen (filename, "wb"); // can we write to it? if (fp == NULL) { sv_window_->AddMessage("Cant write to file " "%s" "", filename); return; } for (std::map<int, ParamContent*>::iterator iter = vcMap.begin(); iter != vcMap.end(); ++iter) { ParamContent* cur = iter->second; if (!changes_only || cur->HasChanged()) { fprintf(fp, "%-25s %-12s # %s\n", cur->GetName(), cur->GetValue().string(), cur->GetDescription()); } } fclose(fp); } #endif
C++
/////////////////////////////////////////////////////////////////////// // File: pageiterator.cpp // Description: Iterator for tesseract page structure that avoids using // tesseract internal data structures. // Author: Ray Smith // Created: Fri Feb 26 14:32:09 PST 2010 // // (C) Copyright 2010, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "pageiterator.h" #include "allheaders.h" #include "helpers.h" #include "pageres.h" #include "tesseractclass.h" namespace tesseract { PageIterator::PageIterator(PAGE_RES* page_res, Tesseract* tesseract, int scale, int scaled_yres, int rect_left, int rect_top, int rect_width, int rect_height) : page_res_(page_res), tesseract_(tesseract), word_(NULL), word_length_(0), blob_index_(0), cblob_it_(NULL), scale_(scale), scaled_yres_(scaled_yres), rect_left_(rect_left), rect_top_(rect_top), rect_width_(rect_width), rect_height_(rect_height) { it_ = new PAGE_RES_IT(page_res); PageIterator::Begin(); } PageIterator::~PageIterator() { delete it_; delete cblob_it_; } /** * PageIterators may be copied! This makes it possible to iterate over * all the objects at a lower level, while maintaining an iterator to * objects at a higher level. */ PageIterator::PageIterator(const PageIterator& src) : page_res_(src.page_res_), tesseract_(src.tesseract_), word_(NULL), word_length_(src.word_length_), blob_index_(src.blob_index_), cblob_it_(NULL), scale_(src.scale_), scaled_yres_(src.scaled_yres_), rect_left_(src.rect_left_), rect_top_(src.rect_top_), rect_width_(src.rect_width_), rect_height_(src.rect_height_) { it_ = new PAGE_RES_IT(*src.it_); BeginWord(src.blob_index_); } const PageIterator& PageIterator::operator=(const PageIterator& src) { page_res_ = src.page_res_; tesseract_ = src.tesseract_; scale_ = src.scale_; scaled_yres_ = src.scaled_yres_; rect_left_ = src.rect_left_; rect_top_ = src.rect_top_; rect_width_ = src.rect_width_; rect_height_ = src.rect_height_; if (it_ != NULL) delete it_; it_ = new PAGE_RES_IT(*src.it_); BeginWord(src.blob_index_); return *this; } bool PageIterator::PositionedAtSameWord(const PAGE_RES_IT* other) const { return (it_ == NULL && it_ == other) || ((other != NULL) && (it_ != NULL) && (*it_ == *other)); } // ============= Moving around within the page ============. /** Resets the iterator to point to the start of the page. */ void PageIterator::Begin() { it_->restart_page_with_empties(); BeginWord(0); } void PageIterator::RestartParagraph() { if (it_->block() == NULL) return; // At end of the document. PAGE_RES_IT para(page_res_); PAGE_RES_IT next_para(para); next_para.forward_paragraph(); while (next_para.cmp(*it_) <= 0) { para = next_para; next_para.forward_paragraph(); } *it_ = para; BeginWord(0); } bool PageIterator::IsWithinFirstTextlineOfParagraph() const { PageIterator p_start(*this); p_start.RestartParagraph(); return p_start.it_->row() == it_->row(); } void PageIterator::RestartRow() { it_->restart_row(); BeginWord(0); } /** * Moves to the start of the next object at the given level in the * page hierarchy, and returns false if the end of the page was reached. * NOTE (CHANGED!) that ALL PageIteratorLevel level values will visit each * non-text block at least once. * Think of non text blocks as containing a single para, with at least one * line, with a single imaginary word, containing a single symbol. * The bounding boxes mark out any polygonal nature of the block, and * PTIsTextType(BLockType()) is false for non-text blocks. * Calls to Next with different levels may be freely intermixed. * This function iterates words in right-to-left scripts correctly, if * the appropriate language has been loaded into Tesseract. */ bool PageIterator::Next(PageIteratorLevel level) { if (it_->block() == NULL) return false; // Already at the end! if (it_->word() == NULL) level = RIL_BLOCK; switch (level) { case RIL_BLOCK: it_->forward_block(); break; case RIL_PARA: it_->forward_paragraph(); break; case RIL_TEXTLINE: for (it_->forward_with_empties(); it_->row() == it_->prev_row(); it_->forward_with_empties()); break; case RIL_WORD: it_->forward_with_empties(); break; case RIL_SYMBOL: if (cblob_it_ != NULL) cblob_it_->forward(); ++blob_index_; if (blob_index_ >= word_length_) it_->forward_with_empties(); else return true; break; } BeginWord(0); return it_->block() != NULL; } /** * Returns true if the iterator is at the start of an object at the given * level. Possible uses include determining if a call to Next(RIL_WORD) * moved to the start of a RIL_PARA. */ bool PageIterator::IsAtBeginningOf(PageIteratorLevel level) const { if (it_->block() == NULL) return false; // Already at the end! if (it_->word() == NULL) return true; // In an image block. switch (level) { case RIL_BLOCK: return blob_index_ == 0 && it_->block() != it_->prev_block(); case RIL_PARA: return blob_index_ == 0 && (it_->block() != it_->prev_block() || it_->row()->row->para() != it_->prev_row()->row->para()); case RIL_TEXTLINE: return blob_index_ == 0 && it_->row() != it_->prev_row(); case RIL_WORD: return blob_index_ == 0; case RIL_SYMBOL: return true; } return false; } /** * Returns whether the iterator is positioned at the last element in a * given level. (e.g. the last word in a line, the last line in a block) */ bool PageIterator::IsAtFinalElement(PageIteratorLevel level, PageIteratorLevel element) const { if (Empty(element)) return true; // Already at the end! // The result is true if we step forward by element and find we are // at the the end of the page or at beginning of *all* levels in: // [level, element). // When there is more than one level difference between element and level, // we could for instance move forward one symbol and still be at the first // word on a line, so we also have to be at the first symbol in a word. PageIterator next(*this); next.Next(element); if (next.Empty(element)) return true; // Reached the end of the page. while (element > level) { element = static_cast<PageIteratorLevel>(element - 1); if (!next.IsAtBeginningOf(element)) return false; } return true; } /** * Returns whether this iterator is positioned * before other: -1 * equal to other: 0 * after other: 1 */ int PageIterator::Cmp(const PageIterator &other) const { int word_cmp = it_->cmp(*other.it_); if (word_cmp != 0) return word_cmp; if (blob_index_ < other.blob_index_) return -1; if (blob_index_ == other.blob_index_) return 0; return 1; } // ============= Accessing data ==============. // Coordinate system: // Integer coordinates are at the cracks between the pixels. // The top-left corner of the top-left pixel in the image is at (0,0). // The bottom-right corner of the bottom-right pixel in the image is at // (width, height). // Every bounding box goes from the top-left of the top-left contained // pixel to the bottom-right of the bottom-right contained pixel, so // the bounding box of the single top-left pixel in the image is: // (0,0)->(1,1). // If an image rectangle has been set in the API, then returned coordinates // relate to the original (full) image, rather than the rectangle. /** * Returns the bounding rectangle of the current object at the given level in * the coordinates of the working image that is pix_binary(). * See comment on coordinate system above. * Returns false if there is no such object at the current position. */ bool PageIterator::BoundingBoxInternal(PageIteratorLevel level, int* left, int* top, int* right, int* bottom) const { if (Empty(level)) return false; TBOX box; PARA *para = NULL; switch (level) { case RIL_BLOCK: box = it_->block()->block->bounding_box(); break; case RIL_PARA: para = it_->row()->row->para(); // explicit fall-through. case RIL_TEXTLINE: box = it_->row()->row->bounding_box(); break; case RIL_WORD: box = it_->word()->word->bounding_box(); break; case RIL_SYMBOL: if (cblob_it_ == NULL) box = it_->word()->box_word->BlobBox(blob_index_); else box = cblob_it_->data()->bounding_box(); } if (level == RIL_PARA) { PageIterator other = *this; other.Begin(); do { if (other.it_->block() && other.it_->block()->block == it_->block()->block && other.it_->row() && other.it_->row()->row && other.it_->row()->row->para() == para) { box = box.bounding_union(other.it_->row()->row->bounding_box()); } } while (other.Next(RIL_TEXTLINE)); } if (level != RIL_SYMBOL || cblob_it_ != NULL) box.rotate(it_->block()->block->re_rotation()); // Now we have a box in tesseract coordinates relative to the image rectangle, // we have to convert the coords to a top-down system. const int pix_height = pixGetHeight(tesseract_->pix_binary()); const int pix_width = pixGetWidth(tesseract_->pix_binary()); *left = ClipToRange(static_cast<int>(box.left()), 0, pix_width); *top = ClipToRange(pix_height - box.top(), 0, pix_height); *right = ClipToRange(static_cast<int>(box.right()), *left, pix_width); *bottom = ClipToRange(pix_height - box.bottom(), *top, pix_height); return true; } /** * Returns the bounding rectangle of the current object at the given level in * coordinates of the original image. * See comment on coordinate system above. * Returns false if there is no such object at the current position. */ bool PageIterator::BoundingBox(PageIteratorLevel level, int* left, int* top, int* right, int* bottom) const { return BoundingBox(level, 0, left, top, right, bottom); } bool PageIterator::BoundingBox(PageIteratorLevel level, const int padding, int* left, int* top, int* right, int* bottom) const { if (!BoundingBoxInternal(level, left, top, right, bottom)) return false; // Convert to the coordinate system of the original image. *left = ClipToRange(*left / scale_ + rect_left_ - padding, rect_left_, rect_left_ + rect_width_); *top = ClipToRange(*top / scale_ + rect_top_ - padding, rect_top_, rect_top_ + rect_height_); *right = ClipToRange((*right + scale_ - 1) / scale_ + rect_left_ + padding, *left, rect_left_ + rect_width_); *bottom = ClipToRange((*bottom + scale_ - 1) / scale_ + rect_top_ + padding, *top, rect_top_ + rect_height_); return true; } /** Return that there is no such object at a given level. */ bool PageIterator::Empty(PageIteratorLevel level) const { if (it_->block() == NULL) return true; // Already at the end! if (it_->word() == NULL && level != RIL_BLOCK) return true; // image block if (level == RIL_SYMBOL && blob_index_ >= word_length_) return true; // Zero length word, or already at the end of it. return false; } /** Returns the type of the current block. See apitypes.h for PolyBlockType. */ PolyBlockType PageIterator::BlockType() const { if (it_->block() == NULL || it_->block()->block == NULL) return PT_UNKNOWN; // Already at the end! if (it_->block()->block->poly_block() == NULL) return PT_FLOWING_TEXT; // No layout analysis used - assume text. return it_->block()->block->poly_block()->isA(); } /** Returns the polygon outline of the current block. The returned Pta must * be ptaDestroy-ed after use. */ Pta* PageIterator::BlockPolygon() const { if (it_->block() == NULL || it_->block()->block == NULL) return NULL; // Already at the end! if (it_->block()->block->poly_block() == NULL) return NULL; // No layout analysis used - no polygon. ICOORDELT_IT it(it_->block()->block->poly_block()->points()); Pta* pta = ptaCreate(it.length()); int num_pts = 0; for (it.mark_cycle_pt(); !it.cycled_list(); it.forward(), ++num_pts) { ICOORD* pt = it.data(); // Convert to top-down coords within the input image. float x = static_cast<float>(pt->x()) / scale_ + rect_left_; float y = rect_top_ + rect_height_ - static_cast<float>(pt->y()) / scale_; ptaAddPt(pta, x, y); } return pta; } /** * Returns a binary image of the current object at the given level. * The position and size match the return from BoundingBoxInternal, and so this * could be upscaled with respect to the original input image. * Use pixDestroy to delete the image after use. * The following methods are used to generate the images: * RIL_BLOCK: mask the page image with the block polygon. * RIL_TEXTLINE: Clip the rectangle of the line box from the page image. * TODO(rays) fix this to generate and use a line polygon. * RIL_WORD: Clip the rectangle of the word box from the page image. * RIL_SYMBOL: Render the symbol outline to an image for cblobs (prior * to recognition) or the bounding box otherwise. * A reconstruction of the original image (using xor to check for double * representation) should be reasonably accurate, * apart from removed noise, at the block level. Below the block level, the * reconstruction will be missing images and line separators. * At the symbol level, kerned characters will be invade the bounding box * if rendered after recognition, making an xor reconstruction inaccurate, but * an or construction better. Before recognition, symbol-level reconstruction * should be good, even with xor, since the images come from the connected * components. */ Pix* PageIterator::GetBinaryImage(PageIteratorLevel level) const { int left, top, right, bottom; if (!BoundingBoxInternal(level, &left, &top, &right, &bottom)) return NULL; Pix* pix = NULL; switch (level) { case RIL_BLOCK: case RIL_PARA: int bleft, btop, bright, bbottom; BoundingBoxInternal(RIL_BLOCK, &bleft, &btop, &bright, &bbottom); pix = it_->block()->block->render_mask(); // AND the mask and the image. pixRasterop(pix, 0, 0, pixGetWidth(pix), pixGetHeight(pix), PIX_SRC & PIX_DST, tesseract_->pix_binary(), bleft, btop); if (level == RIL_PARA) { // RIL_PARA needs further attention: // clip the paragraph from the block mask. Box* box = boxCreate(left - bleft, top - btop, right - left, bottom - top); Pix* pix2 = pixClipRectangle(pix, box, NULL); boxDestroy(&box); pixDestroy(&pix); pix = pix2; } break; case RIL_TEXTLINE: case RIL_WORD: case RIL_SYMBOL: if (level == RIL_SYMBOL && cblob_it_ != NULL && cblob_it_->data()->area() != 0) return cblob_it_->data()->render(); // Just clip from the bounding box. Box* box = boxCreate(left, top, right - left, bottom - top); pix = pixClipRectangle(tesseract_->pix_binary(), box, NULL); boxDestroy(&box); break; } return pix; } /** * Returns an image of the current object at the given level in greyscale * if available in the input. To guarantee a binary image use BinaryImage. * NOTE that in order to give the best possible image, the bounds are * expanded slightly over the binary connected component, by the supplied * padding, so the top-left position of the returned image is returned * in (left,top). These will most likely not match the coordinates * returned by BoundingBox. * If you do not supply an original image, you will get a binary one. * Use pixDestroy to delete the image after use. */ Pix* PageIterator::GetImage(PageIteratorLevel level, int padding, Pix* original_img, int* left, int* top) const { int right, bottom; if (!BoundingBox(level, left, top, &right, &bottom)) return NULL; if (original_img == NULL) return GetBinaryImage(level); // Expand the box. *left = MAX(*left - padding, 0); *top = MAX(*top - padding, 0); right = MIN(right + padding, rect_width_); bottom = MIN(bottom + padding, rect_height_); Box* box = boxCreate(*left, *top, right - *left, bottom - *top); Pix* grey_pix = pixClipRectangle(original_img, box, NULL); boxDestroy(&box); if (level == RIL_BLOCK) { Pix* mask = it_->block()->block->render_mask(); Pix* expanded_mask = pixCreate(right - *left, bottom - *top, 1); pixRasterop(expanded_mask, padding, padding, pixGetWidth(mask), pixGetHeight(mask), PIX_SRC, mask, 0, 0); pixDestroy(&mask); pixDilateBrick(expanded_mask, expanded_mask, 2*padding + 1, 2*padding + 1); pixInvert(expanded_mask, expanded_mask); pixSetMasked(grey_pix, expanded_mask, MAX_UINT32); pixDestroy(&expanded_mask); } return grey_pix; } /** * Returns the baseline of the current object at the given level. * The baseline is the line that passes through (x1, y1) and (x2, y2). * WARNING: with vertical text, baselines may be vertical! */ bool PageIterator::Baseline(PageIteratorLevel level, int* x1, int* y1, int* x2, int* y2) const { if (it_->word() == NULL) return false; // Already at the end! ROW* row = it_->row()->row; WERD* word = it_->word()->word; TBOX box = (level == RIL_WORD || level == RIL_SYMBOL) ? word->bounding_box() : row->bounding_box(); int left = box.left(); ICOORD startpt(left, static_cast<inT16>(row->base_line(left) + 0.5)); int right = box.right(); ICOORD endpt(right, static_cast<inT16>(row->base_line(right) + 0.5)); // Rotate to image coordinates and convert to global image coords. startpt.rotate(it_->block()->block->re_rotation()); endpt.rotate(it_->block()->block->re_rotation()); *x1 = startpt.x() / scale_ + rect_left_; *y1 = (rect_height_ - startpt.y()) / scale_ + rect_top_; *x2 = endpt.x() / scale_ + rect_left_; *y2 = (rect_height_ - endpt.y()) / scale_ + rect_top_; return true; } void PageIterator::Orientation(tesseract::Orientation *orientation, tesseract::WritingDirection *writing_direction, tesseract::TextlineOrder *textline_order, float *deskew_angle) const { BLOCK* block = it_->block()->block; // Orientation FCOORD up_in_image(0.0, 1.0); up_in_image.unrotate(block->classify_rotation()); up_in_image.rotate(block->re_rotation()); if (up_in_image.x() == 0.0F) { if (up_in_image.y() > 0.0F) { *orientation = ORIENTATION_PAGE_UP; } else { *orientation = ORIENTATION_PAGE_DOWN; } } else if (up_in_image.x() > 0.0F) { *orientation = ORIENTATION_PAGE_RIGHT; } else { *orientation = ORIENTATION_PAGE_LEFT; } // Writing direction bool is_vertical_text = (block->classify_rotation().x() == 0.0); bool right_to_left = block->right_to_left(); *writing_direction = is_vertical_text ? WRITING_DIRECTION_TOP_TO_BOTTOM : (right_to_left ? WRITING_DIRECTION_RIGHT_TO_LEFT : WRITING_DIRECTION_LEFT_TO_RIGHT); // Textline Order bool is_mongolian = false; // TODO(eger): fix me *textline_order = is_vertical_text ? (is_mongolian ? TEXTLINE_ORDER_LEFT_TO_RIGHT : TEXTLINE_ORDER_RIGHT_TO_LEFT) : TEXTLINE_ORDER_TOP_TO_BOTTOM; // Deskew angle FCOORD skew = block->skew(); // true horizontal for textlines *deskew_angle = -skew.angle(); } void PageIterator::ParagraphInfo(tesseract::ParagraphJustification *just, bool *is_list_item, bool *is_crown, int *first_line_indent) const { *just = tesseract::JUSTIFICATION_UNKNOWN; if (!it_->row() || !it_->row()->row || !it_->row()->row->para() || !it_->row()->row->para()->model) return; PARA *para = it_->row()->row->para(); *is_list_item = para->is_list_item; *is_crown = para->is_very_first_or_continuation; *first_line_indent = para->model->first_indent() - para->model->body_indent(); } /** * Sets up the internal data for iterating the blobs of a new word, then * moves the iterator to the given offset. */ void PageIterator::BeginWord(int offset) { WERD_RES* word_res = it_->word(); if (word_res == NULL) { // This is a non-text block, so there is no word. word_length_ = 0; blob_index_ = 0; word_ = NULL; return; } if (word_res->best_choice != NULL) { // Recognition has been done, so we are using the box_word, which // is already baseline denormalized. word_length_ = word_res->best_choice->length(); if (word_res->box_word != NULL) { if (word_res->box_word->length() != word_length_) { tprintf("Corrupted word! best_choice[len=%d] = %s, box_word[len=%d]: ", word_length_, word_res->best_choice->unichar_string().string(), word_res->box_word->length()); word_res->box_word->bounding_box().print(); } ASSERT_HOST(word_res->box_word->length() == word_length_); } word_ = NULL; // We will be iterating the box_word. if (cblob_it_ != NULL) { delete cblob_it_; cblob_it_ = NULL; } } else { // No recognition yet, so a "symbol" is a cblob. word_ = word_res->word; ASSERT_HOST(word_->cblob_list() != NULL); word_length_ = word_->cblob_list()->length(); if (cblob_it_ == NULL) cblob_it_ = new C_BLOB_IT; cblob_it_->set_to_list(word_->cblob_list()); } for (blob_index_ = 0; blob_index_ < offset; ++blob_index_) { if (cblob_it_ != NULL) cblob_it_->forward(); } } bool PageIterator::SetWordBlamerBundle(BlamerBundle *blamer_bundle) { if (it_->word() != NULL) { it_->word()->blamer_bundle = blamer_bundle; return true; } else { return false; } } } // namespace tesseract.
C++
/////////////////////////////////////////////////////////////////////// // File: resultiterator.cpp // Description: Iterator for tesseract results that is capable of // iterating in proper reading order over Bi Directional // (e.g. mixed Hebrew and English) text. // Author: David Eger // Created: Fri May 27 13:58:06 PST 2011 // // (C) Copyright 2011, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // /////////////////////////////////////////////////////////////////////// #include "resultiterator.h" #include "allheaders.h" #include "pageres.h" #include "strngs.h" #include "tesseractclass.h" #include "unicharset.h" #include "unicodes.h" namespace tesseract { ResultIterator::ResultIterator(const LTRResultIterator &resit) : LTRResultIterator(resit) { in_minor_direction_ = false; at_beginning_of_minor_run_ = false; preserve_interword_spaces_ = false; BoolParam *p = ParamUtils::FindParam<BoolParam>( "preserve_interword_spaces", GlobalParams()->bool_params, tesseract_->params()->bool_params); if (p != NULL) preserve_interword_spaces_ = (bool)(*p); current_paragraph_is_ltr_ = CurrentParagraphIsLtr(); MoveToLogicalStartOfTextline(); } ResultIterator *ResultIterator::StartOfParagraph( const LTRResultIterator &resit) { return new ResultIterator(resit); } bool ResultIterator::ParagraphIsLtr() const { return current_paragraph_is_ltr_; } bool ResultIterator::CurrentParagraphIsLtr() const { if (!it_->word()) return true; // doesn't matter. LTRResultIterator it(*this); it.RestartParagraph(); // Try to figure out the ltr-ness of the paragraph. The rules below // make more sense in the context of a difficult paragraph example. // Here we denote {ltr characters, RTL CHARACTERS}: // // "don't go in there!" DAIS EH // EHT OTNI DEPMUJ FELSMIH NEHT DNA // .GNIDLIUB GNINRUB // // On the first line, the left-most word is LTR and the rightmost word // is RTL. Thus, we are better off taking the majority direction for // the whole paragraph contents. So instead of "the leftmost word is LTR" // indicating an LTR paragraph, we use a heuristic about what RTL paragraphs // would not do: Typically an RTL paragraph would *not* start with an LTR // word. So our heuristics are as follows: // // (1) If the first text line has an RTL word in the left-most position // it is RTL. // (2) If the first text line has an LTR word in the right-most position // it is LTR. // (3) If neither of the above is true, take the majority count for the // paragraph -- if there are more rtl words, it is RTL. If there // are more LTR words, it's LTR. bool leftmost_rtl = it.WordDirection() == DIR_RIGHT_TO_LEFT; bool rightmost_ltr = it.WordDirection() == DIR_LEFT_TO_RIGHT; int num_ltr, num_rtl; num_rtl = leftmost_rtl ? 1 : 0; num_ltr = (it.WordDirection() == DIR_LEFT_TO_RIGHT) ? 1 : 0; for (it.Next(RIL_WORD); !it.Empty(RIL_WORD) && !it.IsAtBeginningOf(RIL_TEXTLINE); it.Next(RIL_WORD)) { StrongScriptDirection dir = it.WordDirection(); rightmost_ltr = (dir == DIR_LEFT_TO_RIGHT); num_rtl += (dir == DIR_RIGHT_TO_LEFT) ? 1 : 0; num_ltr += rightmost_ltr ? 1 : 0; } if (leftmost_rtl) return false; if (rightmost_ltr) return true; // First line is ambiguous. Take statistics on the whole paragraph. if (!it.Empty(RIL_WORD) && !it.IsAtBeginningOf(RIL_PARA)) do { StrongScriptDirection dir = it.WordDirection(); num_rtl += (dir == DIR_RIGHT_TO_LEFT) ? 1 : 0; num_ltr += (dir == DIR_LEFT_TO_RIGHT) ? 1 : 0; } while (it.Next(RIL_WORD) && !it.IsAtBeginningOf(RIL_PARA)); return num_ltr >= num_rtl; } const int ResultIterator::kMinorRunStart = -1; const int ResultIterator::kMinorRunEnd = -2; const int ResultIterator::kComplexWord = -3; void ResultIterator::CalculateBlobOrder( GenericVector<int> *blob_indices) const { bool context_is_ltr = current_paragraph_is_ltr_ ^ in_minor_direction_; blob_indices->clear(); if (Empty(RIL_WORD)) return; if (context_is_ltr || it_->word()->UnicharsInReadingOrder()) { // Easy! just return the blobs in order; for (int i = 0; i < word_length_; i++) blob_indices->push_back(i); return; } // The blobs are in left-to-right order, but the current reading context // is right-to-left. const int U_LTR = UNICHARSET::U_LEFT_TO_RIGHT; const int U_RTL = UNICHARSET::U_RIGHT_TO_LEFT; const int U_EURO_NUM = UNICHARSET::U_EUROPEAN_NUMBER; const int U_EURO_NUM_SEP = UNICHARSET::U_EUROPEAN_NUMBER_SEPARATOR; const int U_EURO_NUM_TERM = UNICHARSET::U_EUROPEAN_NUMBER_TERMINATOR; const int U_COMMON_NUM_SEP = UNICHARSET::U_COMMON_NUMBER_SEPARATOR; const int U_OTHER_NEUTRAL = UNICHARSET::U_OTHER_NEUTRAL; // Step 1: Scan for and mark European Number sequences // [:ET:]*[:EN:]+(([:ES:]|[:CS:])?[:EN:]+)*[:ET:]* GenericVector<int> letter_types; for (int i = 0; i < word_length_; i++) { letter_types.push_back(it_->word()->SymbolDirection(i)); } // Convert a single separtor sandwiched between two EN's into an EN. for (int i = 0; i + 2 < word_length_; i++) { if (letter_types[i] == U_EURO_NUM && letter_types[i + 2] == U_EURO_NUM && (letter_types[i + 1] == U_EURO_NUM_SEP || letter_types[i + 1] == U_COMMON_NUM_SEP)) { letter_types[i + 1] = U_EURO_NUM; } } // Scan for sequences of European Number Terminators around ENs and convert // them to ENs. for (int i = 0; i < word_length_; i++) { if (letter_types[i] == U_EURO_NUM_TERM) { int j = i + 1; while (j < word_length_ && letter_types[j] == U_EURO_NUM_TERM) { j++; } if (j < word_length_ && letter_types[j] == U_EURO_NUM) { // The sequence [i..j] should be converted to all European Numbers. for (int k = i; k < j; k++) letter_types[k] = U_EURO_NUM; } j = i - 1; while (j > -1 && letter_types[j] == U_EURO_NUM_TERM) { j--; } if (j > -1 && letter_types[j] == U_EURO_NUM) { // The sequence [j..i] should be converted to all European Numbers. for (int k = j; k <= i; k++) letter_types[k] = U_EURO_NUM; } } } // Step 2: Convert all remaining types to either L or R. // Sequences ([:L:]|[:EN:])+ (([:CS:]|[:ON:])+ ([:L:]|[:EN:])+)* -> L. // All other are R. for (int i = 0; i < word_length_;) { int ti = letter_types[i]; if (ti == U_LTR || ti == U_EURO_NUM) { // Left to right sequence; scan to the end of it. int last_good = i; for (int j = i + 1; j < word_length_; j++) { int tj = letter_types[j]; if (tj == U_LTR || tj == U_EURO_NUM) { last_good = j; } else if (tj == U_COMMON_NUM_SEP || tj == U_OTHER_NEUTRAL) { // do nothing. } else { break; } } // [i..last_good] is the L sequence for (int k = i; k <= last_good; k++) letter_types[k] = U_LTR; i = last_good + 1; } else { letter_types[i] = U_RTL; i++; } } // At this point, letter_types is entirely U_LTR or U_RTL. for (int i = word_length_ - 1; i >= 0;) { if (letter_types[i] == U_RTL) { blob_indices->push_back(i); i--; } else { // left to right sequence. scan to the beginning. int j = i - 1; for (; j >= 0 && letter_types[j] != U_RTL; j--) { } // pass // Now (j, i] is LTR for (int k = j + 1; k <= i; k++) blob_indices->push_back(k); i = j; } } ASSERT_HOST(blob_indices->size() == word_length_); } static void PrintScriptDirs(const GenericVector<StrongScriptDirection> &dirs) { for (int i = 0; i < dirs.size(); i++) { switch (dirs[i]) { case DIR_NEUTRAL: tprintf ("N "); break; case DIR_LEFT_TO_RIGHT: tprintf("L "); break; case DIR_RIGHT_TO_LEFT: tprintf("R "); break; case DIR_MIX: tprintf("Z "); break; default: tprintf("? "); break; } } tprintf("\n"); } void ResultIterator::CalculateTextlineOrder( bool paragraph_is_ltr, const LTRResultIterator &resit, GenericVectorEqEq<int> *word_indices) const { GenericVector<StrongScriptDirection> directions; CalculateTextlineOrder(paragraph_is_ltr, resit, &directions, word_indices); } void ResultIterator::CalculateTextlineOrder( bool paragraph_is_ltr, const LTRResultIterator &resit, GenericVector<StrongScriptDirection> *dirs_arg, GenericVectorEqEq<int> *word_indices) const { GenericVector<StrongScriptDirection> dirs; GenericVector<StrongScriptDirection> *directions; directions = (dirs_arg != NULL) ? dirs_arg : &dirs; directions->truncate(0); // A LTRResultIterator goes strictly left-to-right word order. LTRResultIterator ltr_it(resit); ltr_it.RestartRow(); if (ltr_it.Empty(RIL_WORD)) return; do { directions->push_back(ltr_it.WordDirection()); } while (ltr_it.Next(RIL_WORD) && !ltr_it.IsAtBeginningOf(RIL_TEXTLINE)); word_indices->truncate(0); CalculateTextlineOrder(paragraph_is_ltr, *directions, word_indices); } void ResultIterator::CalculateTextlineOrder( bool paragraph_is_ltr, const GenericVector<StrongScriptDirection> &word_dirs, GenericVectorEqEq<int> *reading_order) { reading_order->truncate(0); if (word_dirs.size() == 0) return; // Take all of the runs of minor direction words and insert them // in reverse order. int minor_direction, major_direction, major_step, start, end; if (paragraph_is_ltr) { start = 0; end = word_dirs.size(); major_step = 1; major_direction = DIR_LEFT_TO_RIGHT; minor_direction = DIR_RIGHT_TO_LEFT; } else { start = word_dirs.size() - 1; end = -1; major_step = -1; major_direction = DIR_RIGHT_TO_LEFT; minor_direction = DIR_LEFT_TO_RIGHT; // Special rule: if there are neutral words at the right most side // of a line adjacent to a left-to-right word in the middle of the // line, we interpret the end of the line as a single LTR sequence. if (word_dirs[start] == DIR_NEUTRAL) { int neutral_end = start; while (neutral_end > 0 && word_dirs[neutral_end] == DIR_NEUTRAL) { neutral_end--; } if (neutral_end >= 0 && word_dirs[neutral_end] == DIR_LEFT_TO_RIGHT) { // LTR followed by neutrals. // Scan for the beginning of the minor left-to-right run. int left = neutral_end; for (int i = left; i >= 0 && word_dirs[i] != DIR_RIGHT_TO_LEFT; i--) { if (word_dirs[i] == DIR_LEFT_TO_RIGHT) left = i; } reading_order->push_back(kMinorRunStart); for (int i = left; i < word_dirs.size(); i++) { reading_order->push_back(i); if (word_dirs[i] == DIR_MIX) reading_order->push_back(kComplexWord); } reading_order->push_back(kMinorRunEnd); start = left - 1; } } } for (int i = start; i != end;) { if (word_dirs[i] == minor_direction) { int j = i; while (j != end && word_dirs[j] != major_direction) j += major_step; if (j == end) j -= major_step; while (j != i && word_dirs[j] != minor_direction) j -= major_step; // [j..i] is a minor direction run. reading_order->push_back(kMinorRunStart); for (int k = j; k != i; k -= major_step) { reading_order->push_back(k); } reading_order->push_back(i); reading_order->push_back(kMinorRunEnd); i = j + major_step; } else { reading_order->push_back(i); if (word_dirs[i] == DIR_MIX) reading_order->push_back(kComplexWord); i += major_step; } } } int ResultIterator::LTRWordIndex() const { int this_word_index = 0; LTRResultIterator textline(*this); textline.RestartRow(); while (!textline.PositionedAtSameWord(it_)) { this_word_index++; textline.Next(RIL_WORD); } return this_word_index; } void ResultIterator::MoveToLogicalStartOfWord() { if (word_length_ == 0) { BeginWord(0); return; } GenericVector<int> blob_order; CalculateBlobOrder(&blob_order); if (blob_order.size() == 0 || blob_order[0] == 0) return; BeginWord(blob_order[0]); } bool ResultIterator::IsAtFinalSymbolOfWord() const { if (!it_->word()) return true; GenericVector<int> blob_order; CalculateBlobOrder(&blob_order); return blob_order.size() == 0 || blob_order.back() == blob_index_; } bool ResultIterator::IsAtFirstSymbolOfWord() const { if (!it_->word()) return true; GenericVector<int> blob_order; CalculateBlobOrder(&blob_order); return blob_order.size() == 0 || blob_order[0] == blob_index_; } void ResultIterator::AppendSuffixMarks(STRING *text) const { if (!it_->word()) return; bool reading_direction_is_ltr = current_paragraph_is_ltr_ ^ in_minor_direction_; // scan forward to see what meta-information the word ordering algorithm // left us. // If this word is at the *end* of a minor run, insert the other // direction's mark; else if this was a complex word, insert the // current reading order's mark. GenericVectorEqEq<int> textline_order; CalculateTextlineOrder(current_paragraph_is_ltr_, *this, &textline_order); int this_word_index = LTRWordIndex(); int i = textline_order.get_index(this_word_index); if (i < 0) return; int last_non_word_mark = 0; for (i++; i < textline_order.size() && textline_order[i] < 0; i++) { last_non_word_mark = textline_order[i]; } if (last_non_word_mark == kComplexWord) { *text += reading_direction_is_ltr ? kLRM : kRLM; } else if (last_non_word_mark == kMinorRunEnd) { if (current_paragraph_is_ltr_) { *text += kLRM; } else { *text += kRLM; } } } void ResultIterator::MoveToLogicalStartOfTextline() { GenericVectorEqEq<int> word_indices; RestartRow(); CalculateTextlineOrder(current_paragraph_is_ltr_, dynamic_cast<const LTRResultIterator&>(*this), &word_indices); int i = 0; for (; i < word_indices.size() && word_indices[i] < 0; i++) { if (word_indices[i] == kMinorRunStart) in_minor_direction_ = true; else if (word_indices[i] == kMinorRunEnd) in_minor_direction_ = false; } if (in_minor_direction_) at_beginning_of_minor_run_ = true; if (i >= word_indices.size()) return; int first_word_index = word_indices[i]; for (int j = 0; j < first_word_index; j++) { PageIterator::Next(RIL_WORD); } MoveToLogicalStartOfWord(); } void ResultIterator::Begin() { LTRResultIterator::Begin(); current_paragraph_is_ltr_ = CurrentParagraphIsLtr(); in_minor_direction_ = false; at_beginning_of_minor_run_ = false; MoveToLogicalStartOfTextline(); } bool ResultIterator::Next(PageIteratorLevel level) { if (it_->block() == NULL) return false; // already at end! switch (level) { case RIL_BLOCK: // explicit fall-through case RIL_PARA: // explicit fall-through case RIL_TEXTLINE: if (!PageIterator::Next(level)) return false; if (IsWithinFirstTextlineOfParagraph()) { // if we've advanced to a new paragraph, // recalculate current_paragraph_is_ltr_ current_paragraph_is_ltr_ = CurrentParagraphIsLtr(); } in_minor_direction_ = false; MoveToLogicalStartOfTextline(); return it_->block() != NULL; case RIL_SYMBOL: { GenericVector<int> blob_order; CalculateBlobOrder(&blob_order); int next_blob = 0; while (next_blob < blob_order.size() && blob_index_ != blob_order[next_blob]) next_blob++; next_blob++; if (next_blob < blob_order.size()) { // we're in the same word; simply advance one blob. BeginWord(blob_order[next_blob]); at_beginning_of_minor_run_ = false; return true; } level = RIL_WORD; // we've fallen through to the next word. } case RIL_WORD: // explicit fall-through. { if (it_->word() == NULL) return Next(RIL_BLOCK); GenericVectorEqEq<int> word_indices; int this_word_index = LTRWordIndex(); CalculateTextlineOrder(current_paragraph_is_ltr_, *this, &word_indices); int final_real_index = word_indices.size() - 1; while (final_real_index > 0 && word_indices[final_real_index] < 0) final_real_index--; for (int i = 0; i < final_real_index; i++) { if (word_indices[i] == this_word_index) { int j = i + 1; for (; j < final_real_index && word_indices[j] < 0; j++) { if (word_indices[j] == kMinorRunStart) in_minor_direction_ = true; if (word_indices[j] == kMinorRunEnd) in_minor_direction_ = false; } at_beginning_of_minor_run_ = (word_indices[j - 1] == kMinorRunStart); // awesome, we move to word_indices[j] if (BidiDebug(3)) { tprintf("Next(RIL_WORD): %d -> %d\n", this_word_index, word_indices[j]); } PageIterator::RestartRow(); for (int k = 0; k < word_indices[j]; k++) { PageIterator::Next(RIL_WORD); } MoveToLogicalStartOfWord(); return true; } } if (BidiDebug(3)) { tprintf("Next(RIL_WORD): %d -> EOL\n", this_word_index); } // we're going off the end of the text line. return Next(RIL_TEXTLINE); } } ASSERT_HOST(false); // shouldn't happen. return false; } bool ResultIterator::IsAtBeginningOf(PageIteratorLevel level) const { if (it_->block() == NULL) return false; // Already at the end! if (it_->word() == NULL) return true; // In an image block. if (level == RIL_SYMBOL) return true; // Always at beginning of a symbol. bool at_word_start = IsAtFirstSymbolOfWord(); if (level == RIL_WORD) return at_word_start; ResultIterator line_start(*this); // move to the first word in the line... line_start.MoveToLogicalStartOfTextline(); bool at_textline_start = at_word_start && *line_start.it_ == *it_; if (level == RIL_TEXTLINE) return at_textline_start; // now we move to the left-most word... line_start.RestartRow(); bool at_block_start = at_textline_start && line_start.it_->block() != line_start.it_->prev_block(); if (level == RIL_BLOCK) return at_block_start; bool at_para_start = at_block_start || (at_textline_start && line_start.it_->row()->row->para() != line_start.it_->prev_row()->row->para()); if (level == RIL_PARA) return at_para_start; ASSERT_HOST(false); // shouldn't happen. return false; } /** * NOTE! This is an exact copy of PageIterator::IsAtFinalElement with the * change that the variable next is now a ResultIterator instead of a * PageIterator. */ bool ResultIterator::IsAtFinalElement(PageIteratorLevel level, PageIteratorLevel element) const { if (Empty(element)) return true; // Already at the end! // The result is true if we step forward by element and find we are // at the the end of the page or at beginning of *all* levels in: // [level, element). // When there is more than one level difference between element and level, // we could for instance move forward one symbol and still be at the first // word on a line, so we also have to be at the first symbol in a word. ResultIterator next(*this); next.Next(element); if (next.Empty(element)) return true; // Reached the end of the page. while (element > level) { element = static_cast<PageIteratorLevel>(element - 1); if (!next.IsAtBeginningOf(element)) return false; } return true; } /** * Returns the null terminated UTF-8 encoded text string for the current * object at the given level. Use delete [] to free after use. */ char* ResultIterator::GetUTF8Text(PageIteratorLevel level) const { if (it_->word() == NULL) return NULL; // Already at the end! STRING text; switch (level) { case RIL_BLOCK: { ResultIterator pp(*this); do { pp.AppendUTF8ParagraphText(&text); } while (pp.Next(RIL_PARA) && pp.it_->block() == it_->block()); } break; case RIL_PARA: AppendUTF8ParagraphText(&text); break; case RIL_TEXTLINE: { ResultIterator it(*this); it.MoveToLogicalStartOfTextline(); it.IterateAndAppendUTF8TextlineText(&text); } break; case RIL_WORD: AppendUTF8WordText(&text); break; case RIL_SYMBOL: { bool reading_direction_is_ltr = current_paragraph_is_ltr_ ^ in_minor_direction_; if (at_beginning_of_minor_run_) { text += reading_direction_is_ltr ? kLRM : kRLM; } text = it_->word()->BestUTF8(blob_index_, !reading_direction_is_ltr); if (IsAtFinalSymbolOfWord()) AppendSuffixMarks(&text); } break; } int length = text.length() + 1; char* result = new char[length]; strncpy(result, text.string(), length); return result; } void ResultIterator::AppendUTF8WordText(STRING *text) const { if (!it_->word()) return; ASSERT_HOST(it_->word()->best_choice != NULL); bool reading_direction_is_ltr = current_paragraph_is_ltr_ ^ in_minor_direction_; if (at_beginning_of_minor_run_) { *text += reading_direction_is_ltr ? kLRM : kRLM; } GenericVector<int> blob_order; CalculateBlobOrder(&blob_order); for (int i = 0; i < blob_order.size(); i++) { *text += it_->word()->BestUTF8(blob_order[i], !reading_direction_is_ltr); } AppendSuffixMarks(text); } void ResultIterator::IterateAndAppendUTF8TextlineText(STRING *text) { if (Empty(RIL_WORD)) { Next(RIL_WORD); return; } if (BidiDebug(1)) { GenericVectorEqEq<int> textline_order; GenericVector<StrongScriptDirection> dirs; CalculateTextlineOrder(current_paragraph_is_ltr_, *this, &dirs, &textline_order); tprintf("Strong Script dirs [%p/P=%s]: ", it_->row(), current_paragraph_is_ltr_ ? "ltr" : "rtl"); PrintScriptDirs(dirs); tprintf("Logical textline order [%p/P=%s]: ", it_->row(), current_paragraph_is_ltr_ ? "ltr" : "rtl"); for (int i = 0; i < textline_order.size(); i++) { tprintf("%d ", textline_order[i]); } tprintf("\n"); } int words_appended = 0; do { int numSpaces = preserve_interword_spaces_ ? it_->word()->word->space() : (words_appended > 0); for(int i = 0 ; i < numSpaces ; ++i) { *text += " "; } AppendUTF8WordText(text); words_appended++; } while (Next(RIL_WORD) && !IsAtBeginningOf(RIL_TEXTLINE)); if (BidiDebug(1)) { tprintf("%d words printed\n", words_appended); } *text += line_separator_; // If we just finished a paragraph, add an extra newline. if (it_->block() == NULL || IsAtBeginningOf(RIL_PARA)) *text += paragraph_separator_; } void ResultIterator::AppendUTF8ParagraphText(STRING *text) const { ResultIterator it(*this); it.RestartParagraph(); it.MoveToLogicalStartOfTextline(); if (it.Empty(RIL_WORD)) return; do { it.IterateAndAppendUTF8TextlineText(text); } while (it.it_->block() != NULL && !it.IsAtBeginningOf(RIL_PARA)); } bool ResultIterator::BidiDebug(int min_level) const { int debug_level = 1; IntParam *p = ParamUtils::FindParam<IntParam>( "bidi_debug", GlobalParams()->int_params, tesseract_->params()->int_params); if (p != NULL) debug_level = (inT32)(*p); return debug_level >= min_level; } } // namespace tesseract.
C++
// Copyright 2008 Google Inc. // All Rights Reserved. // Author: ahmadab@google.com (Ahmad Abdulkader) // // neuron.cpp: The implementation of a class for an object // that represents a single neuron in a neural network #include "neuron.h" #include "input_file_buffer.h" namespace tesseract { // Instantiate all supported templates template bool Neuron::ReadBinary(InputFileBuffer *input_buffer); // default and only constructor Neuron::Neuron() { Init(); } // virtual destructor Neuron::~Neuron() { } // Initializer void Neuron::Init() { id_ = -1; frwd_dirty_ = false; fan_in_.clear(); fan_in_weights_.clear(); activation_ = 0.0f; output_ = 0.0f; bias_ = 0.0f; node_type_ = Unknown; } // Computes the activation and output of the neuron if not fresh // by pulling the outputs of all fan-in neurons void Neuron::FeedForward() { if (!frwd_dirty_ ) { return; } // nothing to do for input nodes: just pass the input to the o/p // otherwise, pull the output of all fan-in neurons if (node_type_ != Input) { int fan_in_cnt = fan_in_.size(); // sum out the activation activation_ = -bias_; for (int in = 0; in < fan_in_cnt; in++) { if (fan_in_[in]->frwd_dirty_) { fan_in_[in]->FeedForward(); } activation_ += ((*(fan_in_weights_[in])) * fan_in_[in]->output_); } // sigmoid it output_ = Sigmoid(activation_); } frwd_dirty_ = false; } // set the type of the neuron void Neuron::set_node_type(NeuronTypes Type) { node_type_ = Type; } // Adds new connections *to* this neuron *From* // a target neuron using specfied params // Note that what is actually copied in this function are pointers to the // specified Neurons and weights and not the actualt values. This is by // design to centralize the alloction of neurons and weights and so // increase the locality of reference and improve cache-hits resulting // in a faster net. This technique resulted in a 2X-10X speedup // (depending on network size and processor) void Neuron::AddFromConnection(Neuron *neurons, float *wts_offset, int from_cnt) { for (int in = 0; in < from_cnt; in++) { fan_in_.push_back(neurons + in); fan_in_weights_.push_back(wts_offset + in); } } // fast computation of sigmoid function using a lookup table // defined in sigmoid_table.cpp float Neuron::Sigmoid(float activation) { if (activation <= -10.0f) { return 0.0f; } else if (activation >= 10.0f) { return 1.0f; } else { return kSigmoidTable[static_cast<int>(100 * (activation + 10.0))]; } } }
C++
// Copyright 2008 Google Inc. // All Rights Reserved. // Author: ahmadab@google.com (Ahmad Abdulkader) // // neuron.h: Declarations of a class for an object that // represents a single neuron in a neural network // #ifndef NEURON_H #define NEURON_H #include <math.h> #include <vector> #ifdef USE_STD_NAMESPACE using std::vector; #endif namespace tesseract { // Input Node bias values static const float kInputNodeBias = 0.0f; class Neuron { public: // Types of nodes enum NeuronTypes { Unknown = 0, Input, Hidden, Output }; Neuron(); ~Neuron(); // set the forward dirty flag indicating that the // activation of the net is not fresh void Clear() { frwd_dirty_ = true; } // Read a binary representation of the neuron info from // an input buffer. template <class BuffType> bool ReadBinary(BuffType *input_buff) { float val; if (input_buff->Read(&val, sizeof(val)) != sizeof(val)) { return false; } // input nodes should have no biases if (node_type_ == Input) { bias_ = kInputNodeBias; } else { bias_ = val; } // read fanin count int fan_in_cnt; if (input_buff->Read(&fan_in_cnt, sizeof(fan_in_cnt)) != sizeof(fan_in_cnt)) { return false; } // validate fan-in cnt if (fan_in_cnt != fan_in_.size()) { return false; } // read the weights for (int in = 0; in < fan_in_cnt; in++) { if (input_buff->Read(&val, sizeof(val)) != sizeof(val)) { return false; } *(fan_in_weights_[in]) = val; } return true; } // Add a new connection from this neuron *From* // a target neuron using specfied params // Note that what is actually copied in this function are pointers to the // specified Neurons and weights and not the actualt values. This is by // design to centralize the alloction of neurons and weights and so // increase the locality of reference and improve cache-hits resulting // in a faster net. This technique resulted in a 2X-10X speedup // (depending on network size and processor) void AddFromConnection(Neuron *neuron_vec, float *wts_offset, int from_cnt); // Set the type of a neuron void set_node_type(NeuronTypes type); // Computes the output of the node by // "pulling" the output of the fan-in nodes void FeedForward(); // fast computation of sigmoid function using a lookup table // defined in sigmoid_table.cpp static float Sigmoid(float activation); // Accessor functions float output() const { return output_; } void set_output(float out_val) { output_ = out_val; } int id() const { return id_; } int fan_in_cnt() const { return fan_in_.size(); } Neuron * fan_in(int idx) const { return fan_in_[idx]; } float fan_in_wts(int idx) const { return *(fan_in_weights_[idx]); } void set_id(int id) { id_ = id; } float bias() const { return bias_; } Neuron::NeuronTypes node_type() const { return node_type_; } protected: // Type of Neuron NeuronTypes node_type_; // unqique id of the neuron int id_; // node bias float bias_; // node net activation float activation_; // node output float output_; // pointers to fanin nodes vector<Neuron *> fan_in_; // pointers to fanin weights vector<float *> fan_in_weights_; // Sigmoid function lookup table used for fast computation // of sigmoid function static const float kSigmoidTable[]; // flag determining if the activation of the node // is fresh or not (dirty) bool frwd_dirty_; // Initializer void Init(); }; } #endif // NEURON_H__
C++
// Copyright 2007 Google Inc. // All Rights Reserved. // Author: ahmadab@google.com (Ahmad Abdulkader) // // sigmoid_table.cpp: Sigmoid function lookup table #include "neuron.h" namespace tesseract { const float Neuron::kSigmoidTable[] = { 4.53979E-05f, 4.58541E-05f, 4.63149E-05f, 4.67804E-05f, 4.72505E-05f, 4.77254E-05f, 4.8205E-05f, 4.86894E-05f, 4.91787E-05f, 4.9673E-05f, 5.01722E-05f, 5.06764E-05f, 5.11857E-05f, 5.17001E-05f, 5.22196E-05f, 5.27444E-05f, 5.32745E-05f, 5.38099E-05f, 5.43506E-05f, 5.48968E-05f, 5.54485E-05f, 5.60058E-05f, 5.65686E-05f, 5.71371E-05f, 5.77113E-05f, 5.82913E-05f, 5.88771E-05f, 5.94688E-05f, 6.00664E-05f, 6.067E-05f, 6.12797E-05f, 6.18956E-05f, 6.25176E-05f, 6.31459E-05f, 6.37805E-05f, 6.44214E-05f, 6.50688E-05f, 6.57227E-05f, 6.63832E-05f, 6.70503E-05f, 6.77241E-05f, 6.84047E-05f, 6.90922E-05f, 6.97865E-05f, 7.04878E-05f, 7.11962E-05f, 7.19117E-05f, 7.26343E-05f, 7.33643E-05f, 7.41016E-05f, 7.48462E-05f, 7.55984E-05f, 7.63581E-05f, 7.71255E-05f, 7.79005E-05f, 7.86834E-05f, 7.94741E-05f, 8.02728E-05f, 8.10794E-05f, 8.18942E-05f, 8.27172E-05f, 8.35485E-05f, 8.43881E-05f, 8.52361E-05f, 8.60927E-05f, 8.69579E-05f, 8.78317E-05f, 8.87144E-05f, 8.96059E-05f, 9.05064E-05f, 9.14159E-05f, 9.23345E-05f, 9.32624E-05f, 9.41996E-05f, 9.51463E-05f, 9.61024E-05f, 9.70682E-05f, 9.80436E-05f, 9.90289E-05f, 0.000100024f, 0.000101029f, 0.000102044f, 0.00010307f, 0.000104106f, 0.000105152f, 0.000106209f, 0.000107276f, 0.000108354f, 0.000109443f, 0.000110542f, 0.000111653f, 0.000112775f, 0.000113909f, 0.000115053f, 0.000116209f, 0.000117377f, 0.000118557f, 0.000119748f, 0.000120951f, 0.000122167f, 0.000123395f, 0.000124635f, 0.000125887f, 0.000127152f, 0.00012843f, 0.00012972f, 0.000131024f, 0.000132341f, 0.00013367f, 0.000135014f, 0.00013637f, 0.000137741f, 0.000139125f, 0.000140523f, 0.000141935f, 0.000143361f, 0.000144802f, 0.000146257f, 0.000147727f, 0.000149211f, 0.00015071f, 0.000152225f, 0.000153754f, 0.000155299f, 0.00015686f, 0.000158436f, 0.000160028f, 0.000161636f, 0.000163261f, 0.000164901f, 0.000166558f, 0.000168232f, 0.000169922f, 0.00017163f, 0.000173354f, 0.000175096f, 0.000176856f, 0.000178633f, 0.000180428f, 0.000182241f, 0.000184072f, 0.000185922f, 0.00018779f, 0.000189677f, 0.000191583f, 0.000193508f, 0.000195452f, 0.000197416f, 0.0001994f, 0.000201403f, 0.000203427f, 0.000205471f, 0.000207536f, 0.000209621f, 0.000211727f, 0.000213855f, 0.000216003f, 0.000218174f, 0.000220366f, 0.00022258f, 0.000224817f, 0.000227076f, 0.000229357f, 0.000231662f, 0.00023399f, 0.000236341f, 0.000238715f, 0.000241114f, 0.000243537f, 0.000245984f, 0.000248455f, 0.000250951f, 0.000253473f, 0.00025602f, 0.000258592f, 0.00026119f, 0.000263815f, 0.000266465f, 0.000269143f, 0.000271847f, 0.000274578f, 0.000277337f, 0.000280123f, 0.000282938f, 0.000285781f, 0.000288652f, 0.000291552f, 0.000294481f, 0.00029744f, 0.000300429f, 0.000303447f, 0.000306496f, 0.000309575f, 0.000312685f, 0.000315827f, 0.000319f, 0.000322205f, 0.000325442f, 0.000328712f, 0.000332014f, 0.00033535f, 0.000338719f, 0.000342122f, 0.00034556f, 0.000349031f, 0.000352538f, 0.00035608f, 0.000359657f, 0.00036327f, 0.00036692f, 0.000370606f, 0.000374329f, 0.00037809f, 0.000381888f, 0.000385725f, 0.0003896f, 0.000393514f, 0.000397467f, 0.00040146f, 0.000405494f, 0.000409567f, 0.000413682f, 0.000417838f, 0.000422035f, 0.000426275f, 0.000430557f, 0.000434882f, 0.000439251f, 0.000443664f, 0.000448121f, 0.000452622f, 0.000457169f, 0.000461762f, 0.0004664f, 0.000471085f, 0.000475818f, 0.000480597f, 0.000485425f, 0.000490301f, 0.000495226f, 0.000500201f, 0.000505226f, 0.000510301f, 0.000515427f, 0.000520604f, 0.000525833f, 0.000531115f, 0.00053645f, 0.000541839f, 0.000547281f, 0.000552779f, 0.000558331f, 0.000563939f, 0.000569604f, 0.000575325f, 0.000581104f, 0.00058694f, 0.000592836f, 0.00059879f, 0.000604805f, 0.000610879f, 0.000617015f, 0.000623212f, 0.000629472f, 0.000635794f, 0.00064218f, 0.00064863f, 0.000655144f, 0.000661724f, 0.00066837f, 0.000675083f, 0.000681863f, 0.000688711f, 0.000695628f, 0.000702614f, 0.00070967f, 0.000716798f, 0.000723996f, 0.000731267f, 0.000738611f, 0.000746029f, 0.000753521f, 0.000761088f, 0.000768731f, 0.000776451f, 0.000784249f, 0.000792124f, 0.000800079f, 0.000808113f, 0.000816228f, 0.000824425f, 0.000832703f, 0.000841065f, 0.000849511f, 0.000858041f, 0.000866657f, 0.00087536f, 0.000884149f, 0.000893027f, 0.000901994f, 0.000911051f, 0.000920199f, 0.000929439f, 0.000938771f, 0.000948197f, 0.000957717f, 0.000967333f, 0.000977045f, 0.000986855f, 0.000996763f, 0.001006771f, 0.001016879f, 0.001027088f, 0.0010374f, 0.001047815f, 0.001058334f, 0.00106896f, 0.001079691f, 0.00109053f, 0.001101478f, 0.001112536f, 0.001123705f, 0.001134985f, 0.001146379f, 0.001157887f, 0.00116951f, 0.00118125f, 0.001193108f, 0.001205084f, 0.001217181f, 0.001229399f, 0.001241739f, 0.001254203f, 0.001266792f, 0.001279507f, 0.00129235f, 0.001305321f, 0.001318423f, 0.001331655f, 0.001345021f, 0.00135852f, 0.001372155f, 0.001385926f, 0.001399835f, 0.001413884f, 0.001428073f, 0.001442405f, 0.00145688f, 0.001471501f, 0.001486267f, 0.001501182f, 0.001516247f, 0.001531462f, 0.001546829f, 0.001562351f, 0.001578028f, 0.001593862f, 0.001609855f, 0.001626008f, 0.001642323f, 0.001658801f, 0.001675444f, 0.001692254f, 0.001709233f, 0.001726381f, 0.001743701f, 0.001761195f, 0.001778864f, 0.00179671f, 0.001814734f, 0.001832939f, 0.001851326f, 0.001869898f, 0.001888655f, 0.0019076f, 0.001926735f, 0.001946061f, 0.001965581f, 0.001985296f, 0.002005209f, 0.00202532f, 0.002045634f, 0.00206615f, 0.002086872f, 0.002107801f, 0.00212894f, 0.00215029f, 0.002171854f, 0.002193633f, 0.002215631f, 0.002237849f, 0.002260288f, 0.002282953f, 0.002305844f, 0.002328964f, 0.002352316f, 0.002375901f, 0.002399721f, 0.002423781f, 0.00244808f, 0.002472623f, 0.002497411f, 0.002522447f, 0.002547734f, 0.002573273f, 0.002599068f, 0.00262512f, 0.002651433f, 0.002678009f, 0.002704851f, 0.002731961f, 0.002759342f, 0.002786996f, 0.002814927f, 0.002843137f, 0.002871629f, 0.002900406f, 0.00292947f, 0.002958825f, 0.002988472f, 0.003018416f, 0.003048659f, 0.003079205f, 0.003110055f, 0.003141213f, 0.003172683f, 0.003204467f, 0.003236568f, 0.00326899f, 0.003301735f, 0.003334807f, 0.00336821f, 0.003401946f, 0.003436018f, 0.003470431f, 0.003505187f, 0.00354029f, 0.003575744f, 0.003611551f, 0.003647715f, 0.00368424f, 0.003721129f, 0.003758387f, 0.003796016f, 0.00383402f, 0.003872403f, 0.00391117f, 0.003950322f, 0.003989865f, 0.004029802f, 0.004070138f, 0.004110875f, 0.004152019f, 0.004193572f, 0.00423554f, 0.004277925f, 0.004320734f, 0.004363968f, 0.004407633f, 0.004451734f, 0.004496273f, 0.004541256f, 0.004586687f, 0.004632571f, 0.004678911f, 0.004725713f, 0.00477298f, 0.004820718f, 0.004868931f, 0.004917624f, 0.004966802f, 0.005016468f, 0.005066629f, 0.005117289f, 0.005168453f, 0.005220126f, 0.005272312f, 0.005325018f, 0.005378247f, 0.005432006f, 0.005486299f, 0.005541132f, 0.005596509f, 0.005652437f, 0.005708921f, 0.005765966f, 0.005823577f, 0.005881761f, 0.005940522f, 0.005999867f, 0.006059801f, 0.006120331f, 0.006181461f, 0.006243198f, 0.006305547f, 0.006368516f, 0.006432108f, 0.006496332f, 0.006561193f, 0.006626697f, 0.006692851f, 0.006759661f, 0.006827132f, 0.006895273f, 0.006964089f, 0.007033587f, 0.007103774f, 0.007174656f, 0.00724624f, 0.007318533f, 0.007391541f, 0.007465273f, 0.007539735f, 0.007614933f, 0.007690876f, 0.00776757f, 0.007845023f, 0.007923242f, 0.008002235f, 0.008082009f, 0.008162571f, 0.00824393f, 0.008326093f, 0.008409068f, 0.008492863f, 0.008577485f, 0.008662944f, 0.008749246f, 0.0088364f, 0.008924415f, 0.009013299f, 0.009103059f, 0.009193705f, 0.009285246f, 0.009377689f, 0.009471044f, 0.009565319f, 0.009660523f, 0.009756666f, 0.009853756f, 0.009951802f, 0.010050814f, 0.010150801f, 0.010251772f, 0.010353738f, 0.010456706f, 0.010560688f, 0.010665693f, 0.01077173f, 0.01087881f, 0.010986943f, 0.011096138f, 0.011206406f, 0.011317758f, 0.011430203f, 0.011543752f, 0.011658417f, 0.011774206f, 0.011891132f, 0.012009204f, 0.012128435f, 0.012248835f, 0.012370415f, 0.012493186f, 0.012617161f, 0.012742349f, 0.012868764f, 0.012996417f, 0.013125318f, 0.013255481f, 0.013386918f, 0.01351964f, 0.013653659f, 0.013788989f, 0.01392564f, 0.014063627f, 0.014202961f, 0.014343656f, 0.014485724f, 0.014629178f, 0.014774032f, 0.014920298f, 0.01506799f, 0.015217121f, 0.015367706f, 0.015519757f, 0.015673288f, 0.015828314f, 0.015984848f, 0.016142905f, 0.016302499f, 0.016463645f, 0.016626356f, 0.016790648f, 0.016956536f, 0.017124033f, 0.017293157f, 0.01746392f, 0.01763634f, 0.017810432f, 0.01798621f, 0.018163691f, 0.018342891f, 0.018523825f, 0.01870651f, 0.018890962f, 0.019077197f, 0.019265233f, 0.019455085f, 0.01964677f, 0.019840306f, 0.020035709f, 0.020232997f, 0.020432187f, 0.020633297f, 0.020836345f, 0.021041347f, 0.021248323f, 0.02145729f, 0.021668266f, 0.021881271f, 0.022096322f, 0.022313439f, 0.022532639f, 0.022753943f, 0.02297737f, 0.023202938f, 0.023430668f, 0.023660578f, 0.023892689f, 0.024127021f, 0.024363594f, 0.024602428f, 0.024843544f, 0.025086962f, 0.025332703f, 0.025580788f, 0.025831239f, 0.026084075f, 0.02633932f, 0.026596994f, 0.026857119f, 0.027119717f, 0.027384811f, 0.027652422f, 0.027922574f, 0.028195288f, 0.028470588f, 0.028748496f, 0.029029036f, 0.029312231f, 0.029598104f, 0.02988668f, 0.030177981f, 0.030472033f, 0.030768859f, 0.031068484f, 0.031370932f, 0.031676228f, 0.031984397f, 0.032295465f, 0.032609455f, 0.032926395f, 0.033246309f, 0.033569223f, 0.033895164f, 0.034224158f, 0.03455623f, 0.034891409f, 0.035229719f, 0.035571189f, 0.035915846f, 0.036263716f, 0.036614828f, 0.036969209f, 0.037326887f, 0.037687891f, 0.038052247f, 0.038419986f, 0.038791134f, 0.039165723f, 0.03954378f, 0.039925334f, 0.040310415f, 0.040699054f, 0.041091278f, 0.041487119f, 0.041886607f, 0.042289772f, 0.042696644f, 0.043107255f, 0.043521635f, 0.043939815f, 0.044361828f, 0.044787703f, 0.045217473f, 0.045651171f, 0.046088827f, 0.046530475f, 0.046976146f, 0.047425873f, 0.04787969f, 0.048337629f, 0.048799723f, 0.049266006f, 0.049736512f, 0.050211273f, 0.050690325f, 0.051173701f, 0.051661435f, 0.052153563f, 0.052650118f, 0.053151136f, 0.053656652f, 0.0541667f, 0.054681317f, 0.055200538f, 0.055724398f, 0.056252934f, 0.056786181f, 0.057324176f, 0.057866955f, 0.058414556f, 0.058967013f, 0.059524366f, 0.06008665f, 0.060653903f, 0.061226163f, 0.061803466f, 0.062385851f, 0.062973356f, 0.063566018f, 0.064163876f, 0.064766969f, 0.065375333f, 0.065989009f, 0.066608036f, 0.067232451f, 0.067862294f, 0.068497604f, 0.06913842f, 0.069784783f, 0.070436731f, 0.071094304f, 0.071757542f, 0.072426485f, 0.073101173f, 0.073781647f, 0.074467945f, 0.075160109f, 0.07585818f, 0.076562197f, 0.077272202f, 0.077988235f, 0.078710337f, 0.079438549f, 0.080172912f, 0.080913467f, 0.081660255f, 0.082413318f, 0.083172696f, 0.083938432f, 0.084710566f, 0.085489139f, 0.086274194f, 0.087065772f, 0.087863915f, 0.088668663f, 0.089480059f, 0.090298145f, 0.091122961f, 0.09195455f, 0.092792953f, 0.093638212f, 0.094490369f, 0.095349465f, 0.096215542f, 0.097088641f, 0.097968804f, 0.098856073f, 0.099750489f, 0.100652094f, 0.101560928f, 0.102477033f, 0.103400451f, 0.104331223f, 0.10526939f, 0.106214992f, 0.10716807f, 0.108128667f, 0.109096821f, 0.110072574f, 0.111055967f, 0.112047039f, 0.11304583f, 0.114052381f, 0.115066732f, 0.116088922f, 0.117118991f, 0.118156978f, 0.119202922f, 0.120256862f, 0.121318838f, 0.122388887f, 0.123467048f, 0.124553358f, 0.125647857f, 0.12675058f, 0.127861566f, 0.128980852f, 0.130108474f, 0.131244469f, 0.132388874f, 0.133541723f, 0.134703052f, 0.135872897f, 0.137051293f, 0.138238273f, 0.139433873f, 0.140638126f, 0.141851065f, 0.143072723f, 0.144303134f, 0.145542329f, 0.14679034f, 0.148047198f, 0.149312935f, 0.15058758f, 0.151871164f, 0.153163716f, 0.154465265f, 0.15577584f, 0.157095469f, 0.158424179f, 0.159761997f, 0.16110895f, 0.162465063f, 0.163830361f, 0.16520487f, 0.166588614f, 0.167981615f, 0.169383897f, 0.170795482f, 0.172216392f, 0.173646647f, 0.175086268f, 0.176535275f, 0.177993686f, 0.179461519f, 0.180938793f, 0.182425524f, 0.183921727f, 0.185427419f, 0.186942614f, 0.188467325f, 0.190001566f, 0.191545349f, 0.193098684f, 0.194661584f, 0.196234056f, 0.197816111f, 0.199407757f, 0.201009f, 0.202619846f, 0.204240302f, 0.205870372f, 0.207510059f, 0.209159365f, 0.210818293f, 0.212486844f, 0.214165017f, 0.215852811f, 0.217550224f, 0.219257252f, 0.220973892f, 0.222700139f, 0.224435986f, 0.226181426f, 0.227936451f, 0.229701051f, 0.231475217f, 0.233258936f, 0.235052196f, 0.236854984f, 0.238667285f, 0.240489083f, 0.242320361f, 0.244161101f, 0.246011284f, 0.247870889f, 0.249739894f, 0.251618278f, 0.253506017f, 0.255403084f, 0.257309455f, 0.259225101f, 0.261149994f, 0.263084104f, 0.265027401f, 0.266979851f, 0.268941421f, 0.270912078f, 0.272891784f, 0.274880502f, 0.276878195f, 0.278884822f, 0.280900343f, 0.282924715f, 0.284957894f, 0.286999837f, 0.289050497f, 0.291109827f, 0.293177779f, 0.295254302f, 0.297339346f, 0.299432858f, 0.301534784f, 0.30364507f, 0.30576366f, 0.307890496f, 0.310025519f, 0.312168669f, 0.314319886f, 0.316479106f, 0.318646266f, 0.320821301f, 0.323004144f, 0.325194727f, 0.327392983f, 0.32959884f, 0.331812228f, 0.334033073f, 0.336261303f, 0.338496841f, 0.340739612f, 0.342989537f, 0.345246539f, 0.347510538f, 0.349781451f, 0.352059198f, 0.354343694f, 0.356634854f, 0.358932594f, 0.361236825f, 0.36354746f, 0.365864409f, 0.368187582f, 0.370516888f, 0.372852234f, 0.375193526f, 0.377540669f, 0.379893568f, 0.382252125f, 0.384616244f, 0.386985824f, 0.389360766f, 0.391740969f, 0.394126332f, 0.39651675f, 0.398912121f, 0.40131234f, 0.403717301f, 0.406126897f, 0.408541022f, 0.410959566f, 0.413382421f, 0.415809477f, 0.418240623f, 0.420675748f, 0.423114739f, 0.425557483f, 0.428003867f, 0.430453776f, 0.432907095f, 0.435363708f, 0.437823499f, 0.440286351f, 0.442752145f, 0.445220765f, 0.44769209f, 0.450166003f, 0.452642382f, 0.455121108f, 0.457602059f, 0.460085115f, 0.462570155f, 0.465057055f, 0.467545694f, 0.470035948f, 0.472527696f, 0.475020813f, 0.477515175f, 0.48001066f, 0.482507142f, 0.485004498f, 0.487502604f, 0.490001333f, 0.492500562f, 0.495000167f, 0.497500021f, 0.5f, 0.502499979f, 0.504999833f, 0.507499438f, 0.509998667f, 0.512497396f, 0.514995502f, 0.517492858f, 0.51998934f, 0.522484825f, 0.524979187f, 0.527472304f, 0.529964052f, 0.532454306f, 0.534942945f, 0.537429845f, 0.539914885f, 0.542397941f, 0.544878892f, 0.547357618f, 0.549833997f, 0.55230791f, 0.554779235f, 0.557247855f, 0.559713649f, 0.562176501f, 0.564636292f, 0.567092905f, 0.569546224f, 0.571996133f, 0.574442517f, 0.576885261f, 0.579324252f, 0.581759377f, 0.584190523f, 0.586617579f, 0.589040434f, 0.591458978f, 0.593873103f, 0.596282699f, 0.59868766f, 0.601087879f, 0.60348325f, 0.605873668f, 0.608259031f, 0.610639234f, 0.613014176f, 0.615383756f, 0.617747875f, 0.620106432f, 0.622459331f, 0.624806474f, 0.627147766f, 0.629483112f, 0.631812418f, 0.634135591f, 0.63645254f, 0.638763175f, 0.641067406f, 0.643365146f, 0.645656306f, 0.647940802f, 0.650218549f, 0.652489462f, 0.654753461f, 0.657010463f, 0.659260388f, 0.661503159f, 0.663738697f, 0.665966927f, 0.668187772f, 0.67040116f, 0.672607017f, 0.674805273f, 0.676995856f, 0.679178699f, 0.681353734f, 0.683520894f, 0.685680114f, 0.687831331f, 0.689974481f, 0.692109504f, 0.69423634f, 0.69635493f, 0.698465216f, 0.700567142f, 0.702660654f, 0.704745698f, 0.706822221f, 0.708890173f, 0.710949503f, 0.713000163f, 0.715042106f, 0.717075285f, 0.719099657f, 0.721115178f, 0.723121805f, 0.725119498f, 0.727108216f, 0.729087922f, 0.731058579f, 0.733020149f, 0.734972599f, 0.736915896f, 0.738850006f, 0.740774899f, 0.742690545f, 0.744596916f, 0.746493983f, 0.748381722f, 0.750260106f, 0.752129111f, 0.753988716f, 0.755838899f, 0.757679639f, 0.759510917f, 0.761332715f, 0.763145016f, 0.764947804f, 0.766741064f, 0.768524783f, 0.770298949f, 0.772063549f, 0.773818574f, 0.775564014f, 0.777299861f, 0.779026108f, 0.780742748f, 0.782449776f, 0.784147189f, 0.785834983f, 0.787513156f, 0.789181707f, 0.790840635f, 0.792489941f, 0.794129628f, 0.795759698f, 0.797380154f, 0.798991f, 0.800592243f, 0.802183889f, 0.803765944f, 0.805338416f, 0.806901316f, 0.808454651f, 0.809998434f, 0.811532675f, 0.813057386f, 0.814572581f, 0.816078273f, 0.817574476f, 0.819061207f, 0.820538481f, 0.822006314f, 0.823464725f, 0.824913732f, 0.826353353f, 0.827783608f, 0.829204518f, 0.830616103f, 0.832018385f, 0.833411386f, 0.83479513f, 0.836169639f, 0.837534937f, 0.83889105f, 0.840238003f, 0.841575821f, 0.842904531f, 0.84422416f, 0.845534735f, 0.846836284f, 0.848128836f, 0.84941242f, 0.850687065f, 0.851952802f, 0.85320966f, 0.854457671f, 0.855696866f, 0.856927277f, 0.858148935f, 0.859361874f, 0.860566127f, 0.861761727f, 0.862948707f, 0.864127103f, 0.865296948f, 0.866458277f, 0.867611126f, 0.868755531f, 0.869891526f, 0.871019148f, 0.872138434f, 0.87324942f, 0.874352143f, 0.875446642f, 0.876532952f, 0.877611113f, 0.878681162f, 0.879743138f, 0.880797078f, 0.881843022f, 0.882881009f, 0.883911078f, 0.884933268f, 0.885947619f, 0.88695417f, 0.887952961f, 0.888944033f, 0.889927426f, 0.890903179f, 0.891871333f, 0.89283193f, 0.893785008f, 0.89473061f, 0.895668777f, 0.896599549f, 0.897522967f, 0.898439072f, 0.899347906f, 0.900249511f, 0.901143927f, 0.902031196f, 0.902911359f, 0.903784458f, 0.904650535f, 0.905509631f, 0.906361788f, 0.907207047f, 0.90804545f, 0.908877039f, 0.909701855f, 0.910519941f, 0.911331337f, 0.912136085f, 0.912934228f, 0.913725806f, 0.914510861f, 0.915289434f, 0.916061568f, 0.916827304f, 0.917586682f, 0.918339745f, 0.919086533f, 0.919827088f, 0.920561451f, 0.921289663f, 0.922011765f, 0.922727798f, 0.923437803f, 0.92414182f, 0.924839891f, 0.925532055f, 0.926218353f, 0.926898827f, 0.927573515f, 0.928242458f, 0.928905696f, 0.929563269f, 0.930215217f, 0.93086158f, 0.931502396f, 0.932137706f, 0.932767549f, 0.933391964f, 0.934010991f, 0.934624667f, 0.935233031f, 0.935836124f, 0.936433982f, 0.937026644f, 0.937614149f, 0.938196534f, 0.938773837f, 0.939346097f, 0.93991335f, 0.940475634f, 0.941032987f, 0.941585444f, 0.942133045f, 0.942675824f, 0.943213819f, 0.943747066f, 0.944275602f, 0.944799462f, 0.945318683f, 0.9458333f, 0.946343348f, 0.946848864f, 0.947349882f, 0.947846437f, 0.948338565f, 0.948826299f, 0.949309675f, 0.949788727f, 0.950263488f, 0.950733994f, 0.951200277f, 0.951662371f, 0.95212031f, 0.952574127f, 0.953023854f, 0.953469525f, 0.953911173f, 0.954348829f, 0.954782527f, 0.955212297f, 0.955638172f, 0.956060185f, 0.956478365f, 0.956892745f, 0.957303356f, 0.957710228f, 0.958113393f, 0.958512881f, 0.958908722f, 0.959300946f, 0.959689585f, 0.960074666f, 0.96045622f, 0.960834277f, 0.961208866f, 0.961580014f, 0.961947753f, 0.962312109f, 0.962673113f, 0.963030791f, 0.963385172f, 0.963736284f, 0.964084154f, 0.964428811f, 0.964770281f, 0.965108591f, 0.96544377f, 0.965775842f, 0.966104836f, 0.966430777f, 0.966753691f, 0.967073605f, 0.967390545f, 0.967704535f, 0.968015603f, 0.968323772f, 0.968629068f, 0.968931516f, 0.969231141f, 0.969527967f, 0.969822019f, 0.97011332f, 0.970401896f, 0.970687769f, 0.970970964f, 0.971251504f, 0.971529412f, 0.971804712f, 0.972077426f, 0.972347578f, 0.972615189f, 0.972880283f, 0.973142881f, 0.973403006f, 0.97366068f, 0.973915925f, 0.974168761f, 0.974419212f, 0.974667297f, 0.974913038f, 0.975156456f, 0.975397572f, 0.975636406f, 0.975872979f, 0.976107311f, 0.976339422f, 0.976569332f, 0.976797062f, 0.97702263f, 0.977246057f, 0.977467361f, 0.977686561f, 0.977903678f, 0.978118729f, 0.978331734f, 0.97854271f, 0.978751677f, 0.978958653f, 0.979163655f, 0.979366703f, 0.979567813f, 0.979767003f, 0.979964291f, 0.980159694f, 0.98035323f, 0.980544915f, 0.980734767f, 0.980922803f, 0.981109038f, 0.98129349f, 0.981476175f, 0.981657109f, 0.981836309f, 0.98201379f, 0.982189568f, 0.98236366f, 0.98253608f, 0.982706843f, 0.982875967f, 0.983043464f, 0.983209352f, 0.983373644f, 0.983536355f, 0.983697501f, 0.983857095f, 0.984015152f, 0.984171686f, 0.984326712f, 0.984480243f, 0.984632294f, 0.984782879f, 0.98493201f, 0.985079702f, 0.985225968f, 0.985370822f, 0.985514276f, 0.985656344f, 0.985797039f, 0.985936373f, 0.98607436f, 0.986211011f, 0.986346341f, 0.98648036f, 0.986613082f, 0.986744519f, 0.986874682f, 0.987003583f, 0.987131236f, 0.987257651f, 0.987382839f, 0.987506814f, 0.987629585f, 0.987751165f, 0.987871565f, 0.987990796f, 0.988108868f, 0.988225794f, 0.988341583f, 0.988456248f, 0.988569797f, 0.988682242f, 0.988793594f, 0.988903862f, 0.989013057f, 0.98912119f, 0.98922827f, 0.989334307f, 0.989439312f, 0.989543294f, 0.989646262f, 0.989748228f, 0.989849199f, 0.989949186f, 0.990048198f, 0.990146244f, 0.990243334f, 0.990339477f, 0.990434681f, 0.990528956f, 0.990622311f, 0.990714754f, 0.990806295f, 0.990896941f, 0.990986701f, 0.991075585f, 0.9911636f, 0.991250754f, 0.991337056f, 0.991422515f, 0.991507137f, 0.991590932f, 0.991673907f, 0.99175607f, 0.991837429f, 0.991917991f, 0.991997765f, 0.992076758f, 0.992154977f, 0.99223243f, 0.992309124f, 0.992385067f, 0.992460265f, 0.992534727f, 0.992608459f, 0.992681467f, 0.99275376f, 0.992825344f, 0.992896226f, 0.992966413f, 0.993035911f, 0.993104727f, 0.993172868f, 0.993240339f, 0.993307149f, 0.993373303f, 0.993438807f, 0.993503668f, 0.993567892f, 0.993631484f, 0.993694453f, 0.993756802f, 0.993818539f, 0.993879669f, 0.993940199f, 0.994000133f, 0.994059478f, 0.994118239f, 0.994176423f, 0.994234034f, 0.994291079f, 0.994347563f, 0.994403491f, 0.994458868f, 0.994513701f, 0.994567994f, 0.994621753f, 0.994674982f, 0.994727688f, 0.994779874f, 0.994831547f, 0.994882711f, 0.994933371f, 0.994983532f, 0.995033198f, 0.995082376f, 0.995131069f, 0.995179282f, 0.99522702f, 0.995274287f, 0.995321089f, 0.995367429f, 0.995413313f, 0.995458744f, 0.995503727f, 0.995548266f, 0.995592367f, 0.995636032f, 0.995679266f, 0.995722075f, 0.99576446f, 0.995806428f, 0.995847981f, 0.995889125f, 0.995929862f, 0.995970198f, 0.996010135f, 0.996049678f, 0.99608883f, 0.996127597f, 0.99616598f, 0.996203984f, 0.996241613f, 0.996278871f, 0.99631576f, 0.996352285f, 0.996388449f, 0.996424256f, 0.99645971f, 0.996494813f, 0.996529569f, 0.996563982f, 0.996598054f, 0.99663179f, 0.996665193f, 0.996698265f, 0.99673101f, 0.996763432f, 0.996795533f, 0.996827317f, 0.996858787f, 0.996889945f, 0.996920795f, 0.996951341f, 0.996981584f, 0.997011528f, 0.997041175f, 0.99707053f, 0.997099594f, 0.997128371f, 0.997156863f, 0.997185073f, 0.997213004f, 0.997240658f, 0.997268039f, 0.997295149f, 0.997321991f, 0.997348567f, 0.99737488f, 0.997400932f, 0.997426727f, 0.997452266f, 0.997477553f, 0.997502589f, 0.997527377f, 0.99755192f, 0.997576219f, 0.997600279f, 0.997624099f, 0.997647684f, 0.997671036f, 0.997694156f, 0.997717047f, 0.997739712f, 0.997762151f, 0.997784369f, 0.997806367f, 0.997828146f, 0.99784971f, 0.99787106f, 0.997892199f, 0.997913128f, 0.99793385f, 0.997954366f, 0.99797468f, 0.997994791f, 0.998014704f, 0.998034419f, 0.998053939f, 0.998073265f, 0.9980924f, 0.998111345f, 0.998130102f, 0.998148674f, 0.998167061f, 0.998185266f, 0.99820329f, 0.998221136f, 0.998238805f, 0.998256299f, 0.998273619f, 0.998290767f, 0.998307746f, 0.998324556f, 0.998341199f, 0.998357677f, 0.998373992f, 0.998390145f, 0.998406138f, 0.998421972f, 0.998437649f, 0.998453171f, 0.998468538f, 0.998483753f, 0.998498818f, 0.998513733f, 0.998528499f, 0.99854312f, 0.998557595f, 0.998571927f, 0.998586116f, 0.998600165f, 0.998614074f, 0.998627845f, 0.99864148f, 0.998654979f, 0.998668345f, 0.998681577f, 0.998694679f, 0.99870765f, 0.998720493f, 0.998733208f, 0.998745797f, 0.998758261f, 0.998770601f, 0.998782819f, 0.998794916f, 0.998806892f, 0.99881875f, 0.99883049f, 0.998842113f, 0.998853621f, 0.998865015f, 0.998876295f, 0.998887464f, 0.998898522f, 0.99890947f, 0.998920309f, 0.99893104f, 0.998941666f, 0.998952185f, 0.9989626f, 0.998972912f, 0.998983121f, 0.998993229f, 0.999003237f, 0.999013145f, 0.999022955f, 0.999032667f, 0.999042283f, 0.999051803f, 0.999061229f, 0.999070561f, 0.999079801f, 0.999088949f, 0.999098006f, 0.999106973f, 0.999115851f, 0.99912464f, 0.999133343f, 0.999141959f, 0.999150489f, 0.999158935f, 0.999167297f, 0.999175575f, 0.999183772f, 0.999191887f, 0.999199921f, 0.999207876f, 0.999215751f, 0.999223549f, 0.999231269f, 0.999238912f, 0.999246479f, 0.999253971f, 0.999261389f, 0.999268733f, 0.999276004f, 0.999283202f, 0.99929033f, 0.999297386f, 0.999304372f, 0.999311289f, 0.999318137f, 0.999324917f, 0.99933163f, 0.999338276f, 0.999344856f, 0.99935137f, 0.99935782f, 0.999364206f, 0.999370528f, 0.999376788f, 0.999382985f, 0.999389121f, 0.999395195f, 0.99940121f, 0.999407164f, 0.99941306f, 0.999418896f, 0.999424675f, 0.999430396f, 0.999436061f, 0.999441669f, 0.999447221f, 0.999452719f, 0.999458161f, 0.99946355f, 0.999468885f, 0.999474167f, 0.999479396f, 0.999484573f, 0.999489699f, 0.999494774f, 0.999499799f, 0.999504774f, 0.999509699f, 0.999514575f, 0.999519403f, 0.999524182f, 0.999528915f, 0.9995336f, 0.999538238f, 0.999542831f, 0.999547378f, 0.999551879f, 0.999556336f, 0.999560749f, 0.999565118f, 0.999569443f, 0.999573725f, 0.999577965f, 0.999582162f, 0.999586318f, 0.999590433f, 0.999594506f, 0.99959854f, 0.999602533f, 0.999606486f, 0.9996104f, 0.999614275f, 0.999618112f, 0.99962191f, 0.999625671f, 0.999629394f, 0.99963308f, 0.99963673f, 0.999640343f, 0.99964392f, 0.999647462f, 0.999650969f, 0.99965444f, 0.999657878f, 0.999661281f, 0.99966465f, 0.999667986f, 0.999671288f, 0.999674558f, 0.999677795f, 0.999681f, 0.999684173f, 0.999687315f, 0.999690425f, 0.999693504f, 0.999696553f, 0.999699571f, 0.99970256f, 0.999705519f, 0.999708448f, 0.999711348f, 0.999714219f, 0.999717062f, 0.999719877f, 0.999722663f, 0.999725422f, 0.999728153f, 0.999730857f, 0.999733535f, 0.999736185f, 0.99973881f, 0.999741408f, 0.99974398f, 0.999746527f, 0.999749049f, 0.999751545f, 0.999754016f, 0.999756463f, 0.999758886f, 0.999761285f, 0.999763659f, 0.99976601f, 0.999768338f, 0.999770643f, 0.999772924f, 0.999775183f, 0.99977742f, 0.999779634f, 0.999781826f, 0.999783997f, 0.999786145f, 0.999788273f, 0.999790379f, 0.999792464f, 0.999794529f, 0.999796573f, 0.999798597f, 0.9998006f, 0.999802584f, 0.999804548f, 0.999806492f, 0.999808417f, 0.999810323f, 0.99981221f, 0.999814078f, 0.999815928f, 0.999817759f, 0.999819572f, 0.999821367f, 0.999823144f, 0.999824904f, 0.999826646f, 0.99982837f, 0.999830078f, 0.999831768f, 0.999833442f, 0.999835099f, 0.999836739f, 0.999838364f, 0.999839972f, 0.999841564f, 0.99984314f, 0.999844701f, 0.999846246f, 0.999847775f, 0.99984929f, 0.999850789f, 0.999852273f, 0.999853743f, 0.999855198f, 0.999856639f, 0.999858065f, 0.999859477f, 0.999860875f, 0.999862259f, 0.99986363f, 0.999864986f, 0.99986633f, 0.999867659f, 0.999868976f, 0.99987028f, 0.99987157f, 0.999872848f, 0.999874113f, 0.999875365f, 0.999876605f, 0.999877833f, 0.999879049f, 0.999880252f, 0.999881443f, 0.999882623f, 0.999883791f, 0.999884947f, 0.999886091f, 0.999887225f, 0.999888347f, 0.999889458f, 0.999890557f, 0.999891646f, 0.999892724f, 0.999893791f, 0.999894848f, 0.999895894f, 0.99989693f, 0.999897956f, 0.999898971f, 0.999899976f, 0.999900971f, 0.999901956f, 0.999902932f, 0.999903898f, 0.999904854f, 0.9999058f, 0.999906738f, 0.999907665f, 0.999908584f, 0.999909494f, 0.999910394f, 0.999911286f, 0.999912168f, 0.999913042f, 0.999913907f, 0.999914764f, 0.999915612f, 0.999916452f, 0.999917283f, 0.999918106f, 0.999918921f, 0.999919727f, 0.999920526f, 0.999921317f, 0.999922099f, 0.999922875f, 0.999923642f, 0.999924402f, 0.999925154f, 0.999925898f, 0.999926636f, 0.999927366f, 0.999928088f, 0.999928804f, 0.999929512f, 0.999930213f, 0.999930908f, 0.999931595f, 0.999932276f, 0.99993295f, 0.999933617f, 0.999934277f, 0.999934931f, 0.999935579f, 0.99993622f, 0.999936854f, 0.999937482f, 0.999938104f, 0.99993872f, 0.99993933f, 0.999939934f, 0.999940531f, 0.999941123f, 0.999941709f, 0.999942289f, 0.999942863f, 0.999943431f, 0.999943994f, 0.999944551f, 0.999945103f, 0.999945649f, 0.99994619f, 0.999946726f, 0.999947256f, 0.99994778f, 0.9999483f, 0.999948814f, 0.999949324f, 0.999949828f, 0.999950327f, 0.999950821f, 0.999951311f, 0.999951795f, 0.999952275f, 0.999952749f, 0.99995322f, 0.999953685f, 0.999954146f, 0.999954602f }; } // namespace tesseract
C++
// Copyright 2008 Google Inc. // All Rights Reserved. // Author: ahmadab@google.com (Ahmad Abdulkader) // // neural_net.cpp: Declarations of a class for an object that // represents an arbitrary network of neurons // #include <vector> #include <string> #include "neural_net.h" #include "input_file_buffer.h" namespace tesseract { NeuralNet::NeuralNet() { Init(); } NeuralNet::~NeuralNet() { // clean up the wts chunks vector for (int vec = 0; vec < static_cast<int>(wts_vec_.size()); vec++) { delete wts_vec_[vec]; } // clean up neurons delete []neurons_; // clean up nodes for (int node_idx = 0; node_idx < neuron_cnt_; node_idx++) { delete []fast_nodes_[node_idx].inputs; } } // Initiaization function void NeuralNet::Init() { read_only_ = true; auto_encoder_ = false; alloc_wgt_cnt_ = 0; wts_cnt_ = 0; neuron_cnt_ = 0; in_cnt_ = 0; out_cnt_ = 0; wts_vec_.clear(); neurons_ = NULL; inputs_mean_.clear(); inputs_std_dev_.clear(); inputs_min_.clear(); inputs_max_.clear(); } // Does a fast feedforward for read_only nets // Templatized for float and double Types template <typename Type> bool NeuralNet::FastFeedForward(const Type *inputs, Type *outputs) { int node_idx = 0; Node *node = &fast_nodes_[0]; // feed inputs in and offset them by the pre-computed bias for (node_idx = 0; node_idx < in_cnt_; node_idx++, node++) { node->out = inputs[node_idx] - node->bias; } // compute nodes activations and outputs for (;node_idx < neuron_cnt_; node_idx++, node++) { double activation = -node->bias; for (int fan_in_idx = 0; fan_in_idx < node->fan_in_cnt; fan_in_idx++) { activation += (node->inputs[fan_in_idx].input_weight * node->inputs[fan_in_idx].input_node->out); } node->out = Neuron::Sigmoid(activation); } // copy the outputs to the output buffers node = &fast_nodes_[neuron_cnt_ - out_cnt_]; for (node_idx = 0; node_idx < out_cnt_; node_idx++, node++) { outputs[node_idx] = node->out; } return true; } // Performs a feedforward for general nets. Used mainly in training mode // Templatized for float and double Types template <typename Type> bool NeuralNet::FeedForward(const Type *inputs, Type *outputs) { // call the fast version in case of readonly nets if (read_only_) { return FastFeedForward(inputs, outputs); } // clear all neurons Clear(); // for auto encoders, apply no input normalization if (auto_encoder_) { for (int in = 0; in < in_cnt_; in++) { neurons_[in].set_output(inputs[in]); } } else { // Input normalization : subtract mean and divide by stddev for (int in = 0; in < in_cnt_; in++) { neurons_[in].set_output((inputs[in] - inputs_min_[in]) / (inputs_max_[in] - inputs_min_[in])); neurons_[in].set_output((neurons_[in].output() - inputs_mean_[in]) / inputs_std_dev_[in]); } } // compute the net outputs: follow a pull model each output pulls the // outputs of its input nodes and so on for (int out = neuron_cnt_ - out_cnt_; out < neuron_cnt_; out++) { neurons_[out].FeedForward(); // copy the values to the output buffer outputs[out] = neurons_[out].output(); } return true; } // Sets a connection between two neurons bool NeuralNet::SetConnection(int from, int to) { // allocate the wgt float *wts = AllocWgt(1); if (wts == NULL) { return false; } // register the connection neurons_[to].AddFromConnection(neurons_ + from, wts, 1); return true; } // Create a fast readonly version of the net bool NeuralNet::CreateFastNet() { fast_nodes_.resize(neuron_cnt_); // build the node structures int wts_cnt = 0; for (int node_idx = 0; node_idx < neuron_cnt_; node_idx++) { Node *node = &fast_nodes_[node_idx]; if (neurons_[node_idx].node_type() == Neuron::Input) { // Input neurons have no fan-in node->fan_in_cnt = 0; node->inputs = NULL; // Input bias is the normalization offset computed from // training input stats if (fabs(inputs_max_[node_idx] - inputs_min_[node_idx]) < kMinInputRange) { // if the range approaches zero, the stdev is not defined, // this indicates that this input does not change. // Set the bias to zero node->bias = 0.0f; } else { node->bias = inputs_min_[node_idx] + (inputs_mean_[node_idx] * (inputs_max_[node_idx] - inputs_min_[node_idx])); } } else { node->bias = neurons_[node_idx].bias(); node->fan_in_cnt = neurons_[node_idx].fan_in_cnt(); // allocate memory for fan-in nodes node->inputs = new WeightedNode[node->fan_in_cnt]; if (node->inputs == NULL) { return false; } for (int fan_in = 0; fan_in < node->fan_in_cnt; fan_in++) { // identify fan-in neuron const int id = neurons_[node_idx].fan_in(fan_in)->id(); // Feedback connections are not allowed and should never happen if (id >= node_idx) { return false; } // add the the fan-in neuron and its wgt node->inputs[fan_in].input_node = &fast_nodes_[id]; float wgt_val = neurons_[node_idx].fan_in_wts(fan_in); // for input neurons normalize the wgt by the input scaling // values to save time during feedforward if (neurons_[node_idx].fan_in(fan_in)->node_type() == Neuron::Input) { // if the range approaches zero, the stdev is not defined, // this indicates that this input does not change. // Set the weight to zero if (fabs(inputs_max_[id] - inputs_min_[id]) < kMinInputRange) { wgt_val = 0.0f; } else { wgt_val /= ((inputs_max_[id] - inputs_min_[id]) * inputs_std_dev_[id]); } } node->inputs[fan_in].input_weight = wgt_val; } // incr wgt count to validate against at the end wts_cnt += node->fan_in_cnt; } } // sanity check return wts_cnt_ == wts_cnt; } // returns a pointer to the requested set of weights // Allocates in chunks float * NeuralNet::AllocWgt(int wgt_cnt) { // see if need to allocate a new chunk of wts if (wts_vec_.size() == 0 || (alloc_wgt_cnt_ + wgt_cnt) > kWgtChunkSize) { // add the new chunck to the wts_chunks vector wts_vec_.push_back(new vector<float> (kWgtChunkSize)); alloc_wgt_cnt_ = 0; } float *ret_ptr = &((*wts_vec_.back())[alloc_wgt_cnt_]); // incr usage counts alloc_wgt_cnt_ += wgt_cnt; wts_cnt_ += wgt_cnt; return ret_ptr; } // create a new net object using an input file as a source NeuralNet *NeuralNet::FromFile(const string file_name) { // open the file InputFileBuffer input_buff(file_name); // create a new net object using input buffer NeuralNet *net_obj = FromInputBuffer(&input_buff); return net_obj; } // create a net object from an input buffer NeuralNet *NeuralNet::FromInputBuffer(InputFileBuffer *ib) { // create a new net object NeuralNet *net_obj = new NeuralNet(); if (net_obj == NULL) { return NULL; } // load the net if (!net_obj->ReadBinary(ib)) { delete net_obj; net_obj = NULL; } return net_obj; } // Compute the output of a specific output node. // This function is useful for application that are interested in a single // output of the net and do not want to waste time on the rest // This is the fast-read-only version of this function template <typename Type> bool NeuralNet::FastGetNetOutput(const Type *inputs, int output_id, Type *output) { // feed inputs in and offset them by the pre-computed bias int node_idx = 0; Node *node = &fast_nodes_[0]; for (node_idx = 0; node_idx < in_cnt_; node_idx++, node++) { node->out = inputs[node_idx] - node->bias; } // compute nodes' activations and outputs for hidden nodes if any int hidden_node_cnt = neuron_cnt_ - out_cnt_; for (;node_idx < hidden_node_cnt; node_idx++, node++) { double activation = -node->bias; for (int fan_in_idx = 0; fan_in_idx < node->fan_in_cnt; fan_in_idx++) { activation += (node->inputs[fan_in_idx].input_weight * node->inputs[fan_in_idx].input_node->out); } node->out = Neuron::Sigmoid(activation); } // compute the output of the required output node node += output_id; double activation = -node->bias; for (int fan_in_idx = 0; fan_in_idx < node->fan_in_cnt; fan_in_idx++) { activation += (node->inputs[fan_in_idx].input_weight * node->inputs[fan_in_idx].input_node->out); } (*output) = Neuron::Sigmoid(activation); return true; } // Performs a feedforward for general nets. Used mainly in training mode // Templatized for float and double Types template <typename Type> bool NeuralNet::GetNetOutput(const Type *inputs, int output_id, Type *output) { // validate output id if (output_id < 0 || output_id >= out_cnt_) { return false; } // call the fast version in case of readonly nets if (read_only_) { return FastGetNetOutput(inputs, output_id, output); } // For the slow version, we'll just call FeedForward and return the // appropriate output vector<Type> outputs(out_cnt_); if (!FeedForward(inputs, &outputs[0])) { return false; } (*output) = outputs[output_id]; return true; } // Instantiate all supported templates now that the functions have been defined. template bool NeuralNet::FeedForward(const float *inputs, float *outputs); template bool NeuralNet::FeedForward(const double *inputs, double *outputs); template bool NeuralNet::FastFeedForward(const float *inputs, float *outputs); template bool NeuralNet::FastFeedForward(const double *inputs, double *outputs); template bool NeuralNet::GetNetOutput(const float *inputs, int output_id, float *output); template bool NeuralNet::GetNetOutput(const double *inputs, int output_id, double *output); template bool NeuralNet::FastGetNetOutput(const float *inputs, int output_id, float *output); template bool NeuralNet::FastGetNetOutput(const double *inputs, int output_id, double *output); template bool NeuralNet::ReadBinary(InputFileBuffer *input_buffer); }
C++
// Copyright 2008 Google Inc. // All Rights Reserved. // Author: ahmadab@google.com (Ahmad Abdulkader) // // neural_net.h: Declarations of a class for an object that // represents an arbitrary network of neurons // #ifndef NEURAL_NET_H #define NEURAL_NET_H #include <string> #include <vector> #include "neuron.h" #include "input_file_buffer.h" namespace tesseract { // Minimum input range below which we set the input weight to zero static const float kMinInputRange = 1e-6f; class NeuralNet { public: NeuralNet(); virtual ~NeuralNet(); // create a net object from a file. Uses stdio static NeuralNet *FromFile(const string file_name); // create a net object from an input buffer static NeuralNet *FromInputBuffer(InputFileBuffer *ib); // Different flavors of feed forward function template <typename Type> bool FeedForward(const Type *inputs, Type *outputs); // Compute the output of a specific output node. // This function is useful for application that are interested in a single // output of the net and do not want to waste time on the rest template <typename Type> bool GetNetOutput(const Type *inputs, int output_id, Type *output); // Accessor functions int in_cnt() const { return in_cnt_; } int out_cnt() const { return out_cnt_; } protected: struct Node; // A node-weight pair struct WeightedNode { Node *input_node; float input_weight; }; // node struct used for fast feedforward in // Read only nets struct Node { float out; float bias; int fan_in_cnt; WeightedNode *inputs; }; // Read-Only flag (no training: On by default) // will presumeably be set to false by // the inherting TrainableNeuralNet class bool read_only_; // input count int in_cnt_; // output count int out_cnt_; // Total neuron count (including inputs) int neuron_cnt_; // count of unique weights int wts_cnt_; // Neuron vector Neuron *neurons_; // size of allocated weight chunk (in weights) // This is basically the size of the biggest network // that I have trained. However, the class will allow // a bigger sized net if desired static const int kWgtChunkSize = 0x10000; // Magic number expected at the beginning of the NN // binary file static const unsigned int kNetSignature = 0xFEFEABD0; // count of allocated wgts in the last chunk int alloc_wgt_cnt_; // vector of weights buffers vector<vector<float> *>wts_vec_; // Is the net an auto-encoder type bool auto_encoder_; // vector of input max values vector<float> inputs_max_; // vector of input min values vector<float> inputs_min_; // vector of input mean values vector<float> inputs_mean_; // vector of input standard deviation values vector<float> inputs_std_dev_; // vector of input offsets used by fast read-only // feedforward function vector<Node> fast_nodes_; // Network Initialization function void Init(); // Clears all neurons void Clear() { for (int node = 0; node < neuron_cnt_; node++) { neurons_[node].Clear(); } } // Reads the net from an input buffer template<class ReadBuffType> bool ReadBinary(ReadBuffType *input_buff) { // Init vars Init(); // is this an autoencoder unsigned int read_val; unsigned int auto_encode; // read and verify signature if (input_buff->Read(&read_val, sizeof(read_val)) != sizeof(read_val)) { return false; } if (read_val != kNetSignature) { return false; } if (input_buff->Read(&auto_encode, sizeof(auto_encode)) != sizeof(auto_encode)) { return false; } auto_encoder_ = auto_encode; // read and validate total # of nodes if (input_buff->Read(&read_val, sizeof(read_val)) != sizeof(read_val)) { return false; } neuron_cnt_ = read_val; if (neuron_cnt_ <= 0) { return false; } // set the size of the neurons vector neurons_ = new Neuron[neuron_cnt_]; if (neurons_ == NULL) { return false; } // read & validate inputs if (input_buff->Read(&read_val, sizeof(read_val)) != sizeof(read_val)) { return false; } in_cnt_ = read_val; if (in_cnt_ <= 0) { return false; } // read outputs if (input_buff->Read(&read_val, sizeof(read_val)) != sizeof(read_val)) { return false; } out_cnt_ = read_val; if (out_cnt_ <= 0) { return false; } // set neuron ids and types for (int idx = 0; idx < neuron_cnt_; idx++) { neurons_[idx].set_id(idx); // input type if (idx < in_cnt_) { neurons_[idx].set_node_type(Neuron::Input); } else if (idx >= (neuron_cnt_ - out_cnt_)) { neurons_[idx].set_node_type(Neuron::Output); } else { neurons_[idx].set_node_type(Neuron::Hidden); } } // read the connections for (int node_idx = 0; node_idx < neuron_cnt_; node_idx++) { // read fanout if (input_buff->Read(&read_val, sizeof(read_val)) != sizeof(read_val)) { return false; } // read the neuron's info int fan_out_cnt = read_val; for (int fan_out_idx = 0; fan_out_idx < fan_out_cnt; fan_out_idx++) { // read the neuron id if (input_buff->Read(&read_val, sizeof(read_val)) != sizeof(read_val)) { return false; } // create the connection if (!SetConnection(node_idx, read_val)) { return false; } } } // read all the neurons' fan-in connections for (int node_idx = 0; node_idx < neuron_cnt_; node_idx++) { // read if (!neurons_[node_idx].ReadBinary(input_buff)) { return false; } } // size input stats vector to expected input size inputs_mean_.resize(in_cnt_); inputs_std_dev_.resize(in_cnt_); inputs_min_.resize(in_cnt_); inputs_max_.resize(in_cnt_); // read stats if (input_buff->Read(&(inputs_mean_.front()), sizeof(inputs_mean_[0]) * in_cnt_) != sizeof(inputs_mean_[0]) * in_cnt_) { return false; } if (input_buff->Read(&(inputs_std_dev_.front()), sizeof(inputs_std_dev_[0]) * in_cnt_) != sizeof(inputs_std_dev_[0]) * in_cnt_) { return false; } if (input_buff->Read(&(inputs_min_.front()), sizeof(inputs_min_[0]) * in_cnt_) != sizeof(inputs_min_[0]) * in_cnt_) { return false; } if (input_buff->Read(&(inputs_max_.front()), sizeof(inputs_max_[0]) * in_cnt_) != sizeof(inputs_max_[0]) * in_cnt_) { return false; } // create a readonly version for fast feedforward if (read_only_) { return CreateFastNet(); } return true; } // creates a connection between two nodes bool SetConnection(int from, int to); // Create a read only version of the net that // has faster feedforward performance bool CreateFastNet(); // internal function to allocate a new set of weights // Centralized weight allocation attempts to increase // weights locality of reference making it more cache friendly float *AllocWgt(int wgt_cnt); // different flavors read-only feedforward function template <typename Type> bool FastFeedForward(const Type *inputs, Type *outputs); // Compute the output of a specific output node. // This function is useful for application that are interested in a single // output of the net and do not want to waste time on the rest // This is the fast-read-only version of this function template <typename Type> bool FastGetNetOutput(const Type *inputs, int output_id, Type *output); }; } #endif // NEURAL_NET_H__
C++
// Copyright 2008 Google Inc. // All Rights Reserved. // Author: ahmadab@google.com (Ahmad Abdulkader) // // input_file_buffer.h: Declarations of a class for an object that // represents an input file buffer. #include <string> #include "input_file_buffer.h" namespace tesseract { // default and only contsructor InputFileBuffer::InputFileBuffer(const string &file_name) : file_name_(file_name) { fp_ = NULL; } // virtual destructor InputFileBuffer::~InputFileBuffer() { if (fp_ != NULL) { fclose(fp_); } } // Read the specified number of bytes to the specified input buffer int InputFileBuffer::Read(void *buffer, int bytes_to_read) { // open the file if necessary if (fp_ == NULL) { fp_ = fopen(file_name_.c_str(), "rb"); if (fp_ == NULL) { return 0; } } return fread(buffer, 1, bytes_to_read, fp_); } }
C++
// Copyright 2008 Google Inc. // All Rights Reserved. // Author: ahmadab@google.com (Ahmad Abdulkader) // // input_file_buffer.h: Declarations of a class for an object that // represents an input file buffer. // #ifndef INPUT_FILE_BUFFER_H #define INPUT_FILE_BUFFER_H #include <stdio.h> #include <string> #ifdef USE_STD_NAMESPACE using std::string; #endif namespace tesseract { class InputFileBuffer { public: explicit InputFileBuffer(const string &file_name); virtual ~InputFileBuffer(); int Read(void *buffer, int bytes_to_read); protected: string file_name_; FILE *fp_; }; } #endif // INPUT_FILE_BUFFER_H__
C++