From 9778b272a8e2a84cf940ebb22b6895d82974b8e2 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 9 Sep 2020 02:01:36 +0200 Subject: [PATCH 01/92] Add ATS of NTAG Gen2 --- armsrc/mifarecmd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index dd2bffedf..6e500bc70 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2303,6 +2303,11 @@ void MifareCIdent(void) { isGen = MAGIC_GEN_2; goto OUT; } + // test for NTAG213 magic gen2 + if (memcmp(buf, "\x85\x00\x00\xA0\x00\x00\x0A\xA5\x00\x04\x04\x02\x01\x00\x0F\x03\x79\x0C", 18) == 0) { + isGen = MAGIC_GEN_2; + goto OUT; + } }; OUT: From ecc3623cad201af1be8e31981966fab7563719e3 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Wed, 9 Sep 2020 04:07:04 +0200 Subject: [PATCH 02/92] Fixed appveyor CI --- appveyor.yml | 237 ++++++++++++++++++++------------------------------- 1 file changed, 94 insertions(+), 143 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6e268ccb7..328796653 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,13 @@ version: 3.0.1.{build} image: Visual Studio 2019 -clone_folder: C:\ProxSpace\pm3 +clone_folder: C:\ProxSpace\pm3\proxmark +environment: + proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip + proxspace_zip_file: \proxspace.zip + proxspace_zip_folder_name: ProxSpace-* + proxspace_path: \ProxSpace + proxspace_home_path: \ProxSpace\pm3 + init: - ps: >- $psversiontable @@ -25,42 +32,79 @@ init: # iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) clone_script: - ps: >- + + Function ExecUpdate($Text, $firstStart) { + Write-Host "$Text" -NoNewLine + Start-Process "cmd.exe" "/c ""cd /D $env:proxspace_path && call msys2\ps\setup.cmd && msys2\msys2_shell.cmd -mingw64 -defterm -no-start -c ""exit""""" + $StartTime=[System.Environment]::TickCount + Start-Sleep -s 10 + while($true) { + $cmdprocess = Get-Process "cmd" -ErrorAction SilentlyContinue + + if (!$cmdprocess -Or $cmdprocess.HasExited) { + Write-Host "[ OK ]" -ForegroundColor Green + break + } + + if ($firstStart -And (Test-Path "$env:proxspace_path\msys2\etc\pacman.conf.pacnew")) { + Start-Sleep -s 5 + $tmp = $cmdprocess.CloseMainWindow() + Start-Sleep -s 5 + Stop-Process -Name "cmd" -Force -ErrorAction SilentlyContinue + Write-Host "Exit by pacman.conf" -ForegroundColor Green + break + } + + if ([System.Environment]::TickCount-$StartTime -gt 1000000) { + Write-host "Exit by timeout" -ForegroundColor Yellow + break + } + + Start-Sleep -s 1 + } + } + Write-Host "Removing ProxSpace..." -NoNewLine $CloneTime=[System.Environment]::TickCount - + cd \ - Remove-Item -Recurse -Force -Path c:\ProxSpace\* + Remove-Item -Recurse -Force -Path $env:proxspace_path Write-Host "[ OK ]" -ForegroundColor Green - - Write-Host "Git clone ProxSpace..." -NoNewLine - - git clone -q https://github.com/Gator96100/ProxSpace c:\ProxSpace - - Write-Host "[ OK ]" -ForegroundColor Green - - - if(!(Test-Path -Path C:\ProxSpace\pm3)){ - - New-Item -ItemType Directory -Force -Path C:\ProxSpace\pm3 - - } + Write-Host "Download ProxSpace..." -NoNewLine + + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + + Invoke-WebRequest "$env:proxspace_url" -outfile "$env:proxspace_zip_file" - Write-Host "Removing pm3 dir..." -NoNewLine - - Remove-Item -Recurse -Force -Path c:\ProxSpace\pm3\* - Write-Host "[ OK ]" -ForegroundColor Green - - Write-Host "Removing ps startup_check.sh ..." -NoNewLine - - Remove-Item -Recurse -Force -Path c:\ProxSpace\msys2\ps\startup_checks.sh - + + Write-Host "Extracting ProxSpace..." -NoNewLine + + Expand-Archive -LiteralPath "$env:proxspace_zip_file" -DestinationPath "\" + + Remove-Item "$env:proxspace_zip_file" + Write-Host "[ OK ]" -ForegroundColor Green + + Write-Host "Renaming ProxSpace folder..." -NoNewLine + + Get-ChildItem -Path "\$env:proxspace_zip_folder_name" | Rename-Item -NewName (Split-Path $env:proxspace_path -Leaf) + + Write-Host "[ OK ]" -ForegroundColor Gree + ExecUpdate "Initial msys2 startup..." $true + + ExecUpdate "Installing required packages..." $false + + + $psversion = (Select-String -Pattern 'PSVERSION=' -SimpleMatch -Path "$env:proxspace_path\msys2\ps\09-proxspace_setup.post").Line.Split("""")[1] + + Write-Host "ProxSpace version: $psversion" -ForegroundColor Yellow + Write-Host "Cloning repository <$env:appveyor_repo_name> to $env:appveyor_build_folder ..." -NoNewLine if(-not $env:appveyor_pull_request_number) { @@ -73,134 +117,45 @@ clone_script: git fetch -q origin +refs/pull/$env:appveyor_pull_request_number/merge: git checkout -qf FETCH_HEAD } - + Write-Host "[ OK ]" -ForegroundColor Green - - - Write-Host "Fill msys2\etc\fstab file..." -NoNewLine - - New-Item c:\ProxSpace\msys2\etc\fstab -type file -force -value "# For a description of the file format, see the Users Guide`n# http://cygwin.com/cygwin-ug-net/using.html#mount-table`nnone / cygdrive binary,posix=0,noacl,user 0 0 `nC:\ProxSpace\pm3 /pm3 ntfs noacl 0 0 `nC:\ProxSpace\gcc-arm-none-eabi /gcc-arm-none-eabi ntfs noacl 0 0 `n" - - Write-Host "[ OK ]" -ForegroundColor Green - - - Write-Host "Update msys2 packages..." - - $env:Path = "C:\ProxSpace\msys2\usr\bin;C:\ProxSpace\msys2\mingw32\bin;C:\ProxSpace\gcc-arm-none-eabi\bin;$env:Path" - - Function ExecUpdate($Name, $Cmd, $ErrorLine) { - - Write-Host "Exec [$Name]... " -NoNewLine - #--- begin Job - - $Job = Start-Job -Name "$Name" -ScriptBlock { - $env:Path = "C:\ProxSpace\msys\bin;$env:Path" - Set-Location $using:PWD - - $sb=[scriptblock]::Create("$using:Cmd") - #execute scriptblock - $Cond=&$sb - - return $Cond - } - - #--- end Job - - $JobTime=[System.Environment]::TickCount - while($true) { - Try { - $Res = Receive-Job -Job $Job -Keep 2>&1 6>&1 - } - Catch { - $Res = "" - Write-host "error in Receive-Job" - } - - if ($Res -is "String" -and $Res -like "*$ErrorLine*"){ - Write-host "Exit by stop phrase" -ForegroundColor Green - break - } - - if ($Res -is [Object]){ - [bool]$needexit = $false - ForEach($line in $Res){ - if ($line -like "*$ErrorLine*"){ - Write-host "Exit by stop phrase [obj]" -ForegroundColor Green - $needexit = $true - break - } - } - if ($needexit) { - break - } - } - - if(Wait-Job $Job -Timeout 5){ - Write-host "Exit by end job" -ForegroundColor Green - break - } - - if ([System.Environment]::TickCount-$JobTime -gt 1000000) { - Write-host "Exit by timeout" -ForegroundColor Yellow - break - } - } - - Remove-Job -Force $Job - } - - cd C:\ProxSpace\ - - C:\ProxSpace\msys2\ps\setup.cmd - - ExecUpdate "update1" "C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start /dev/null" "terminate?MSYS2" - - ExecUpdate "update2" "C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start /dev/null" "terminate?MSYS2" Add-AppveyorMessage -Message "ProxSpace download and update took $(([System.Environment]::TickCount-$CloneTime) / 1000) sec" -Category Information - Write-Host "Update " -NoNewLine - - Write-Host "[ OK ]" -ForegroundColor Green + install: build_script: - ps: >- - $env:Path="C:\ProxSpace\msys2\usr\bin;C:\ProxSpace\msys2\mingw32\bin;C:\ProxSpace\gcc-arm-none-eabi\bin;c:\Python38;c:\Python38\Scripts;$env:Path" - $env:MINGW_HOME="C:\ProxSpace\msys2\mingw32" - - $env:MSYS_HOME="C:\ProxSpace\msys2" - - $env:MSYSTEM="MINGW32" - - $env:MINGW_PREFIX="/mingw32" - - $env:SHELL="/bin/bash" - - $env:MSYSTEM_CHOST="i686-w64-mingw32" - - cd C:\ProxSpace\pm3 + $pmfolder = Split-Path $env:appveyor_build_folder -Leaf + + Function ExecMinGWCmd($Cmd) { + cd $env:proxspace_path + msys2\msys2_shell.cmd -mingw64 -defterm -no-start -c "cd $pmfolder && $Cmd" + } + Write-Host "---------- make ----------" -ForegroundColor Yellow - $TestTime=[System.Environment]::TickCount - + $TestTime=[System.Environment]::TickCount + #make - - bash -c -i 'echo $PATH;pwd;make clean;make V=1' - + + cd $env:proxspace_path + + msys2\ps\setup.cmd + + ExecMinGWCmd "make clean;make V=1" #some checks - if(!(Test-Path C:\ProxSpace\pm3\client\proxmark3.exe)){ + if(!(Test-Path "$env:proxspace_home_path\$pmfolder\client\proxmark3.exe")){ throw "Main file proxmark3.exe not exists." } - cd c:\ProxSpace\pm3 - - bash -c -i 'make check' + ExecMinGWCmd 'make check' $testspass = ($LASTEXITCODE -eq 0) @@ -219,11 +174,9 @@ build_script: $TestTime=[System.Environment]::TickCount - bash -c -i 'pwd;make clean;make PLATFORM_EXTRAS=BTADDON' + ExecMinGWCmd 'make clean;make V=1 PLATFORM_EXTRAS=BTADDON' - cd c:\ProxSpace\pm3 - - bash -c -i 'make check' + ExecMinGWCmd 'make check' $testspass = ($LASTEXITCODE -eq 0) @@ -239,19 +192,17 @@ build_script: Write-Host "---------- make clean ----------" -ForegroundColor Yellow - bash -c -i 'make clean' + ExecMinGWCmd 'make clean' Write-Host "---------- cmake ----------" -ForegroundColor Yellow $TestTime=[System.Environment]::TickCount - - cmd.exe /c 'C:\ProxSpace\msys2\msys2_shell.cmd -mingw32 -defterm -no-start -c "mkdir -p client/build; cd client/build; cmake -G""MSYS Makefiles"" ..; make VERBOSE=1;"' + + ExecMinGWCmd 'mkdir -p client/build; cd client/build; cmake -G""MSYS Makefiles"" ..; make VERBOSE=1;' Write-Host "---------- cmake tests ----------" -ForegroundColor Yellow - cd c:\ProxSpace\pm3 - - bash -c -i './tools/pm3_tests.sh --clientbin client/build/proxmark3.exe client' + ExecMinGWCmd './tools/pm3_tests.sh --clientbin client/build/proxmark3.exe client' $testspass = ($LASTEXITCODE -eq 0) From 2af4a8957be059ace3391713832f02cb00f85e56 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 9 Sep 2020 10:37:47 +0200 Subject: [PATCH 03/92] Fix hf mfu setuid for cards requiring valid BCC --- client/src/cmdhfmfu.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/client/src/cmdhfmfu.c b/client/src/cmdhfmfu.c index 58dc9a300..a9b03cb46 100644 --- a/client/src/cmdhfmfu.c +++ b/client/src/cmdhfmfu.c @@ -2540,6 +2540,7 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) { return PM3_EINVARG; } + PrintAndLogEx(INFO, "Please ignore possible transient BCC warnings"); // read block2. clearCommandBuffer(); SendCommandMIX(CMD_HF_MIFAREU_READBL, 2, 0, 0, NULL, 0); @@ -2552,6 +2553,21 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) { uint8_t oldblock2[4] = {0x00}; memcpy(resp.data.asBytes, oldblock2, 4); + // Enforce bad BCC handling temporarily as BCC will be wrong between + // block 1 write and block2 write + hf14a_config config; + SendCommandNG(CMD_HF_ISO14443A_GET_CONFIG, NULL, 0); + if (!WaitForResponseTimeout(CMD_HF_ISO14443A_GET_CONFIG, &resp, 2000)) { + PrintAndLogEx(WARNING, "command execution time out"); + return PM3_ETIMEOUT; + } + memcpy(&config, resp.data.asBytes, sizeof(hf14a_config)); + int8_t oldconfig_bcc = config.forcebcc; + if (oldconfig_bcc != 2) { + config.forcebcc = 2; + SendCommandNG(CMD_HF_ISO14443A_SET_CONFIG, (uint8_t *)&config, sizeof(hf14a_config)); + } + // block 0. uint8_t data[4]; data[0] = uid[0]; @@ -2588,6 +2604,12 @@ static int CmdHF14AMfUCSetUid(const char *Cmd) { PrintAndLogEx(WARNING, "Command execute timeout"); return PM3_ETIMEOUT; } + + // restore BCC config + if (oldconfig_bcc != 2) { + config.forcebcc = oldconfig_bcc; + SendCommandNG(CMD_HF_ISO14443A_SET_CONFIG, (uint8_t *)&config, sizeof(hf14a_config)); + } return PM3_SUCCESS; } From d60b9859bfb8bfaf715f05de347542f0b72513e3 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 9 Sep 2020 12:19:26 +0200 Subject: [PATCH 04/92] lf fdx clone, sim, demod - wrong bit, better naming and output --- client/src/cmdlffdx.c | 237 +++++++++++++++++++++++++++++------------- client/src/cmdlffdx.h | 2 +- 2 files changed, 168 insertions(+), 71 deletions(-) diff --git a/client/src/cmdlffdx.c b/client/src/cmdlffdx.c index 496dad691..564c4d6b6 100644 --- a/client/src/cmdlffdx.c +++ b/client/src/cmdlffdx.c @@ -50,19 +50,18 @@ static int CmdHelp(const char *Cmd); static int usage_lf_fdx_clone(void) { PrintAndLogEx(NORMAL, "Clone a FDX-B animal tag to a T55x7 or Q5/T5555 tag."); - PrintAndLogEx(NORMAL, "Usage: lf fdx clone [h] "); + PrintAndLogEx(NORMAL, "Usage: lf fdx clone [h] [c ] [a ] [e ] "); PrintAndLogEx(NORMAL, "Options:"); - PrintAndLogEx(NORMAL, " h : This help"); - PrintAndLogEx(NORMAL, " : Country id"); - PrintAndLogEx(NORMAL, " : Animal id"); - PrintAndLogEx(NORMAL, " : Extended data"); - //reserved/rfu - //is animal tag - PrintAndLogEx(NORMAL, " : Specify writing to Q5/T5555 tag"); + PrintAndLogEx(NORMAL, " h : This help"); + PrintAndLogEx(NORMAL, " c : (dec) Country code"); + PrintAndLogEx(NORMAL, " n : (dec) National code"); + PrintAndLogEx(NORMAL, " e : (hex) Extended data"); + PrintAndLogEx(NORMAL, " s : Set animal bit"); + PrintAndLogEx(NORMAL, " : Specify writing to Q5/T5555 tag"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx clone 999 112233")); - PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx clone 999 112233 16a")); + PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx clone c 999 n 112233 s")); + PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx clone c 999 n 112233 e 16a")); return PM3_SUCCESS; } @@ -70,33 +69,37 @@ static int usage_lf_fdx_sim(void) { PrintAndLogEx(NORMAL, "Enables simulation of FDX-B animal tag"); PrintAndLogEx(NORMAL, "Simulation runs until the button is pressed or another USB command is issued."); PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(NORMAL, "Usage: lf fdx sim [h] "); + PrintAndLogEx(NORMAL, "Usage: lf fdx sim [h] [c ] [n ] [e ] "); PrintAndLogEx(NORMAL, "Options:"); - PrintAndLogEx(NORMAL, " h : This help"); - PrintAndLogEx(NORMAL, " : Country ID"); - PrintAndLogEx(NORMAL, " : Animal ID"); - PrintAndLogEx(NORMAL, " : Extended data"); + PrintAndLogEx(NORMAL, " h : This help"); + PrintAndLogEx(NORMAL, " c : (dec) Country code"); + PrintAndLogEx(NORMAL, " n : (dec) National code"); + PrintAndLogEx(NORMAL, " e : (hex) Extended data"); + PrintAndLogEx(NORMAL, " s : Set animal bit"); + PrintAndLogEx(NORMAL, " : Specify writing to Q5/T5555 tag"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx sim 999 112233")); - PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx sim 999 112233 16a")); + PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx sim c 999 n 112233 s")); + PrintAndLogEx(NORMAL, _YELLOW_(" lf fdx sim c 999 n 112233 e 16a")); return PM3_SUCCESS; } // clearing the topbit needed for the preambl detection. -static void verify_values(uint64_t *animalid, uint32_t *countryid, uint32_t *extended) { +static void verify_values(uint64_t *animalid, uint32_t *countryid, uint32_t *extended, uint8_t *is_animal) { if ((*animalid & 0x3FFFFFFFFF) != *animalid) { *animalid &= 0x3FFFFFFFFF; PrintAndLogEx(INFO, "Animal ID truncated to 38bits: " _YELLOW_("%"PRIx64), *animalid); } - if ((*countryid & 0x3ff) != *countryid) { - *countryid &= 0x3ff; + if ((*countryid & 0x3FF) != *countryid) { + *countryid &= 0x3FF; PrintAndLogEx(INFO, "Country ID truncated to 10bits:" _YELLOW_("%03d"), *countryid); } - if ((*extended & 0xfff) != *extended) { - *extended &= 0xfff; + if ((*extended & 0xFFF) != *extended) { + *extended &= 0xFFF; PrintAndLogEx(INFO, "Extended truncated to 24bits: " _YELLOW_("0x%03X"), *extended); } + + *is_animal &= 0x01; } static inline uint32_t bitcount(uint32_t a) { @@ -228,6 +231,8 @@ int demodFDX(void) { // set and leave DemodBuffer intact setDemodBuff(DemodBuffer, 128, preambleIndex); setClockGrid(g_DemodClock, g_DemodStartIdx + (preambleIndex * g_DemodClock)); + + // remove marker bits (1's every 9th digit after preamble) (pType = 2) size = removeParity(DemodBuffer, 11, 9, 2, 117); if (size != 104) { @@ -236,29 +241,43 @@ int demodFDX(void) { } //got a good demod + uint8_t offset; uint64_t NationalCode = ((uint64_t)(bytebits_to_byteLSBF(DemodBuffer + 32, 6)) << 32) | bytebits_to_byteLSBF(DemodBuffer, 32); - uint16_t countryCode = bytebits_to_byteLSBF(DemodBuffer + 38, 10); - uint8_t dataBlockBit = DemodBuffer[48]; - uint32_t reservedCode = bytebits_to_byteLSBF(DemodBuffer + 49, 14); - uint8_t animalBit = DemodBuffer[63]; - uint16_t crc = bytebits_to_byteLSBF(DemodBuffer + 64, 16); - uint32_t extended = bytebits_to_byteLSBF(DemodBuffer + 80, 24); + + offset = 38; + uint16_t countryCode = bytebits_to_byteLSBF(DemodBuffer + offset, 10); + + offset += 10; + uint8_t dataBlockBit = DemodBuffer[offset]; + + offset++; + uint32_t reservedCode = bytebits_to_byteLSBF(DemodBuffer + offset, 14); + + offset += 14; + uint8_t animalBit = DemodBuffer[offset]; + + offset++; + uint16_t crc = bytebits_to_byteLSBF(DemodBuffer + offset, 16); + + offset += 16; + uint32_t extended = bytebits_to_byteLSBF(DemodBuffer + offset, 24); + uint64_t rawid = (uint64_t)(bytebits_to_byte(DemodBuffer, 32)) << 32 | bytebits_to_byte(DemodBuffer + 32, 32); uint8_t raw[8]; num_to_bytes(rawid, 8, raw); PrintAndLogEx(SUCCESS, "FDX-B / ISO 11784/5 Animal"); PrintAndLogEx(SUCCESS, "Animal ID " _GREEN_("%04u-%012"PRIu64), countryCode, NationalCode); - PrintAndLogEx(SUCCESS, "National Code " _GREEN_("%012" PRIu64) " (0x%" PRIx64 ")", NationalCode, NationalCode); - PrintAndLogEx(SUCCESS, "Country Code %04u", countryCode); - PrintAndLogEx(SUCCESS, "Reserved/RFU %u (0x04%X)", reservedCode, reservedCode); - PrintAndLogEx(SUCCESS, "Animal Tag %s", animalBit ? _YELLOW_("True") : "False"); - PrintAndLogEx(SUCCESS, "Has extended data %s [0x%X]", dataBlockBit ? _YELLOW_("True") : "False", extended); + PrintAndLogEx(SUCCESS, "National Code " _GREEN_("%012" PRIu64) " (0x%" PRIX64 ")", NationalCode, NationalCode); + PrintAndLogEx(SUCCESS, "Country Code " _GREEN_("%04u"), countryCode); + PrintAndLogEx(SUCCESS, "Reserved/RFU %u (0x%04X)", reservedCode, reservedCode); + PrintAndLogEx(SUCCESS, " Animal bit set? %s", animalBit ? _YELLOW_("True") : "False"); + PrintAndLogEx(SUCCESS, " Data block? %s [value 0x%X]", dataBlockBit ? _YELLOW_("True") : "False", extended); uint8_t c[] = {0, 0}; compute_crc(CRC_11784, raw, sizeof(raw), &c[0], &c[1]); - PrintAndLogEx(SUCCESS, "CRC-16 0x%04X (%s) ", crc, (crc == (c[1] << 8 | c[0])) ? _GREEN_("ok") : _RED_("fail")); - + PrintAndLogEx(SUCCESS, "CRC-16 0x%04X (%s)", crc, (crc == (c[1] << 8 | c[0])) ? _GREEN_("ok") : _RED_("fail")); + // iceman: crc doesn't protect the extended data? PrintAndLogEx(SUCCESS, "Raw " _GREEN_("%s"), sprint_hex(raw, 8)); if (g_debugMode) { @@ -327,21 +346,61 @@ static int CmdFdxRead(const char *Cmd) { static int CmdFdxClone(const char *Cmd) { - uint32_t countryid = 0, extended = 0; - uint64_t animalid = 0; + uint32_t country_code = 0, extended = 0; + uint64_t national_code = 0; + uint8_t is_animal = 0, cmdp = 0; + bool errors = false, has_extended = false, q5 = false; - char cmdp = tolower(param_getchar(Cmd, 0)); - if (strlen(Cmd) == 0 || cmdp == 'h') return usage_lf_fdx_clone(); + while (param_getchar(Cmd, cmdp) != 0x00 && !errors) { + switch (tolower(param_getchar(Cmd, cmdp))) { + case 'h': + return usage_lf_fdx_clone(); + case 'c': { + country_code = param_get32ex(Cmd, cmdp + 1, 0, 10); + cmdp += 2; + break; + } + case 'n': { + national_code = param_get64ex(Cmd, cmdp + 1, 0, 10); + cmdp += 2; + break; + } + case 'e': { + extended = param_get32ex(Cmd, cmdp + 1, 0, 16); + has_extended = true; + cmdp += 2; + break; + } + case 's': { + is_animal = 1; + cmdp++; + break; + } + case 'q': { + q5 = true; + cmdp++; + break; + } + default: { + PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp)); + errors = true; + break; + } + } + } + if (errors || strlen(Cmd) == 0) return usage_lf_fdx_clone(); + + verify_values(&national_code, &country_code, &extended, &is_animal); - countryid = param_get32ex(Cmd, 0, 0, 10); - animalid = param_get64ex(Cmd, 1, 0, 10); - extended = param_get32ex(Cmd, 2, 0, 16); - - verify_values(&animalid, &countryid, &extended); + PrintAndLogEx(INFO, " Country code %u", country_code); + PrintAndLogEx(INFO, " National code %u", national_code); + PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N'); + PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N'); + PrintAndLogEx(INFO, " Extended data 0x%X", extended); + PrintAndLogEx(INFO, " RFU 0"); uint8_t *bits = calloc(128, sizeof(uint8_t)); - - if (getFDXBits(animalid, countryid, 1, (extended > 0), extended, bits) != PM3_SUCCESS) { + if (getFDXBits(national_code, country_code, is_animal, has_extended, extended, bits) != PM3_SUCCESS) { PrintAndLogEx(ERR, "Error with tag bitstream generation."); free(bits); return PM3_ESOFT; @@ -350,7 +409,6 @@ static int CmdFdxClone(const char *Cmd) { uint32_t blocks[5] = {T55x7_MODULATION_DIPHASE | T55x7_BITRATE_RF_32 | 4 << T55x7_MAXBLOCK_SHIFT, 0, 0, 0, 0}; //Q5 - bool q5 = tolower(param_getchar(Cmd, 2)) == 'q'; if (q5) blocks[0] = T5555_FIXED | T5555_MODULATION_BIPHASE | T5555_INVERT_OUTPUT | T5555_SET_BITRATE(32) | 4 << T5555_MAXBLOCK_SHIFT; @@ -362,7 +420,7 @@ static int CmdFdxClone(const char *Cmd) { free(bits); - PrintAndLogEx(INFO, "Preparing to clone FDX-B to " _YELLOW_("%s") " with animal ID: " _GREEN_("%04u-%"PRIu64)" (extended 0x%X)", (q5) ? "Q5/T5555" : "T55x7", countryid, animalid, extended); + PrintAndLogEx(INFO, "Preparing to clone FDX-B to " _YELLOW_("%s") " with animal ID: " _GREEN_("%04u-%"PRIu64), (q5) ? "Q5/T5555" : "T55x7", country_code, national_code); print_blocks(blocks, ARRAYLEN(blocks)); int res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); @@ -372,24 +430,59 @@ static int CmdFdxClone(const char *Cmd) { } static int CmdFdxSim(const char *Cmd) { - uint32_t countryid = 0, extended = 0; - uint64_t animalid = 0; - char cmdp = tolower(param_getchar(Cmd, 0)); - if (strlen(Cmd) == 0 || cmdp == 'h') return usage_lf_fdx_sim(); + uint32_t country_code = 0, extended = 0; + uint64_t national_code = 0; + uint8_t is_animal = 0, cmdp = 0; + bool errors = false, has_extended = false; - countryid = param_get32ex(Cmd, 0, 0, 10); - animalid = param_get64ex(Cmd, 1, 0, 10); - extended = param_get32ex(Cmd, 2, 0, 16); + while (param_getchar(Cmd, cmdp) != 0x00 && !errors) { + switch (tolower(param_getchar(Cmd, cmdp))) { + case 'h': + return usage_lf_fdx_sim(); + case 'c': { + country_code = param_get32ex(Cmd, cmdp + 1, 0, 10); + cmdp += 2; + break; + } + case 'n': { + national_code = param_get64ex(Cmd, cmdp + 1, 0, 10); + cmdp += 2; + break; + } + case 'e': { + extended = param_get32ex(Cmd, cmdp + 1, 0, 10); + has_extended = true; + cmdp += 2; + break; + } + case 's': { + is_animal = 1; + cmdp++; + break; + } + default: { + PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp)); + errors = true; + break; + } + } + } + if (errors) return usage_lf_fdx_sim(); + + verify_values(&national_code, &country_code, &extended, &is_animal); - verify_values(&animalid, &countryid, &extended); + PrintAndLogEx(INFO, " Country code %u", country_code); + PrintAndLogEx(INFO, " National code %u", national_code); + PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N'); + PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N'); + PrintAndLogEx(INFO, " Extended data 0x%X", extended); + PrintAndLogEx(INFO, " RFU 0"); - PrintAndLogEx(SUCCESS, "Simulating FDX-B animal ID: " _GREEN_("%04u-%"PRIu64)" (extended 0x%X)", countryid, animalid, extended); + PrintAndLogEx(SUCCESS, "Simulating FDX-B animal ID: " _GREEN_("%04u-%"PRIu64), country_code, national_code); - //getFDXBits(uint64_t national_id, uint16_t country, uint8_t isanimal, uint8_t isextended, uint32_t extended, uint8_t *bits) uint8_t *bits = calloc(128, sizeof(uint8_t)); - - if (getFDXBits(animalid, countryid, 1, (extended > 0), extended, bits) != PM3_SUCCESS) { + if (getFDXBits(national_code, country_code, is_animal, (extended > 0), extended, bits) != PM3_SUCCESS) { PrintAndLogEx(ERR, "Error with tag bitstream generation."); free(bits); return PM3_ESOFT; @@ -453,7 +546,7 @@ int detectFDXB(uint8_t *dest, size_t *size) { return (int)startIdx; } -int getFDXBits(uint64_t national_id, uint16_t country, uint8_t is_animal, uint8_t is_extended, uint32_t extended, uint8_t *bits) { +int getFDXBits(uint64_t national_code, uint16_t country_code, uint8_t is_animal, uint8_t is_extended, uint32_t extended, uint8_t *bits) { // add preamble ten 0x00 and one 0x01 memset(bits, 0x00, 10); @@ -471,21 +564,21 @@ int getFDXBits(uint64_t national_id, uint16_t country, uint8_t is_animal, uint8_ num_to_bytebitsLSBF(0x00 >> 7, 7, bits + 74); // add animal flag - OK - bits[65] = is_animal; + bits[81] = is_animal; // add extended flag - OK - bits[81] = is_extended; + bits[65] = is_extended; // add national code 40bits - OK - num_to_bytebitsLSBF(national_id >> 0, 8, bits + 11); - num_to_bytebitsLSBF(national_id >> 8, 8, bits + 20); - num_to_bytebitsLSBF(national_id >> 16, 8, bits + 29); - num_to_bytebitsLSBF(national_id >> 24, 8, bits + 38); - num_to_bytebitsLSBF(national_id >> 32, 6, bits + 47); + num_to_bytebitsLSBF(national_code >> 0, 8, bits + 11); + num_to_bytebitsLSBF(national_code >> 8, 8, bits + 20); + num_to_bytebitsLSBF(national_code >> 16, 8, bits + 29); + num_to_bytebitsLSBF(national_code >> 24, 8, bits + 38); + num_to_bytebitsLSBF(national_code >> 32, 6, bits + 47); // add country code - OK - num_to_bytebitsLSBF(country >> 0, 2, bits + 53); - num_to_bytebitsLSBF(country >> 2, 8, bits + 56); + num_to_bytebitsLSBF(country_code >> 0, 2, bits + 53); + num_to_bytebitsLSBF(country_code >> 2, 8, bits + 56); // add crc-16 - OK uint8_t raw[8]; @@ -501,6 +594,10 @@ int getFDXBits(uint64_t national_id, uint16_t country, uint8_t is_animal, uint8_ num_to_bytebitsLSBF(extended >> 0, 8, bits + 101); num_to_bytebitsLSBF(extended >> 8, 8, bits + 110); num_to_bytebitsLSBF(extended >> 16, 8, bits + 119); + + // 8 16 24 32 40 48 49 + // A8 28 0C 92 EA 6F 00 01 + // A8 28 0C 92 EA 6F 80 00 return PM3_SUCCESS; } diff --git a/client/src/cmdlffdx.h b/client/src/cmdlffdx.h index 63043c7c2..faf1f2aa7 100644 --- a/client/src/cmdlffdx.h +++ b/client/src/cmdlffdx.h @@ -14,7 +14,7 @@ int CmdLFFdx(const char *Cmd); int detectFDXB(uint8_t *dest, size_t *size); int demodFDX(void); -int getFDXBits(uint64_t national_id, uint16_t country, uint8_t is_animal, uint8_t is_extended, uint32_t extended, uint8_t *bits); +int getFDXBits(uint64_t national_code, uint16_t country_code, uint8_t is_animal, uint8_t is_extended, uint32_t extended, uint8_t *bits); #endif From 539f33a3c9455f20e25d8e4b3adb85b1548d264e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 9 Sep 2020 12:30:09 +0200 Subject: [PATCH 05/92] warning gcc10.2 (@mwalker33) --- client/src/fileutils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/fileutils.c b/client/src/fileutils.c index d70fe508d..be6cab977 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -1482,6 +1482,7 @@ static int filelist(const char *path, const char *ext, uint8_t last, bool tentat char tmp_fullpath[1024] = {0}; strncat(tmp_fullpath, path, sizeof(tmp_fullpath) - 1); + tmp_fullpath[1023] = 0x00; strncat(tmp_fullpath, namelist[i]->d_name, strlen(tmp_fullpath) - 1); if (is_directory(tmp_fullpath)) { From 131ffbcb6ad3bffd74db1c36d1e7e19f52fffec1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 9 Sep 2020 17:33:03 +0200 Subject: [PATCH 06/92] trace list 15 - now prints block for write /read annotations better --- client/src/cmdhflist.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index d898e9ab9..dff2b6345 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -442,13 +442,19 @@ void annotateIso15693(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) { uint8_t block = 0; if (cmdsize == 13) block = cmd[10]; + else if (cmdsize == 5) + block = cmd[2]; snprintf(exp, size, "READBLOCK(%d)", block); return; } - case ISO15693_WRITEBLOCK: - snprintf(exp, size, "WRITEBLOCK"); + case ISO15693_WRITEBLOCK: { + uint8_t block = 0; + if (cmdsize == 9) + block = cmd[2]; + snprintf(exp, size, "WRITEBLOCK(%d)", block); return; + } case ISO15693_LOCKBLOCK: snprintf(exp, size, "LOCKBLOCK"); return; From a785d7ea77c2fa45b8fdb24d4a7bf6b43cbc4784 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 9 Sep 2020 17:38:15 +0200 Subject: [PATCH 07/92] typo --- client/luascripts/mfu_magic.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/luascripts/mfu_magic.lua b/client/luascripts/mfu_magic.lua index d921a9fb2..5b817fe93 100644 --- a/client/luascripts/mfu_magic.lua +++ b/client/luascripts/mfu_magic.lua @@ -191,7 +191,7 @@ local function read_config() end print('Magic NTAG 21* Configuration') - print(' - Type ', typestr, '(geniune cardtype)') + print(' - Type ', typestr, '(genuine cardtype)') print(' - Password', pwd) print(' - Pack ', pack) print(' - Version ', version) From 420b29c7bf1b73051863e4ef446491b49cf954f7 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 00:05:50 +0200 Subject: [PATCH 08/92] hf 14a sim t 10 - possibility to simulate IKEA rothult locks --- armsrc/iso14443a.c | 288 ++++++++++++++++++++++++------------------ client/src/cmdhf14a.c | 1 + 2 files changed, 169 insertions(+), 120 deletions(-) diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index 061dfe9ae..792d73400 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -899,13 +899,15 @@ bool GetIso14443aCommandFromReader(uint8_t *received, uint8_t *par, int *len) { uint16_t check = 0; for (;;) { - if (check == 1000) { - if (BUTTON_PRESS() || data_available()) + if (check == 4000) { +// if (BUTTON_PRESS() || data_available()) + if (BUTTON_PRESS()) return false; + check = 0; + WDT_HIT(); } ++check; - WDT_HIT(); if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) { b = (uint8_t)AT91C_BASE_SSC->SSC_RHR; @@ -981,11 +983,15 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i // Prepare the optional second SAK (for 7 byte UID), drop the cascade bit static uint8_t rSAKc2[3] = { 0x00 }; // dummy ATS (pseudo-ATR), answer to RATS - static uint8_t rRATS[] = { 0x04, 0x58, 0x80, 0x02, 0x00, 0x00 }; +// static uint8_t rRATS[] = { 0x04, 0x58, 0x80, 0x02, 0x00, 0x00 }; + static uint8_t rRATS[] = { 0x05, 0x75, 0x80, 0x60, 0x02, 0x00, 0x00 }; + // GET_VERSION response for EV1/NTAG static uint8_t rVERSION[10] = { 0x00 }; // READ_SIG response for EV1/NTAG static uint8_t rSIGN[34] = { 0x00 }; + // PPS respoonse + static uint8_t rPPS[3] = { 0xD0 }; switch (tagType) { case 1: { // MIFARE Classic 1k @@ -1059,12 +1065,19 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i sak = 0x18; } break; - case 9 : { // FM11RF005SH (Shanghai Metro) + case 9: { // FM11RF005SH (Shanghai Metro) rATQA[0] = 0x03; rATQA[1] = 0x00; sak = 0x0A; } break; + case 10: { // JCOP31/41 Rothult + rATQA[0] = 0x42; + rATQA[1] = 0x00; + sak = 0x00; + } + break; + default: { if (DBGLEVEL >= DBG_ERROR) Dbprintf("Error: unknown tagtype (%d)", tagType); return false; @@ -1115,13 +1128,20 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i return false; } - // Calculate the BitCountCheck (BCC) for the first 4 bytes of the UID. + // Calculate BCC for the first 4 bytes of the UID. rUIDc1[4] = rUIDc1[0] ^ rUIDc1[1] ^ rUIDc1[2] ^ rUIDc1[3]; - rSAKc1[0] = sak; - AddCrc14A(rSAKc1, sizeof(rSAKc1) - 2); + + if (tagType == 10) { + rSAKc1[0] = 0x04; + rSAKc2[0] = 0x20; + } else { + rSAKc1[0] = sak; + rSAKc2[0] = sak & 0xFB; + } - rSAKc2[0] = sak & 0xFB; + // crc + AddCrc14A(rSAKc1, sizeof(rSAKc1) - 2); AddCrc14A(rSAKc2, sizeof(rSAKc2) - 2); // Format byte = 0x58: FSCI=0x08 (FSC=256), TA(1) and TC(1) present, @@ -1130,22 +1150,26 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i // TC(1) = 0x02: CID supported, NAD not supported AddCrc14A(rRATS, sizeof(rRATS) - 2); -#define TAG_RESPONSE_COUNT 8 + AddCrc14A(rPPS, sizeof(rPPS) - 2); + +#define TAG_RESPONSE_COUNT 9 static tag_response_info_t responses_init[TAG_RESPONSE_COUNT] = { - { .response = rATQA, .response_n = sizeof(rATQA) }, // Answer to request - respond with card type - { .response = rUIDc1, .response_n = sizeof(rUIDc1) }, // Anticollision cascade1 - respond with uid - { .response = rUIDc2, .response_n = sizeof(rUIDc2) }, // Anticollision cascade2 - respond with 2nd half of uid if asked - { .response = rSAKc1, .response_n = sizeof(rSAKc1) }, // Acknowledge select - cascade 1 - { .response = rSAKc2, .response_n = sizeof(rSAKc2) }, // Acknowledge select - cascade 2 - { .response = rRATS, .response_n = sizeof(rRATS) }, // dummy ATS (pseudo-ATR), answer to RATS - { .response = rVERSION, .response_n = sizeof(rVERSION) }, // EV1/NTAG GET_VERSION response - { .response = rSIGN, .response_n = sizeof(rSIGN) } // EV1/NTAG READ_SIG response + { .response = rATQA, .response_n = sizeof(rATQA) }, // Answer to request - respond with card type + { .response = rUIDc1, .response_n = sizeof(rUIDc1) }, // Anticollision cascade1 - respond with uid + { .response = rUIDc2, .response_n = sizeof(rUIDc2) }, // Anticollision cascade2 - respond with 2nd half of uid if asked + { .response = rSAKc1, .response_n = sizeof(rSAKc1) }, // Acknowledge select - cascade 1 + { .response = rSAKc2, .response_n = sizeof(rSAKc2) }, // Acknowledge select - cascade 2 + { .response = rRATS, .response_n = sizeof(rRATS) }, // dummy ATS (pseudo-ATR), answer to RATS + { .response = rVERSION, .response_n = sizeof(rVERSION) }, // EV1/NTAG GET_VERSION response + { .response = rSIGN, .response_n = sizeof(rSIGN) }, // EV1/NTAG READ_SIG response + { .response = rPPS, .response_n = sizeof(rPPS) } // PPS response }; - // "precompile" responses. There are 8 predefined responses with a total of 68 bytes data to transmit. + // "precompile" responses. There are 9 predefined responses with a total of 72 bytes data to transmit. // Coded responses need one byte per bit to transfer (data, parity, start, stop, correction) - // 68 * 8 data bits, 68 * 1 parity bits, 8 start bits, 8 stop bits, 8 correction bits -- 636 bytes buffer -#define ALLOCATED_TAG_MODULATION_BUFFER_SIZE 636 + // 72 * 8 data bits, 72 * 1 parity bits, 9 start bits, 9 stop bits, 9 correction bits -- 677 bytes buffer +#define ALLOCATED_TAG_MODULATION_BUFFER_SIZE 675 +// 576 + 72 + 9 + 9 + 9 == 675 uint8_t *free_buffer = BigBuf_malloc(ALLOCATED_TAG_MODULATION_BUFFER_SIZE); // modulation buffer pointer and current buffer free space size @@ -1173,7 +1197,7 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i #define RATS 5 #define VERSION 6 #define SIGNATURE 7 - +#define PPS 8 return true; } @@ -1232,6 +1256,8 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { // We need to listen to the high-frequency, peak-detected path. iso14443a_setup(FPGA_HF_ISO14443A_TAGSIM_LISTEN); + iso14a_set_timeout(201400); // 106 * 19ms default + int len = 0; // To control where we are in the protocol @@ -1246,8 +1272,8 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { #define ORDER_SELECT_CL2 30 #define ORDER_EV1_COMP_WRITE 40 #define ORDER_RATS 70 - uint8_t order = ORDER_NONE; + uint8_t order = ORDER_NONE; int retval = PM3_SUCCESS; // Just to allow some checks @@ -1257,28 +1283,27 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { // compatible write block number uint8_t wrblock = 0; + + bool odd_reply = true; clear_trace(); set_tracing(true); LED_A_ON(); + + // main loop for (;;) { WDT_HIT(); + tag_response_info_t *p_response = NULL; + // Clean receive command buffer - if (!GetIso14443aCommandFromReader(receivedCmd, receivedCmdPar, &len)) { - Dbprintf("Emulator stopped. Trace length: %d ", BigBuf_get_traceLen()); + if (GetIso14443aCommandFromReader(receivedCmd, receivedCmdPar, &len) == false) { + Dbprintf("Emulator stopped. Trace length: %d ", BigBuf_get_traceLen()); retval = PM3_EOPABORTED; break; } - tag_response_info_t *p_response = NULL; - // Okay, look at the command now. - int lastorder = order; - - // // we need to check "ordered" states before, because received data may be same to any command - is wrong!!! - // - if (order == ORDER_EV1_COMP_WRITE && len == 18) { // MIFARE_ULC_COMP_WRITE part 2 // 16 bytes data + 2 bytes crc, only least significant 4 bytes are written @@ -1361,28 +1386,22 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { order = ORDER_NONE; // back to work state p_response = NULL; - // - // now check commands in received buffer - // - - } else if (receivedCmd[0] == ISO14443A_CMD_REQA && len == 1) { // Received a REQUEST - p_response = &responses[ATQA]; - order = ORDER_REQA; + } else if (receivedCmd[0] == ISO14443A_CMD_REQA && len == 1) { // Received a REQUEST, but in HALTED, skip + odd_reply = !odd_reply; + if (odd_reply) + p_response = &responses[ATQA]; } else if (receivedCmd[0] == ISO14443A_CMD_WUPA && len == 1) { // Received a WAKEUP p_response = &responses[ATQA]; - order = ORDER_WUPA; } else if (receivedCmd[1] == 0x20 && receivedCmd[0] == ISO14443A_CMD_ANTICOLL_OR_SELECT && len == 2) { // Received request for UID (cascade 1) p_response = &responses[UIDC1]; - order = ORDER_SELECT_ALL_CL1; } else if (receivedCmd[1] == 0x20 && receivedCmd[0] == ISO14443A_CMD_ANTICOLL_OR_SELECT_2 && len == 2) { // Received request for UID (cascade 2) p_response = &responses[UIDC2]; - order = ORDER_SELECT_ALL_CL2; } else if (receivedCmd[1] == 0x70 && receivedCmd[0] == ISO14443A_CMD_ANTICOLL_OR_SELECT && len == 9) { // Received a SELECT (cascade 1) p_response = &responses[SAKC1]; - order = ORDER_SELECT_CL1; } else if (receivedCmd[1] == 0x70 && receivedCmd[0] == ISO14443A_CMD_ANTICOLL_OR_SELECT_2 && len == 9) { // Received a SELECT (cascade 2) p_response = &responses[SAKC2]; - order = ORDER_SELECT_CL2; + } else if (receivedCmd[0] == ISO14443A_CMD_PPS) { + p_response = &responses[PPS]; } else if (receivedCmd[0] == ISO14443A_CMD_READBLOCK && len == 4) { // Received a (plain) READ uint8_t block = receivedCmd[1]; // if Ultralight or NTAG (4 byte blocks) @@ -1410,8 +1429,6 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { emlGetMemBt(emdata, block, 16); AddCrc14A(emdata, 16); EmSendCmd(emdata, sizeof(emdata)); - // EmSendCmd(data+(4*receivedCmd[1]),16); - // Dbprintf("Read request from reader: %x %x",receivedCmd[0],receivedCmd[1]); // We already responded, do not send anything with the EmSendCmd14443aRaw() that is called below p_response = NULL; } @@ -1433,8 +1450,7 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { p_response = NULL; } else if (receivedCmd[0] == MIFARE_ULC_WRITE && len == 8 && (tagType == 2 || tagType == 7)) { // Received a WRITE // cmd + block + 4 bytes data + 2 bytes crc - bool isCrcCorrect = CheckCrc14A(receivedCmd, len); - if (isCrcCorrect) { + if (CheckCrc14A(receivedCmd, len)) { uint8_t block = receivedCmd[1]; if (block > pages) { // send NACK 0x0 == invalid argument @@ -1452,8 +1468,7 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { p_response = NULL; } else if (receivedCmd[0] == MIFARE_ULC_COMP_WRITE && len == 4 && (tagType == 2 || tagType == 7)) { // cmd + block + 2 bytes crc - bool isCrcCorrect = CheckCrc14A(receivedCmd, len); - if (isCrcCorrect) { + if (CheckCrc14A(receivedCmd, len)) { wrblock = receivedCmd[1]; if (wrblock > pages) { // send NACK 0x0 == invalid argument @@ -1538,7 +1553,6 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { p_response = NULL; } else { p_response = &responses[RATS]; - order = ORDER_RATS; } } else if (receivedCmd[0] == MIFARE_ULC_AUTH_1) { // ULC authentication, or Desfire Authentication LogTrace(receivedCmd, Uart.len, Uart.startTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.endTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.parity, true); @@ -1566,73 +1580,103 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { AddCrc14A(cmd, sizeof(cmd) - 2); EmSendCmd(cmd, sizeof(cmd)); p_response = NULL; + } else { - // Check for ISO 14443A-4 compliant commands, look at left nibble - switch (receivedCmd[0]) { - case 0x02: - case 0x03: { // IBlock (command no CID) + + // clear old dynamic responses + dynamic_response_info.response_n = 0; + dynamic_response_info.modulation_n = 0; + + // ST25TA512B IKEA Rothult + if (tagType == 10) { + // we replay 90 00 for all commands but the read bin and we deny the verify cmd. + + if (memcmp("\x02\xa2\xb0\x00\x00\x1d\x51\x69", receivedCmd, 8) == 0) { + dynamic_response_info.response[0] = receivedCmd[0]; + memcpy(dynamic_response_info.response + 1, "\x00\x1b\xd1\x01\x17\x54\x02\x7a\x68\xa2\x34\xcb\xd0\xe2\x03\xc7\x3e\x62\x0b\xe8\xc6\x3c\x85\x2c\xc5\x31\x31\x31\x32\x90\x00", 31); + dynamic_response_info.response_n = 32; + } else if (memcmp("\x02\x00\x20\x00\x01\x00\x6e\xa9", receivedCmd, 8) == 0) { + dynamic_response_info.response[0] = receivedCmd[0]; + dynamic_response_info.response[1] = 0x63; + dynamic_response_info.response[2] = 0x00; + dynamic_response_info.response_n = 3; + } else { dynamic_response_info.response[0] = receivedCmd[0]; dynamic_response_info.response[1] = 0x90; dynamic_response_info.response[2] = 0x00; dynamic_response_info.response_n = 3; } - break; - case 0x0B: - case 0x0A: { // IBlock (command CID) - dynamic_response_info.response[0] = receivedCmd[0]; - dynamic_response_info.response[1] = 0x00; - dynamic_response_info.response[2] = 0x90; - dynamic_response_info.response[3] = 0x00; - dynamic_response_info.response_n = 4; - } - break; + } else { - case 0x1A: - case 0x1B: { // Chaining command - dynamic_response_info.response[0] = 0xaa | ((receivedCmd[0]) & 1); - dynamic_response_info.response_n = 2; - } - break; - - case 0xAA: - case 0xBB: { - dynamic_response_info.response[0] = receivedCmd[0] ^ 0x11; - dynamic_response_info.response_n = 2; - } - break; - - case 0xBA: { // ping / pong - dynamic_response_info.response[0] = 0xAB; - dynamic_response_info.response[1] = 0x00; - dynamic_response_info.response_n = 2; - } - break; - - case 0xCA: - case 0xC2: { // Readers sends deselect command - dynamic_response_info.response[0] = 0xCA; - dynamic_response_info.response[1] = 0x00; - dynamic_response_info.response_n = 2; - } - break; - - default: { - // Never seen this command before - LogTrace(receivedCmd, Uart.len, Uart.startTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.endTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.parity, true); - if (DBGLEVEL >= DBG_DEBUG) { - Dbprintf("Received unknown command (len=%d):", len); - Dbhexdump(len, receivedCmd, false); + // Check for ISO 14443A-4 compliant commands, look at left nibble + switch (receivedCmd[0]) { + case 0x02: + case 0x03: { // IBlock (command no CID) + dynamic_response_info.response[0] = receivedCmd[0]; + dynamic_response_info.response[1] = 0x90; + dynamic_response_info.response[2] = 0x00; + dynamic_response_info.response_n = 3; } - // Do not respond - dynamic_response_info.response_n = 0; - order = ORDER_NONE; // back to work state - } - break; - } + break; + case 0x0B: + case 0x0A: { // IBlock (command CID) + dynamic_response_info.response[0] = receivedCmd[0]; + dynamic_response_info.response[1] = 0x00; + dynamic_response_info.response[2] = 0x90; + dynamic_response_info.response[3] = 0x00; + dynamic_response_info.response_n = 4; + } + break; + case 0x1A: + case 0x1B: { // Chaining command + dynamic_response_info.response[0] = 0xaa | ((receivedCmd[0]) & 1); + dynamic_response_info.response_n = 2; + } + break; + + case 0xAA: + case 0xBB: { + dynamic_response_info.response[0] = receivedCmd[0] ^ 0x11; + dynamic_response_info.response_n = 2; + } + break; + + case 0xBA: { // ping / pong + dynamic_response_info.response[0] = 0xAB; + dynamic_response_info.response[1] = 0x00; + dynamic_response_info.response_n = 2; + } + break; + + case 0xCA: + case 0xC2: { // Readers sends deselect command + dynamic_response_info.response[0] = 0xCA; + dynamic_response_info.response[1] = 0x00; + dynamic_response_info.response_n = 2; + } + break; + + default: { + // Never seen this command before + LogTrace(receivedCmd, Uart.len, Uart.startTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.endTime * 16 - DELAY_AIR2ARM_AS_TAG, Uart.parity, true); + if (DBGLEVEL >= DBG_DEBUG) { + Dbprintf("Received unknown command (len=%d):", len); + Dbhexdump(len, receivedCmd, false); + } + // Do not respond + dynamic_response_info.response_n = 0; + order = ORDER_NONE; // back to work state + } + break; + } + + } if (dynamic_response_info.response_n > 0) { + // Copy the CID from the reader query - dynamic_response_info.response[1] = receivedCmd[1]; + if (tagType != 10) + dynamic_response_info.response[1] = receivedCmd[1]; // Add CRC bytes, always used in ISO 14443A-4 compliant cards AddCrc14A(dynamic_response_info.response, dynamic_response_info.response_n); @@ -1648,16 +1692,15 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { } // Count number of wakeups received after a halt - if (order == ORDER_WUPA && lastorder == ORDER_HALTED) { happened++; } +// if (order == ORDER_WUPA && lastorder == ORDER_HALTED) { happened++; } // Count number of other messages after a halt - if (order != ORDER_WUPA && lastorder == ORDER_HALTED) { happened2++; } +// if (order != ORDER_WUPA && lastorder == ORDER_HALTED) { happened2++; } cmdsRecvd++; - if (p_response != NULL) { - EmSendPrecompiledCmd(p_response); - } + // Send response + EmSendPrecompiledCmd(p_response); } switch_off(); @@ -1958,7 +2001,7 @@ int EmSendCmd14443aRaw(uint8_t *resp, uint16_t respLen) { volatile uint8_t b; uint16_t i = 0; uint32_t ThisTransferTime; - bool correctionNeeded; + bool correction_needed; // Modulate Manchester FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | FPGA_HF_ISO14443A_TAGSIM_MOD); @@ -1966,21 +2009,23 @@ int EmSendCmd14443aRaw(uint8_t *resp, uint16_t respLen) { // Include correction bit if necessary if (Uart.bitCount == 7) { // Short tags (7 bits) don't have parity, determine the correct value from MSB - correctionNeeded = Uart.output[0] & 0x40; + correction_needed = Uart.output[0] & 0x40; } else { // The parity bits are left-aligned - correctionNeeded = Uart.parity[(Uart.len - 1) / 8] & (0x80 >> ((Uart.len - 1) & 7)); + correction_needed = Uart.parity[(Uart.len - 1) / 8] & (0x80 >> ((Uart.len - 1) & 7)); } // 1236, so correction bit needed - i = (correctionNeeded) ? 0 : 1; + i = (correction_needed) ? 0 : 1; // clear receiving shift register and holding register while (!(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY)); b = AT91C_BASE_SSC->SSC_RHR; (void) b; - while (!(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY)); - b = AT91C_BASE_SSC->SSC_RHR; +/* + while (!(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_TXRDY)); + b = AT91C_BASE_SSC->SSC_THR; (void) b; +*/ // wait for the FPGA to signal fdt_indicator == 1 (the FPGA is ready to queue new data in its delay line) for (uint8_t j = 0; j < 5; j++) { // allow timeout - better late than never @@ -2000,22 +2045,24 @@ int EmSendCmd14443aRaw(uint8_t *resp, uint16_t respLen) { FpgaSendQueueDelay = (uint8_t)AT91C_BASE_SSC->SSC_RHR; } +/* if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) { b = (uint16_t)(AT91C_BASE_SSC->SSC_RHR); (void)b; } + */ } // Ensure that the FPGA Delay Queue is empty before we switch to TAGSIM_LISTEN again: uint8_t fpga_queued_bits = FpgaSendQueueDelay >> 3; - for (i = 0; i <= fpga_queued_bits / 8 + 1;) { + for (i = 0; i <= (fpga_queued_bits >> 3) + 1;) { if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) { AT91C_BASE_SSC->SSC_THR = SEC_F; FpgaSendQueueDelay = (uint8_t)AT91C_BASE_SSC->SSC_RHR; i++; } } - LastTimeProxToAirStart = ThisTransferTime + (correctionNeeded ? 8 : 0); + LastTimeProxToAirStart = ThisTransferTime + (correction_needed ? 8 : 0); return 0; } @@ -2069,6 +2116,7 @@ int EmSendCmdEx(uint8_t *resp, uint16_t respLen, bool collision) { } int EmSendPrecompiledCmd(tag_response_info_t *p_response) { + if (p_response == NULL) return 0; int ret = EmSendCmd14443aRaw(p_response->modulation, p_response->modulation_n); // do the tracing for the previous reader request and this tag answer: uint8_t par[MAX_PARITY_SIZE] = {0x00}; diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 4a53ef021..f8fc02f8f 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -201,6 +201,7 @@ static int usage_hf_14a_sim(void) { PrintAndLogEx(NORMAL, " 7 = AMIIBO (NTAG 215), pack 0x8080"); PrintAndLogEx(NORMAL, " 8 = MIFARE Classic 4k"); PrintAndLogEx(NORMAL, " 9 = FM11RF005SH Shanghai Metro"); + PrintAndLogEx(NORMAL, " 10 = JCOP 31/41 Rothult"); // PrintAndLogEx(NORMAL, " u : 4, 7 or 10 byte UID"); PrintAndLogEx(NORMAL, " u : 4, 7 byte UID"); PrintAndLogEx(NORMAL, " x : (Optional) Performs the 'reader attack', nr/ar attack against a reader"); From 945b9196fe122f8deb51ca32a38502a74e87a251 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 00:14:08 +0200 Subject: [PATCH 09/92] magic_cards_notes --- doc/magic_cards_notes.md | 448 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 448 insertions(+) create mode 100644 doc/magic_cards_notes.md diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md new file mode 100644 index 000000000..7d515598e --- /dev/null +++ b/doc/magic_cards_notes.md @@ -0,0 +1,448 @@ +This document is based mostly on information posted on http://www.proxmark.org/forum/viewtopic.php?pid=35372#p35372 + +- [MIFARE Classic](#mifare-classic) + * [MIFARE Classic block0](#mifare-classic-block0) + * [MIFARE Classic Gen1A aka UID](#mifare-classic-gen1a-aka-uid) + * [MIFARE Classic Gen1B](#mifare-classic-gen1b) + * [MIFARE Classic Gen2 aka CUID](#mifare-classic-gen2-aka-cuid) + * [MIFARE Classic Gen2, FUID version](#mifare-classic-gen2--fuid-version) + * [MIFARE Classic Gen2, UFUID version](#mifare-classic-gen2--ufuid-version) + * [MIFARE Classic, other versions](#mifare-classic--other-versions) + * [MIFARE Classic Gen3](#mifare-classic-gen3) + * [MIFARE Classic Super](#mifare-classic-super) +- [MIFARE Ultralight](#mifare-ultralight) + * [MIFARE Ultralight blocks 0..2](#mifare-ultralight-blocks-02) + * [MIFARE Ultralight Gen1A](#mifare-ultralight-gen1a) + * [MIFARE Ultralight Gen2](#mifare-ultralight-gen2) + * [MIFARE Ultralight EV1 Gen2](#mifare-ultralight-ev1-gen2) + * [MIFARE Ultralight C Gen1A](#mifare-ultralight-c-gen1a) + * [MIFARE Ultralight C Gen2](#mifare-ultralight-c-gen2) +- [NTAG](#ntag) + * [NTAG213 Gen2](#ntag213-gen2) + * [NTAG21x](#ntag21x) +- [DESFire](#desfire) + * [DESFire "Gen3", 7b UID](#desfire--gen3---7b-uid) + * [DESFire "Gen3", 4b UID](#desfire--gen3---4b-uid) +- [ISO14443B](#iso14443b) + * [ISO14443B magic](#iso14443b-magic) +- [ISO15693](#iso15693) + * [ISO15693 magic](#iso15693-magic) + + +# MIFARE Classic + +Referred as M1, S50 (1k), S70 (4k) + +## MIFARE Classic block0 + +UID 4b: + +``` +11223344440804006263646566676869 +^^^^^^^^ UID + ^^ BCC + ^^ SAK(*) + ^^^^ ATQA + ^^^^^^^^^^^^^^^^ Manufacturer data +(*) some cards have on purpose a different SAK in their anticollision and in block0 +``` + + +Computing BCC on UID 11223344: `hf analyse lcr 11223344` = `44` + +UID 7b: + +**todo** + +## MIFARE Classic Gen1A aka UID + +### Magic commands + +raw commands 40/41/43 + +**TODO** details, differences in global wipe command? + +### Characteristics + +* UID: Only 4b versions +* ATQA: + * all(?) cards play blindly the block0 ATQA bytes +* SAK: + * some cards play blindly the block0 SAK byte + * some cards use a fix "08" in anticollision, no matter the block0 +* BCC: +* ATS: + +### Proxmark3 commands + +``` +hf mf csetuid +hf mf cwipe +hf mf csetblk +hf mf cgetblk +hf mf cgetsc +hf mf cload +hf mf csave +hf mf cview +``` + +When "soft-bricked" (by writing invalid data in block0), these ones may help: + +``` +hf 14a config h +script run remagic +``` + +## MIFARE Classic Gen1B + +Similar to Gen1A, but supports only commands 40/43 + +## MIFARE Classic Gen2 aka CUID + +### Magic commands + +Android compatible + +* issue regular write to block0 + +### Characteristics + +* UID: 4b and 7b versions +* ATQA: +* SAK: +* BCC: +* ATS: + +**todo** + +* some card will die if invalid block0! (or can be recovered with anticol...? "hf 14a config a 1 b 1 ..." then "hf mf wrbl 0 ...") +* some card have always correct anticol no matter block0, e.g. ATS=0948009102DABC1910F005 + +### Proxmark3 commands + +``` +hf mf wrbl 0 A FFFFFFFFFFFF 11223344440804006263646566676869 +``` + +When "soft-bricked" (by writing invalid data in block0), these ones may help: + +``` +hf 14a config h +``` + +e.g. for 4b UID: + +``` +hf 14a config a 1 b 2 2 2 3 2 r 2 +hf mf wrbl 0 A FFFFFFFFFFFF 11223344440804006263646566676869 +hf 14a config a 0 b 0 2 0 3 0 r 0 +``` +## MIFARE Classic Gen2, FUID version + +Same as MIFARE Classic Gen2, but block0 can be written only once. + +Initial UID is AA55C396 + +## MIFARE Classic Gen2, UFUID version + +Same as MIFARE Classic Gen2, but block0 can be locked with special command. + +### Proxmark3 commands + +To lock definitively block0: +``` +hf 14a raw -a -p -b 7 40 +hf 14a raw -p 43 +hf 14a raw -p -c e000 +hf 14a raw -c 85000000000000000000000000000008 +``` + +## MIFARE Classic, other versions + +**todo** ZXUID, EUID, ICUID ? + +Some cards exhibit a specific SAK=28 ?? + +## MIFARE Classic Gen3 + +### Magic commands + +Android compatible + +* issue special APDUs + +``` +cla ins p1 p2 len + 90 F0 CC CC 10 - write block 0 + 90 FB CC CC 07 - write uid separated instead of block 0 + 90 FD 11 11 00 - lock uid permanently +``` + +### Characteristics + +* UID: 4b and 7b versions +* ATQA: +* SAK: +* BCC: +* ATS: + +### Proxmark3 commands + +``` +# change just UID: +hf mf gen3uid +# write block0: +hf mf gen3blk +# lock block0 forever: +hf mf gen3freez +``` +See also +``` +script run mfc_gen3_writer -h +``` + +Equivalent: +``` +# change just UID: +hf 14a raw -s -c -t 2000 90FBCCCC07 11223344556677 +# write block0: +hf 14a raw -s -c -t 2000 90F0CCCC10 041219c3219316984200e32000000000 +# lock block0 forever: +hf 14a raw -s -c 90fd11100 +``` + +## MIFARE Classic Super + +It behaves like Gen2 but records reader auth attempts. + +To change UID: same commands as for MFC Gen2 + +To do reader-only attack: at least two versions exist. + +* https://github.com/nfc-tools/nfc-supercard for card with ATS: 0978009102DABC1910F005 +* https://github.com/netscylla/super-card/blob/master/libnfc-1.7.1/utils/nfc-super.c for ?? + +# MIFARE Ultralight + +## MIFARE Ultralight blocks 0..2 + +``` +SN0 SN1 SN2 BCC0 +SN3 SN4 SN5 SN6 +BCC1 Int LCK0 LCK1 +``` + +UID is made of SN0..SN6 bytes + +Computing BCC0 on UID 04112233445566: `analyse lcr 88041122` = `bf` + +Computing BCC1 on UID 04112233445566: `analyse lcr 33445566` = `44` + +Int is internal, typically 0x48 + +## MIFARE Ultralight Gen1A + +### Characteristics + +#### Magic commands + +**todo** + +#### UID + +Only 7b versions + +#### SAK, ATQA, BCC, ATS + +**TODO** need more tests + +### Proxmark3 commands + +``` +script run ul_uid -h +``` + +When "soft-bricked" (by writing invalid data in block0), these ones may help: + +``` +hf 14a config h +script run remagic -u +``` + +## MIFARE Ultralight Gen2 + +### Characteristics + +#### Magic commands + +**todo** + +#### UID + +Only 7b versions + +#### SAK, ATQA, BCC, ATS + +Some fix their BCC in anticol, some don't, be careful! + +**TODO** need more tests + +### Proxmark3 commands + +``` +hf mfu setuid +``` + +Equivalent: don't use `hf mfu wrbl` as you need to write three blocks in a row, but do, with proper BCCx: + +``` +hf 14a raw -s -c -p a2 00 041122bf +hf 14a raw -c -p a2 01 33445566 +hf 14a raw -c a2 02 44480000 +``` + +When "soft-bricked" (by writing invalid data in block0), these ones may help: + +``` +hf 14a config h +``` + +## MIFARE Ultralight EV1 Gen2 + +Same commands as for MFUL Gen2 + +## MIFARE Ultralight C Gen1A + +Same commands as for MFUL Gen1A + +## MIFARE Ultralight C Gen2 + +Same commands as for MFUL Gen2 + +# NTAG + +## NTAG213 Gen2 + +Same commands as for MFUL Gen2 + +## NTAG21x + +### Characteristics + +Emulates fully NTAG213, 213F, 215, 216, 216F + +Emulates partially UL EV1 48k/128k, NTAG210, NTAG212, NTAGI2C 1K/2K, NTAGI2C 1K/2K PLUS + +### Proxmark3 commands + +``` +script run mfu_magic -h +``` + +# DESFire + +## DESFire "Gen3", 7b UID + +### Magic commands + +Android compatible + +* issue special APDUs + +### Characteristics + +* ATQA: 0344 +* SAK: 20 +* ATS: 0675338102005110 or 06757781028002F0 + +Only mimics DESFire anticollision (but wrong ATS), no further DESFire support + +### Proxmark commands + +UID 04112233445566 +``` +hf 14a raw -s -c 0200ab00000704112233445566 +``` +or equivalently +``` +hf 14a apdu -s 00ab00000704112233445566 +``` + +### pn53x-tamashell commands + +``` +4a0100 +420200ab00000704112233445566 +``` +## DESFire "Gen3", 4b UID + +### Magic commands + +Android compatible + +* issue special APDUs + +### Characteristics + +* ATQA: 0008 ??? This is not DESFire, 0008/20 doesn't match anything +* SAK: 20 +* ATS: 0675338102005110 or 06757781028002F0 + +Only mimics DESFire anticollision (but wrong ATS), no further DESFire support + +### Proxmark commands + +UID 04112233445566 +``` +hf 14a raw -s -c 0200ab00000411223344 +``` +or equivalently +``` +hf 14a apdu -s 00ab00000411223344 +``` + +It accepts longer UID but that doesn't affect BCC/ATQA/SAK + +### pn53x-tamashell commands +``` +4a0100 +420200ab00000411223344 +``` + +### Remarks + +The same effect (with better ATQA!) can be obtained with a MFC Gen1A that uses SAK defined in block0: + +``` +hf mf csetblk 0 1122334444204403A1A2A3A4A5A6A7A8 +hf 14a info +[+] UID: 11 22 33 44 +[+] ATQA: 03 44 +[+] SAK: 20 [1] +[+] Possible types: +[+] MIFARE DESFire MF3ICD40 +``` + +# ISO14443B + +## ISO14443B magic + +No such card is available. + +Some vendor allow to specify an ID (PUPI) when ordering a card. + +# ISO15693 + +## ISO15693 magic + +### Proxmark3 commands + +Always set a UID starting with `E0`. + +``` +hf 15 csetuid E011223344556677 +``` +or (ignore errors): +``` +script run iso15_magic -u E004013344556677 +``` From 014a3a4998a35b083fc769d35fdaaef11522ccaf Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 00:24:56 +0200 Subject: [PATCH 10/92] desfire supports 7 and 4 bytes --- armsrc/mifaredesfire.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/armsrc/mifaredesfire.c b/armsrc/mifaredesfire.c index d578d026b..31b338d39 100644 --- a/armsrc/mifaredesfire.c +++ b/armsrc/mifaredesfire.c @@ -148,13 +148,6 @@ void MifareDesfireGetInformation(void) { return; } - if (card.uidlen != 7) { - if (DBGLEVEL >= DBG_ERROR) Dbprintf("Wrong UID size. Expected 7byte got %d", card.uidlen); - payload.isOK = 2; // 2 == WRONG UID - reply_ng(CMD_HF_DESFIRE_INFO, PM3_ESOFT, (uint8_t *)&payload, sizeof(payload)); - switch_off(); - return; - } // add uid. memcpy(payload.uid, card.uid, sizeof(payload.uid)); From 2514ec740c9d377c1450f54653c806d4b5202e3a Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 00:33:46 +0200 Subject: [PATCH 11/92] uid 7 or 4 for desfire --- armsrc/mifaredesfire.c | 4 +++- client/src/cmdhfmfdes.c | 11 ++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/armsrc/mifaredesfire.c b/armsrc/mifaredesfire.c index 31b338d39..b6ca949c6 100644 --- a/armsrc/mifaredesfire.c +++ b/armsrc/mifaredesfire.c @@ -118,6 +118,7 @@ void MifareDesfireGetInformation(void) { struct p { uint8_t isOK; uint8_t uid[7]; + uint8_t uidlen; uint8_t versionHW[7]; uint8_t versionSW[7]; uint8_t details[14]; @@ -149,7 +150,8 @@ void MifareDesfireGetInformation(void) { } // add uid. - memcpy(payload.uid, card.uid, sizeof(payload.uid)); + memcpy(payload.uid, card.uid, card.uidlen); + payload.uidlen = card.uidlen; LED_A_ON(); uint8_t cmd[] = {0x90, MFDES_GET_VERSION, 0x00, 0x00, 0x00}; diff --git a/client/src/cmdhfmfdes.c b/client/src/cmdhfmfdes.c index a5ecf561b..e48e54958 100644 --- a/client/src/cmdhfmfdes.c +++ b/client/src/cmdhfmfdes.c @@ -1152,7 +1152,7 @@ static int mifare_desfire_change_key(uint8_t key_no, uint8_t *new_key, uint8_t n } // --- GET SIGNATURE -static int desfire_print_signature(uint8_t *uid, uint8_t *signature, size_t signature_len, nxp_cardtype_t card_type) { +static int desfire_print_signature(uint8_t *uid, uint8_t uidlen, uint8_t *signature, size_t signature_len, nxp_cardtype_t card_type) { (void)card_type; if (uid == NULL) { @@ -1185,7 +1185,7 @@ static int desfire_print_signature(uint8_t *uid, uint8_t *signature, size_t sign uint8_t key[PUBLIC_DESFIRE_ECDA_KEYLEN]; param_gethex_to_eol(nxp_desfire_public_keys[i].value, 0, key, PUBLIC_DESFIRE_ECDA_KEYLEN, &dl); - int res = ecdsa_signature_r_s_verify(MBEDTLS_ECP_DP_SECP224R1, key, uid, 7, signature, signature_len, false); + int res = ecdsa_signature_r_s_verify(MBEDTLS_ECP_DP_SECP224R1, key, uid, uidlen, signature, signature_len, false); is_valid = (res == 0); if (is_valid) break; @@ -3228,7 +3228,7 @@ static int CmdHF14ADesInfo(const char *Cmd) { SendCommandNG(CMD_HF_DESFIRE_INFO, NULL, 0); PacketResponseNG resp; - if (!WaitForResponseTimeout(CMD_HF_DESFIRE_INFO, &resp, 1500)) { + if (WaitForResponseTimeout(CMD_HF_DESFIRE_INFO, &resp, 1500) == false) { PrintAndLogEx(WARNING, "Command execute timeout"); DropField(); return PM3_ETIMEOUT; @@ -3237,6 +3237,7 @@ static int CmdHF14ADesInfo(const char *Cmd) { struct p { uint8_t isOK; uint8_t uid[7]; + uint8_t uidlen; uint8_t versionHW[7]; uint8_t versionSW[7]; uint8_t details[14]; @@ -3269,7 +3270,7 @@ static int CmdHF14ADesInfo(const char *Cmd) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Information") " ---------------------------"); PrintAndLogEx(INFO, "-------------------------------------------------------------"); - PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(package->uid, sizeof(package->uid))); + PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(package->uid, package->uidlen)); PrintAndLogEx(SUCCESS, " Batch number: " _GREEN_("%s"), sprint_hex(package->details + 7, 5)); PrintAndLogEx(SUCCESS, " Production date: week " _GREEN_("%02x") " / " _GREEN_("20%02x"), package->details[12], package->details[13]); PrintAndLogEx(NORMAL, ""); @@ -3319,7 +3320,7 @@ static int CmdHF14ADesInfo(const char *Cmd) { PrintAndLogEx(NORMAL, ""); PrintAndLogEx(INFO, "--- " _CYAN_("Tag Signature")); if (handler_desfire_signature(signature, &signature_len) == PM3_SUCCESS) { - desfire_print_signature(package->uid, signature, signature_len, cardtype); + desfire_print_signature(package->uid, package->uidlen, signature, signature_len, cardtype); } else { PrintAndLogEx(WARNING, "--- Card doesn't support GetSignature cmd"); } From c11c553c28d73f07b58b113347c7ed19df1fdbdd Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 00:36:13 +0200 Subject: [PATCH 12/92] add ref to new notes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ac155f993..507c1a6cc 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ |[Notes on frame format](/doc/new_frame_format.md)|[Notes on tracelog / wireshark](/doc/trace_notes.md)|[Notes on EMV](/doc/emv_notes.md)| |[Notes on external flash](/doc/ext_flash_notes.md)|[Notes on loclass](/doc/loclass_notes.md)|[Notes on Coverity Scan Config & Run](/doc/md/Development/Coverity-Scan-Config-%26-Run.md)| |[Notes on file formats used with Proxmark3](/doc/extensions_notes.md)|[Notes on MFU binary format](/doc/mfu_binary_format_notes.md)|[Notes on FPGA & ARM](/doc/fpga_arm_notes.md)| -|[Developing standalone mode](/armsrc/Standalone/readme.md)|[Wiki about standalone mode](https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode)|| +|[Developing standalone mode](/armsrc/Standalone/readme.md)|[Wiki about standalone mode](https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode)|[Notes on Magic cards](/doc/magic_cards_notes.txt)| |[Notes on Color usage](/doc/colors_notes.md)|[Makefile vs CMake](/doc/md/Development/Makefile-vs-CMake.md)| From cc20c8e90cb6c8ec1346df18afa34eb4db7fe3d9 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 00:37:48 +0200 Subject: [PATCH 13/92] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 507c1a6cc..076161cbe 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ |[Notes on frame format](/doc/new_frame_format.md)|[Notes on tracelog / wireshark](/doc/trace_notes.md)|[Notes on EMV](/doc/emv_notes.md)| |[Notes on external flash](/doc/ext_flash_notes.md)|[Notes on loclass](/doc/loclass_notes.md)|[Notes on Coverity Scan Config & Run](/doc/md/Development/Coverity-Scan-Config-%26-Run.md)| |[Notes on file formats used with Proxmark3](/doc/extensions_notes.md)|[Notes on MFU binary format](/doc/mfu_binary_format_notes.md)|[Notes on FPGA & ARM](/doc/fpga_arm_notes.md)| -|[Developing standalone mode](/armsrc/Standalone/readme.md)|[Wiki about standalone mode](https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode)|[Notes on Magic cards](/doc/magic_cards_notes.txt)| +|[Developing standalone mode](/armsrc/Standalone/readme.md)|[Wiki about standalone mode](https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode)|[Notes on Magic cards](/doc/magic_cards_notes.md)| |[Notes on Color usage](/doc/colors_notes.md)|[Makefile vs CMake](/doc/md/Development/Makefile-vs-CMake.md)| From b0f962ee4e218b5e7a0f745df5b5cc0e6d8bfa78 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 01:03:53 +0200 Subject: [PATCH 14/92] few renaming in magic cards... --- doc/magic_cards_notes.md | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 7d515598e..1344e40fb 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -4,25 +4,25 @@ This document is based mostly on information posted on http://www.proxmark.org/f * [MIFARE Classic block0](#mifare-classic-block0) * [MIFARE Classic Gen1A aka UID](#mifare-classic-gen1a-aka-uid) * [MIFARE Classic Gen1B](#mifare-classic-gen1b) - * [MIFARE Classic Gen2 aka CUID](#mifare-classic-gen2-aka-cuid) - * [MIFARE Classic Gen2, FUID version](#mifare-classic-gen2--fuid-version) - * [MIFARE Classic Gen2, UFUID version](#mifare-classic-gen2--ufuid-version) + * [MIFARE Classic DirectWrite aka Gen2 aka CUID](#mifare-classic-directwrite-aka-gen2-aka-cuid) + * [MIFARE Classic DirectWrite, FUID version aka 1-write](#mifare-classic-directwrite--fuid-version-aka-1-write) + * [MIFARE Classic DirectWrite, UFUID version](#mifare-classic-directwrite--ufuid-version) * [MIFARE Classic, other versions](#mifare-classic--other-versions) - * [MIFARE Classic Gen3](#mifare-classic-gen3) + * [MIFARE Classic APDU](#mifare-classic-apdu) * [MIFARE Classic Super](#mifare-classic-super) - [MIFARE Ultralight](#mifare-ultralight) * [MIFARE Ultralight blocks 0..2](#mifare-ultralight-blocks-02) * [MIFARE Ultralight Gen1A](#mifare-ultralight-gen1a) - * [MIFARE Ultralight Gen2](#mifare-ultralight-gen2) - * [MIFARE Ultralight EV1 Gen2](#mifare-ultralight-ev1-gen2) + * [MIFARE Ultralight DirectWrite](#mifare-ultralight-directwrite) + * [MIFARE Ultralight EV1 DirectWrite](#mifare-ultralight-ev1-directwrite) * [MIFARE Ultralight C Gen1A](#mifare-ultralight-c-gen1a) - * [MIFARE Ultralight C Gen2](#mifare-ultralight-c-gen2) + * [MIFARE Ultralight C DirectWrite](#mifare-ultralight-c-directwrite) - [NTAG](#ntag) - * [NTAG213 Gen2](#ntag213-gen2) + * [NTAG213 DirectWrite](#ntag213-directwrite) * [NTAG21x](#ntag21x) - [DESFire](#desfire) - * [DESFire "Gen3", 7b UID](#desfire--gen3---7b-uid) - * [DESFire "Gen3", 4b UID](#desfire--gen3---4b-uid) + * ["DESFire" APDU, 7b UID](#-desfire--apdu--7b-uid) + * ["DESFire" APDU, 4b UID](#-desfire--apdu--4b-uid) - [ISO14443B](#iso14443b) * [ISO14443B magic](#iso14443b-magic) - [ISO15693](#iso15693) @@ -97,7 +97,7 @@ script run remagic Similar to Gen1A, but supports only commands 40/43 -## MIFARE Classic Gen2 aka CUID +## MIFARE Classic DirectWrite aka Gen2 aka CUID ### Magic commands @@ -137,15 +137,15 @@ hf 14a config a 1 b 2 2 2 3 2 r 2 hf mf wrbl 0 A FFFFFFFFFFFF 11223344440804006263646566676869 hf 14a config a 0 b 0 2 0 3 0 r 0 ``` -## MIFARE Classic Gen2, FUID version +## MIFARE Classic DirectWrite, FUID version aka 1-write -Same as MIFARE Classic Gen2, but block0 can be written only once. +Same as MIFARE Classic DirectWrite, but block0 can be written only once. Initial UID is AA55C396 -## MIFARE Classic Gen2, UFUID version +## MIFARE Classic DirectWrite, UFUID version -Same as MIFARE Classic Gen2, but block0 can be locked with special command. +Same as MIFARE Classic DirectWrite, but block0 can be locked with special command. ### Proxmark3 commands @@ -213,9 +213,9 @@ hf 14a raw -s -c 90fd11100 ## MIFARE Classic Super -It behaves like Gen2 but records reader auth attempts. +It behaves like DirectWrite but records reader auth attempts. -To change UID: same commands as for MFC Gen2 +To change UID: same commands as for MFC DirectWrite To do reader-only attack: at least two versions exist. @@ -269,7 +269,7 @@ hf 14a config h script run remagic -u ``` -## MIFARE Ultralight Gen2 +## MIFARE Ultralight DirectWrite ### Characteristics @@ -307,23 +307,23 @@ When "soft-bricked" (by writing invalid data in block0), these ones may help: hf 14a config h ``` -## MIFARE Ultralight EV1 Gen2 +## MIFARE Ultralight EV1 DirectWrite -Same commands as for MFUL Gen2 +Same commands as for MFUL DirectWrite ## MIFARE Ultralight C Gen1A Same commands as for MFUL Gen1A -## MIFARE Ultralight C Gen2 +## MIFARE Ultralight C DirectWrite -Same commands as for MFUL Gen2 +Same commands as for MFUL DirectWrite # NTAG -## NTAG213 Gen2 +## NTAG213 DirectWrite -Same commands as for MFUL Gen2 +Same commands as for MFUL DirectWrite ## NTAG21x @@ -341,7 +341,7 @@ script run mfu_magic -h # DESFire -## DESFire "Gen3", 7b UID +## "DESFire" APDU, 7b UID ### Magic commands @@ -374,7 +374,7 @@ hf 14a apdu -s 00ab00000704112233445566 4a0100 420200ab00000704112233445566 ``` -## DESFire "Gen3", 4b UID +## "DESFire" APDU, 4b UID ### Magic commands From b5810abda250557fddba9c1044b01fc116395bbb Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 01:06:18 +0200 Subject: [PATCH 15/92] few renaming in magic cards... --- doc/magic_cards_notes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 1344e40fb..4e6cca043 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -8,7 +8,7 @@ This document is based mostly on information posted on http://www.proxmark.org/f * [MIFARE Classic DirectWrite, FUID version aka 1-write](#mifare-classic-directwrite--fuid-version-aka-1-write) * [MIFARE Classic DirectWrite, UFUID version](#mifare-classic-directwrite--ufuid-version) * [MIFARE Classic, other versions](#mifare-classic--other-versions) - * [MIFARE Classic APDU](#mifare-classic-apdu) + * [MIFARE Classic APDU aka Gen3](#mifare-classic-apdu-aka-gen3) * [MIFARE Classic Super](#mifare-classic-super) - [MIFARE Ultralight](#mifare-ultralight) * [MIFARE Ultralight blocks 0..2](#mifare-ultralight-blocks-02) @@ -163,7 +163,7 @@ hf 14a raw -c 85000000000000000000000000000008 Some cards exhibit a specific SAK=28 ?? -## MIFARE Classic Gen3 +## MIFARE Classic APDU aka Gen3 ### Magic commands From cc2999d03b7c9d281af6f05aa12d77362fe9103b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 01:08:35 +0200 Subject: [PATCH 16/92] fix links --- doc/magic_cards_notes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 4e6cca043..18efca59d 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -5,9 +5,9 @@ This document is based mostly on information posted on http://www.proxmark.org/f * [MIFARE Classic Gen1A aka UID](#mifare-classic-gen1a-aka-uid) * [MIFARE Classic Gen1B](#mifare-classic-gen1b) * [MIFARE Classic DirectWrite aka Gen2 aka CUID](#mifare-classic-directwrite-aka-gen2-aka-cuid) - * [MIFARE Classic DirectWrite, FUID version aka 1-write](#mifare-classic-directwrite--fuid-version-aka-1-write) - * [MIFARE Classic DirectWrite, UFUID version](#mifare-classic-directwrite--ufuid-version) - * [MIFARE Classic, other versions](#mifare-classic--other-versions) + * [MIFARE Classic DirectWrite, FUID version aka 1-write](#mifare-classic-directwrite-fuid-version-aka-1-write) + * [MIFARE Classic DirectWrite, UFUID version](#mifare-classic-directwrite-ufuid-version) + * [MIFARE Classic, other versions](#mifare-classic-other-versions) * [MIFARE Classic APDU aka Gen3](#mifare-classic-apdu-aka-gen3) * [MIFARE Classic Super](#mifare-classic-super) - [MIFARE Ultralight](#mifare-ultralight) @@ -21,8 +21,8 @@ This document is based mostly on information posted on http://www.proxmark.org/f * [NTAG213 DirectWrite](#ntag213-directwrite) * [NTAG21x](#ntag21x) - [DESFire](#desfire) - * ["DESFire" APDU, 7b UID](#-desfire--apdu--7b-uid) - * ["DESFire" APDU, 4b UID](#-desfire--apdu--4b-uid) + * ["DESFire" APDU, 7b UID](#desfire-apdu-7b-uid) + * ["DESFire" APDU, 4b UID](#desfire-apdu-4b-uid) - [ISO14443B](#iso14443b) * [ISO14443B magic](#iso14443b-magic) - [ISO15693](#iso15693) From 9ced99a8533d5606a7ea57ed8e4a5d967d2a7b49 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 01:31:54 +0200 Subject: [PATCH 17/92] cident super card --- armsrc/mifarecmd.c | 9 +++++++++ client/src/mifare/mifarehost.c | 3 +++ include/protocols.h | 1 + 3 files changed, 13 insertions(+) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 6e500bc70..97e4bf42c 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2308,6 +2308,15 @@ void MifareCIdent(void) { isGen = MAGIC_GEN_2; goto OUT; } + + // super card ident + uint8_t super[] = {0x0A, 0x00, 0x00, 0xA6, 0xB0, 0x00, 0x10}; + ReaderTransmit(super, sizeof(super), NULL); + res = ReaderReceive(buf, par); + if (res == 22) { + isGen = MAGIC_SUPER; + goto OUT; + } }; OUT: diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index b33872cdc..65c51f177 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -1184,6 +1184,9 @@ int detect_classic_magic(void) { case MAGIC_GEN_UNFUSED: PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Write Once / FUID")); break; + case MAGIC_SUPER: + PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("super card")); + break; default: break; } diff --git a/include/protocols.h b/include/protocols.h index 62bb9f276..324d4b2fc 100644 --- a/include/protocols.h +++ b/include/protocols.h @@ -219,6 +219,7 @@ ISO 7816-4 Basic interindustry commands. For command APDU's. #define MAGIC_GEN_1B 2 #define MAGIC_GEN_2 4 #define MAGIC_GEN_UNFUSED 5 +#define MAGIC_SUPER 6 /** 06 00 = INITIATE 0E xx = SELECT ID (xx = Chip-ID) From eb353056dc47f5c6a301d77aa5927b5cbe24ac66 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 01:34:29 +0200 Subject: [PATCH 18/92] fix super --- armsrc/mifarecmd.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 97e4bf42c..d57bae7cf 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2277,6 +2277,16 @@ void MifareCIdent(void) { ReaderTransmit(rats, sizeof(rats), NULL); res = ReaderReceive(buf, par); if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) { + + // super card ident + uint8_t super[] = {0x0A, 0x00, 0x00, 0xA6, 0xB0, 0x00, 0x10}; + ReaderTransmit(super, sizeof(super), NULL); + res = ReaderReceive(buf, par); + if (res == 22) { + isGen = MAGIC_SUPER; + goto OUT; + } + isGen = MAGIC_GEN_2; goto OUT; } @@ -2308,15 +2318,8 @@ void MifareCIdent(void) { isGen = MAGIC_GEN_2; goto OUT; } - - // super card ident - uint8_t super[] = {0x0A, 0x00, 0x00, 0xA6, 0xB0, 0x00, 0x10}; - ReaderTransmit(super, sizeof(super), NULL); - res = ReaderReceive(buf, par); - if (res == 22) { - isGen = MAGIC_SUPER; - goto OUT; - } + + }; OUT: From 5689546ae0f5e601371efa2b840d87b1447350f2 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 01:40:50 +0200 Subject: [PATCH 19/92] fix super --- armsrc/mifarecmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index d57bae7cf..c1f3299b9 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2279,7 +2279,7 @@ void MifareCIdent(void) { if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) { // super card ident - uint8_t super[] = {0x0A, 0x00, 0x00, 0xA6, 0xB0, 0x00, 0x10}; + uint8_t super[] = {0x0A, 0x00, 0x00, 0xA6, 0xB0, 0x00, 0x10, 0x14, 0x1D}; ReaderTransmit(super, sizeof(super), NULL); res = ReaderReceive(buf, par); if (res == 22) { From 3221fb32a1a137c193af9bd1a3628b53b3c8fedb Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 11:44:32 +0200 Subject: [PATCH 20/92] fixes for 36b format --- client/src/cmdlfguard.c | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/client/src/cmdlfguard.c b/client/src/cmdlfguard.c index 12d39ac71..6bb566c0d 100644 --- a/client/src/cmdlfguard.c +++ b/client/src/cmdlfguard.c @@ -93,32 +93,35 @@ static int CmdGuardDemod(const char *Cmd) { return PM3_ESOFT; } - //got a good demod of 96 bits - uint8_t ByteStream[8] = {0x00}; + // got a good demod of 96 bits + + uint8_t plain[8] = {0x00}; uint8_t xorKey = 0; size_t startIdx = preambleIndex + 6; //start after 6 bit preamble - uint8_t bits_no_spacer[90]; - //so as to not mess with raw DemodBuffer copy to a new sample array + + // not mess with raw DemodBuffer copy to a new sample array memcpy(bits_no_spacer, DemodBuffer + startIdx, 90); + // remove the 18 (90/5=18) parity bits (down to 72 bits (96-6-18=72)) size_t len = removeParity(bits_no_spacer, 0, 5, 3, 90); //source, startloc, paritylen, ptype, length_to_run if (len != 72) { PrintAndLogEx(DEBUG, "DEBUG: Error - gProxII spacer removal did not produce 72 bits: %zu, start: %zu", len, startIdx); return PM3_ESOFT; } + // get key and then get all 8 bytes of payload decoded xorKey = (uint8_t)bytebits_to_byteLSBF(bits_no_spacer, 8); for (size_t idx = 0; idx < 8; idx++) { - ByteStream[idx] = ((uint8_t)bytebits_to_byteLSBF(bits_no_spacer + 8 + (idx * 8), 8)) ^ xorKey; - PrintAndLogEx(DEBUG, "DEBUG: gProxII byte %zu after xor: %02x", idx, ByteStream[idx]); + plain[idx] = ((uint8_t)bytebits_to_byteLSBF(bits_no_spacer + 8 + (idx * 8), 8)) ^ xorKey; + PrintAndLogEx(DEBUG, "DEBUG: gProxII byte %zu after xor: %02x", idx, plain[idx]); } setDemodBuff(DemodBuffer, 96, preambleIndex); setClockGrid(g_DemodClock, g_DemodStartIdx + (preambleIndex * g_DemodClock)); - //ByteStream contains 8 Bytes (64 bits) of decrypted raw tag data - uint8_t fmtLen = ByteStream[0] >> 2; + //plain contains 8 Bytes (64 bits) of decrypted raw tag data + uint8_t fmtLen = plain[0] >> 2; uint32_t FC = 0; uint32_t Card = 0; //get raw 96 bits to print @@ -128,12 +131,12 @@ static int CmdGuardDemod(const char *Cmd) { bool unknown = false; switch (fmtLen) { case 36: - FC = ((ByteStream[3] & 0x7F) << 7) | (ByteStream[4] >> 1); - Card = ((ByteStream[4] & 1) << 19) | (ByteStream[5] << 11) | (ByteStream[6] << 3) | (ByteStream[7] >> 5); + FC = ((plain[3] & 0x7F) << 7) | (plain[4] >> 1); + Card = ((plain[4] & 1) << 19) | (plain[5] << 11) | (plain[6] << 3) | ((plain[7] & 0xE0) >> 5); break; case 26: - FC = ((ByteStream[3] & 0x7F) << 1) | (ByteStream[4] >> 7); - Card = ((ByteStream[4] & 0x7F) << 9) | (ByteStream[5] << 1) | (ByteStream[6] >> 7); + FC = ((plain[3] & 0x7F) << 1) | (plain[4] >> 7); + Card = ((plain[4] & 0x7F) << 9) | (plain[5] << 1) | (plain[6] >> 7); break; default : unknown = true; @@ -309,14 +312,12 @@ int getGuardBits(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint8_t *guardBits) { break; } case 36: { - // FC = ((ByteStream[3] & 0x7F)<<7) | (ByteStream[4]>>1); - // Card = ((ByteStream[4]&1)<<19) | (ByteStream[5]<<11) | (ByteStream[6]<<3) | (ByteStream[7]>>5); rawbytes[1] = (36 << 2); - // Get 26 wiegand from FacilityCode, CardNumber - uint8_t wiegand[34]; + // Get wiegand from FacilityCode 14bits, CardNumber 20bits + uint8_t wiegand[36]; memset(wiegand, 0x00, sizeof(wiegand)); - num_to_bytebits(fc, 8, wiegand); - num_to_bytebits(cn, 26, wiegand + 8); + num_to_bytebits(fc, 14, wiegand); + num_to_bytebits(cn, 20, wiegand + 14); // add wiegand parity bits (dest, source, len) wiegand_add_parity(pre, wiegand, 34); @@ -351,28 +352,27 @@ int getGuardBits(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint8_t *guardBits) { rawbytes[3] = 0; // add wiegand to rawbytes - for (i = 0; i < 4; ++i) + for (i = 0; i < 5; ++i) rawbytes[i + 4] = bytebits_to_byte(pre + (i * 8), 8); - PrintAndLogEx(DEBUG, " WIE | %s\n", sprint_hex(rawbytes, sizeof(rawbytes))); - - + PrintAndLogEx(DEBUG, " WIE | %s", sprint_hex(rawbytes, sizeof(rawbytes))); + // XOR (only works on wiegand stuff) - for (i = 1; i < 12; ++i) + for (i = 1; i < sizeof(rawbytes); ++i) rawbytes[i] ^= xorKey ; - PrintAndLogEx(DEBUG, " XOR | %s \n", sprint_hex(rawbytes, sizeof(rawbytes))); + PrintAndLogEx(DEBUG, " XOR | %s", sprint_hex(rawbytes, sizeof(rawbytes))); // convert rawbytes to bits in pre - for (i = 0; i < 12; ++i) + for (i = 0; i < sizeof(rawbytes); ++i) num_to_bytebitsLSBF(rawbytes[i], 8, pre + (i * 8)); - PrintAndLogEx(DEBUG, "\n Raw | %s \n", sprint_hex(rawbytes, sizeof(rawbytes))); - PrintAndLogEx(DEBUG, " Raw | %s\n", sprint_bin(pre, 64)); + PrintAndLogEx(DEBUG, " Raw | %s", sprint_hex(rawbytes, sizeof(rawbytes))); + PrintAndLogEx(DEBUG, " Raw | %s", sprint_bin(pre, 96)); // add spacer bit 0 every 4 bits, starting with index 0, - // 12 bytes, 24 nibbles. 24+1 extra bites. 3bytes. ie 9bytes | 1byte xorkey, 8bytes rawdata (64bits, should be enough for a 40bit wiegand) - addParity(pre, guardBits + 6, 64, 5, 3); + // 12 bytes, 24 nibbles. 24+1 extra bites. 3bytes. ie 9bytes | 1byte xorkey, 8bytes rawdata (72bits, should be enough for a 40bit wiegand) + addParity(pre, guardBits + 6, 72, 5, 3); // preamble guardBits[0] = 1; From 3252bb1e31869c9d90d0a28d91b10d51c41f61a9 Mon Sep 17 00:00:00 2001 From: Iceman Date: Thu, 10 Sep 2020 13:52:56 +0200 Subject: [PATCH 21/92] Update magic_cards_notes.md --- doc/magic_cards_notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 18efca59d..43d4ab199 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -1,3 +1,4 @@ +# Notes on Magic Cards, aka UID changeable This document is based mostly on information posted on http://www.proxmark.org/forum/viewtopic.php?pid=35372#p35372 - [MIFARE Classic](#mifare-classic) From 9db343b1c4bc48cdc69427d409bef1debbf60276 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 14:01:38 +0200 Subject: [PATCH 22/92] fix printfs coverity 298929, 298928 --- client/src/cmdlffdx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/cmdlffdx.c b/client/src/cmdlffdx.c index 564c4d6b6..2bb3b274c 100644 --- a/client/src/cmdlffdx.c +++ b/client/src/cmdlffdx.c @@ -392,11 +392,11 @@ static int CmdFdxClone(const char *Cmd) { verify_values(&national_code, &country_code, &extended, &is_animal); - PrintAndLogEx(INFO, " Country code %u", country_code); - PrintAndLogEx(INFO, " National code %u", national_code); + PrintAndLogEx(INFO, " Country code %"PRIu32, country_code); + PrintAndLogEx(INFO, " National code %"PRIu64, national_code); PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N'); PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N'); - PrintAndLogEx(INFO, " Extended data 0x%X", extended); + PrintAndLogEx(INFO, " Extended data 0x%"PRIX32, extended); PrintAndLogEx(INFO, " RFU 0"); uint8_t *bits = calloc(128, sizeof(uint8_t)); @@ -472,11 +472,11 @@ static int CmdFdxSim(const char *Cmd) { verify_values(&national_code, &country_code, &extended, &is_animal); - PrintAndLogEx(INFO, " Country code %u", country_code); - PrintAndLogEx(INFO, " National code %u", national_code); + PrintAndLogEx(INFO, " Country code %"PRIu32, country_code); + PrintAndLogEx(INFO, " National code %"PRIu64, national_code); PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N'); PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N'); - PrintAndLogEx(INFO, " Extended data 0x%X", extended); + PrintAndLogEx(INFO, " Extended data 0x%"PRIX32, extended); PrintAndLogEx(INFO, " RFU 0"); PrintAndLogEx(SUCCESS, "Simulating FDX-B animal ID: " _GREEN_("%04u-%"PRIu64), country_code, national_code); From 25c45ef659b8c0a2e45cb0c7214449ce7df333df Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 16:20:29 +0200 Subject: [PATCH 23/92] textual --- client/src/cmdhfmf.c | 42 ++++++++-------------------------- client/src/mifare/mifarehost.c | 4 ++-- 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index c42387063..666757c2d 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -2163,7 +2163,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { } if (mfCheckKeys(FirstBlockOfSector(blockNo), keyType, true, 1, key, &key64) == PM3_SUCCESS) { - PrintAndLogEx(INFO, "target sector:%3u key type: %c -- using valid key [ " _YELLOW_("%s") "] (used for nested / hardnested attack)", + PrintAndLogEx(INFO, "target sector:%3u key type: %c -- using valid key [ " _GREEN_("%s") "] (used for nested / hardnested attack)", blockNo, keyType ? 'B' : 'A', sprint_hex(key, sizeof(key)) @@ -2198,13 +2198,13 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { know_target_key = true; blockNo = i; keyType = j; - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key ["_YELLOW_("%s") "] (used for nested / hardnested attack)", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "] (used for nested / hardnested attack)", i, j ? 'B' : 'A', sprint_hex(key, sizeof(key)) ); } else { - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key ["_YELLOW_("%s") "]", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "]", i, j ? 'B' : 'A', sprint_hex(key, sizeof(key)) @@ -2216,10 +2216,6 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { } } - if (verbose) { - PrintAndLogEx(INFO, "======================= " _YELLOW_("STOP KNOWN KEY ATTACK") " ======================="); - } - if (num_found_keys == sectors_cnt * 2) { goto all_found; } @@ -2310,8 +2306,6 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { lastChunk = false; } // end strategy } - if (verbose) PrintAndLogEx(INFO, "======================= " _YELLOW_("STOP DICTIONARY ATTACK") " ======================="); - // Analyse the dictionary attack for (int i = 0; i < sectors_cnt; i++) { @@ -2326,13 +2320,13 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { know_target_key = true; blockNo = i; keyType = j; - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _YELLOW_("%s") "] (used for nested / hardnested attack)", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "] (used for nested / hardnested attack)", i, j ? 'B' : 'A', sprint_hex(tmp_key, sizeof(tmp_key)) ); } else { - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _YELLOW_("%s") "]", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "]", i, j ? 'B' : 'A', sprint_hex(tmp_key, sizeof(tmp_key)) @@ -2352,10 +2346,6 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { isOK = mfDarkside(FirstBlockOfSector(blockNo), keyType, &key64); - if (verbose) { - PrintAndLogEx(INFO, "======================= " _YELLOW_("STOP DARKSIDE ATTACK") " ======================="); - } - switch (isOK) { case -1 : PrintAndLogEx(WARNING, "\nButton pressed. Aborted."); @@ -2381,7 +2371,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { // Store the keys e_sector[blockNo].Key[keyType] = key64; e_sector[blockNo].foundKey[keyType] = 'S'; - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _YELLOW_("%s") "] (used for nested / hardnested attack)", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "] (used for nested / hardnested attack)", blockNo, keyType ? 'B' : 'A', sprint_hex(key, sizeof(key)) @@ -2421,7 +2411,7 @@ noValidKeyFound: if (mfCheckKeys(FirstBlockOfSector(i), j, true, 1, tmp_key, &key64) == PM3_SUCCESS) { e_sector[i].Key[j] = bytes_to_num(tmp_key, 6); e_sector[i].foundKey[j] = 'R'; - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _YELLOW_("%s") "]", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "]", i, j ? 'B' : 'A', sprint_hex(tmp_key, sizeof(tmp_key)) @@ -2463,7 +2453,7 @@ noValidKeyFound: e_sector[current_sector_i].foundKey[current_key_type_i] = 'A'; e_sector[current_sector_i].Key[current_key_type_i] = key64; num_to_bytes(key64, 6, tmp_key); - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _YELLOW_("%s") "]", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "]", current_sector_i, current_key_type_i ? 'B' : 'A', sprint_hex(tmp_key, sizeof(tmp_key)) @@ -2479,9 +2469,6 @@ noValidKeyFound: } } - if (verbose) { - PrintAndLogEx(INFO, "======================= " _YELLOW_("STOP READ B KEY ATTACK") " ======================="); - } } } @@ -2545,9 +2532,6 @@ tryNested: return PM3_ESOFT; } } - if (verbose) { - PrintAndLogEx(INFO, "======================= " _YELLOW_("STOP NESTED ATTACK") " ======================="); - } } else { tryHardnested: // If the nested attack fails then we try the hardnested attack @@ -2583,10 +2567,6 @@ tryHardnested: // If the nested attack fails then we try the hardnested attack num_to_bytes(foundkey, 6, tmp_key); e_sector[current_sector_i].Key[current_key_type_i] = foundkey; e_sector[current_sector_i].foundKey[current_key_type_i] = 'H'; - - if (verbose) { - PrintAndLogEx(INFO, "======================= " _YELLOW_("STOP HARDNESTED ATTACK") " ======================="); - } } if (has_staticnonce) { @@ -2620,15 +2600,11 @@ tryStaticnested: break; } } - - if (verbose) { - PrintAndLogEx(INFO, "======================= " _YELLOW_("STOP STATIC NESTED ATTACK") " ======================="); - } } // Check if the key was found if (e_sector[current_sector_i].foundKey[current_key_type_i]) { - PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [" _YELLOW_("%s") "]", + PrintAndLogEx(SUCCESS, "target sector:%3u key type: %c -- found valid key [ " _GREEN_("%s") "]", current_sector_i, current_key_type_i ? 'B' : 'A', sprint_hex(tmp_key, sizeof(tmp_key)) diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 65c51f177..8a567fb26 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -535,7 +535,7 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo, free(statelists[1].head.slhead); num_to_bytes(key64, 6, resultKey); - PrintAndLogEx(SUCCESS, "\ntarget block:%3u key type: %c -- found valid key [" _YELLOW_("%s") "]", + PrintAndLogEx(SUCCESS, "\ntarget block:%3u key type: %c -- found valid key [ " _GREEN_("%s") "]", package->block, package->keytype ? 'B' : 'A', sprint_hex(resultKey, 6) @@ -714,7 +714,7 @@ int mfStaticNested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBl num_to_bytes(key64, 6, resultKey); PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(SUCCESS, "target block:%3u key type: %c -- found valid key [" _YELLOW_("%s") "]", + PrintAndLogEx(SUCCESS, "target block:%3u key type: %c -- found valid key [ " _GREEN_("%s") "]", package->block, package->keytype ? 'B' : 'A', sprint_hex(resultKey, 6) From a5026fbdf03b308172bc852a051753177c5420e6 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 19:24:57 +0200 Subject: [PATCH 24/92] magic cards identification --- doc/magic_cards_notes.md | 89 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 6 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 43d4ab199..e7129b782 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -57,6 +57,14 @@ UID 7b: ## MIFARE Classic Gen1A aka UID +### Identify + +``` +hf 14a info +... +[+] Magic capabilities : Gen 1a +``` + ### Magic commands raw commands 40/41/43 @@ -98,8 +106,24 @@ script run remagic Similar to Gen1A, but supports only commands 40/43 +### Identify + +``` +hf 14a info +... +[+] Magic capabilities : Gen 1b +``` + ## MIFARE Classic DirectWrite aka Gen2 aka CUID +### Identify + +``` +hf 14a info +... +[+] Magic capabilities : Gen 2 / CUID +``` + ### Magic commands Android compatible @@ -144,10 +168,24 @@ Same as MIFARE Classic DirectWrite, but block0 can be written only once. Initial UID is AA55C396 +### Identify + +Only possible before personalisation. + +``` +hf 14a info +... +[+] Magic capabilities : Write Once / FUID +``` + ## MIFARE Classic DirectWrite, UFUID version Same as MIFARE Classic DirectWrite, but block0 can be locked with special command. +### Identify + +**TODO** + ### Proxmark3 commands To lock definitively block0: @@ -160,12 +198,17 @@ hf 14a raw -c 85000000000000000000000000000008 ## MIFARE Classic, other versions -**todo** ZXUID, EUID, ICUID ? +**TODO** -Some cards exhibit a specific SAK=28 ?? +* ZXUID, EUID, ICUID ? +* Some cards exhibit a specific SAK=28 ?? ## MIFARE Classic APDU aka Gen3 +### Identify + +**TODO** + ### Magic commands Android compatible @@ -220,8 +263,18 @@ To change UID: same commands as for MFC DirectWrite To do reader-only attack: at least two versions exist. -* https://github.com/nfc-tools/nfc-supercard for card with ATS: 0978009102DABC1910F005 -* https://github.com/netscylla/super-card/blob/master/libnfc-1.7.1/utils/nfc-super.c for ?? +* type 1: https://github.com/nfc-tools/nfc-supercard for card with ATS: 0978009102DABC1910F005 +* type 2: https://github.com/netscylla/super-card/blob/master/libnfc-1.7.1/utils/nfc-super.c for ?? + +### Identify + +Only type 1 at the moment: + +``` +hf 14a info +... +[+] Magic capabilities : super card +``` # MIFARE Ultralight @@ -243,11 +296,15 @@ Int is internal, typically 0x48 ## MIFARE Ultralight Gen1A +### Identify + +**TODO** + ### Characteristics #### Magic commands -**todo** +**TOOD** #### UID @@ -272,11 +329,15 @@ script run remagic -u ## MIFARE Ultralight DirectWrite +### Identify + +**TODO** + ### Characteristics #### Magic commands -**todo** +**TODO** #### UID @@ -322,12 +383,20 @@ Same commands as for MFUL DirectWrite # NTAG +### Identify + +**TODO** + ## NTAG213 DirectWrite Same commands as for MFUL DirectWrite ## NTAG21x +### Identify + +**TODO** + ### Characteristics Emulates fully NTAG213, 213F, 215, 216, 216F @@ -344,6 +413,10 @@ script run mfu_magic -h ## "DESFire" APDU, 7b UID +### Identify + +**TODO** + ### Magic commands Android compatible @@ -436,6 +509,10 @@ Some vendor allow to specify an ID (PUPI) when ordering a card. ## ISO15693 magic +### Identify + +**TODO** + ### Proxmark3 commands Always set a UID starting with `E0`. From 866f4b6313af854b892921807744efc927005185 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 20:40:12 +0200 Subject: [PATCH 25/92] hf 14a info - ntag21x identification --- armsrc/mifarecmd.c | 14 +++++++++++++- client/src/mifare/mifarehost.c | 3 +++ include/protocols.h | 11 ++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index c1f3299b9..cbba1f9c6 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2242,6 +2242,7 @@ void MifareCIdent(void) { uint8_t rec[1] = {0x00}; uint8_t recpar[1] = {0x00}; uint8_t rats[4] = { ISO14443A_CMD_RATS, 0x80, 0x31, 0x73 }; + uint8_t rdbl[4] = { ISO14443A_CMD_READBLOCK, 0xF0, 0x8D, 0x5f}; uint8_t *par = BigBuf_malloc(MAX_PARITY_SIZE); uint8_t *buf = BigBuf_malloc(PM3_CMD_DATA_SIZE); uint8_t *uid = BigBuf_malloc(10); @@ -2319,7 +2320,18 @@ void MifareCIdent(void) { goto OUT; } - + // magic ntag test + FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); + SpinDelay(40); + iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN); + res = iso14443a_select_card(uid, NULL, &cuid, true, 0, true); + if (res == 2) { + ReaderTransmit(rdbl, sizeof(rdbl), NULL); + res = ReaderReceive(buf, par); + if (res == 18) { + isGen = MAGIC_NTAG21X; + } + } }; OUT: diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 8a567fb26..821eaaf85 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -1187,6 +1187,9 @@ int detect_classic_magic(void) { case MAGIC_SUPER: PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("super card")); break; + case MAGIC_NTAG21X: + PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("NTAG21x")); + break; default: break; } diff --git a/include/protocols.h b/include/protocols.h index 324d4b2fc..e043b6418 100644 --- a/include/protocols.h +++ b/include/protocols.h @@ -215,11 +215,12 @@ ISO 7816-4 Basic interindustry commands. For command APDU's. #define MAGIC_SINGLE (MAGIC_WUPC | MAGIC_HALT | MAGIC_INIT | MAGIC_OFF) //0x1E // by CMD_HF_MIFARE_CIDENT -#define MAGIC_GEN_1A 1 -#define MAGIC_GEN_1B 2 -#define MAGIC_GEN_2 4 -#define MAGIC_GEN_UNFUSED 5 -#define MAGIC_SUPER 6 +#define MAGIC_GEN_1A 1 +#define MAGIC_GEN_1B 2 +#define MAGIC_GEN_2 4 +#define MAGIC_GEN_UNFUSED 5 +#define MAGIC_SUPER 6 +#define MAGIC_NTAG21X 7 /** 06 00 = INITIATE 0E xx = SELECT ID (xx = Chip-ID) From 282860034f28a598912c3e805d4b8ece30bc7917 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 20:49:18 +0200 Subject: [PATCH 26/92] doc --- doc/magic_cards_notes.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index e7129b782..30fe69bcc 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -1,6 +1,9 @@ # Notes on Magic Cards, aka UID changeable This document is based mostly on information posted on http://www.proxmark.org/forum/viewtopic.php?pid=35372#p35372 +Useful docs: +* [AN10833 MIFARE Type Identification Procedure](https://www.nxp.com/docs/en/application-note/AN10833.pdf) + - [MIFARE Classic](#mifare-classic) * [MIFARE Classic block0](#mifare-classic-block0) * [MIFARE Classic Gen1A aka UID](#mifare-classic-gen1a-aka-uid) @@ -36,7 +39,7 @@ Referred as M1, S50 (1k), S70 (4k) ## MIFARE Classic block0 -UID 4b: +UID 4b: (actually NUID as there are no more "unique" IDs on 4b) ``` 11223344440804006263646566676869 @@ -53,7 +56,14 @@ Computing BCC on UID 11223344: `hf analyse lcr 11223344` = `44` UID 7b: -**todo** +``` +04112233445566884400c82000000000 +^^ Manufacturer byte +^^^^^^^^^^^^^^ UID + ^^ SAK(*)?? + ^^^^ ATQA?? + ^^^^^^^^^^^^ Manufacturer data +``` ## MIFARE Classic Gen1A aka UID From a5de8aa7146275a92033ad5fa5cd8d7851dbdecb Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 20:49:23 +0200 Subject: [PATCH 27/92] mixed messages --- client/src/cmdlf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 7bae8618d..165108fb8 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -1200,6 +1200,7 @@ static bool CheckChipType(bool getDeviceData) { PrintAndLogEx(SUCCESS, "Chipset detection: " _GREEN_("T55xx")); PrintAndLogEx(HINT, "Hint: try " _YELLOW_("`lf t55xx`") " commands"); retval = true; + goto out; } // check for em4x50 chips From 35029ea624d336a217aeab33d4e6bdecafb4dcf1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 10 Sep 2020 21:02:02 +0200 Subject: [PATCH 28/92] type --- client/src/wiegand_formats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index e04fc29f0..2d62d4cdb 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -591,7 +591,7 @@ static const cardformat_t FormatTable[] = { {"H10306", Pack_H10306, Unpack_H10306, "HID H10306 34-bit", {1, 1, 0, 0, 1}}, // imported from old pack/unpack {"N10002", Pack_N10002, Unpack_N10002, "HID N10002 34-bit", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au {"C1k35s", Pack_C1k35s, Unpack_C1k35s, "HID Corporate 1000 35-bit standard layout", {1, 1, 0, 0, 1}}, // imported from old pack/unpack - {"C15001", Pack_C15001, Unpack_C15001, "HID KeySpan 36-bit", {1, 1, 0, 1, 1}}, // from Proxmark forums + {"C15001", Pack_C15001, Unpack_C15001, "HID KeyScan 36-bit", {1, 1, 0, 1, 1}}, // from Proxmark forums {"S12906", Pack_S12906, Unpack_S12906, "HID Simplex 36-bit", {1, 1, 1, 0, 1}}, // from cardinfo.barkweb.com.au {"Sie36", Pack_Sie36, Unpack_Sie36, "HID 36-bit Siemens", {1, 1, 0, 0, 1}}, // from cardinfo.barkweb.com.au {"H10320", Pack_H10320, Unpack_H10320, "HID H10320 36-bit BCD", {1, 0, 0, 0, 1}}, // from Proxmark forums From 19a6868daa14bd81a42dbaa54bc78b3180cb2ec7 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 10 Sep 2020 21:13:05 +0200 Subject: [PATCH 29/92] doc --- doc/magic_cards_notes.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 30fe69bcc..5e8c872b4 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -405,7 +405,11 @@ Same commands as for MFUL DirectWrite ### Identify -**TODO** +``` +hf 14a info +... +[+] Magic capabilities : NTAG21x +``` ### Characteristics From 3bf3e668a55fc1c33637eb8a7a0accebcf8815e3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 01:23:30 +0200 Subject: [PATCH 30/92] doc gen1a --- doc/magic_cards_notes.md | 100 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 94 insertions(+), 6 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 5e8c872b4..3dcf5b296 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -77,20 +77,65 @@ hf 14a info ### Magic commands -raw commands 40/41/43 - -**TODO** details, differences in global wipe command? +* Wipe: `40(7)`, `41` (use 2000ms timeout) +* Read: `40(7)`, `43`, `30xx`+crc +* Write: `40(7)`, `43`, `A0xx`+crc, `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`+crc ### Characteristics * UID: Only 4b versions * ATQA: - * all(?) cards play blindly the block0 ATQA bytes + * all cards play blindly the block0 ATQA bytes, beware! * SAK: - * some cards play blindly the block0 SAK byte + * some cards play blindly the block0 SAK byte, beware! * some cards use a fix "08" in anticollision, no matter the block0 + * some cards use a fix "08" in anticollision, unless SAK in block0 has most significant bit "80" set, in which case SAK="88" * BCC: + * all cards play blindly the block0 BCC bytes, beware! * ATS: + * no card with ATS + +#### MIFARE Classic Gen1A flavour 1 + +* SAK: play blindly the block0 SAK byte, beware! +* PRNG: static 01200145 +* Wipe: filled with 0xFF + +#### MIFARE Classic Gen1A flavour 2 + +* SAK: play blindly the block0 SAK byte, beware! +* PRNG: static 01200145 +* Wipe: filled with 0x00 + +#### MIFARE Classic Gen1A flavour 3 + +* SAK: 08 +* PRNG: static 01200145 +* Wipe: filled with 0xFF + +#### MIFARE Classic Gen1A flavour 4 + +* SAK: 08 +* PRNG: weak +* Wipe: timeout, no wipe + +#### MIFARE Classic Gen1A flavour 5 + +* SAK: 08 +* PRNG: weak +* Wipe: reply ok but no wipe performed + +#### MIFARE Classic Gen1A flavour 6 + +* SAK: 08 or 88 if block0_SAK most significant bit is set +* PRNG: weak +* Wipe: timeout, no wipe + +#### MIFARE Classic Gen1A flavour 7 + +* SAK: 08 or 88 if block0_SAK most significant bit is set +* PRNG: weak +* Wipe: filled with 0x00 ### Proxmark3 commands @@ -107,11 +152,37 @@ hf mf cview When "soft-bricked" (by writing invalid data in block0), these ones may help: +``` +hf mf csetblk 0 11223344440804006263646566676869 +``` ``` hf 14a config h +``` +``` script run remagic ``` +To execute commands manually: +``` +hf 14a raw -a -p -b 7 40 +hf 14a raw -p 43 +hf 14a raw -p -c A000 +hf 14a raw -c -t 1000 11223344440804006263646566676869 +``` +wipe: +``` +hf 14a raw -a -p -b 7 40 +hf 14a raw -t 1000 41 +``` + +### libnfc commands + +``` +nfc-mfsetuid +nfc-mfclassic R a u mydump +nfc-mfclassic W a u mydump +``` + ## MIFARE Classic Gen1B Similar to Gen1A, but supports only commands 40/43 @@ -124,6 +195,11 @@ hf 14a info [+] Magic capabilities : Gen 1b ``` +### Magic commands + +* Read: `40(7)`, `30xx` +* Write: `40(7)`, `A0xx`+crc, `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`+crc + ## MIFARE Classic DirectWrite aka Gen2 aka CUID ### Identify @@ -379,6 +455,17 @@ When "soft-bricked" (by writing invalid data in block0), these ones may help: hf 14a config h ``` +### libnfc commands + +``` +nfc-mfultralight -h +``` +See `--uid` and `--full` + +### Android + +* MIFARE++ Ultralight + ## MIFARE Ultralight EV1 DirectWrite Same commands as for MFUL DirectWrite @@ -456,9 +543,10 @@ or equivalently hf 14a apdu -s 00ab00000704112233445566 ``` -### pn53x-tamashell commands +### libnfc commands ``` +pn53x-tamashell 4a0100 420200ab00000704112233445566 ``` From 5fc7948dc796a73049420c88687dfa8b79ca447e Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 01:35:23 +0200 Subject: [PATCH 31/92] doc gen1b --- doc/magic_cards_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 3dcf5b296..1fbc0b758 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -185,7 +185,7 @@ nfc-mfclassic W a u mydump ## MIFARE Classic Gen1B -Similar to Gen1A, but supports only commands 40/43 +Similar to Gen1A, but supports directly read/write after command 40 ### Identify From 68e6df84a4d10ecc3778cb721e341bce5cba0f83 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 11 Sep 2020 11:02:19 +0200 Subject: [PATCH 32/92] t55 output --- client/src/cmdlft55xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdlft55xx.c b/client/src/cmdlft55xx.c index bc84fc3f8..c3e69238b 100644 --- a/client/src/cmdlft55xx.c +++ b/client/src/cmdlft55xx.c @@ -829,7 +829,7 @@ static int CmdT55xxSetConfig(const char *Cmd) { return printConfiguration(config); } int T55xxReadBlock(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode) { - return T55xxReadBlockEx(block, page1, usepwd, override, password, downlink_mode, false); + return T55xxReadBlockEx(block, page1, usepwd, override, password, downlink_mode, true); } int T55xxReadBlockEx(uint8_t block, bool page1, bool usepwd, uint8_t override, uint32_t password, uint8_t downlink_mode, bool verbose) { From 1b3463dc6ae3c36d15cc768695d2da305b988052 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 11:43:49 +0200 Subject: [PATCH 33/92] magic doc update --- doc/magic_cards_notes.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 1fbc0b758..682b268e6 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -48,7 +48,7 @@ UID 4b: (actually NUID as there are no more "unique" IDs on 4b) ^^ SAK(*) ^^^^ ATQA ^^^^^^^^^^^^^^^^ Manufacturer data -(*) some cards have on purpose a different SAK in their anticollision and in block0 +(*) some cards have a different SAK in their anticollision and in block0: +0x80 in the block0 (e.g. 08->88, 18->98) ``` @@ -60,9 +60,10 @@ UID 7b: 04112233445566884400c82000000000 ^^ Manufacturer byte ^^^^^^^^^^^^^^ UID - ^^ SAK(*)?? - ^^^^ ATQA?? + ^^ SAK(*) + ^^^^ ATQA ^^^^^^^^^^^^ Manufacturer data +(*) all? cards have a different SAK in their anticollision and in block0: +0x80 in the block0 (e.g. 08->88, 18->98) ``` ## MIFARE Classic Gen1A aka UID From 5896d85ab34afbc120ad52761669c4ffb9bfc8ea Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 12:00:01 +0200 Subject: [PATCH 34/92] fix gen3 doc --- doc/magic_cards_notes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 682b268e6..0e8707827 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -304,9 +304,9 @@ Android compatible ``` cla ins p1 p2 len - 90 F0 CC CC 10 - write block 0 - 90 FB CC CC 07 - write uid separated instead of block 0 - 90 FD 11 11 00 - lock uid permanently + 90 F0 CC CC 10 - write block 0 + 90 FB CC CC 07 - write uid separated instead of block 0 + 90 FD 11 11 00 - lock uid permanently ``` ### Characteristics @@ -339,7 +339,7 @@ hf 14a raw -s -c -t 2000 90FBCCCC07 11223344556677 # write block0: hf 14a raw -s -c -t 2000 90F0CCCC10 041219c3219316984200e32000000000 # lock block0 forever: -hf 14a raw -s -c 90fd11100 +hf 14a raw -s -c 90FD111100 ``` ## MIFARE Classic Super From 55e800e4cec55e3fe28354ec7ffef79bbcb5c378 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 13:36:57 +0200 Subject: [PATCH 35/92] text --- armsrc/iso14443a.c | 10 +++++----- armsrc/mifarecmd.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index 792d73400..0b904be33 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -134,11 +134,11 @@ static hf14a_config hf14aconfig = { 0, 0, 0, 0, 0 } ; void printHf14aConfig(void) { DbpString(_CYAN_("HF 14a config")); - Dbprintf("[a] Anticol override......%s%s%s", (hf14aconfig.forceanticol == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forceanticol == 1) ? _RED_("Yes: Always do anticol") : "", (hf14aconfig.forceanticol == 2) ? _RED_("Yes: Always skip anticol") : ""); - Dbprintf("[b] BCC override..........%s%s%s", (hf14aconfig.forcebcc == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcebcc == 1) ? _RED_("Yes: Always do CL2") : "", (hf14aconfig.forcebcc == 2) ? _RED_("Yes: Always use card BCC") : ""); - Dbprintf("[2] CL2 override..........%s%s%s", (hf14aconfig.forcecl2 == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcecl2 == 1) ? _RED_("Yes: Always do CL2") : "", (hf14aconfig.forcecl2 == 2) ? _RED_("Yes: Always skip CL2") : ""); - Dbprintf("[3] CL3 override..........%s%s%s", (hf14aconfig.forcecl3 == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcecl3 == 1) ? _RED_("Yes: Always do CL3") : "", (hf14aconfig.forcecl3 == 2) ? _RED_("Yes: Always skip CL3") : ""); - Dbprintf("[r] RATS override.........%s%s%s", (hf14aconfig.forcerats == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcerats == 1) ? _RED_("Yes: Always do RATS") : "", (hf14aconfig.forcerats == 2) ? _RED_("Yes: Always skip RATS") : ""); + Dbprintf("[a] Anticol override......%i: %s%s%s", hf14aconfig.forceanticol, (hf14aconfig.forceanticol == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forceanticol == 1) ? _RED_("Yes: Always do anticol") : "", (hf14aconfig.forceanticol == 2) ? _RED_("Yes: Always skip anticol") : ""); + Dbprintf("[b] BCC override..........%i: %s%s%s", hf14aconfig.forcebcc, (hf14aconfig.forcebcc == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcebcc == 1) ? _RED_("Yes: Always do CL2") : "", (hf14aconfig.forcebcc == 2) ? _RED_("Yes: Always use card BCC") : ""); + Dbprintf("[2] CL2 override..........%i: %s%s%s", hf14aconfig.forcecl2, (hf14aconfig.forcecl2 == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcecl2 == 1) ? _RED_("Yes: Always do CL2") : "", (hf14aconfig.forcecl2 == 2) ? _RED_("Yes: Always skip CL2") : ""); + Dbprintf("[3] CL3 override..........%i: %s%s%s", hf14aconfig.forcecl3, (hf14aconfig.forcecl3 == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcecl3 == 1) ? _RED_("Yes: Always do CL3") : "", (hf14aconfig.forcecl3 == 2) ? _RED_("Yes: Always skip CL3") : ""); + Dbprintf("[r] RATS override.........%i: %s%s%s", hf14aconfig.forcerats, (hf14aconfig.forcerats == 0) ? _GREEN_("No") " (follow standard)" : "", (hf14aconfig.forcerats == 1) ? _RED_("Yes: Always do RATS") : "", (hf14aconfig.forcerats == 2) ? _RED_("Yes: Always skip RATS") : ""); } /** diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index cbba1f9c6..0746921ca 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2277,6 +2277,7 @@ void MifareCIdent(void) { ReaderTransmit(rats, sizeof(rats), NULL); res = ReaderReceive(buf, par); + // test for some MFC gen2 if (memcmp(buf, "\x09\x78\x00\x91\x02\xDA\xBC\x19\x10\xF0\x05", 11) == 0) { // super card ident @@ -2291,6 +2292,7 @@ void MifareCIdent(void) { isGen = MAGIC_GEN_2; goto OUT; } + // test for some MFC 7b gen2 if (memcmp(buf, "\x0D\x78\x00\x71\x02\x88\x49\xA1\x30\x20\x15\x06\x08\x56\x3D", 15) == 0) { isGen = MAGIC_GEN_2; } From e488ef306c4bf182032684d9d3b853d5eb82dbe3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 14:09:38 +0200 Subject: [PATCH 36/92] Fix MFC static nonce detection on some cards and do it before prng det --- armsrc/mifarecmd.c | 3 +++ client/src/cmdhf14a.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 0746921ca..a5cf56bf3 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2383,6 +2383,9 @@ void MifareHasStaticNonce(void) { nt = bytes_to_num(rec, 4); + // some cards with static nonce need to be reset before next query + FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); + LEDsoff(); CHK_TIMEOUT(); } diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index f8fc02f8f..4ce99c69a 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -1956,23 +1956,23 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) { isMagic = detect_classic_magic(); if (isMifareClassic) { - int res = detect_classic_prng(); - if (res == 1) - PrintAndLogEx(SUCCESS, "Prng detection: " _GREEN_("weak")); - else if (res == 0) - PrintAndLogEx(SUCCESS, "Prng detection: " _YELLOW_("hard")); - else - PrintAndLogEx(FAILED, "Prng detection: " _RED_("fail")); - - if (do_nack_test) - detect_classic_nackbug(false); - - res = detect_classic_static_nonce(); + int res = detect_classic_static_nonce(); if (res == 1) PrintAndLogEx(SUCCESS, "Static nonce: " _YELLOW_("yes")); if (res == 2 && verbose) PrintAndLogEx(SUCCESS, "Static nonce: " _RED_("fail")); + if (res != 1) { // not static + res = detect_classic_prng(); + if (res == 1) + PrintAndLogEx(SUCCESS, "Prng detection: " _GREEN_("weak")); + else if (res == 0) + PrintAndLogEx(SUCCESS, "Prng detection: " _YELLOW_("hard")); + else + PrintAndLogEx(FAILED, "Prng detection: " _RED_("fail")); + if (do_nack_test) + detect_classic_nackbug(false); + } } } From 5cb12db5af9b32c6c7ee4d2a2239655f63b45604 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 14:40:52 +0200 Subject: [PATCH 37/92] doc mfc gen2 --- doc/magic_cards_notes.md | 68 +++++++++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 11 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 0e8707827..d8511082a 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -211,6 +211,8 @@ hf 14a info [+] Magic capabilities : Gen 2 / CUID ``` +Not all Gen2 cards can be identified with `hf 14a info`, only those replying to RATS. + ### Magic commands Android compatible @@ -221,14 +223,56 @@ Android compatible * UID: 4b and 7b versions * ATQA: + * some cards play blindly the block0 ATQA bytes, beware! + * some cards use a fix ATQA in anticollision, no matter the block0. Including all 7b. * SAK: + * some cards play blindly the block0 SAK byte, beware! + * some cards use a fix "08" or "18" in anticollision, no matter the block0. Including all 7b. * BCC: + * some cards play blindly the block0 BCC bytes, beware! + * some cards compute a proper BCC in anticollision. Including all 7b. * ATS: + * some cards don't reply to RATS + * some reply with 0978009102DABC1910F005 -**todo** +#### MIFARE Classic DirectWrite flavour 1 -* some card will die if invalid block0! (or can be recovered with anticol...? "hf 14a config a 1 b 1 ..." then "hf mf wrbl 0 ...") -* some card have always correct anticol no matter block0, e.g. ATS=0948009102DABC1910F005 +* UID 4b +* ATQA: play blindly the block0 ATQA bytes, beware! +* SAK: play blindly the block0 SAK byte, beware! +* BCC: play blindly the block0 BCC bytes, beware! +* ATS: no +* PRNG: weak + +F1 ATQAwarn SAKxx +BCCwarn Pweak + +#### MIFARE Classic DirectWrite flavour 2 + +* UID 4b +* ATQA: fixed +* SAK: fixed +* BCC: computed +* ATS: 0978009102DABC1910F005 +* PRNG: weak + +#### MIFARE Classic DirectWrite flavour 3 + +* UID 4b +* ATQA: play blindly the block0 ATQA bytes, beware! +* SAK: fixed +* BCC: play blindly the block0 BCC bytes, beware! +* ATS: no +* PRNG: weak + +#### MIFARE Classic DirectWrite flavour 4 + +* UID 7b +* ATQA: fixed +* SAK: fixed +* BCC: computed +* ATS: 0978009102DABC1910F005 +* PRNG: static 00000000 ### Proxmark3 commands @@ -305,17 +349,19 @@ Android compatible ``` cla ins p1 p2 len 90 F0 CC CC 10 - write block 0 - 90 FB CC CC 07 - write uid separated instead of block 0 - 90 FD 11 11 00 - lock uid permanently + 90 FB CC CC 07 - change uid (independently of block0 data) + 90 FD 11 11 00 - lock permanently ``` +It seems the length byte gets ignored anyway. + +Note: it seems some cards only accept the "change UID" command. ### Characteristics * UID: 4b and 7b versions -* ATQA: -* SAK: -* BCC: -* ATS: +* ATQA/SAK: fixed +* BCC: auto +* ATS: none ### Proxmark3 commands @@ -324,7 +370,7 @@ cla ins p1 p2 len hf mf gen3uid # write block0: hf mf gen3blk -# lock block0 forever: +# lock (uid/block0?) forever: hf mf gen3freez ``` See also @@ -338,7 +384,7 @@ Equivalent: hf 14a raw -s -c -t 2000 90FBCCCC07 11223344556677 # write block0: hf 14a raw -s -c -t 2000 90F0CCCC10 041219c3219316984200e32000000000 -# lock block0 forever: +# lock (uid/block0?) forever: hf 14a raw -s -c 90FD111100 ``` From bc19a532a9d45ae3ea9154f2f60d7fb08cde0672 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 15:11:37 +0200 Subject: [PATCH 38/92] fix hf 14a raw to allow large timeouts --- client/src/cmdhf14a.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 4ce99c69a..698f1871e 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -31,7 +31,7 @@ bool APDUInFramingEnable = true; static int CmdHelp(const char *Cmd); -static int waitCmd(uint8_t iSelect); +static int waitCmd(uint8_t iSelect, uint32_t timeout); static const manufactureName manufactureMapping[] = { // ID, "Vendor Country" @@ -1309,17 +1309,17 @@ static int CmdHF14ACmdRaw(const char *Cmd) { if (reply) { int res = 0; if (active_select) - res = waitCmd(1); + res = waitCmd(1, timeout); if (!res && datalen > 0) - waitCmd(0); + waitCmd(0, timeout); } return 0; } -static int waitCmd(uint8_t iSelect) { +static int waitCmd(uint8_t iSelect, uint32_t timeout) { PacketResponseNG resp; - if (WaitForResponseTimeout(CMD_ACK, &resp, 1500)) { + if (WaitForResponseTimeout(CMD_ACK, &resp, timeout + 1500)) { uint16_t len = (resp.oldarg[0] & 0xFFFF); if (iSelect) { len = (resp.oldarg[1] & 0xFFFF); From 5b695153b61a68627840f53cc810611d3f59210d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 11 Sep 2020 16:15:58 +0200 Subject: [PATCH 39/92] improved staticnonce tristate processing --- armsrc/mifarecmd.c | 31 +++++++++++++++++++------------ client/src/cmdhf14a.c | 13 +++++++++---- client/src/mifare/mifarehost.c | 13 ++++--------- include/pm3_cmd.h | 5 +++++ 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index a5cf56bf3..d33feeff2 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2348,29 +2348,29 @@ OUT: void MifareHasStaticNonce(void) { // variables - int retval = PM3_SUCCESS, len; - - uint32_t nt = 0 ; - uint8_t rec[1] = {0x00}; - uint8_t recpar[1] = {0x00}; + int retval = PM3_SUCCESS; + uint32_t nt = 0; uint8_t *uid = BigBuf_malloc(10); - uint8_t data[1] = {0x00}; - + uint8_t data[1] = { NONCE_FAIL }; struct Crypto1State mpcs = {0, 0}; struct Crypto1State *pcs; pcs = &mpcs; - iso14a_card_select_t card_info; - + iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN); - for (int i = 0; i < 3; i++) { + uint8_t counter = 0; + for (uint8_t i = 0; i < 3; i++) { + + iso14a_card_select_t card_info; if (!iso14443a_select_card(uid, &card_info, NULL, true, 0, true)) { retval = PM3_ESOFT; goto OUT; } + uint8_t rec[1] = {0x00}; + uint8_t recpar[1] = {0x00}; // Transmit MIFARE_CLASSIC_AUTH 0x60, block 0 - len = mifare_sendcmd_short(pcs, false, MIFARE_AUTH_KEYA, 0, rec, recpar, NULL); + int len = mifare_sendcmd_short(pcs, false, MIFARE_AUTH_KEYA, 0, rec, recpar, NULL); if (len != 4) { retval = PM3_ESOFT; goto OUT; @@ -2378,7 +2378,7 @@ void MifareHasStaticNonce(void) { // Save the tag nonce (nt) if (nt == bytes_to_num(rec, 4)) { - data[0]++; + counter++; } nt = bytes_to_num(rec, 4); @@ -2389,6 +2389,13 @@ void MifareHasStaticNonce(void) { CHK_TIMEOUT(); } + if (counter) { + Dbprintf("%u static nonce %08x", data[0], nt); + data[0] = NONCE_STATIC; + } else { + data[0] = NONCE_NORMAL; + } + OUT: reply_ng(CMD_HF_MIFARE_STATIC_NONCE, retval, data, sizeof(data)); // turns off diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 698f1871e..9170d2fd7 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -1956,12 +1956,17 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) { isMagic = detect_classic_magic(); if (isMifareClassic) { + int res = detect_classic_static_nonce(); - if (res == 1) + if (res == NONCE_STATIC) PrintAndLogEx(SUCCESS, "Static nonce: " _YELLOW_("yes")); - if (res == 2 && verbose) - PrintAndLogEx(SUCCESS, "Static nonce: " _RED_("fail")); - if (res != 1) { // not static + + if (res == NONCE_FAIL && verbose) + PrintAndLogEx(SUCCESS, "Static nonce: " _RED_("read failed")); + + if (res == NONCE_NORMAL) { + + // not static res = detect_classic_prng(); if (res == 1) PrintAndLogEx(SUCCESS, "Prng detection: " _GREEN_("weak")); diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 821eaaf85..ed83a6498 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -1144,19 +1144,14 @@ int detect_classic_static_nonce(void) { clearCommandBuffer(); SendCommandNG(CMD_HF_MIFARE_STATIC_NONCE, NULL, 0); PacketResponseNG resp; - - if (WaitForResponseTimeout(CMD_HF_MIFARE_STATIC_NONCE, &resp, 500)) { + if (WaitForResponseTimeout(CMD_HF_MIFARE_STATIC_NONCE, &resp, 1000)) { if (resp.status == PM3_ESOFT) - return 2; + return NONCE_FAIL; - if (resp.data.asBytes[0] == 0) - return 0; - - if (resp.data.asBytes[0] != 0) - return 1; + return resp.data.asBytes[0]; } - return 2; + return NONCE_FAIL; } /* try to see if card responses to "chinese magic backdoor" commands. */ diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index dd11d49d5..78fca9c62 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -710,6 +710,11 @@ typedef struct { #define MODE_EXIT_AFTER_MAC 1 #define MODE_FULLSIM 2 +// Static Nonce detection +#define NONCE_FAIL 0x01 +#define NONCE_NORMAL 0x02 +#define NONCE_STATIC 0x03 + // Dbprintf flags #define FLAG_RAWPRINT 0x00 #define FLAG_LOG 0x01 From c15101e45b71bd831d649e5d45b61d7e79fc07e8 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 11 Sep 2020 16:27:14 +0200 Subject: [PATCH 40/92] add fflush back --- client/src/cmdhfmf.c | 47 ++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 666757c2d..0637599fc 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -995,6 +995,8 @@ static int CmdHF14AMfDump(const char *Cmd) { PrintAndLogEx(WARNING, "Could not find file " _YELLOW_("%s"), keyFilename); return PM3_EFILE; } + + PrintAndLogEx(INFO, "Using `" _YELLOW_("%s") "`", keyFilename); // Read keys A from file size_t bytes_read; @@ -1026,6 +1028,7 @@ static int CmdHF14AMfDump(const char *Cmd) { for (sectorNo = 0; sectorNo < numSectors; sectorNo++) { for (tries = 0; tries < MIFARE_SECTOR_RETRY; tries++) { PrintAndLogEx(NORMAL, "." NOLF); + fflush(stdout); payload.blockno = FirstBlockOfSector(sectorNo) + NumBlocksPerSector(sectorNo) - 1; payload.keytype = 0; @@ -1357,7 +1360,7 @@ static int CmdHF14AMfNested(const char *Cmd) { } // check if tag doesn't have static nonce - if (detect_classic_static_nonce() == 1) { + if (detect_classic_static_nonce()) { PrintAndLogEx(WARNING, "Static nonce detected. Quitting..."); PrintAndLogEx(INFO, "\t Try use " _YELLOW_("`hf mf staticnested`")); return PM3_EOPABORTED; @@ -1607,8 +1610,8 @@ static int CmdHF14AMfNestedStatic(const char *Cmd) { } // check if tag have static nonce - if (detect_classic_static_nonce() == 0) { - PrintAndLogEx(WARNING, "None static nonce detected. Quitting..."); + if (detect_classic_static_nonce() == false) { + PrintAndLogEx(WARNING, "Normal nonce detected, or failed read of card. Quitting..."); PrintAndLogEx(INFO, "\t Try use " _YELLOW_("`hf mf nested`")); return PM3_EOPABORTED; } @@ -1921,7 +1924,7 @@ static int CmdHF14AMfNestedHard(const char *Cmd) { if (!know_target_key && nonce_file_read == false) { // check if tag doesn't have static nonce - if (detect_classic_static_nonce() == 1) { + if (detect_classic_static_nonce()) { PrintAndLogEx(WARNING, "Static nonce detected. Quitting..."); PrintAndLogEx(HINT, "\tTry use `" _YELLOW_("hf mf staticnested") "`"); return PM3_EOPABORTED; @@ -2002,7 +2005,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { bool slow = false; bool legacy_mfchk = false; int prng_type = PM3_EUNDEF; - int has_staticnonce = 2; + int has_staticnonce; bool verbose = false; bool has_filename = false; bool errors = false; @@ -2120,17 +2123,20 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { // read uid to generate a filename for the key file char *fptr = GenerateFilename("hf-mf-", "-key.bin"); - // card prng type (weak=1 / hard=0 / select/card comm error = negative value) - prng_type = detect_classic_prng(); - if (prng_type < 0) { - PrintAndLogEx(FAILED, "\nNo tag detected or other tag communication error"); - free(e_sector); - return prng_type; - } // check if tag doesn't have static nonce has_staticnonce = detect_classic_static_nonce(); + // card prng type (weak=1 / hard=0 / select/card comm error = negative value) + if (has_staticnonce == NONCE_NORMAL) { + prng_type = detect_classic_prng(); + if (prng_type < 0) { + PrintAndLogEx(FAILED, "\nNo tag detected or other tag communication error"); + free(e_sector); + return prng_type; + } + } + // print parameters if (verbose) { PrintAndLogEx(INFO, "======================= " _YELLOW_("SETTINGS") " ======================="); @@ -2140,10 +2146,12 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { PrintAndLogEx(INFO, " keytype ....... " _YELLOW_("%c"), keyType ? 'B' : 'A'); PrintAndLogEx(INFO, " known key ..... " _YELLOW_("%s"), sprint_hex(key, sizeof(key))); - if (has_staticnonce) - PrintAndLogEx(INFO, " card PRNG ..... " _YELLOW_("%s & STATIC"), prng_type ? "WEAK" : "HARD"); - else + if (has_staticnonce == NONCE_STATIC) + PrintAndLogEx(INFO, " card PRNG ..... " _YELLOW_("STATIC")); + else if (has_staticnonce == NONCE_NORMAL) PrintAndLogEx(INFO, " card PRNG ..... " _YELLOW_("%s"), prng_type ? "WEAK" : "HARD"); + else + PrintAndLogEx(INFO, " card PRNG ..... " _YELLOW_("Could not determine PRNG,") " " _RED_("read failed.")); PrintAndLogEx(INFO, " dictionary .... " _YELLOW_("%s"), strlen(filename) ? filename : "NONE"); PrintAndLogEx(INFO, " legacy mode ... " _YELLOW_("%s"), legacy_mfchk ? "True" : "False"); @@ -2259,6 +2267,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { if (e_sector[i].foundKey[j] == 0) { for (uint32_t k = 0; k < key_cnt; k++) { PrintAndLogEx(NORMAL, "." NOLF); + fflush(stdout); if (mfCheckKeys(FirstBlockOfSector(i), j, true, 1, (keyBlock + (6 * k)), &key64) == PM3_SUCCESS) { e_sector[i].Key[j] = bytes_to_num((keyBlock + (6 * k)), 6); @@ -3159,7 +3168,8 @@ static int CmdHF14AMfChk(const char *Cmd) { for (uint16_t c = 0; c < keycnt; c += max_keys) { PrintAndLogEx(NORMAL, "." NOLF); - + fflush(stdout); + if (kbd_enter_pressed()) { PrintAndLogEx(INFO, "\naborted via keyboard!\n"); goto out; @@ -3737,7 +3747,8 @@ int CmdHF14AMfELoad(const char *Cmd) { return PM3_ESOFT; } PrintAndLogEx(NORMAL, "." NOLF); - + fflush(stdout); + blockNum++; counter += blockWidth; datalen -= blockWidth; @@ -4162,6 +4173,7 @@ static int CmdHF14AMfCLoad(const char *Cmd) { return PM3_ESOFT; } PrintAndLogEx(NORMAL, "." NOLF); + fflush(stdout); } PrintAndLogEx(NORMAL, "\n"); return PM3_SUCCESS; @@ -4424,6 +4436,7 @@ static int CmdHF14AMfCSave(const char *Cmd) { PrintAndLogEx(WARNING, "Cant set emul block: %d", i); } PrintAndLogEx(NORMAL, "." NOLF); + fflush(stdout); } PrintAndLogEx(NORMAL, "\n"); PrintAndLogEx(SUCCESS, "uploaded %d bytes to emulator memory", bytes); From 674dc38f5ec998442d32d62ff97b0aee4259b2ed Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 16:36:41 +0200 Subject: [PATCH 41/92] doc new mfc gen2 --- doc/magic_cards_notes.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index d8511082a..f77e2a38e 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -92,7 +92,7 @@ hf 14a info * some cards use a fix "08" in anticollision, no matter the block0 * some cards use a fix "08" in anticollision, unless SAK in block0 has most significant bit "80" set, in which case SAK="88" * BCC: - * all cards play blindly the block0 BCC bytes, beware! + * all cards play blindly the block0 BCC byte, beware! * ATS: * no card with ATS @@ -229,7 +229,7 @@ Android compatible * some cards play blindly the block0 SAK byte, beware! * some cards use a fix "08" or "18" in anticollision, no matter the block0. Including all 7b. * BCC: - * some cards play blindly the block0 BCC bytes, beware! + * some cards play blindly the block0 BCC byte, beware! * some cards compute a proper BCC in anticollision. Including all 7b. * ATS: * some cards don't reply to RATS @@ -240,13 +240,10 @@ Android compatible * UID 4b * ATQA: play blindly the block0 ATQA bytes, beware! * SAK: play blindly the block0 SAK byte, beware! -* BCC: play blindly the block0 BCC bytes, beware! +* BCC: play blindly the block0 BCC byte, beware! * ATS: no * PRNG: weak -F1 ATQAwarn SAKxx -BCCwarn Pweak - #### MIFARE Classic DirectWrite flavour 2 * UID 4b @@ -261,7 +258,7 @@ BCCwarn Pweak * UID 4b * ATQA: play blindly the block0 ATQA bytes, beware! * SAK: fixed -* BCC: play blindly the block0 BCC bytes, beware! +* BCC: play blindly the block0 BCC byte, beware! * ATS: no * PRNG: weak @@ -274,6 +271,15 @@ BCCwarn Pweak * ATS: 0978009102DABC1910F005 * PRNG: static 00000000 +#### MIFARE Classic DirectWrite flavour 5 + +* UID 4b +* ATQA: fixed +* SAK: play blindly the block0 SAK byte, beware! +* BCC: computed +* ATS: no +* PRNG: weak + ### Proxmark3 commands ``` From 28ecc8fea86ceb673820b6bcb7df9125c3e79d13 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 11 Sep 2020 16:38:12 +0200 Subject: [PATCH 42/92] renamed gen3, textual --- client/src/cmdhfmf.c | 51 +++++++++++++++++----------------- client/src/mifare/mifarehost.c | 4 +-- client/src/mifare/mifarehost.h | 4 +-- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 0637599fc..7e635b503 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -512,7 +512,7 @@ static int usage_hf14_gen3uid(void) { PrintAndLogEx(NORMAL, _YELLOW_(" hf mf gen3uid 01020304050607")); return PM3_SUCCESS; } -static int usage_hf14_gen3blk(void) { +static int usage_hf14_gen3block(void) { PrintAndLogEx(NORMAL, "Overwrite full manufacturer block for magic GEN 3 card"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Usage: hf mf gen3blk [h] [block data (up to 32 hex symbols)]"); @@ -531,15 +531,15 @@ static int usage_hf14_gen3blk(void) { PrintAndLogEx(NORMAL, _YELLOW_(" hf mf gen3blk")); return PM3_SUCCESS; } -static int usage_hf14_gen3freez(void) { - PrintAndLogEx(NORMAL, "Lock further UID changes. No more UID changes available after operation completed"); +static int usage_hf14_gen3freeze(void) { + PrintAndLogEx(NORMAL, "Perma lock further UID changes. No more UID changes available after operation completed"); PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(NORMAL, "Usage: hf mf gen3freez [h] "); + PrintAndLogEx(NORMAL, "Usage: hf mf gen3freeze [h] "); PrintAndLogEx(NORMAL, "Options:"); PrintAndLogEx(NORMAL, " h this help"); - PrintAndLogEx(NORMAL, " confirm UID locks operation"); + PrintAndLogEx(NORMAL, " confirm UID locks operation"); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, _YELLOW_(" hf mf gen3freez Y")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf mf gen3freeze y")); return PM3_SUCCESS; } @@ -5159,18 +5159,18 @@ static int CmdHf14AGen3UID(const char *Cmd) { return PM3_SUCCESS; } -static int CmdHf14AGen3Blk(const char *Cmd) { +static int CmdHf14AGen3Block(const char *Cmd) { uint8_t block[16] = {0x00}; int blocklen = 0; uint8_t newBlock[16] = {0x00}; char ctmp = tolower(param_getchar(Cmd, 0)); - if (ctmp == 'h') return usage_hf14_gen3blk(); + if (ctmp == 'h') return usage_hf14_gen3block(); if (ctmp != '\0' && param_gethex_to_eol(Cmd, 0, block, sizeof(block), &blocklen)) - return usage_hf14_gen3blk(); + return usage_hf14_gen3block(); - int res = mfGen3Blk(block, blocklen, newBlock); + int res = mfGen3Block(block, blocklen, newBlock); if (res) { PrintAndLogEx(ERR, "Can't change manufacturer block data. Error=%d", res); return PM3_ESOFT; @@ -5180,18 +5180,17 @@ static int CmdHf14AGen3Blk(const char *Cmd) { return PM3_SUCCESS; } -static int CmdHf14AGen3Freez(const char *Cmd) { - char ctmp = param_getchar(Cmd, 0); - if (tolower(ctmp) == 'h') return usage_hf14_gen3freez(); - if (ctmp != 'Y') return usage_hf14_gen3freez(); +static int CmdHf14AGen3Freeze(const char *Cmd) { + char ctmp = tolower(param_getchar(Cmd, 0)); + if (ctmp == 'h') return usage_hf14_gen3freeze(); + if (ctmp != 'y') return usage_hf14_gen3freeze(); - int res = mfGen3Freez(); + int res = mfGen3Freeze(); if (res) { PrintAndLogEx(ERR, "Can't lock UID changes. Error=%d", res); return PM3_ESOFT; } - - PrintAndLogEx(SUCCESS, "Gen 3 UID locked"); + PrintAndLogEx(SUCCESS, "MFC Gen3 UID permalocked"); return PM3_SUCCESS; } @@ -5232,18 +5231,18 @@ static command_t CommandTable[] = { {"ecfill", CmdHF14AMfECFill, IfPm3Iso14443a, "Fill simulator memory with help of keys from simulator"}, {"ekeyprn", CmdHF14AMfEKeyPrn, IfPm3Iso14443a, "Print keys from simulator memory"}, {"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("magic") " -----------------------"}, - {"csetuid", CmdHF14AMfCSetUID, IfPm3Iso14443a, "Set UID (magic chinese card)"}, + {"csetuid", CmdHF14AMfCSetUID, IfPm3Iso14443a, "Set UID"}, {"cwipe", CmdHF14AMfCWipe, IfPm3Iso14443a, "Wipe card to default UID/Sectors/Keys"}, - {"csetblk", CmdHF14AMfCSetBlk, IfPm3Iso14443a, "Write block (magic chinese card)"}, - {"cgetblk", CmdHF14AMfCGetBlk, IfPm3Iso14443a, "Read block (magic chinese card)"}, - {"cgetsc", CmdHF14AMfCGetSc, IfPm3Iso14443a, "Read sector (magic chinese card)"}, - {"cload", CmdHF14AMfCLoad, IfPm3Iso14443a, "Load dump (magic chinese card)"}, - {"csave", CmdHF14AMfCSave, IfPm3Iso14443a, "Save dump from magic chinese card into file or emulator"}, + {"csetblk", CmdHF14AMfCSetBlk, IfPm3Iso14443a, "Write block"}, + {"cgetblk", CmdHF14AMfCGetBlk, IfPm3Iso14443a, "Read block"}, + {"cgetsc", CmdHF14AMfCGetSc, IfPm3Iso14443a, "Read sector"}, + {"cload", CmdHF14AMfCLoad, IfPm3Iso14443a, "Load dump"}, + {"csave", CmdHF14AMfCSave, IfPm3Iso14443a, "Save dump from card into file or emulator"}, {"cview", CmdHF14AMfCView, IfPm3Iso14443a, "view card"}, {"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("magic gen3") " -----------------------"}, - {"gen3uid", CmdHf14AGen3UID, IfPm3Iso14443a, "Set UID without manufacturer block (magic gen3 card)"}, - {"gen3blk", CmdHf14AGen3Blk, IfPm3Iso14443a, "Overwrite full manufacturer block (magic gen 3 card)"}, - {"gen3freez", CmdHf14AGen3Freez, IfPm3Iso14443a, "Lock further UID changes (magic gen 3 card)"}, + {"gen3uid", CmdHf14AGen3UID, IfPm3Iso14443a, "Set UID without manufacturer block"}, + {"gen3blk", CmdHf14AGen3Block, IfPm3Iso14443a, "Overwrite full manufacturer block"}, + {"gen3freeze", CmdHf14AGen3Freeze, IfPm3Iso14443a, "Perma lock further UID changes"}, {"-----------", CmdHelp, IfPm3Iso14443a, "----------------------- " _CYAN_("i") " -----------------------"}, {"ice", CmdHF14AMfice, IfPm3Iso14443a, "collect MIFARE Classic nonces to file"}, diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index ed83a6498..7a14c3100 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -959,7 +959,7 @@ int mfGen3UID(uint8_t *uid, uint8_t uidlen, uint8_t *oldUid) { } } -int mfGen3Blk(uint8_t *block, int blockLen, uint8_t *newBlock) { +int mfGen3Block(uint8_t *block, int blockLen, uint8_t *newBlock) { clearCommandBuffer(); SendCommandMIX(CMD_HF_MIFARE_GEN3BLK, blockLen, 0, 0, block, 16); PacketResponseNG resp; @@ -974,7 +974,7 @@ int mfGen3Blk(uint8_t *block, int blockLen, uint8_t *newBlock) { } } -int mfGen3Freez(void) { +int mfGen3Freeze(void) { clearCommandBuffer(); SendCommandNG(CMD_HF_MIFARE_GEN3FREEZ, NULL, 0); PacketResponseNG resp; diff --git a/client/src/mifare/mifarehost.h b/client/src/mifare/mifarehost.h index 4864d9357..f6a840550 100644 --- a/client/src/mifare/mifarehost.h +++ b/client/src/mifare/mifarehost.h @@ -81,8 +81,8 @@ int mfCSetBlock(uint8_t blockNo, uint8_t *data, uint8_t *uid, uint8_t params); int mfCGetBlock(uint8_t blockNo, uint8_t *data, uint8_t params); int mfGen3UID(uint8_t *uid, uint8_t uidlen, uint8_t *oldUid); -int mfGen3Blk(uint8_t *block, int blockLen, uint8_t *newBlock); -int mfGen3Freez(void); +int mfGen3Block(uint8_t *block, int blockLen, uint8_t *newBlock); +int mfGen3Freeze(void); int tryDecryptWord(uint32_t nt, uint32_t ar_enc, uint32_t at_enc, uint8_t *data, int len); From cc30f4ed9fa1b6e172b82cf346b4541b81252075 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 16:46:13 +0200 Subject: [PATCH 43/92] adapt doc --- doc/magic_cards_notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index f77e2a38e..4bc67e273 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -377,7 +377,7 @@ hf mf gen3uid # write block0: hf mf gen3blk # lock (uid/block0?) forever: -hf mf gen3freez +hf mf gen3freeze ``` See also ``` From ecbcba18dd3db382d85f12b4f6a4c4181f695d2f Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 18:17:58 +0200 Subject: [PATCH 44/92] identify gen3 --- armsrc/mifarecmd.c | 14 ++++++++++++++ client/src/mifare/mifarehost.c | 5 ++++- doc/magic_cards_notes.md | 8 +++++++- include/protocols.h | 1 + 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index d33feeff2..9ee47f19f 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2243,6 +2243,7 @@ void MifareCIdent(void) { uint8_t recpar[1] = {0x00}; uint8_t rats[4] = { ISO14443A_CMD_RATS, 0x80, 0x31, 0x73 }; uint8_t rdbl[4] = { ISO14443A_CMD_READBLOCK, 0xF0, 0x8D, 0x5f}; + uint8_t rdbl0[4] = { ISO14443A_CMD_READBLOCK, 0x00, 0x02, 0xa8}; uint8_t *par = BigBuf_malloc(MAX_PARITY_SIZE); uint8_t *buf = BigBuf_malloc(PM3_CMD_DATA_SIZE); uint8_t *uid = BigBuf_malloc(10); @@ -2334,6 +2335,19 @@ void MifareCIdent(void) { isGen = MAGIC_NTAG21X; } } + + // magic MFC Gen3 test + FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); + SpinDelay(40); + iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN); + res = iso14443a_select_card(uid, NULL, &cuid, true, 0, true); + if (res == 2) { + ReaderTransmit(rdbl0, sizeof(rdbl0), NULL); + res = ReaderReceive(buf, par); + if (res == 18) { + isGen = MAGIC_GEN_3; + } + } }; OUT: diff --git a/client/src/mifare/mifarehost.c b/client/src/mifare/mifarehost.c index 7a14c3100..032c9eccf 100644 --- a/client/src/mifare/mifarehost.c +++ b/client/src/mifare/mifarehost.c @@ -1174,7 +1174,10 @@ int detect_classic_magic(void) { PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 1b")); break; case MAGIC_GEN_2: - PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 2 / CUID")); + PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 2 / CUID")); + break; + case MAGIC_GEN_3: + PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Gen 3 / APDU")); break; case MAGIC_GEN_UNFUSED: PrintAndLogEx(SUCCESS, "Magic capabilities : " _GREEN_("Write Once / FUID")); diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 4bc67e273..71180d2fd 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -344,7 +344,11 @@ hf 14a raw -c 85000000000000000000000000000008 ### Identify -**TODO** +``` +hf 14a info +... +[+] Magic capabilities : Gen 3 / APDU +``` ### Magic commands @@ -362,6 +366,8 @@ It seems the length byte gets ignored anyway. Note: it seems some cards only accept the "change UID" command. +It accepts direct read of block0 (and only block0) without prior auth. + ### Characteristics * UID: 4b and 7b versions diff --git a/include/protocols.h b/include/protocols.h index e043b6418..7cd547fef 100644 --- a/include/protocols.h +++ b/include/protocols.h @@ -221,6 +221,7 @@ ISO 7816-4 Basic interindustry commands. For command APDU's. #define MAGIC_GEN_UNFUSED 5 #define MAGIC_SUPER 6 #define MAGIC_NTAG21X 7 +#define MAGIC_GEN_3 8 /** 06 00 = INITIATE 0E xx = SELECT ID (xx = Chip-ID) From 3c9ca8f5bc38bb7c6f34b930473ed0c22734ff05 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 11 Sep 2020 22:48:42 +0200 Subject: [PATCH 45/92] 14a info: identify waveshare --- client/src/cmdhf14a.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index 9170d2fd7..c2b5b759b 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -1664,6 +1664,12 @@ int infoHF14A(bool verbose, bool do_nack_test, bool do_aid_search) { } getTagLabel(card.uid[0], card.uid[1]); break; + case 0x57: // Qualcomm + if (memcmp(card.uid, "WSDZ10m", 7) == 0) { + isMifareClassic = false; + printTag("Waveshare NFC-Powered e-Paper"); + } + break; default: getTagLabel(card.uid[0], card.uid[1]); switch (card.sak) { From 812d9cc46a68add6641c06ffacf234981d677a9a Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 12 Sep 2020 00:31:17 +0200 Subject: [PATCH 46/92] style --- armsrc/iso14443a.c | 46 ++++++++++++++++++++--------------------- armsrc/mifarecmd.c | 6 +++--- client/src/cmdhfmf.c | 8 +++---- client/src/cmdlffdx.c | 26 +++++++++++------------ client/src/cmdlfguard.c | 2 +- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index 0b904be33..d7de0b554 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -1077,7 +1077,7 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i sak = 0x00; } break; - + default: { if (DBGLEVEL >= DBG_ERROR) Dbprintf("Error: unknown tagtype (%d)", tagType); return false; @@ -1131,16 +1131,16 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i // Calculate BCC for the first 4 bytes of the UID. rUIDc1[4] = rUIDc1[0] ^ rUIDc1[1] ^ rUIDc1[2] ^ rUIDc1[3]; - + if (tagType == 10) { rSAKc1[0] = 0x04; rSAKc2[0] = 0x20; - } else { + } else { rSAKc1[0] = sak; rSAKc2[0] = sak & 0xFB; } - // crc + // crc AddCrc14A(rSAKc1, sizeof(rSAKc1) - 2); AddCrc14A(rSAKc2, sizeof(rSAKc2) - 2); @@ -1151,7 +1151,7 @@ bool SimulateIso14443aInit(int tagType, int flags, uint8_t *data, tag_response_i AddCrc14A(rRATS, sizeof(rRATS) - 2); AddCrc14A(rPPS, sizeof(rPPS) - 2); - + #define TAG_RESPONSE_COUNT 9 static tag_response_info_t responses_init[TAG_RESPONSE_COUNT] = { { .response = rATQA, .response_n = sizeof(rATQA) }, // Answer to request - respond with card type @@ -1257,7 +1257,7 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { iso14443a_setup(FPGA_HF_ISO14443A_TAGSIM_LISTEN); iso14a_set_timeout(201400); // 106 * 19ms default - + int len = 0; // To control where we are in the protocol @@ -1283,19 +1283,19 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { // compatible write block number uint8_t wrblock = 0; - + bool odd_reply = true; clear_trace(); set_tracing(true); LED_A_ON(); - + // main loop for (;;) { WDT_HIT(); tag_response_info_t *p_response = NULL; - + // Clean receive command buffer if (GetIso14443aCommandFromReader(receivedCmd, receivedCmdPar, &len) == false) { Dbprintf("Emulator stopped. Trace length: %d ", BigBuf_get_traceLen()); @@ -1580,17 +1580,17 @@ void SimulateIso14443aTag(uint8_t tagType, uint8_t flags, uint8_t *data) { AddCrc14A(cmd, sizeof(cmd) - 2); EmSendCmd(cmd, sizeof(cmd)); p_response = NULL; - + } else { // clear old dynamic responses dynamic_response_info.response_n = 0; dynamic_response_info.modulation_n = 0; - + // ST25TA512B IKEA Rothult if (tagType == 10) { // we replay 90 00 for all commands but the read bin and we deny the verify cmd. - + if (memcmp("\x02\xa2\xb0\x00\x00\x1d\x51\x69", receivedCmd, 8) == 0) { dynamic_response_info.response[0] = receivedCmd[0]; memcpy(dynamic_response_info.response + 1, "\x00\x1b\xd1\x01\x17\x54\x02\x7a\x68\xa2\x34\xcb\xd0\xe2\x03\xc7\x3e\x62\x0b\xe8\xc6\x3c\x85\x2c\xc5\x31\x31\x31\x32\x90\x00", 31); @@ -2021,11 +2021,11 @@ int EmSendCmd14443aRaw(uint8_t *resp, uint16_t respLen) { while (!(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY)); b = AT91C_BASE_SSC->SSC_RHR; (void) b; -/* - while (!(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_TXRDY)); - b = AT91C_BASE_SSC->SSC_THR; - (void) b; -*/ + /* + while (!(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_TXRDY)); + b = AT91C_BASE_SSC->SSC_THR; + (void) b; + */ // wait for the FPGA to signal fdt_indicator == 1 (the FPGA is ready to queue new data in its delay line) for (uint8_t j = 0; j < 5; j++) { // allow timeout - better late than never @@ -2045,12 +2045,12 @@ int EmSendCmd14443aRaw(uint8_t *resp, uint16_t respLen) { FpgaSendQueueDelay = (uint8_t)AT91C_BASE_SSC->SSC_RHR; } -/* - if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) { - b = (uint16_t)(AT91C_BASE_SSC->SSC_RHR); - (void)b; - } - */ + /* + if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) { + b = (uint16_t)(AT91C_BASE_SSC->SSC_RHR); + (void)b; + } + */ } // Ensure that the FPGA Delay Queue is empty before we switch to TAGSIM_LISTEN again: diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 9ee47f19f..53e33ff38 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2287,7 +2287,7 @@ void MifareCIdent(void) { res = ReaderReceive(buf, par); if (res == 22) { isGen = MAGIC_SUPER; - goto OUT; + goto OUT; } isGen = MAGIC_GEN_2; @@ -2322,7 +2322,7 @@ void MifareCIdent(void) { isGen = MAGIC_GEN_2; goto OUT; } - + // magic ntag test FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); SpinDelay(40); @@ -2369,7 +2369,7 @@ void MifareHasStaticNonce(void) { struct Crypto1State mpcs = {0, 0}; struct Crypto1State *pcs; pcs = &mpcs; - + iso14443a_setup(FPGA_HF_ISO14443A_READER_LISTEN); uint8_t counter = 0; diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 7e635b503..c62629b6f 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -995,7 +995,7 @@ static int CmdHF14AMfDump(const char *Cmd) { PrintAndLogEx(WARNING, "Could not find file " _YELLOW_("%s"), keyFilename); return PM3_EFILE; } - + PrintAndLogEx(INFO, "Using `" _YELLOW_("%s") "`", keyFilename); // Read keys A from file @@ -3169,7 +3169,7 @@ static int CmdHF14AMfChk(const char *Cmd) { PrintAndLogEx(NORMAL, "." NOLF); fflush(stdout); - + if (kbd_enter_pressed()) { PrintAndLogEx(INFO, "\naborted via keyboard!\n"); goto out; @@ -3748,7 +3748,7 @@ int CmdHF14AMfELoad(const char *Cmd) { } PrintAndLogEx(NORMAL, "." NOLF); fflush(stdout); - + blockNum++; counter += blockWidth; datalen -= blockWidth; @@ -4525,7 +4525,7 @@ static int CmdHF14AMfCView(const char *Cmd) { free(dump); return PM3_ESOFT; } - + PrintAndLogEx(NORMAL, "." NOLF); fflush(stdout); } diff --git a/client/src/cmdlffdx.c b/client/src/cmdlffdx.c index 2bb3b274c..af4f316ae 100644 --- a/client/src/cmdlffdx.c +++ b/client/src/cmdlffdx.c @@ -232,7 +232,7 @@ int demodFDX(void) { setDemodBuff(DemodBuffer, 128, preambleIndex); setClockGrid(g_DemodClock, g_DemodStartIdx + (preambleIndex * g_DemodClock)); - + // remove marker bits (1's every 9th digit after preamble) (pType = 2) size = removeParity(DemodBuffer, 11, 9, 2, 117); if (size != 104) { @@ -246,21 +246,21 @@ int demodFDX(void) { offset = 38; uint16_t countryCode = bytebits_to_byteLSBF(DemodBuffer + offset, 10); - + offset += 10; uint8_t dataBlockBit = DemodBuffer[offset]; - + offset++; uint32_t reservedCode = bytebits_to_byteLSBF(DemodBuffer + offset, 14); - + offset += 14; uint8_t animalBit = DemodBuffer[offset]; - + offset++; uint16_t crc = bytebits_to_byteLSBF(DemodBuffer + offset, 16); - + offset += 16; - uint32_t extended = bytebits_to_byteLSBF(DemodBuffer + offset, 24); + uint32_t extended = bytebits_to_byteLSBF(DemodBuffer + offset, 24); uint64_t rawid = (uint64_t)(bytebits_to_byte(DemodBuffer, 32)) << 32 | bytebits_to_byte(DemodBuffer + 32, 32); uint8_t raw[8]; @@ -389,13 +389,13 @@ static int CmdFdxClone(const char *Cmd) { } } if (errors || strlen(Cmd) == 0) return usage_lf_fdx_clone(); - + verify_values(&national_code, &country_code, &extended, &is_animal); PrintAndLogEx(INFO, " Country code %"PRIu32, country_code); PrintAndLogEx(INFO, " National code %"PRIu64, national_code); - PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N'); - PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N'); + PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y' : 'N'); + PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y' : 'N'); PrintAndLogEx(INFO, " Extended data 0x%"PRIX32, extended); PrintAndLogEx(INFO, " RFU 0"); @@ -469,13 +469,13 @@ static int CmdFdxSim(const char *Cmd) { } } if (errors) return usage_lf_fdx_sim(); - + verify_values(&national_code, &country_code, &extended, &is_animal); PrintAndLogEx(INFO, " Country code %"PRIu32, country_code); PrintAndLogEx(INFO, " National code %"PRIu64, national_code); - PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y':'N'); - PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y':'N'); + PrintAndLogEx(INFO, " Set animal bit %c", (is_animal) ? 'Y' : 'N'); + PrintAndLogEx(INFO, "Set data block bit %c", (has_extended) ? 'Y' : 'N'); PrintAndLogEx(INFO, " Extended data 0x%"PRIX32, extended); PrintAndLogEx(INFO, " RFU 0"); diff --git a/client/src/cmdlfguard.c b/client/src/cmdlfguard.c index 6bb566c0d..83a34d5fe 100644 --- a/client/src/cmdlfguard.c +++ b/client/src/cmdlfguard.c @@ -356,7 +356,7 @@ int getGuardBits(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint8_t *guardBits) { rawbytes[i + 4] = bytebits_to_byte(pre + (i * 8), 8); PrintAndLogEx(DEBUG, " WIE | %s", sprint_hex(rawbytes, sizeof(rawbytes))); - + // XOR (only works on wiegand stuff) for (i = 1; i < sizeof(rawbytes); ++i) rawbytes[i] ^= xorKey ; From df60ba6b055dd7ada39fa56f130eed8a7075d0a8 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 12 Sep 2020 14:23:04 +0200 Subject: [PATCH 47/92] added basic support for Rothult ST cards --- client/Makefile | 1 + client/src/cmdhf.c | 2 + client/src/cmdhfst.c | 309 +++++++++++++++++++++++++++++++++++++++++++ client/src/cmdhfst.h | 19 +++ 4 files changed, 331 insertions(+) create mode 100644 client/src/cmdhfst.c create mode 100644 client/src/cmdhfst.h diff --git a/client/Makefile b/client/Makefile index a4e8b193d..5af53463d 100644 --- a/client/Makefile +++ b/client/Makefile @@ -434,6 +434,7 @@ SRCS = aidsearch.c \ cmdhfmfp.c \ cmdhfthinfilm.c \ cmdhftopaz.c \ + cmdhfst.c \ cmdhw.c \ cmdlf.c \ cmdlfawid.c \ diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index dd3bf4b51..4d89cca62 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -35,6 +35,7 @@ #include "cmdhfthinfilm.h" // Thinfilm #include "cmdhflto.h" // LTO-CM #include "cmdhfcryptorf.h" // CryptoRF +#include "cmdhfst.h" // ST rothult #include "cmdtrace.h" // trace list #include "ui.h" #include "proxgui.h" @@ -365,6 +366,7 @@ static command_t CommandTable[] = { {"mfp", CmdHFMFP, AlwaysAvailable, "{ MIFARE Plus RFIDs... }"}, {"mfu", CmdHFMFUltra, AlwaysAvailable, "{ MIFARE Ultralight RFIDs... }"}, {"mfdes", CmdHFMFDes, AlwaysAvailable, "{ MIFARE Desfire RFIDs... }"}, + {"st", CmdHF_ST, AlwaysAvailable, "{ ST Rothult RFIDs... }"}, {"thinfilm", CmdHFThinfilm, AlwaysAvailable, "{ Thinfilm RFIDs... }"}, {"topaz", CmdHFTopaz, AlwaysAvailable, "{ TOPAZ (NFC Type 1) RFIDs... }"}, {"list", CmdTraceList, AlwaysAvailable, "List protocol data in trace buffer"}, diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c new file mode 100644 index 000000000..ac4384cff --- /dev/null +++ b/client/src/cmdhfst.c @@ -0,0 +1,309 @@ +//----------------------------------------------------------------------------- +// Copyright (C) 2020 iceman1001 +// +// This code is licensed to you under the terms of the GNU GPL, version 2 or, +// at your option, any later version. See the LICENSE.txt file for the text of +// the license. +//----------------------------------------------------------------------------- +// High frequency ISO14443A / ST commands +//----------------------------------------------------------------------------- + +#include "cmdhfst.h" +#include +#include "fileutils.h" +#include "cmdparser.h" // command_t +#include "comms.h" // clearCommandBuffer +#include "cmdtrace.h" +#include "crc16.h" +#include "cmdhf14a.h" +#include "protocols.h" // definitions of ISO14A/7816 protocol +#include "emv/apduinfo.h" // GetAPDUCodeDescription + +#define TIMEOUT 2000 +static int CmdHelp(const char *Cmd); + +static int usage_hf_st_info(void) { + PrintAndLogEx(NORMAL, "Usage: hf st info [h]"); + PrintAndLogEx(NORMAL, "Options:"); + PrintAndLogEx(NORMAL, " h this help"); + PrintAndLogEx(NORMAL, "Example:"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf st info")); + return PM3_SUCCESS; +} + +static int usage_hf_st_sim(void) { + PrintAndLogEx(NORMAL, "\n Emulating ST25TA512B tag with 7 byte UID\n"); + PrintAndLogEx(NORMAL, "Usage: hf st sim [h] u "); + PrintAndLogEx(NORMAL, "Options:"); + PrintAndLogEx(NORMAL, " h : This help"); + PrintAndLogEx(NORMAL, " u : 7 byte UID"); + PrintAndLogEx(NORMAL, "Examples:"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a sim u 02E2007D0FCA4C")); + return PM3_SUCCESS; +} +/* +// get ST chip model (from UID) // from ST Microelectronics +static char *get_st_chip_model(uint8_t data) { + static char model[20]; + char *s = model; + memset(model, 0, sizeof(model)); + switch (data) { + case 0x0: + sprintf(s, "SRIX4K (Special)"); + break; + case 0x2: + sprintf(s, "SR176"); + break; + case 0x3: + sprintf(s, "SRIX4K"); + break; + case 0x4: + sprintf(s, "SRIX512"); + break; + case 0x6: + sprintf(s, "SRI512"); + break; + case 0x7: + sprintf(s, "SRI4K"); + break; + case 0xC: + sprintf(s, "SRT512"); + break; + default : + sprintf(s, "Unknown"); + break; + } + return s; +} + +// print UID info from SRx chips (ST Microelectronics) +static void print_st_general_info(uint8_t *data, uint8_t len) { + //uid = first 8 bytes in data + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(SUCCESS, " UID: " _GREEN_("%s"), sprint_hex(SwapEndian64(data, 8, 8), len)); + PrintAndLogEx(SUCCESS, " MFG: %02X, " _YELLOW_("%s"), data[6], getTagInfo(data[6])); + PrintAndLogEx(SUCCESS, "Chip: %02X, " _YELLOW_("%s"), data[5] >> 2, get_st_chip_model(data[5] >> 2)); +} + +*/ +static void print_st_cc_info(uint8_t *d, uint8_t n) { + if (n < 0x0F) { + PrintAndLogEx(WARNING, "Not enought bytes read from system file"); + return; + } + + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(SUCCESS, "------------ " _CYAN_("Capability Container file") " ------------"); + PrintAndLogEx(SUCCESS, " len %u bytes (" _GREEN_("0x%02X") ")", d[1],d[1]); + PrintAndLogEx(SUCCESS, " version %s (" _GREEN_("0x%02X") ")", (d[2] == 0x20) ? "v2.0" : "v1.0", d[2]); + + uint16_t maxr = (d[3] << 8 | d[4]); + PrintAndLogEx(SUCCESS, " max bytes read %u bytes ( 0x%04X )", maxr, maxr); + uint16_t maxw = (d[5] << 8 | d[6]); + PrintAndLogEx(SUCCESS, " max bytes write %u bytes ( 0x%04X )", maxw, maxw); + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(SUCCESS, " NDEF file control TLV {"); + PrintAndLogEx(SUCCESS, " t ( %02X )", d[7]); + PrintAndLogEx(SUCCESS, " v ( %02X )", d[8]); + PrintAndLogEx(SUCCESS, " file id ( %02X%02X )", d[9], d[10]); + + uint16_t maxndef = (d[11] << 8 | d[12]); + PrintAndLogEx(SUCCESS, " max NDEF filesize %u bytes ( 0x%04X )", maxndef, maxndef); + PrintAndLogEx(SUCCESS, " ----- " _CYAN_("access rights") " -------"); + PrintAndLogEx(SUCCESS, " read ( %02X )", d[13]); + PrintAndLogEx(SUCCESS, " write ( %02X )", d[14]); + PrintAndLogEx(SUCCESS, " }"); + PrintAndLogEx(SUCCESS, "----------------- " _CYAN_("raw") " -----------------"); + PrintAndLogEx(SUCCESS, "%s", sprint_hex_inrow(d, n)); + PrintAndLogEx(NORMAL, ""); +} +static void print_st_system_info(uint8_t *d, uint8_t n) { + if (n < 0x12) { + PrintAndLogEx(WARNING, "Not enought bytes read from system file"); + return; + } + + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(SUCCESS, "------------ " _CYAN_("ST System file") " ------------"); + + uint16_t len = (d[0] << 8 | d[1]); + PrintAndLogEx(SUCCESS, " len %u bytes (" _GREEN_("0x%04X") ")", len, len); + + if (d[2] == 0x80) { + PrintAndLogEx(SUCCESS, " ST reserved ( 0x%02X )", d[2]); + } else { + PrintAndLogEx(SUCCESS, " GPO Config ( 0x%02X )", d[2]); + } + PrintAndLogEx(SUCCESS, " Event counter config ( 0x%02X )", d[3]); + + uint32_t counter = (d[4] << 16 | d[5] << 8 | d[6]); + PrintAndLogEx(SUCCESS, " 20bit counter ( 0x%05X )", counter & 0xFFFFF); + + PrintAndLogEx(SUCCESS, " Product version ( 0x%02X )", d[7]); + + PrintAndLogEx(SUCCESS, " UID " _GREEN_("%s"), sprint_hex_inrow(d + 8, 7)); + + uint16_t mem = (d[0xF] << 8 | d[0x10]); + PrintAndLogEx(SUCCESS, " Memory Size - 1 %u bytes (" _GREEN_("0x%04X") ")", mem, mem); + + PrintAndLogEx(SUCCESS, " IC Reference code %u ( 0x%02X )", d[0x12], d[0x12]); + + PrintAndLogEx(SUCCESS, "----------------- " _CYAN_("raw") " -----------------"); + PrintAndLogEx(SUCCESS, "%s", sprint_hex_inrow(d, n)); + PrintAndLogEx(NORMAL, ""); + + /* + 0012 + 80000000001302E2007D0E8DCC + */ +} + +static uint16_t get_sw(uint8_t *d, uint8_t n) { + if (n < 2) + return 0; + + n -= 2; + return d[n] * 0x0100 + d[n + 1]; +} + +// ST rothult +int infoHF_ST(void) { + + bool activate_field = true; + bool keep_field_on = true; + uint8_t response[PM3_CMD_DATA_SIZE]; + int resplen = 0; + + uint8_t aSELECT_AID[80]; + int aSELECT_AID_n = 0; + param_gethex_to_eol("00a4040007d276000085010100", 0, aSELECT_AID, sizeof(aSELECT_AID), &aSELECT_AID_n); + int res = ExchangeAPDU14a(aSELECT_AID, aSELECT_AID_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + if (resplen < 2) + return PM3_ESOFT; + + uint16_t sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "Selecting NDEF aid failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + + activate_field = false; + keep_field_on = true; + // --------------- CC file reading ---------------- + + uint8_t aSELECT_FILE_CC[30]; + int aSELECT_FILE_CC_n = 0; + param_gethex_to_eol("00a4000c02e103", 0, aSELECT_FILE_CC, sizeof(aSELECT_FILE_CC), &aSELECT_FILE_CC_n); + res = ExchangeAPDU14a(aSELECT_FILE_CC, aSELECT_FILE_CC_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "Selecting CC file failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + + uint8_t aREAD_CC[30]; + int aREAD_CC_n = 0; + param_gethex_to_eol("00b000000f", 0, aREAD_CC, sizeof(aREAD_CC), &aREAD_CC_n); + res = ExchangeAPDU14a(aREAD_CC, aREAD_CC_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "reading CC file failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + + print_st_cc_info(response, resplen - 2); + + + // --------------- System file reading ---------------- + uint8_t aSELECT_FILE_SYS[30]; + int aSELECT_FILE_SYS_n = 0; + param_gethex_to_eol("00a4000c02e101", 0, aSELECT_FILE_SYS, sizeof(aSELECT_FILE_SYS), &aSELECT_FILE_SYS_n); + res = ExchangeAPDU14a(aSELECT_FILE_SYS, aSELECT_FILE_SYS_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "Selecting system file failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + + keep_field_on = false; + + uint8_t aREAD_SYS[30]; + int aREAD_SYS_n = 0; + param_gethex_to_eol("00b0000012", 0, aREAD_SYS, sizeof(aREAD_SYS), &aREAD_SYS_n); + res = ExchangeAPDU14a(aREAD_SYS, aREAD_SYS_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "reading system file failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + print_st_system_info(response, resplen - 2); +// PrintAndLogEx(NORMAL, "<<<< %s", sprint_hex(response, resplen)); + return PM3_SUCCESS; +} + +// menu command to get and print all info known about any known 14b tag +static int cmd_hf_st_info(const char *Cmd) { + char c = tolower(param_getchar(Cmd, 0)); + if (c == 'h') return usage_hf_st_info(); + return infoHF_ST(); +} + +static int cmd_hf_st_sim(const char *Cmd) { + char c = tolower(param_getchar(Cmd, 0)); + if (c == 'h' || c == 0x00) return usage_hf_st_sim(); + + int uidlen = 0; + uint8_t cmdp = 0; + uint8_t uid[7] = {0}; + if (c == 'u') { + param_gethex_ex(Cmd, cmdp + 1, uid, &uidlen); + uidlen >>= 1; + if (uidlen != 7) { + return usage_hf_st_sim(); + } + } + + char param[40]; + snprintf(param, sizeof(param), "t 10 u %s", sprint_hex_inrow(uid, uidlen)); + return CmdHF14ASim(param); +} + +static int cmd_hf_st_list(const char *Cmd) { + (void)Cmd; // Cmd is not used so far + CmdTraceList("7816"); + return PM3_SUCCESS; +} + +static command_t CommandTable[] = { + {"help", CmdHelp, AlwaysAvailable, "This help"}, + {"info", cmd_hf_st_info, IfPm3Iso14443a, "Tag information"}, + {"list", cmd_hf_st_list, AlwaysAvailable, "List ISO 14443A/7816 history"}, + {"sim", cmd_hf_st_sim, IfPm3Iso14443a, "Fake ISO 14443A/ST tag"}, + {NULL, NULL, NULL, NULL} +}; + +static int CmdHelp(const char *Cmd) { + (void)Cmd; // Cmd is not used so far + CmdsHelp(CommandTable); + return PM3_SUCCESS; +} + +int CmdHF_ST(const char *Cmd) { + clearCommandBuffer(); + return CmdsParse(CommandTable, Cmd); +} diff --git a/client/src/cmdhfst.h b/client/src/cmdhfst.h new file mode 100644 index 000000000..c3772318d --- /dev/null +++ b/client/src/cmdhfst.h @@ -0,0 +1,19 @@ +//----------------------------------------------------------------------------- +// Copyright (C) 2020 iceman1001 +// +// This code is licensed to you under the terms of the GNU GPL, version 2 or, +// at your option, any later version. See the LICENSE.txt file for the text of +// the license. +//----------------------------------------------------------------------------- +// High frequency ISO14443A / ST commands +//----------------------------------------------------------------------------- + +#ifndef CMDHFST_H__ +#define CMDHFST_H__ + +#include "common.h" + +int CmdHF_ST(const char *Cmd); + +int infoHF_ST(void); +#endif From b16d895438aa5f0ae4f309bd5b5cec882a744a28 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 12 Sep 2020 15:00:50 +0200 Subject: [PATCH 48/92] hf st info - more details GPO, Event --- client/src/cmdhfst.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c index ac4384cff..b987f88af 100644 --- a/client/src/cmdhfst.c +++ b/client/src/cmdhfst.c @@ -133,8 +133,40 @@ static void print_st_system_info(uint8_t *d, uint8_t n) { PrintAndLogEx(SUCCESS, " ST reserved ( 0x%02X )", d[2]); } else { PrintAndLogEx(SUCCESS, " GPO Config ( 0x%02X )", d[2]); + PrintAndLogEx(SUCCESS, " config lock bit ( %s )", ((d[2] & 0x80) == 0x80) ? _RED_("locked") : _GREEN_("unlocked")); + uint8_t conf = (d[2] & 0x70) >> 4; + switch(conf) { + case 0: + PrintAndLogEx(SUCCESS, ""); + break; + case 1: + PrintAndLogEx(SUCCESS, "Session opened"); + break; + case 2: + PrintAndLogEx(SUCCESS, "WIP"); + break; + case 3: + PrintAndLogEx(SUCCESS, "MIP"); + break; + case 4: + PrintAndLogEx(SUCCESS, "Interrupt"); + break; + case 5: + PrintAndLogEx(SUCCESS, "State Control"); + break; + case 6: + PrintAndLogEx(SUCCESS, "RF Busy"); + break; + case 7: + PrintAndLogEx(SUCCESS, "Field Detect"); + break; + } } + PrintAndLogEx(SUCCESS, " Event counter config ( 0x%02X )", d[3]); + PrintAndLogEx(SUCCESS, " config lock bit ( %s )", ((d[3] & 0x80) == 0x80) ? _RED_("locked") : _GREEN_("unlocked")); + PrintAndLogEx(SUCCESS, " counter ( %s )", ((d[3] & 0x02) == 0x02) ? _RED_("enabled") : _GREEN_("disable")); + PrintAndLogEx(SUCCESS, " counter increment on ( %s )", ((d[3] & 0x01) == 0x01) ? _YELLOW_("write") : _YELLOW_("read")); uint32_t counter = (d[4] << 16 | d[5] << 8 | d[6]); PrintAndLogEx(SUCCESS, " 20bit counter ( 0x%05X )", counter & 0xFFFFF); From 8736f60fdcde683e6fb5f78ce1a29838a528887c Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 12 Sep 2020 15:11:43 +0200 Subject: [PATCH 49/92] hf st info - more details GPO, Event --- client/src/cmdhfst.c | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c index b987f88af..c38009eed 100644 --- a/client/src/cmdhfst.c +++ b/client/src/cmdhfst.c @@ -41,13 +41,13 @@ static int usage_hf_st_sim(void) { PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a sim u 02E2007D0FCA4C")); return PM3_SUCCESS; } -/* -// get ST chip model (from UID) // from ST Microelectronics -static char *get_st_chip_model(uint8_t data) { - static char model[20]; + +// get ST Microelectronics chip model (from UID) +static char *get_st_chip_model(uint8_t pc) { + static char model[40]; char *s = model; memset(model, 0, sizeof(model)); - switch (data) { + switch (pc) { case 0x0: sprintf(s, "SRIX4K (Special)"); break; @@ -69,13 +69,28 @@ static char *get_st_chip_model(uint8_t data) { case 0xC: sprintf(s, "SRT512"); break; + case 0xE2: + sprintf(s, "ST25??? IKEA Rothult"); + break; + case 0xE3: + sprintf(s, "ST25TA02KB"); + break; + case 0xE4: + sprintf(s, "ST25TA512B"); + break; + case 0xA3: + sprintf(s, "ST25TA02KB-P"); + break; + case 0xF3: + sprintf(s, "ST25TA02KB-D"); + break; default : sprintf(s, "Unknown"); break; } return s; } - +/* // print UID info from SRx chips (ST Microelectronics) static void print_st_general_info(uint8_t *data, uint8_t len) { //uid = first 8 bytes in data @@ -103,9 +118,9 @@ static void print_st_cc_info(uint8_t *d, uint8_t n) { PrintAndLogEx(SUCCESS, " max bytes write %u bytes ( 0x%04X )", maxw, maxw); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(SUCCESS, " NDEF file control TLV {"); - PrintAndLogEx(SUCCESS, " t ( %02X )", d[7]); - PrintAndLogEx(SUCCESS, " v ( %02X )", d[8]); - PrintAndLogEx(SUCCESS, " file id ( %02X%02X )", d[9], d[10]); + PrintAndLogEx(SUCCESS, " (t) type of file ( %02X )", d[7]); + PrintAndLogEx(SUCCESS, " (v) ( %02X )", d[8]); + PrintAndLogEx(SUCCESS, " file id ( %02X%02X )", d[9], d[10]); uint16_t maxndef = (d[11] << 8 | d[12]); PrintAndLogEx(SUCCESS, " max NDEF filesize %u bytes ( 0x%04X )", maxndef, maxndef); @@ -173,7 +188,10 @@ static void print_st_system_info(uint8_t *d, uint8_t n) { PrintAndLogEx(SUCCESS, " Product version ( 0x%02X )", d[7]); - PrintAndLogEx(SUCCESS, " UID " _GREEN_("%s"), sprint_hex_inrow(d + 8, 7)); + PrintAndLogEx(SUCCESS, " UID " _GREEN_("%s"), sprint_hex_inrow(d + 8, 7)); + PrintAndLogEx(SUCCESS, " MFG 0x%02X, " _YELLOW_("%s"), d[8], getTagInfo(d[8])); + PrintAndLogEx(SUCCESS, " Product Code 0x%02X, " _YELLOW_("%s"), d[9], get_st_chip_model(d[9])); + PrintAndLogEx(SUCCESS, " Device# " _YELLOW_("%s"), sprint_hex_inrow(d + 10, 5)); uint16_t mem = (d[0xF] << 8 | d[0x10]); PrintAndLogEx(SUCCESS, " Memory Size - 1 %u bytes (" _GREEN_("0x%04X") ")", mem, mem); @@ -205,7 +223,8 @@ int infoHF_ST(void) { bool keep_field_on = true; uint8_t response[PM3_CMD_DATA_SIZE]; int resplen = 0; - + + // --------------- Select NDEF Tag application ---------------- uint8_t aSELECT_AID[80]; int aSELECT_AID_n = 0; param_gethex_to_eol("00a4040007d276000085010100", 0, aSELECT_AID, sizeof(aSELECT_AID), &aSELECT_AID_n); From 9abbcab4a5dfa17cbab243cff456d8adf5fb2c10 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 12 Sep 2020 20:57:07 +0200 Subject: [PATCH 50/92] cmake --- client/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 3ac98578b..ab8f20c74 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -238,6 +238,7 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/cmdhfmfhard.c ${PM3_ROOT}/client/src/cmdhfmfp.c ${PM3_ROOT}/client/src/cmdhfmfu.c + ${PM3_ROOT}/client/src/cmdhfst.c ${PM3_ROOT}/client/src/cmdhfthinfilm.c ${PM3_ROOT}/client/src/cmdhftopaz.c ${PM3_ROOT}/client/src/cmdhw.c From b9329ce555858116b109fe608fdfeeaa457aa844 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 12 Sep 2020 19:38:29 +0200 Subject: [PATCH 51/92] Add Waveshare support (bitmap ok, RGB maybe broken?) --- CHANGELOG.md | 3 +- client/CMakeLists.txt | 1 + client/Makefile | 3 +- client/android/CMakeLists.txt | 1 + client/src/cmdhf.c | 4 +- client/src/cmdhfwaveshare.c | 878 ++++++++++++++++++++++++++++++++++ client/src/cmdhfwaveshare.h | 10 + client/src/ui.h | 1 + 8 files changed, 897 insertions(+), 4 deletions(-) create mode 100644 client/src/cmdhfwaveshare.c create mode 100644 client/src/cmdhfwaveshare.h diff --git a/CHANGELOG.md b/CHANGELOG.md index eccad5f86..55d26c791 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] - - Add `hf 14a config` to deal with badly configured cards: invalid ATQA/BCC/SAK (@doegox)" + - Add `hf waveshare` to upload picture to Waveshare NFC-Powered e-Paper (@doegox) + - Add `hf 14a config` to deal with badly configured cards: invalid ATQA/BCC/SAK (@doegox) - Mikron JSC Russia Ultralight EV1 41 pages tag type support (@McEloff) - Add test for Ultralight gen2 magic 'hf search' (@McEloff) - Add test for Ultralight EV1 gen2 magic 'hf search' (@McEloff) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index ab8f20c74..fc56b594a 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -241,6 +241,7 @@ set (TARGET_SOURCES ${PM3_ROOT}/client/src/cmdhfst.c ${PM3_ROOT}/client/src/cmdhfthinfilm.c ${PM3_ROOT}/client/src/cmdhftopaz.c + ${PM3_ROOT}/client/src/cmdhfwaveshare.c ${PM3_ROOT}/client/src/cmdhw.c ${PM3_ROOT}/client/src/cmdlf.c ${PM3_ROOT}/client/src/cmdlfawid.c diff --git a/client/Makefile b/client/Makefile index 5af53463d..ebf07c4b4 100644 --- a/client/Makefile +++ b/client/Makefile @@ -432,9 +432,10 @@ SRCS = aidsearch.c \ cmdhfmfhard.c \ cmdhfmfu.c \ cmdhfmfp.c \ + cmdhfst.c \ cmdhfthinfilm.c \ cmdhftopaz.c \ - cmdhfst.c \ + cmdhfwaveshare.c \ cmdhw.c \ cmdlf.c \ cmdlfawid.c \ diff --git a/client/android/CMakeLists.txt b/client/android/CMakeLists.txt index cc827d143..a55055770 100644 --- a/client/android/CMakeLists.txt +++ b/client/android/CMakeLists.txt @@ -119,6 +119,7 @@ add_library(pm3rrg_rdv4 SHARED ${PM3_ROOT}/client/src/cmdhfmfu.c ${PM3_ROOT}/client/src/cmdhfthinfilm.c ${PM3_ROOT}/client/src/cmdhftopaz.c + ${PM3_ROOT}/client/src/cmdhfwaveshare.c ${PM3_ROOT}/client/src/cmdhw.c ${PM3_ROOT}/client/src/cmdlf.c ${PM3_ROOT}/client/src/cmdlfawid.c diff --git a/client/src/cmdhf.c b/client/src/cmdhf.c index 4d89cca62..dcd85c5d5 100644 --- a/client/src/cmdhf.c +++ b/client/src/cmdhf.c @@ -36,6 +36,7 @@ #include "cmdhflto.h" // LTO-CM #include "cmdhfcryptorf.h" // CryptoRF #include "cmdhfst.h" // ST rothult +#include "cmdhfwaveshare.h" // Waveshare #include "cmdtrace.h" // trace list #include "ui.h" #include "proxgui.h" @@ -85,8 +86,6 @@ static int usage_hf_tune(void) { return PM3_SUCCESS; } -#define PROMPT_CLEARLINE PrintAndLogEx(INPLACE, " \r") - int CmdHFSearch(const char *Cmd) { char cmdp = tolower(param_getchar(Cmd, 0)); @@ -369,6 +368,7 @@ static command_t CommandTable[] = { {"st", CmdHF_ST, AlwaysAvailable, "{ ST Rothult RFIDs... }"}, {"thinfilm", CmdHFThinfilm, AlwaysAvailable, "{ Thinfilm RFIDs... }"}, {"topaz", CmdHFTopaz, AlwaysAvailable, "{ TOPAZ (NFC Type 1) RFIDs... }"}, + {"waveshare", CmdHFWaveshare, AlwaysAvailable, "{ Waveshare NFC ePaper... }"}, {"list", CmdTraceList, AlwaysAvailable, "List protocol data in trace buffer"}, {"plot", CmdHFPlot, IfPm3Hfplot, "Plot signal"}, {"tune", CmdHFTune, IfPm3Present, "Continuously measure HF antenna tuning"}, diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c new file mode 100644 index 000000000..8494f9f48 --- /dev/null +++ b/client/src/cmdhfwaveshare.c @@ -0,0 +1,878 @@ +//----------------------------------------------------------------------------- +// Waveshare commands +//----------------------------------------------------------------------------- +// from ST25R3911B-NFC-Demo source code by Waveshare team + +#include "cmdhfwaveshare.h" + +#include +#include +#include "comms.h" +#include "cmdparser.h" +#include "ui.h" +#include "util.h" +#include "fileutils.h" +#include "util_posix.h" // msleep + +// Currently the largest pixel 880*528 only needs 58.08K bytes +#define WSMAPSIZE 60000 + +#pragma pack(1) /* Mandatory to remove any padding */ +typedef struct { + uint8_t B; + uint8_t M; + uint32_t fsize; + uint16_t res1; + uint16_t res2; + uint32_t offset; + uint32_t Bit_Pixel; + uint32_t BMP_Width; + uint32_t BMP_Height; + uint16_t planes; + uint16_t bpp; + uint32_t ctype; + uint32_t dsize; + uint32_t hppm; + uint32_t vppm; + uint32_t colorsused; + uint32_t colorreq; + uint32_t Color_1; //Color palette + uint32_t Color_2; +} PACKED BMP_HEADER; + +#define EPD_1IN54B 0 +#define EPD_1IN54C 1 +#define EPD_1IN54V2 2 +#define EPD_1IN54BCV2 3 +#define EPD_2IN13V2 4 +#define EPD_2IN13BC 5 +#define EPD_2IN13D 6 +#define EPD_2IN9 7 +#define EPD_2IN9BC 8 +#define EPD_2IN9D 9 +#define EPD_4IN2 10 +#define EPD_4IN2BC 11 +#define EPD_7IN5 12 +#define EPD_7IN5BC 13 +#define EPD_7IN5V2 14 +#define EPD_7IN5BCV2 15 +#define EPD_2IN7 16 +#define EPD_7IN5HD 17 + +typedef struct model_s { + const char *desc; + uint8_t len; // The data sent in one time shall not be greater than 128-3 +} model_t; + +typedef enum { + M2in13 = 0, + M2in9, + M4in2, + M7in5, + M2in7, + M2in13B, + M1in54B, + M7in5HD, + MEND +} model_enum_t; + +static model_t models[] = { + {"2.13 inch e-paper", 16}, + {"2.9 inch e-paper", 16}, + {"4.2 inch e-paper", 100}, + {"7.5 inch e-paper", 120}, + {"2.7 inch e-paper", 121}, + {"2.13 inch e-paper B", 106}, + {"1.54 inch e-paper B", 100}, + {"7.5 inch e-paper HD", 120}, +}; + +static int CmdHelp(const char *Cmd); + +static int usage_hf_waveshare_loadbmp(void) { + PrintAndLogEx(NORMAL, "Load BMP file to Waveshare NFC ePaper."); + PrintAndLogEx(NORMAL, "Usage: hf waveshare loadbmp [h] f m "); + PrintAndLogEx(NORMAL, " Options :"); + PrintAndLogEx(NORMAL, " f : " _YELLOW_("filename[.bmp]") " to upload to tag"); + PrintAndLogEx(NORMAL, " m : " _YELLOW_("model number") " of your tag"); + for (uint8_t i=0; i< MEND; i++) { + PrintAndLogEx(NORMAL, " m %2i : %s", i, models[i].desc); + } + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(NORMAL, "Examples:"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf waveshare loadbmp m 0 f myfile")); + PrintAndLogEx(NORMAL, ""); + return PM3_SUCCESS; +} + +static int picture_bit_depth(const uint8_t *bmp, const size_t bmpsize) { + if (bmpsize < sizeof(BMP_HEADER)) + return PM3_ESOFT; + BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; + PrintAndLogEx(DEBUG, "colorsused = %d", pbmpheader->colorsused); + PrintAndLogEx(DEBUG, "pbmpheader->bpp = %d", pbmpheader->bpp); + return pbmpheader->bpp; +} + + +static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t **black) { + BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; + // check file is bitmap + if (pbmpheader->bpp != 1) { + return PM3_ESOFT; + } + if (pbmpheader->B == 'M' || pbmpheader->M == 'B') { //0x4d42 + PrintAndLogEx(WARNING, "The file is not a BMP!"); + return PM3_ESOFT; + } + PrintAndLogEx(DEBUG, "file size = %d", pbmpheader->fsize); + PrintAndLogEx(DEBUG, "file offset = %d", pbmpheader->offset); + if (pbmpheader->fsize > bmpsize) { + PrintAndLogEx(WARNING, "The file is truncated!"); + return PM3_ESOFT; + } + uint8_t color_flag = pbmpheader->Color_1; + // Get BMP file data pointer + uint32_t offset = pbmpheader->offset; + + uint16_t X, Y; + uint16_t Image_Width_Byte = (pbmpheader->BMP_Width % 8 == 0) ? (pbmpheader->BMP_Width / 8) : (pbmpheader->BMP_Width / 8 + 1); + uint16_t Bmp_Width_Byte = (Image_Width_Byte % 4 == 0) ? Image_Width_Byte : ((Image_Width_Byte / 4 + 1) * 4); + + *black = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*black == NULL) { + return PM3_EMALLOC; + } + // Write data into RAM + for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns + for (X = 0; X < Bmp_Width_Byte; X++) { // lines + if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { + (*black)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; + offset++; + } + } + } + return PM3_SUCCESS; +} + +static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **black, uint8_t **red) { + BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; + // check file is full color + if (pbmpheader->bpp != 24) { + return PM3_ESOFT; + } + if (pbmpheader->B == 'M' || pbmpheader->M == 'B') { //0x4d42 + PrintAndLogEx(WARNING, "The file is not a BMP!"); + return PM3_ESOFT; + } + PrintAndLogEx(DEBUG, "file size = %d", pbmpheader->fsize); + PrintAndLogEx(DEBUG, "file offset = %d", pbmpheader->offset); + if (pbmpheader->fsize > bmpsize) { + PrintAndLogEx(WARNING, "The file is truncated!"); + return PM3_ESOFT; + } + // Get BMP file data pointer + uint32_t offset = pbmpheader->offset; + + uint16_t X, Y; + uint16_t Image_Width_Byte = (pbmpheader->BMP_Width % 8 == 0) ? (pbmpheader->BMP_Width / 8) : (pbmpheader->BMP_Width / 8 + 1); + + *black = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*black == NULL) { + return PM3_EMALLOC; + } + *red = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*red == NULL) { + free(*black); + return PM3_EMALLOC; + } + + uint8_t R = 0, G = 0, B = 0; + uint8_t Black_data = 0; + uint8_t Red_data = 0; + uint8_t count = 0; + // Write data into RAM + for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns + for (X = 0; X < pbmpheader->BMP_Width; X++) { // lines + B = bmp[offset++]; + G = bmp[offset++]; + G = bmp[offset++]; + if (R < 30 && G < 30 && B < 30) { + Black_data = Black_data | (1); + } else if (R > 190 && G < 90 && B < 90) { + Red_data = Red_data | (1); + } + count++; + if (count >= 8) { + (*black)[X / 8 + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = ~Black_data; + (*red)[X / 8 + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = ~Red_data; + count = 0; + Black_data = 0; + Red_data = 0; + } + Black_data = Black_data << 1; + Red_data = Red_data << 1; + } + } + return PM3_SUCCESS; +} + +static void read_black(uint32_t i, uint8_t *l, uint8_t model_nr, uint8_t *black) { + for (uint8_t j = 0; j < models[model_nr].len; j++) { + l[3 + j] = black[i * models[model_nr].len + j]; + } +} +static void read_red(uint32_t i, uint8_t *l, uint8_t model_nr, uint8_t *red) { + for (uint8_t j = 0; j < models[model_nr].len; j++) { + if (model_nr == M1in54B) { + //1.54B needs to flip the red picture data, other screens do not need to flip data + l[3 + j] = ~red[i * models[model_nr].len + j]; + } else { + l[3 + j] = red[i * models[model_nr].len + j]; + } + } +} + +static void transceive_blocking( uint8_t* txBuf, uint16_t txBufLen, uint8_t* rxBuf, uint16_t rxBufLen, uint16_t* actLen, uint32_t fwt ){ + *actLen = 2; + (void) fwt; + PacketResponseNG resp; + SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_RAW | ISO14A_APPEND_CRC | ISO14A_NO_DISCONNECT, txBufLen, 0, txBuf, txBufLen); + WaitForResponse(CMD_ACK, &resp); + if (resp.oldarg[0] > rxBufLen) { + PrintAndLogEx(WARNING, "Received % bytes, rxBuf too small (%)", resp.oldarg[0], rxBufLen); + memcpy(rxBuf, resp.data.asBytes, rxBufLen); + *actLen = rxBufLen; + return; + } + memcpy(rxBuf, resp.data.asBytes, resp.oldarg[0]); + *actLen = resp.oldarg[0]; +} + +// 1.54B Keychain +// 1.54B does not share the common base and requires specific handling +static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red, uint8_t fail_num) { + uint8_t step = 5; + uint8_t step_5[128] = {0xcd, 0x05, 100}; + uint8_t step_4[2] = {0xcd, 0x04}; + uint8_t step_6[2] = {0xcd, 0x06}; + uint8_t rx[20] = {0}; + uint16_t actrxlen[20], i = 0, progress = 0; + + if (model_nr == M1in54B) { + step_5[2] = 100; + } + while (1) { + if (step == 5) { + PrintAndLogEx(INFO, "1.54_Step9: e-paper config2 (black)"); + if (model_nr == M1in54B) { //1.54inch B Keychain + for (i = 0; i < 50; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step_5, model_nr, black); + transceive_blocking(step_5, 103, rx, 20, actrxlen, 2157 + 2048); // cd 05 + progress = i * 100 / 100; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } + PROMPT_CLEARLINE; + step = 6; + } else if (step == 6) { + PrintAndLogEx(INFO, "1.54_Step6: e-paper power on"); + transceive_blocking(step_4, 2, rx, 20, actrxlen, 2157 + 2048); //cd 04 + step = 7; + if (rx[0] == 0 && rx[1] == 0) { + step = 7; + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please press any key to exit and try again."); + step = 14; + fail_num = 0; + msleep(200); + } + } + } else if (step == 7) { + PrintAndLogEx(INFO, "1.54_Step7: e-paper config2 (red)"); + if (model_nr == M1in54B) { //1.54inch B Keychain + for (i = 0; i < 50; i++) { + rx[0] = 1; + rx[1] = 1; + read_red(i, step_5, model_nr, red); + transceive_blocking(step_5, 103, rx, 20, actrxlen, 2157 + 2048); // cd 05 + progress = i * 100 / 100 + 50; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } + PROMPT_CLEARLINE; + step = 8; + rx[0] = 1; + rx[1] = 1; + } else if (step == 8) { + // Send update instructions + PrintAndLogEx(INFO, "1.54_Step8: EDP load to main"); + transceive_blocking(step_6, 2, rx, 20, actrxlen, 2157 + 2048); //cd 06 + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 9; + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please press any key to exit and try again."); + step = 14; + fail_num = 0; + msleep(200); + } + } + } else if (step == 9) { + PrintAndLogEx(INFO, "1.54_Step9"); + return PM3_SUCCESS; + } else if (step == 14) { + return PM3_ESOFT; + } + } +} + +static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { + uint8_t fail_num = 0; + uint8_t step = 0, progress = 0; + uint8_t step0[2] = {0xcd, 0x0d}; + uint8_t step1[3] = {0xcd, 0x00, 10}; //select e-paper type and reset e-paper 4:2.13inch e-Paper 7:2.9inch e-Paper 10:4.2inch e-Paper 14:7.5inch e-Paper + uint8_t step2[2] = {0xcd, 0x01}; //e-paper normal mode type๏ผš + uint8_t step3[2] = {0xcd, 0x02}; //e-paper config1 + uint8_t step4[2] = {0xcd, 0x03}; //e-paper power on + uint8_t step5[2] = {0xcd, 0x05}; //e-paper config2 + uint8_t step6[2] = {0xcd, 0x06}; //EDP load to main + uint8_t step7[2] = {0xcd, 0x07}; //Data preparation + uint8_t step8[123] = {0xcd, 0x08, 0x64}; //Data start command 2.13inch(0x10:Send 16 data at a time) 2.9inch(0x10:Send 16 data at a time) 4.2inch(0x64:Send 100 data at a time) 7.5inch(0x78:Send 120 data at a time) + uint8_t step9[2] = {0xcd, 0x18}; //e-paper power on + uint8_t step10[2] = {0xcd, 0x09}; //Refresh e-paper + uint8_t step11[2] = {0xcd, 0x0a}; //wait for ready + uint8_t step12[2] = {0xcd, 0x04}; //e-paper power off command + uint8_t step13[124] = {0xcd, 0x19, 121}; +// uint8_t step13[2]={0xcd,0x0b}; //Judge whether the power supply is turned off successfully +// uint8_t step14[2]={0xcd,0x0c}; //The end of the transmission + uint8_t rx[20]; + uint16_t actrxlen[20], i = 0; + + + + clearCommandBuffer(); + SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_CONNECT | ISO14A_NO_DISCONNECT, 0, 0, NULL, 0); + PacketResponseNG resp; + if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) { + PrintAndLogEx(ERR, "No tag found"); + DropField(); + return PM3_ETIMEOUT; + } + + iso14a_card_select_t card; + memcpy(&card, (iso14a_card_select_t *)resp.data.asBytes, sizeof(iso14a_card_select_t)); + + uint64_t select_status = resp.oldarg[0]; + + if (select_status == 0) { + PrintAndLogEx(ERR, "Tag select error"); + DropField(); + return PM3_ERFTRANS; + } else if (select_status == 3) { + PrintAndLogEx(WARNING, "Card doesn't support standard iso14443-3 anticollision, doesn't look like Waveshare tag"); + DropField(); + return PM3_ESOFT; + } + + if ((card.uidlen != 7) || (memcmp(card.uid, "WSDZ10m", 7) != 0)) { + PrintAndLogEx(WARNING, "Card doesn't look like Waveshare tag"); + DropField(); + return PM3_ESOFT; + } + + PrintAndLogEx(DEBUG, "model_nr = %d", model_nr); + while (1) { + if (step == 0) { + PrintAndLogEx(INFO, "Step0"); + transceive_blocking(step0, 2, rx, 20, actrxlen, 2157 + 2048); //cd 0d + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 1; + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + } else if (step == 1) { + PrintAndLogEx(INFO, "Step1: e-paper config"); + //step1[2] screen model + //step8[2] nr of bytes sent at once + //step13[2] nr of bytes sent for the second time + // generally, step8 sends a black image, step13 sends a red image + if (model_nr == M2in13) { //2.13inch + step1[2] = EPD_2IN13V2; + step8[2] = 16; + step13[2] = 0; + } else if (model_nr == M2in9) { //2.9inch + step1[2] = EPD_2IN9; + step8[2] = 16; + step13[2] = 0; + } else if (model_nr == M4in2) { //4.2inch + step1[2] = EPD_4IN2; + step8[2] = 100; + step13[2] = 0; + } else if (model_nr == M7in5) { //7.5inch + step1[2] = EPD_7IN5V2; + step8[2] = 120; + step13[2] = 0; + } else if (model_nr == M2in7) { //2.7inch + step1[2] = EPD_2IN7; + step8[2] = 121; + // Send blank data for the first time, and send other data to 0xff without processing the bottom layer + step13[2] = 121; + //Sending the second data is the real image data. If the previous 0xff is not sent, the last output image is abnormally black + } else if (model_nr == M2in13B) { //2.13inch B + step1[2] = EPD_2IN13BC; + step8[2] = 106; + step13[2] = 106; + } else if (model_nr == M7in5HD) { + step1[2] = EPD_7IN5HD; + step8[2] = 120; + step13[2] = 0; + } + + if (model_nr == M1in54B) { + transceive_blocking(step1, 2, rx, 20, actrxlen, 2157 + 2048); //cd 00 + } else { + transceive_blocking(step1, 3, rx, 20, actrxlen, 2157 + 2048); + } + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 2; + fail_num = 0; + msleep(100); + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + msleep(10); + } else if (step == 2) { + PrintAndLogEx(INFO, "Step2: e-paper normal mode type"); + transceive_blocking(step2, 2, rx, 20, actrxlen, 2157 + 2048); //cd 01 + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 3; + fail_num = 0; + msleep(100); + } else { + fail_num++; + if (fail_num > 50) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + msleep(100); + } else if (step == 3) { + PrintAndLogEx(INFO, "Step3: e-paper config1"); + transceive_blocking(step3, 2, rx, 20, actrxlen, 2157 + 2048); //cd 02 + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 4; + fail_num = 0; + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + msleep(200); + } else if (step == 4) { + PrintAndLogEx(INFO, "Step4: e-paper power on"); + transceive_blocking(step4, 2, rx, 20, actrxlen, 2157 + 2048); //cd 03 + if (model_nr == M1in54B) { + // 1.54B Keychain handler + PrintAndLogEx(DEBUG, "Start_Drawing_1in54B"); + char t = start_drawing_1in54B(model_nr, black, red, fail_num); + if (t == 0) { + step = 11; + //1.54B Data transfer is complete and wait for refresh + } else if (t == 1) { + step = 14; + //1.54B Data transmission error + } + // 1.54B Keychain handler end + } + if (rx[0] == 0 && rx[1] == 0) { + fail_num = 0; + step = 5; + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + } else if (step == 5) { + PrintAndLogEx(INFO, "Step5: e-paper config2"); + transceive_blocking(step5, 2, rx, 20, actrxlen, 2157 + 2048); //cd 05 + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 6; + fail_num = 0; + msleep(100); + } else { + fail_num++; + if (fail_num > 30) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + msleep(10); + } else if (step == 6) { + PrintAndLogEx(INFO, "Step6: EDP load to main") ; + transceive_blocking(step6, 2, rx, 20, actrxlen, 2157 + 2048); //cd 06 + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 7; + fail_num = 0; + msleep(100); + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + } else if (step == 7) { + PrintAndLogEx(INFO, "Step7: Data preparation"); + transceive_blocking(step7, 2, rx, 20, actrxlen, 2157 + 2048); //cd 07 + if (rx[0] == 0 && rx[1] == 0) { + rx[0] = 1; + rx[1] = 1; + step = 8; + fail_num = 0; + } else { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } + } else if (step == 8) { //cd 08 + PrintAndLogEx(INFO, "Step8: Start data transfer"); + if (model_nr == M2in13) { //2.13inch + for (i = 0; i < 250; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step8, model_nr, black); + transceive_blocking(step8, 19, rx, 20, actrxlen, 2157 + 2048); + progress = i * 100 / 250; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } else if (model_nr == M2in9) { + for (i = 0; i < 296; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step8, model_nr, black); + transceive_blocking(step8, 19, rx, 20, actrxlen, 2157 + 2048); + progress = i * 100 / 296; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } else if (model_nr == M4in2) { //4.2inch + for (i = 0; i < 150; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step8, model_nr, black); + transceive_blocking(step8, 103, rx, 20, actrxlen, 2157 + 2048); + progress = i * 100 / 150; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } else if (model_nr == M7in5) { //7.5inch + for (i = 0; i < 400; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step8, model_nr, black); + transceive_blocking(step8, 123, rx, 20, actrxlen, 2157 + 2048); + progress = i * 100 / 400; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + msleep(6); + } + } else if (model_nr == M2in13B) { //2.13inch B + for (i = 0; i < 26; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step8, model_nr, black); + transceive_blocking(step8, 109, rx, 20, actrxlen, 2157 + 2048); + progress = i * 50 / 26; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } else if (model_nr == M7in5HD) { //7.5HD + + for (i = 0; i < 484; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step8, model_nr, black); + //memset(&step8[3], 0xf0, 120); + transceive_blocking(step8, 123, rx, 20, actrxlen, 2157 + 2048); + progress = i * 100 / 484; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + memset(&step8[3], 0xff, 120); + transceive_blocking(step8, 110 + 3, rx, 20, actrxlen, 2157 + 2048); + + + } else if (model_nr == M2in7) { //2.7inch + for (i = 0; i < 48; i++) { + rx[0] = 1; + rx[1] = 1; + //read_black(i,step8, model_nr, black); + memset(&step8[3], 0xFF, sizeof(step8)-3); + transceive_blocking(step8, 124, rx, 20, actrxlen, 2157 + 2048); + progress = i * 50 / 48; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } + PROMPT_CLEARLINE; + step = 9; + } else if (step == 9) { + PrintAndLogEx(INFO, "Step9: e-paper power on"); + if (model_nr == M2in13 || model_nr == M2in9 || model_nr == M4in2 || model_nr == M7in5 || model_nr == M7in5HD) { + transceive_blocking(step9, 2, rx, 20, actrxlen, 2157 + 2048); //cd 18 + // The black-and-white screen sending backplane is also shielded, with no effect. Except 2.7 + if (rx[0] != 0 || rx[1] != 0) { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } else + fail_num = 0; + + rx[0] = 1; + rx[1] = 1; + step = 10; + } else if (model_nr == M2in13B || model_nr == M2in7) { + transceive_blocking(step9, 2, rx, 20, actrxlen, 2157 + 2048); //cd 18 + //rx[0]=1;rx[1]=1; + step = 19; + } + } else if (step == 10) { + PrintAndLogEx(INFO, "Step10: Refresh e-paper"); + transceive_blocking(step10, 2, rx, 20, actrxlen, 2157 + 2048); //cd 09 refresh command + if (rx[0] != 0 || rx[1] != 0) { + fail_num++; + if (fail_num > 10) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } else + fail_num = 0; + rx[0] = 1; + rx[1] = 1; + step = 11; + msleep(200); + } else if (step == 11) { + PrintAndLogEx(INFO, "Step11: Wait tag to be ready"); + if (model_nr == M2in13B || model_nr == M1in54B) { // Black, white and red screen refresh time is longer, wait first + msleep(9000); + } else if (model_nr == M7in5HD) { + msleep(1000); + } + while (1) { + rx[0] = 1; + rx[1] = 1; + if (model_nr == M1in54B) { + // send 0xcd 0x08 with 1.54B + transceive_blocking(step8, 2, rx, 20, actrxlen, 2157 + 2048); + } else { + transceive_blocking(step11, 2, rx, 20, actrxlen, 2157 + 2048); //cd 0a + } + if (rx[0] == 0xff && rx[1] == 0) { + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(SUCCESS, "E-paper Reflash OK"); + fail_num = 0; + step = 12; + msleep(200); + break; + } else { + if (fail_num > 50) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } else { + fail_num++; + PrintAndLogEx(INPLACE, "E-paper Reflashing, Waiting"); + msleep(100); + } + } + } + + } else if (step == 12) { + PrintAndLogEx(INFO, "Step12: e-paper power off command"); + transceive_blocking(step12, 2, rx, 20, actrxlen, 2157 + 2048); //cd 04 + rx[0] = 1; + rx[1] = 1; + step = 13; + msleep(200); + } else if (step == 13) { + PrintAndLogEx(SUCCESS, "E-paper Update OK"); + rx[0] = 1; + rx[1] = 1; + msleep(200); + DropField(); + return PM3_SUCCESS; + } else if (step == 19) { + PrintAndLogEx(INFO, "Step9b"); + if (model_nr == M2in7) { + for (i = 0; i < 48; i++) { + rx[0] = 1; + rx[1] = 1; + read_black(i, step13, model_nr, black); + transceive_blocking(step13, 124, rx, 20, actrxlen, 2157 + 2048); //CD 19 + progress = i * 50 / 48 + 50; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } else if (model_nr == M2in13B) { + for (i = 0; i < 26; i++) { + rx[0] = 1; + rx[1] = 1; + read_red(i, step13, model_nr, red); + //memset(&step13[3], 0xfE, 106); + transceive_blocking(step13, 109, rx, 20, actrxlen, 2157 + 2048); + progress = i * 50 / 26 + 50; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } + PROMPT_CLEARLINE; + rx[0] = 1; + rx[1] = 1; + step = 10; + } + } +} + + +static int CmdHF14AWSLoadBmp(const char *Cmd) { + + char filename[FILE_PATH_SIZE] = {0}; + uint8_t cmdp = 0; + bool errors = false; + size_t filenamelen = 0; + uint8_t model_nr = 0xff; + + while (param_getchar(Cmd, cmdp) != 0x00 && !errors) { + switch (tolower(param_getchar(Cmd, cmdp))) { + case 'h': + return usage_hf_waveshare_loadbmp(); + case 'f': + filenamelen = param_getstr(Cmd, cmdp + 1, filename, FILE_PATH_SIZE); + if (filenamelen > FILE_PATH_SIZE - 5) + filenamelen = FILE_PATH_SIZE - 5; + cmdp += 2; + break; + case 'm': + model_nr = param_get8(Cmd, cmdp + 1); + cmdp += 2; + break; + default: + PrintAndLogEx(WARNING, "Unknown parameter: " _RED_("'%c'"), param_getchar(Cmd, cmdp)); + errors = true; + break; + } + } + + //Validations + if (filenamelen < 1) { + PrintAndLogEx(WARNING, "Missing filename"); + errors = true; + } + if (model_nr == 0xff) { + PrintAndLogEx(WARNING, "Missing model"); + errors = true; + } else if (model_nr >= MEND) { + PrintAndLogEx(WARNING, "Unknown model"); + errors = true; + } + if (errors || cmdp == 0) return usage_hf_waveshare_loadbmp(); + + uint8_t *bmp = NULL; + uint8_t *black = NULL; + uint8_t *red = NULL; + size_t bytes_read = 0; + if (loadFile_safe(filename, ".bmp", (void **)&bmp, &bytes_read) != PM3_SUCCESS) { + PrintAndLogEx(WARNING, "Could not find file " _YELLOW_("%s"), filename); + return PM3_EIO; + } + + int depth = picture_bit_depth(bmp, bytes_read); + if (depth == PM3_ESOFT) { + PrintAndLogEx(ERR, "Error, BMP file is too small"); + free(bmp); + return PM3_ESOFT; + } else if (depth == 1) { + PrintAndLogEx(DEBUG, "BMP file is a bitmap"); + if (read_bmp_bitmap(bmp, bytes_read, &black) != PM3_SUCCESS) { + free(bmp); + return PM3_ESOFT; + } + } else if (depth == 24) { + PrintAndLogEx(DEBUG, "BMP file is a RGB"); + if (read_bmp_rgb(bmp, bytes_read, &black, &red) != PM3_SUCCESS) { + free(bmp); + return PM3_ESOFT; + } + } else if (depth == 32) { + PrintAndLogEx(ERR, "Error, BMP color depth %i not supported. Remove alpha channel.", depth); + free(bmp); + return PM3_ESOFT; + } else { + PrintAndLogEx(ERR, "Error, BMP color depth %i not supported", depth); + free(bmp); + return PM3_ESOFT; + } + free(bmp); + + start_drawing(model_nr, black, red); + free(black); + if (red != NULL) { + free(red); + } + return PM3_SUCCESS; +} + +static command_t CommandTable[] = { + {"help", CmdHelp, AlwaysAvailable, "This help"}, + {"loadbmp", CmdHF14AWSLoadBmp, IfPm3Iso14443a, "Load BMP file to Waveshare NFC ePaper"}, + {NULL, NULL, NULL, NULL} +}; + +static int CmdHelp(const char *Cmd) { + (void)Cmd; // Cmd is not used so far + CmdsHelp(CommandTable); + return PM3_SUCCESS; +} + +int CmdHFWaveshare(const char *Cmd) { + clearCommandBuffer(); + return CmdsParse(CommandTable, Cmd); +} diff --git a/client/src/cmdhfwaveshare.h b/client/src/cmdhfwaveshare.h new file mode 100644 index 000000000..bae8f239a --- /dev/null +++ b/client/src/cmdhfwaveshare.h @@ -0,0 +1,10 @@ +//----------------------------------------------------------------------------- +// Waveshare commands +//----------------------------------------------------------------------------- + +#ifndef CMDHFWQVESHARE_H__ +#define CMDHFWAVESHARE_H__ + +int CmdHFWaveshare(const char *Cmd); + +#endif diff --git a/client/src/ui.h b/client/src/ui.h index 7a5b7911d..f19f2024a 100644 --- a/client/src/ui.h +++ b/client/src/ui.h @@ -53,6 +53,7 @@ extern bool showDemod; #endif #define MAX_PRINT_BUFFER 2048 +#define PROMPT_CLEARLINE PrintAndLogEx(INPLACE, " \r") void PrintAndLogOptions(const char *str[][2], size_t size, size_t space); void PrintAndLogEx(logLevel_t level, const char *fmt, ...); void SetFlushAfterWrite(bool value); From a045638dd0ca03a544d2985ec433d877c89e06f5 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 13 Sep 2020 01:33:32 +0200 Subject: [PATCH 52/92] add cmdhfst to android cmake --- client/android/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/client/android/CMakeLists.txt b/client/android/CMakeLists.txt index a55055770..28fc2021c 100644 --- a/client/android/CMakeLists.txt +++ b/client/android/CMakeLists.txt @@ -117,6 +117,7 @@ add_library(pm3rrg_rdv4 SHARED ${PM3_ROOT}/client/src/cmdhfmfhard.c ${PM3_ROOT}/client/src/cmdhfmfp.c ${PM3_ROOT}/client/src/cmdhfmfu.c + ${PM3_ROOT}/client/src/cmdhfst.c ${PM3_ROOT}/client/src/cmdhfthinfilm.c ${PM3_ROOT}/client/src/cmdhftopaz.c ${PM3_ROOT}/client/src/cmdhfwaveshare.c From 25bad7259e3074ee4561155912b414fa1c496603 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 13 Sep 2020 01:51:58 +0200 Subject: [PATCH 53/92] remove redundant pragma --- client/src/cmdhfwaveshare.c | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 8494f9f48..260071c43 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -17,7 +17,6 @@ // Currently the largest pixel 880*528 only needs 58.08K bytes #define WSMAPSIZE 60000 -#pragma pack(1) /* Mandatory to remove any padding */ typedef struct { uint8_t B; uint8_t M; From f828240af4ebdadcd39d9bf85fccbf5ea9e5c9d5 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 13 Sep 2020 03:10:33 +0200 Subject: [PATCH 54/92] waveshare: clean code --- client/src/cmdhfwaveshare.c | 769 +++++++++++++++--------------------- 1 file changed, 320 insertions(+), 449 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 260071c43..550955fa1 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -223,7 +223,9 @@ static void read_black(uint32_t i, uint8_t *l, uint8_t model_nr, uint8_t *black) } static void read_red(uint32_t i, uint8_t *l, uint8_t model_nr, uint8_t *red) { for (uint8_t j = 0; j < models[model_nr].len; j++) { - if (model_nr == M1in54B) { + if (red == NULL) { + l[3 + j] = ~0x00; + } else if (model_nr == M1in54B) { //1.54B needs to flip the red picture data, other screens do not need to flip data l[3 + j] = ~red[i * models[model_nr].len + j]; } else { @@ -232,26 +234,43 @@ static void read_red(uint32_t i, uint8_t *l, uint8_t model_nr, uint8_t *red) { } } -static void transceive_blocking( uint8_t* txBuf, uint16_t txBufLen, uint8_t* rxBuf, uint16_t rxBufLen, uint16_t* actLen, uint32_t fwt ){ - *actLen = 2; - (void) fwt; - PacketResponseNG resp; - SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_RAW | ISO14A_APPEND_CRC | ISO14A_NO_DISCONNECT, txBufLen, 0, txBuf, txBufLen); - WaitForResponse(CMD_ACK, &resp); - if (resp.oldarg[0] > rxBufLen) { - PrintAndLogEx(WARNING, "Received % bytes, rxBuf too small (%)", resp.oldarg[0], rxBufLen); - memcpy(rxBuf, resp.data.asBytes, rxBufLen); - *actLen = rxBufLen; - return; +static int transceive_blocking( uint8_t* txBuf, uint16_t txBufLen, uint8_t* rxBuf, uint16_t rxBufLen, uint16_t* actLen, bool retransmit ){ + uint8_t fail_num = 0; + if (rxBufLen < 2) + return PM3_EINVARG; + while (1) { + PacketResponseNG resp; + SendCommandMIX(CMD_HF_ISO14443A_READER, ISO14A_RAW | ISO14A_APPEND_CRC | ISO14A_NO_DISCONNECT, txBufLen, 0, txBuf, txBufLen); + rxBuf[0] = 1; + if (WaitForResponseTimeout(CMD_ACK, &resp, 2000)) { + if (resp.oldarg[0] > rxBufLen) { + PrintAndLogEx(WARNING, "Received % bytes, rxBuf too small (%)", resp.oldarg[0], rxBufLen); + memcpy(rxBuf, resp.data.asBytes, rxBufLen); + *actLen = rxBufLen; + return PM3_ESOFT; + } + memcpy(rxBuf, resp.data.asBytes, resp.oldarg[0]); + *actLen = resp.oldarg[0]; + } + if ((retransmit) && (rxBuf[0] != 0 || rxBuf[1] != 0)) { + fail_num++; + if (fail_num > 10) { + PROMPT_CLEARLINE; + PrintAndLogEx(WARNING, "Transmission failed, please try again."); + DropField(); + return PM3_ESOFT; + } + } else { + break; + } } - memcpy(rxBuf, resp.data.asBytes, resp.oldarg[0]); - *actLen = resp.oldarg[0]; + return PM3_SUCCESS; } // 1.54B Keychain // 1.54B does not share the common base and requires specific handling -static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red, uint8_t fail_num) { - uint8_t step = 5; +static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red) { + int ret; uint8_t step_5[128] = {0xcd, 0x05, 100}; uint8_t step_4[2] = {0xcd, 0x04}; uint8_t step_6[2] = {0xcd, 0x06}; @@ -261,99 +280,67 @@ static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red, if (model_nr == M1in54B) { step_5[2] = 100; } - while (1) { - if (step == 5) { - PrintAndLogEx(INFO, "1.54_Step9: e-paper config2 (black)"); - if (model_nr == M1in54B) { //1.54inch B Keychain - for (i = 0; i < 50; i++) { - rx[0] = 1; - rx[1] = 1; - read_black(i, step_5, model_nr, black); - transceive_blocking(step_5, 103, rx, 20, actrxlen, 2157 + 2048); // cd 05 - progress = i * 100 / 100; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - } + PrintAndLogEx(INFO, "1.54_Step9: e-paper config2 (black)"); + if (model_nr == M1in54B) { //1.54inch B Keychain + for (i = 0; i < 50; i++) { + read_black(i, step_5, model_nr, black); + ret = transceive_blocking(step_5, 103, rx, 20, actrxlen, true); // cd 05 + if (ret != PM3_SUCCESS) { + return ret; } - PROMPT_CLEARLINE; - step = 6; - } else if (step == 6) { - PrintAndLogEx(INFO, "1.54_Step6: e-paper power on"); - transceive_blocking(step_4, 2, rx, 20, actrxlen, 2157 + 2048); //cd 04 - step = 7; - if (rx[0] == 0 && rx[1] == 0) { - step = 7; - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please press any key to exit and try again."); - step = 14; - fail_num = 0; - msleep(200); - } - } - } else if (step == 7) { - PrintAndLogEx(INFO, "1.54_Step7: e-paper config2 (red)"); - if (model_nr == M1in54B) { //1.54inch B Keychain - for (i = 0; i < 50; i++) { - rx[0] = 1; - rx[1] = 1; - read_red(i, step_5, model_nr, red); - transceive_blocking(step_5, 103, rx, 20, actrxlen, 2157 + 2048); // cd 05 - progress = i * 100 / 100 + 50; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - } - } - PROMPT_CLEARLINE; - step = 8; - rx[0] = 1; - rx[1] = 1; - } else if (step == 8) { - // Send update instructions - PrintAndLogEx(INFO, "1.54_Step8: EDP load to main"); - transceive_blocking(step_6, 2, rx, 20, actrxlen, 2157 + 2048); //cd 06 - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 9; - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please press any key to exit and try again."); - step = 14; - fail_num = 0; - msleep(200); - } - } - } else if (step == 9) { - PrintAndLogEx(INFO, "1.54_Step9"); - return PM3_SUCCESS; - } else if (step == 14) { - return PM3_ESOFT; + progress = i * 100 / 100; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } } + PROMPT_CLEARLINE; + PrintAndLogEx(INFO, "1.54_Step6: e-paper power on"); + ret = transceive_blocking(step_4, 2, rx, 20, actrxlen, true); //cd 04 + if (ret != PM3_SUCCESS) { + return ret; + } + PrintAndLogEx(INFO, "1.54_Step7: e-paper config2 (red)"); + if (model_nr == M1in54B) { //1.54inch B Keychain + for (i = 0; i < 50; i++) { + read_red(i, step_5, model_nr, red); + ret = transceive_blocking(step_5, 103, rx, 20, actrxlen, true); // cd 05 + if (ret != PM3_SUCCESS) { + return ret; + } + progress = i * 100 / 100 + 50; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + } + } + PROMPT_CLEARLINE; + // Send update instructions + PrintAndLogEx(INFO, "1.54_Step8: EDP load to main"); + ret = transceive_blocking(step_6, 2, rx, 20, actrxlen, true); //cd 06 + if (ret != PM3_SUCCESS) { + return ret; + } + PrintAndLogEx(INFO, "1.54_Step9"); + return PM3_SUCCESS; } static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { - uint8_t fail_num = 0; - uint8_t step = 0, progress = 0; - uint8_t step0[2] = {0xcd, 0x0d}; - uint8_t step1[3] = {0xcd, 0x00, 10}; //select e-paper type and reset e-paper 4:2.13inch e-Paper 7:2.9inch e-Paper 10:4.2inch e-Paper 14:7.5inch e-Paper - uint8_t step2[2] = {0xcd, 0x01}; //e-paper normal mode type๏ผš - uint8_t step3[2] = {0xcd, 0x02}; //e-paper config1 - uint8_t step4[2] = {0xcd, 0x03}; //e-paper power on - uint8_t step5[2] = {0xcd, 0x05}; //e-paper config2 - uint8_t step6[2] = {0xcd, 0x06}; //EDP load to main - uint8_t step7[2] = {0xcd, 0x07}; //Data preparation - uint8_t step8[123] = {0xcd, 0x08, 0x64}; //Data start command 2.13inch(0x10:Send 16 data at a time) 2.9inch(0x10:Send 16 data at a time) 4.2inch(0x64:Send 100 data at a time) 7.5inch(0x78:Send 120 data at a time) - uint8_t step9[2] = {0xcd, 0x18}; //e-paper power on - uint8_t step10[2] = {0xcd, 0x09}; //Refresh e-paper - uint8_t step11[2] = {0xcd, 0x0a}; //wait for ready - uint8_t step12[2] = {0xcd, 0x04}; //e-paper power off command - uint8_t step13[124] = {0xcd, 0x19, 121}; -// uint8_t step13[2]={0xcd,0x0b}; //Judge whether the power supply is turned off successfully -// uint8_t step14[2]={0xcd,0x0c}; //The end of the transmission - uint8_t rx[20]; - uint16_t actrxlen[20], i = 0; + uint8_t progress = 0; + uint8_t step0[2] = {0xcd, 0x0d}; + uint8_t step1[3] = {0xcd, 0x00, 10}; //select e-paper type and reset e-paper 4:2.13inch e-Paper 7:2.9inch e-Paper 10:4.2inch e-Paper 14:7.5inch e-Paper + uint8_t step2[2] = {0xcd, 0x01}; //e-paper normal mode type๏ผš + uint8_t step3[2] = {0xcd, 0x02}; //e-paper config1 + uint8_t step4[2] = {0xcd, 0x03}; //e-paper power on + uint8_t step5[2] = {0xcd, 0x05}; //e-paper config2 + uint8_t step6[2] = {0xcd, 0x06}; //EDP load to main + uint8_t step7[2] = {0xcd, 0x07}; //Data preparation + uint8_t step8[123] = {0xcd, 0x08, 0x64}; //Data start command 2.13inch(0x10:Send 16 data at a time) 2.9inch(0x10:Send 16 data at a time) 4.2inch(0x64:Send 100 data at a time) 7.5inch(0x78:Send 120 data at a time) + uint8_t step9[2] = {0xcd, 0x18}; //e-paper power on + uint8_t step10[2] = {0xcd, 0x09}; //Refresh e-paper + uint8_t step11[2] = {0xcd, 0x0a}; //wait for ready + uint8_t step12[2] = {0xcd, 0x04}; //e-paper power off command + uint8_t step13[124] = {0xcd, 0x19, 121}; +// uint8_t step13[2]={0xcd,0x0b}; //Judge whether the power supply is turned off successfully +// uint8_t step14[2]={0xcd,0x0c}; //The end of the transmission + uint8_t rx[20]; + uint16_t actrxlen[20], i = 0; @@ -386,388 +373,272 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { DropField(); return PM3_ESOFT; } - PrintAndLogEx(DEBUG, "model_nr = %d", model_nr); - while (1) { - if (step == 0) { - PrintAndLogEx(INFO, "Step0"); - transceive_blocking(step0, 2, rx, 20, actrxlen, 2157 + 2048); //cd 0d - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 1; - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; - } - } - } else if (step == 1) { - PrintAndLogEx(INFO, "Step1: e-paper config"); - //step1[2] screen model - //step8[2] nr of bytes sent at once - //step13[2] nr of bytes sent for the second time - // generally, step8 sends a black image, step13 sends a red image - if (model_nr == M2in13) { //2.13inch - step1[2] = EPD_2IN13V2; - step8[2] = 16; - step13[2] = 0; - } else if (model_nr == M2in9) { //2.9inch - step1[2] = EPD_2IN9; - step8[2] = 16; - step13[2] = 0; - } else if (model_nr == M4in2) { //4.2inch - step1[2] = EPD_4IN2; - step8[2] = 100; - step13[2] = 0; - } else if (model_nr == M7in5) { //7.5inch - step1[2] = EPD_7IN5V2; - step8[2] = 120; - step13[2] = 0; - } else if (model_nr == M2in7) { //2.7inch - step1[2] = EPD_2IN7; - step8[2] = 121; - // Send blank data for the first time, and send other data to 0xff without processing the bottom layer - step13[2] = 121; - //Sending the second data is the real image data. If the previous 0xff is not sent, the last output image is abnormally black - } else if (model_nr == M2in13B) { //2.13inch B - step1[2] = EPD_2IN13BC; - step8[2] = 106; - step13[2] = 106; - } else if (model_nr == M7in5HD) { - step1[2] = EPD_7IN5HD; - step8[2] = 120; - step13[2] = 0; - } + int ret; + PrintAndLogEx(INFO, "Step0"); + ret = transceive_blocking(step0, 2, rx, 20, actrxlen, true); //cd 0d + if (ret != PM3_SUCCESS) { + return ret; + } + PrintAndLogEx(INFO, "Step1: e-paper config"); + //step1[2] screen model + //step8[2] nr of bytes sent at once + //step13[2] nr of bytes sent for the second time + // generally, step8 sends a black image, step13 sends a red image + if (model_nr == M2in13) { //2.13inch + step1[2] = EPD_2IN13V2; + step8[2] = 16; + step13[2] = 0; + } else if (model_nr == M2in9) { //2.9inch + step1[2] = EPD_2IN9; + step8[2] = 16; + step13[2] = 0; + } else if (model_nr == M4in2) { //4.2inch + step1[2] = EPD_4IN2; + step8[2] = 100; + step13[2] = 0; + } else if (model_nr == M7in5) { //7.5inch + step1[2] = EPD_7IN5V2; + step8[2] = 120; + step13[2] = 0; + } else if (model_nr == M2in7) { //2.7inch + step1[2] = EPD_2IN7; + step8[2] = 121; + // Send blank data for the first time, and send other data to 0xff without processing the bottom layer + step13[2] = 121; + //Sending the second data is the real image data. If the previous 0xff is not sent, the last output image is abnormally black + } else if (model_nr == M2in13B) { //2.13inch B + step1[2] = EPD_2IN13BC; + step8[2] = 106; + step13[2] = 106; + } else if (model_nr == M7in5HD) { + step1[2] = EPD_7IN5HD; + step8[2] = 120; + step13[2] = 0; + } - if (model_nr == M1in54B) { - transceive_blocking(step1, 2, rx, 20, actrxlen, 2157 + 2048); //cd 00 - } else { - transceive_blocking(step1, 3, rx, 20, actrxlen, 2157 + 2048); + if (model_nr == M1in54B) { + ret = transceive_blocking(step1, 2, rx, 20, actrxlen, true); //cd 00 + } else { + ret = transceive_blocking(step1, 3, rx, 20, actrxlen, true); + } + if (ret != PM3_SUCCESS) { + return ret; + } + msleep(100); + PrintAndLogEx(INFO, "Step2: e-paper normal mode type"); + ret = transceive_blocking(step2, 2, rx, 20, actrxlen, true); //cd 01 + if (ret != PM3_SUCCESS) { + return ret; + } + msleep(100); + PrintAndLogEx(INFO, "Step3: e-paper config1"); + ret = transceive_blocking(step3, 2, rx, 20, actrxlen, true); //cd 02 + if (ret != PM3_SUCCESS) { + return ret; + } + msleep(200); + PrintAndLogEx(INFO, "Step4: e-paper power on"); + ret = transceive_blocking(step4, 2, rx, 20, actrxlen, true); //cd 03 + if (ret != PM3_SUCCESS) { + return ret; + } + if (model_nr == M1in54B) { + // 1.54B Keychain handler + PrintAndLogEx(DEBUG, "Start_Drawing_1in54B"); + ret = start_drawing_1in54B(model_nr, black, red); + if (ret != PM3_SUCCESS) { + return ret; + } + //1.54B Data transfer is complete and wait for refresh + } else { + PrintAndLogEx(INFO, "Step5: e-paper config2"); + ret = transceive_blocking(step5, 2, rx, 20, actrxlen, true); //cd 05 + if (ret != PM3_SUCCESS) { + return ret; + } + msleep(100); + PrintAndLogEx(INFO, "Step6: EDP load to main") ; + ret = transceive_blocking(step6, 2, rx, 20, actrxlen, true); //cd 06 + if (ret != PM3_SUCCESS) { + return ret; + } + msleep(100); + PrintAndLogEx(INFO, "Step7: Data preparation"); + ret = transceive_blocking(step7, 2, rx, 20, actrxlen, true); //cd 07 + if (ret != PM3_SUCCESS) { + return ret; + } + PrintAndLogEx(INFO, "Step8: Start data transfer"); + if (model_nr == M2in13) { //2.13inch + for (i = 0; i < 250; i++) { + read_black(i, step8, model_nr, black); + ret = transceive_blocking(step8, 19, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; + } + progress = i * 100 / 250; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 2; - fail_num = 0; - msleep(100); - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; + } else if (model_nr == M2in9) { + for (i = 0; i < 296; i++) { + read_black(i, step8, model_nr, black); + ret = transceive_blocking(step8, 19, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; } + progress = i * 100 / 296; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } - msleep(10); - } else if (step == 2) { - PrintAndLogEx(INFO, "Step2: e-paper normal mode type"); - transceive_blocking(step2, 2, rx, 20, actrxlen, 2157 + 2048); //cd 01 - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 3; - fail_num = 0; - msleep(100); - } else { - fail_num++; - if (fail_num > 50) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; + } else if (model_nr == M4in2) { //4.2inch + for (i = 0; i < 150; i++) { + read_black(i, step8, model_nr, black); + ret = transceive_blocking(step8, 103, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; } + progress = i * 100 / 150; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } - msleep(100); - } else if (step == 3) { - PrintAndLogEx(INFO, "Step3: e-paper config1"); - transceive_blocking(step3, 2, rx, 20, actrxlen, 2157 + 2048); //cd 02 - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 4; - fail_num = 0; - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; + } else if (model_nr == M7in5) { //7.5inch + for (i = 0; i < 400; i++) { + read_black(i, step8, model_nr, black); + ret = transceive_blocking(step8, 123, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; } + progress = i * 100 / 400; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + msleep(6); } - msleep(200); - } else if (step == 4) { - PrintAndLogEx(INFO, "Step4: e-paper power on"); - transceive_blocking(step4, 2, rx, 20, actrxlen, 2157 + 2048); //cd 03 - if (model_nr == M1in54B) { - // 1.54B Keychain handler - PrintAndLogEx(DEBUG, "Start_Drawing_1in54B"); - char t = start_drawing_1in54B(model_nr, black, red, fail_num); - if (t == 0) { - step = 11; - //1.54B Data transfer is complete and wait for refresh - } else if (t == 1) { - step = 14; - //1.54B Data transmission error + } else if (model_nr == M2in13B) { //2.13inch B + for (i = 0; i < 26; i++) { + read_black(i, step8, model_nr, black); + ret = transceive_blocking(step8, 109, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; } - // 1.54B Keychain handler end + progress = i * 50 / 26; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } - if (rx[0] == 0 && rx[1] == 0) { - fail_num = 0; - step = 5; - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; - } - } - } else if (step == 5) { - PrintAndLogEx(INFO, "Step5: e-paper config2"); - transceive_blocking(step5, 2, rx, 20, actrxlen, 2157 + 2048); //cd 05 - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 6; - fail_num = 0; - msleep(100); - } else { - fail_num++; - if (fail_num > 30) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; - } - } - msleep(10); - } else if (step == 6) { - PrintAndLogEx(INFO, "Step6: EDP load to main") ; - transceive_blocking(step6, 2, rx, 20, actrxlen, 2157 + 2048); //cd 06 - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 7; - fail_num = 0; - msleep(100); - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; - } - } - } else if (step == 7) { - PrintAndLogEx(INFO, "Step7: Data preparation"); - transceive_blocking(step7, 2, rx, 20, actrxlen, 2157 + 2048); //cd 07 - if (rx[0] == 0 && rx[1] == 0) { - rx[0] = 1; - rx[1] = 1; - step = 8; - fail_num = 0; - } else { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; - } - } - } else if (step == 8) { //cd 08 - PrintAndLogEx(INFO, "Step8: Start data transfer"); - if (model_nr == M2in13) { //2.13inch - for (i = 0; i < 250; i++) { - rx[0] = 1; - rx[1] = 1; - read_black(i, step8, model_nr, black); - transceive_blocking(step8, 19, rx, 20, actrxlen, 2157 + 2048); - progress = i * 100 / 250; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - } - } else if (model_nr == M2in9) { - for (i = 0; i < 296; i++) { - rx[0] = 1; - rx[1] = 1; - read_black(i, step8, model_nr, black); - transceive_blocking(step8, 19, rx, 20, actrxlen, 2157 + 2048); - progress = i * 100 / 296; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - } - } else if (model_nr == M4in2) { //4.2inch - for (i = 0; i < 150; i++) { - rx[0] = 1; - rx[1] = 1; - read_black(i, step8, model_nr, black); - transceive_blocking(step8, 103, rx, 20, actrxlen, 2157 + 2048); - progress = i * 100 / 150; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - } - } else if (model_nr == M7in5) { //7.5inch - for (i = 0; i < 400; i++) { - rx[0] = 1; - rx[1] = 1; - read_black(i, step8, model_nr, black); - transceive_blocking(step8, 123, rx, 20, actrxlen, 2157 + 2048); - progress = i * 100 / 400; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - msleep(6); - } - } else if (model_nr == M2in13B) { //2.13inch B - for (i = 0; i < 26; i++) { - rx[0] = 1; - rx[1] = 1; - read_black(i, step8, model_nr, black); - transceive_blocking(step8, 109, rx, 20, actrxlen, 2157 + 2048); - progress = i * 50 / 26; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - } - } else if (model_nr == M7in5HD) { //7.5HD + } else if (model_nr == M7in5HD) { //7.5HD - for (i = 0; i < 484; i++) { - rx[0] = 1; - rx[1] = 1; - read_black(i, step8, model_nr, black); - //memset(&step8[3], 0xf0, 120); - transceive_blocking(step8, 123, rx, 20, actrxlen, 2157 + 2048); - progress = i * 100 / 484; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); - } - memset(&step8[3], 0xff, 120); - transceive_blocking(step8, 110 + 3, rx, 20, actrxlen, 2157 + 2048); - - - } else if (model_nr == M2in7) { //2.7inch - for (i = 0; i < 48; i++) { - rx[0] = 1; - rx[1] = 1; - //read_black(i,step8, model_nr, black); - memset(&step8[3], 0xFF, sizeof(step8)-3); - transceive_blocking(step8, 124, rx, 20, actrxlen, 2157 + 2048); - progress = i * 50 / 48; - PrintAndLogEx(INPLACE, "Progress: %d %%", progress); + for (i = 0; i < 484; i++) { + read_black(i, step8, model_nr, black); + //memset(&step8[3], 0xf0, 120); + ret = transceive_blocking(step8, 123, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; } + progress = i * 100 / 484; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } - PROMPT_CLEARLINE; - step = 9; - } else if (step == 9) { - PrintAndLogEx(INFO, "Step9: e-paper power on"); - if (model_nr == M2in13 || model_nr == M2in9 || model_nr == M4in2 || model_nr == M7in5 || model_nr == M7in5HD) { - transceive_blocking(step9, 2, rx, 20, actrxlen, 2157 + 2048); //cd 18 - // The black-and-white screen sending backplane is also shielded, with no effect. Except 2.7 - if (rx[0] != 0 || rx[1] != 0) { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; - } - } else - fail_num = 0; - - rx[0] = 1; - rx[1] = 1; - step = 10; - } else if (model_nr == M2in13B || model_nr == M2in7) { - transceive_blocking(step9, 2, rx, 20, actrxlen, 2157 + 2048); //cd 18 - //rx[0]=1;rx[1]=1; - step = 19; + memset(&step8[3], 0xff, 120); + ret = transceive_blocking(step8, 110 + 3, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; } - } else if (step == 10) { - PrintAndLogEx(INFO, "Step10: Refresh e-paper"); - transceive_blocking(step10, 2, rx, 20, actrxlen, 2157 + 2048); //cd 09 refresh command - if (rx[0] != 0 || rx[1] != 0) { - fail_num++; - if (fail_num > 10) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; + } else if (model_nr == M2in7) { //2.7inch + for (i = 0; i < 48; i++) { + //read_black(i,step8, model_nr, black); + memset(&step8[3], 0xFF, sizeof(step8)-3); + ret = transceive_blocking(step8, 124, rx, 20, actrxlen, true); // cd 08 + if (ret != PM3_SUCCESS) { + return ret; } - } else - fail_num = 0; - rx[0] = 1; - rx[1] = 1; - step = 11; - msleep(200); - } else if (step == 11) { - PrintAndLogEx(INFO, "Step11: Wait tag to be ready"); - if (model_nr == M2in13B || model_nr == M1in54B) { // Black, white and red screen refresh time is longer, wait first - msleep(9000); - } else if (model_nr == M7in5HD) { - msleep(1000); + progress = i * 50 / 48; + PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } - while (1) { - rx[0] = 1; - rx[1] = 1; - if (model_nr == M1in54B) { - // send 0xcd 0x08 with 1.54B - transceive_blocking(step8, 2, rx, 20, actrxlen, 2157 + 2048); - } else { - transceive_blocking(step11, 2, rx, 20, actrxlen, 2157 + 2048); //cd 0a - } - if (rx[0] == 0xff && rx[1] == 0) { - PrintAndLogEx(NORMAL, ""); - PrintAndLogEx(SUCCESS, "E-paper Reflash OK"); - fail_num = 0; - step = 12; - msleep(200); - break; - } else { - if (fail_num > 50) { - PrintAndLogEx(WARNING, "Update failed, please try again."); - DropField(); - return PM3_ESOFT; - } else { - fail_num++; - PrintAndLogEx(INPLACE, "E-paper Reflashing, Waiting"); - msleep(100); - } - } + } + PROMPT_CLEARLINE; + PrintAndLogEx(INFO, "Step9: e-paper power on"); + if (model_nr == M2in13 || model_nr == M2in9 || model_nr == M4in2 || model_nr == M7in5 || model_nr == M7in5HD) { + ret = transceive_blocking(step9, 2, rx, 20, actrxlen, true); //cd 18 + // The black-and-white screen sending backplane is also shielded, with no effect. Except 2.7 + if (ret != PM3_SUCCESS) { + return ret; + } + } else if (model_nr == M2in13B || model_nr == M2in7) { + ret = transceive_blocking(step9, 2, rx, 20, actrxlen, true); //cd 18 + if (ret != PM3_SUCCESS) { + return ret; } - - } else if (step == 12) { - PrintAndLogEx(INFO, "Step12: e-paper power off command"); - transceive_blocking(step12, 2, rx, 20, actrxlen, 2157 + 2048); //cd 04 - rx[0] = 1; - rx[1] = 1; - step = 13; - msleep(200); - } else if (step == 13) { - PrintAndLogEx(SUCCESS, "E-paper Update OK"); - rx[0] = 1; - rx[1] = 1; - msleep(200); - DropField(); - return PM3_SUCCESS; - } else if (step == 19) { PrintAndLogEx(INFO, "Step9b"); if (model_nr == M2in7) { for (i = 0; i < 48; i++) { - rx[0] = 1; - rx[1] = 1; read_black(i, step13, model_nr, black); - transceive_blocking(step13, 124, rx, 20, actrxlen, 2157 + 2048); //CD 19 + ret = transceive_blocking(step13, 124, rx, 20, actrxlen, true); //CD 19 + if (ret != PM3_SUCCESS) { + return ret; + } progress = i * 50 / 48 + 50; PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } } else if (model_nr == M2in13B) { for (i = 0; i < 26; i++) { - rx[0] = 1; - rx[1] = 1; read_red(i, step13, model_nr, red); //memset(&step13[3], 0xfE, 106); - transceive_blocking(step13, 109, rx, 20, actrxlen, 2157 + 2048); + ret = transceive_blocking(step13, 109, rx, 20, actrxlen, true); + if (ret != PM3_SUCCESS) { + return ret; + } progress = i * 50 / 26 + 50; PrintAndLogEx(INPLACE, "Progress: %d %%", progress); } } PROMPT_CLEARLINE; - rx[0] = 1; - rx[1] = 1; - step = 10; + } + PrintAndLogEx(INFO, "Step10: Refresh e-paper"); + ret = transceive_blocking(step10, 2, rx, 20, actrxlen, true); //cd 09 refresh command + if (ret != PM3_SUCCESS) { + return ret; + } + msleep(200); + } + PrintAndLogEx(INFO, "Step11: Wait tag to be ready"); + if (model_nr == M2in13B || model_nr == M1in54B) { // Black, white and red screen refresh time is longer, wait first + msleep(9000); + } else if (model_nr == M7in5HD) { + msleep(1000); + } + uint8_t fail_num = 0; + while (1) { + if (model_nr == M1in54B) { + // send 0xcd 0x08 with 1.54B + ret = transceive_blocking(step8, 2, rx, 20, actrxlen, false); //cd 08 + } else { + ret = transceive_blocking(step11, 2, rx, 20, actrxlen, false); //cd 0a + } + if (ret != PM3_SUCCESS) { + return ret; + } + if (rx[0] == 0xff && rx[1] == 0) { + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(SUCCESS, "E-paper Reflash OK"); + msleep(200); + break; + } else { + if (fail_num > 50) { + PrintAndLogEx(WARNING, "Update failed, please try again."); + DropField(); + return PM3_ESOFT; + } else { + fail_num++; + PrintAndLogEx(INPLACE, "E-paper Reflashing, Waiting"); + msleep(100); + } } } + PrintAndLogEx(INFO, "Step12: e-paper power off command"); + ret = transceive_blocking(step12, 2, rx, 20, actrxlen, true); //cd 04 + if (ret != PM3_SUCCESS) { + return ret; + } + msleep(200); + PrintAndLogEx(SUCCESS, "E-paper Update OK"); + msleep(200); + DropField(); + return PM3_SUCCESS; } From b92c9e845d68d9db0d109a3ece5911f2a96b818b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 13 Sep 2020 03:46:15 +0200 Subject: [PATCH 55/92] waveshare: bugfix --- client/src/cmdhfwaveshare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 550955fa1..83c014505 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -147,8 +147,8 @@ static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t **b for (X = 0; X < Bmp_Width_Byte; X++) { // lines if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { (*black)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; - offset++; } + offset++; } } return PM3_SUCCESS; From 407105b93ae54d8959e45ac7ccf5eec54ed3d699 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 13 Sep 2020 09:37:35 +0200 Subject: [PATCH 56/92] travis fix, bad define --- client/src/cmdhfwaveshare.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfwaveshare.h b/client/src/cmdhfwaveshare.h index bae8f239a..da15c9166 100644 --- a/client/src/cmdhfwaveshare.h +++ b/client/src/cmdhfwaveshare.h @@ -2,7 +2,7 @@ // Waveshare commands //----------------------------------------------------------------------------- -#ifndef CMDHFWQVESHARE_H__ +#ifndef CMDHFWAVESHARE_H__ #define CMDHFWAVESHARE_H__ int CmdHFWaveshare(const char *Cmd); From 172f3163e6d238ddd1c11ce36b1dff9ed31552dd Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 13 Sep 2020 15:19:35 +0200 Subject: [PATCH 57/92] update magic cards doc --- armsrc/iso14443a.c | 2 +- doc/magic_cards_notes.md | 186 ++++++++++++++++++++++++++++++++------- 2 files changed, 155 insertions(+), 33 deletions(-) diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index d7de0b554..6ada61171 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -2537,7 +2537,7 @@ int iso14443a_select_card(uint8_t *uid_ptr, iso14a_card_select_t *p_card, uint32 } else if (hf14aconfig.forcebcc == 1) { sel_uid[6] = bcc; } // else use card BCC - Dbprintf("Using BCC=" _YELLOW_("0x%02x") " to perform anticollision", sel_uid[6]); + Dbprintf("Using BCC%d=" _YELLOW_("0x%02x") " to perform anticollision", cascade_level, sel_uid[6]); } } else { memcpy(sel_uid + 2, uid_resp, 4); // the provided UID diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index 71180d2fd..c7c2144a6 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -154,10 +154,10 @@ hf mf cview When "soft-bricked" (by writing invalid data in block0), these ones may help: ``` -hf mf csetblk 0 11223344440804006263646566676869 -``` -``` -hf 14a config h +# MFC Gen1A 1k: +hf mf cwipe -u 11223344 -a 0004 -s 08 +# MFC Gen1A 4k: +hf mf cwipe -u 11223344 -a 0044 -s 18 ``` ``` script run remagic @@ -213,6 +213,8 @@ hf 14a info Not all Gen2 cards can be identified with `hf 14a info`, only those replying to RATS. +To identify the other ones, you've to try to write to block0 and see if it works... + ### Magic commands Android compatible @@ -230,10 +232,10 @@ Android compatible * some cards use a fix "08" or "18" in anticollision, no matter the block0. Including all 7b. * BCC: * some cards play blindly the block0 BCC byte, beware! - * some cards compute a proper BCC in anticollision. Including all 7b. + * some cards compute a proper BCC in anticollision. Including all 7b comuting their BCC0 and BCC1. * ATS: * some cards don't reply to RATS - * some reply with 0978009102DABC1910F005 + * some reply with an ATS #### MIFARE Classic DirectWrite flavour 1 @@ -280,6 +282,13 @@ Android compatible * ATS: no * PRNG: weak +#### MIFARE Classic DirectWrite flavour 6 + +**TODO** need more info + +* UID 7b +* ATS: 0D780071028849A13020150608563D + ### Proxmark3 commands ``` @@ -295,9 +304,21 @@ hf 14a config h e.g. for 4b UID: ``` -hf 14a config a 1 b 2 2 2 3 2 r 2 -hf mf wrbl 0 A FFFFFFFFFFFF 11223344440804006263646566676869 +hf 14a config a 1 b 2 2 2 r 2 +hf mf wrbl 0 A FFFFFFFFFFFF 11223344440804006263646566676869 # for 1k +hf mf wrbl 0 A FFFFFFFFFFFF 11223344441802006263646566676869 # for 4k +hf 14a config a 0 b 0 2 0 r 0 +hf 14a reader +``` + +e.g. for 7b UID: + +``` +hf 14a config a 1 b 2 2 1 3 2 r 2 +hf mf wrbl 0 A FFFFFFFFFFFF 04112233445566084400626364656667 # for 1k +hf mf wrbl 0 A FFFFFFFFFFFF 04112233445566184200626364656667 # for 4k hf 14a config a 0 b 0 2 0 3 0 r 0 +hf 14a reader ``` ## MIFARE Classic DirectWrite, FUID version aka 1-write @@ -449,7 +470,7 @@ Int is internal, typically 0x48 #### Magic commands -**TOOD** +**TODO** #### UID @@ -476,23 +497,40 @@ script run remagic -u ### Identify -**TODO** +``` +hf 14a info +... +[+] Magic capabilities : Gen 2 / CUID +``` + +It seems so far that all MFUL DW have an ATS. + +### Magic commands + +Issue three regular MFU write commands in a row to write first three blocks. ### Characteristics -#### Magic commands +* UID: Only 7b versions +* ATQA: + * all cards play fix ATQA +* SAK: + * all cards play fix SAK +* BCC: + * some cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware! + * some cards compute proper BCC0 and BCC1 in anticollision +* ATS: + * all cards reply with an ATS -**TODO** +#### MIFARE Ultralight DirectWrite flavour 1 -#### UID +* BCC: computed +* ATS: 0A78008102DBA0C119402AB5 -Only 7b versions +#### MIFARE Ultralight DirectWrite flavour 2 -#### SAK, ATQA, BCC, ATS - -Some fix their BCC in anticol, some don't, be careful! - -**TODO** need more tests +* BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware! +* ATS: 850000A00A000AB00000000000000000184D ### Proxmark3 commands @@ -514,6 +552,14 @@ When "soft-bricked" (by writing invalid data in block0), these ones may help: hf 14a config h ``` +E.g.: +``` +hf 14a config a 1 b 2 2 1 3 2 r 2 +hf mfu setuid 04112233445566 +hf 14a config a 0 b 0 2 0 3 0 r 0 +hf 14a reader +``` + ### libnfc commands ``` @@ -527,25 +573,101 @@ See `--uid` and `--full` ## MIFARE Ultralight EV1 DirectWrite -Same commands as for MFUL DirectWrite - -## MIFARE Ultralight C Gen1A - -Same commands as for MFUL Gen1A - -## MIFARE Ultralight C DirectWrite - -Same commands as for MFUL DirectWrite - -# NTAG +Similar to MFUL DirectWrite ### Identify -**TODO** +``` +hf 14a info +... +[+] Magic capabilities : Gen 2 / CUID +``` + +### Characteristics + +* UID: Only 7b versions +* ATQA: + * all cards play fix ATQA +* SAK: + * all cards play fix SAK +* BCC: + * cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware! +* ATS: + * all cards reply with an ATS + +#### MIFARE Ultralight EV1 DirectWrite flavour 1 + +* BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware! +* ATS: 850000A000000AC30004030101000B0341DF + +#### MIFARE Ultralight EV1 DirectWrite flavour 2 + +* BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware! +* ATS: 850000A00A000AC30004030101000B0316D7 + +## MIFARE Ultralight C Gen1A + +Similar to MFUL Gen1A + +## MIFARE Ultralight C DirectWrite + +Similar to MFUL DirectWrite + +### Identify + +``` +hf 14a info +... +[+] Magic capabilities : Gen 2 / CUID +``` + +### Characteristics + +* UID: Only 7b versions +* ATQA: + * all cards play fix ATQA +* SAK: + * all cards play fix SAK +* BCC: + * cards compute proper BCC0 and BCC1 in anticollision +* ATS: + * all cards reply with an ATS + +#### MIFARE Ultralight C DirectWrite flavour 1 + +* BCC: computed +* ATS: 0A78008102DBA0C119402AB5 + +# NTAG ## NTAG213 DirectWrite -Same commands as for MFUL DirectWrite +Similar to MFUL DirectWrite + +### Identify + +``` +hf 14a info +... +[+] Magic capabilities : Gen 2 / CUID +``` + +### Characteristics + +* UID: Only 7b versions +* ATQA: + * all cards play fix ATQA +* SAK: + * all cards play fix SAK +* BCC: + * cards play blindly the block0 BCC0 and block2 BCC1 bytes, beware! +* ATS: + * all cards reply with an ATS + +#### NTAG213 DirectWrite flavour 1 + +* BCC: play blindly the block0 BCC0 and block2 BCC1 bytes, beware! +* ATS: 0A78008102DBA0C119402AB5 ## NTAG21x From c62a721c22a8b8599ba04432f0c1e5f30bbaf197 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 13 Sep 2020 15:36:19 +0200 Subject: [PATCH 58/92] hf 14a config : Add useful recipes to unbrick cards --- client/src/cmdhf14a.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhf14a.c b/client/src/cmdhf14a.c index c2b5b759b..fbd9fc618 100644 --- a/client/src/cmdhf14a.c +++ b/client/src/cmdhf14a.c @@ -170,19 +170,40 @@ uint16_t atsFSC[] = {16, 24, 32, 40, 48, 64, 96, 128, 256}; static int usage_hf_14a_config(void) { PrintAndLogEx(NORMAL, "Usage: hf 14a config [a 0|1|2] [b 0|1|2] [2 0|1|2] [3 0|1|2]"); - PrintAndLogEx(NORMAL, "Options:"); + PrintAndLogEx(NORMAL, "\nOptions:"); PrintAndLogEx(NORMAL, " h This help"); PrintAndLogEx(NORMAL, " a 0|1|2 ATQA<>anticollision: 0=follow standard 1=execute anticol 2=skip anticol"); PrintAndLogEx(NORMAL, " b 0|1|2 BCC: 0=follow standard 1=use fixed BCC 2=use card BCC"); PrintAndLogEx(NORMAL, " 2 0|1|2 SAK<>CL2: 0=follow standard 1=execute CL2 2=skip CL2"); PrintAndLogEx(NORMAL, " 3 0|1|2 SAK<>CL3: 0=follow standard 1=execute CL3 2=skip CL3"); PrintAndLogEx(NORMAL, " r 0|1|2 SAK<>ATS: 0=follow standard 1=execute RATS 2=skip RATS"); - PrintAndLogEx(NORMAL, "Examples:"); + PrintAndLogEx(NORMAL, "\nExamples:"); PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config ")" Print current configuration"); PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 1 ")" Force execution of anticollision"); PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 0 ")" Restore ATQA interpretation"); PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config b 1 ")" Force fix of bad BCC in anticollision"); PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config b 0 ")" Restore BCC check"); + PrintAndLogEx(NORMAL, "\nExamples to revive Gen2/DirectWrite magic cards failing at anticollision:"); + PrintAndLogEx(NORMAL, _CYAN_(" MFC 1k 4b UID")":"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 1 b 2 2 2 r 2")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf mf wrbl 0 A FFFFFFFFFFFF 11223344440804006263646566676869")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 0 b 0 2 0 r 0")); + PrintAndLogEx(NORMAL, _CYAN_(" MFC 4k 4b UID")":"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 1 b 2 2 2 r 2")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf mf wrbl 0 A FFFFFFFFFFFF 11223344441802006263646566676869")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 0 b 0 2 0 r 0")); + PrintAndLogEx(NORMAL, _CYAN_(" MFC 1k 7b UID")":"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 1 b 2 2 1 3 2 r 2")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf mf wrbl 0 A FFFFFFFFFFFF 04112233445566084400626364656667")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 0 b 0 2 0 3 0 r 0")); + PrintAndLogEx(NORMAL, _CYAN_(" MFC 4k 7b UID")":"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 1 b 2 2 1 3 2 r 2")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf mf wrbl 0 A FFFFFFFFFFFF 04112233445566184200626364656667")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 0 b 0 2 0 3 0 r 0")); + PrintAndLogEx(NORMAL, _CYAN_(" MFUL ")"/" _CYAN_(" MFUL EV1 ")"/" _CYAN_(" MFULC")":"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 1 b 2 2 1 3 2 r 2")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf mfu setuid 04112233445566")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a config a 0 b 0 2 0 3 0 r 0")); return PM3_SUCCESS; } From 0650123b09d27e03dfd0ef6453fff4a63f50dcd8 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 13 Sep 2020 16:16:53 +0200 Subject: [PATCH 59/92] doc --- doc/magic_cards_notes.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index c7c2144a6..a3d9627fd 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -4,6 +4,8 @@ This document is based mostly on information posted on http://www.proxmark.org/f Useful docs: * [AN10833 MIFARE Type Identification Procedure](https://www.nxp.com/docs/en/application-note/AN10833.pdf) +- [ISO14443A](#iso14443a) + * [Identifying broken ISO14443A magic](#identifying-broken-iso14443a-magic) - [MIFARE Classic](#mifare-classic) * [MIFARE Classic block0](#mifare-classic-block0) * [MIFARE Classic Gen1A aka UID](#mifare-classic-gen1a-aka-uid) @@ -33,6 +35,31 @@ Useful docs: * [ISO15693 magic](#iso15693-magic) +# ISO14443A + +## Identifying broken ISO14443A magic + +When a magic card configuration is really messed up and the card is not labeled, it may be hard to find out which type of card it is. + +Here are some tips if the card doesn't react or gives error on a simple `hf 14a reader`: + +Let's force a 4b UID anticollision and see what happens: +``` +hf 14a config a 1 b 2 2 2 r 2 +hf 14a reader +``` +It it responds, we know it's a TypeA card. But maybe it's a 7b UID, so let's force a 7b UID anticollision: +``` +hf 14a config a 1 b 2 2 1 3 2 r 2 +hf 14a reader +``` +At this stage, you know if it's a TypeA 4b or 7b card and you can check further on this page how to reconfigure different types of cards. + +To restore anticollision config of the Proxmark3: + +``` +hf 14a config a 0 b 0 2 0 3 0 r 0 +``` # MIFARE Classic Referred as M1, S50 (1k), S70 (4k) From aa756aa493b73f5bcc2c75fbc3239cd83346b3a2 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 13 Sep 2020 18:38:02 +0200 Subject: [PATCH 60/92] fix #953 static nonce detection --- client/src/cmdhfmf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index c62629b6f..332821384 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -1360,7 +1360,7 @@ static int CmdHF14AMfNested(const char *Cmd) { } // check if tag doesn't have static nonce - if (detect_classic_static_nonce()) { + if (detect_classic_static_nonce() == NONCE_STATIC) { PrintAndLogEx(WARNING, "Static nonce detected. Quitting..."); PrintAndLogEx(INFO, "\t Try use " _YELLOW_("`hf mf staticnested`")); return PM3_EOPABORTED; @@ -1610,7 +1610,7 @@ static int CmdHF14AMfNestedStatic(const char *Cmd) { } // check if tag have static nonce - if (detect_classic_static_nonce() == false) { + if (detect_classic_static_nonce() != NONCE_STATIC) { PrintAndLogEx(WARNING, "Normal nonce detected, or failed read of card. Quitting..."); PrintAndLogEx(INFO, "\t Try use " _YELLOW_("`hf mf nested`")); return PM3_EOPABORTED; @@ -1924,7 +1924,7 @@ static int CmdHF14AMfNestedHard(const char *Cmd) { if (!know_target_key && nonce_file_read == false) { // check if tag doesn't have static nonce - if (detect_classic_static_nonce()) { + if (detect_classic_static_nonce() == NONCE_STATIC) { PrintAndLogEx(WARNING, "Static nonce detected. Quitting..."); PrintAndLogEx(HINT, "\tTry use `" _YELLOW_("hf mf staticnested") "`"); return PM3_EOPABORTED; From b4aebd140a8c019fb27f671d979c0b7e4bb1dc9c Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 14 Sep 2020 00:14:19 +0200 Subject: [PATCH 61/92] waveshare: fix multiple issues in BMP RGB handling --- client/src/cmdhfwaveshare.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 83c014505..aa89abaa7 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -195,14 +195,14 @@ static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **blac for (X = 0; X < pbmpheader->BMP_Width; X++) { // lines B = bmp[offset++]; G = bmp[offset++]; - G = bmp[offset++]; - if (R < 30 && G < 30 && B < 30) { + R = bmp[offset++]; + if (R < 128 && G < 128 && B < 128) { Black_data = Black_data | (1); } else if (R > 190 && G < 90 && B < 90) { Red_data = Red_data | (1); } count++; - if (count >= 8) { + if ((count >= 8) || (X == pbmpheader->BMP_Width - 1)) { (*black)[X / 8 + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = ~Black_data; (*red)[X / 8 + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = ~Red_data; count = 0; @@ -212,6 +212,8 @@ static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **blac Black_data = Black_data << 1; Red_data = Red_data << 1; } + // Skip BMP line padding + offset+=(((pbmpheader->BMP_Width*3/4)+1)*4)-pbmpheader->BMP_Width*3; } return PM3_SUCCESS; } From 8bb2f62f1ed82f09ddf919bd872587c4746f9b17 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 14 Sep 2020 00:31:24 +0200 Subject: [PATCH 62/92] doc csetuid --- doc/magic_cards_notes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/magic_cards_notes.md b/doc/magic_cards_notes.md index a3d9627fd..c02b59e53 100644 --- a/doc/magic_cards_notes.md +++ b/doc/magic_cards_notes.md @@ -186,6 +186,14 @@ hf mf cwipe -u 11223344 -a 0004 -s 08 # MFC Gen1A 4k: hf mf cwipe -u 11223344 -a 0044 -s 18 ``` +or just fixing block0: +``` +# MFC Gen1A 1k: +hf mf csetuid 11223344 0004 08 +# MFC Gen1A 4k: +hf mf csetuid 11223344 0044 18 +``` + ``` script run remagic ``` From 6304003a7a6e8e0b2da0b068d8142b4402715288 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 14 Sep 2020 01:16:28 +0200 Subject: [PATCH 63/92] waveshare: check image size --- client/src/cmdhfwaveshare.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index aa89abaa7..6cf38de9d 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -61,6 +61,8 @@ typedef struct { typedef struct model_s { const char *desc; uint8_t len; // The data sent in one time shall not be greater than 128-3 + uint16_t width; + uint16_t height; } model_t; typedef enum { @@ -76,14 +78,14 @@ typedef enum { } model_enum_t; static model_t models[] = { - {"2.13 inch e-paper", 16}, - {"2.9 inch e-paper", 16}, - {"4.2 inch e-paper", 100}, - {"7.5 inch e-paper", 120}, - {"2.7 inch e-paper", 121}, - {"2.13 inch e-paper B", 106}, - {"1.54 inch e-paper B", 100}, - {"7.5 inch e-paper HD", 120}, + {"2.13 inch e-paper", 16, 122, 250}, // tested + {"2.9 inch e-paper", 16, 128, 296}, + {"4.2 inch e-paper", 100, 400, 300}, + {"7.5 inch e-paper", 120, 800, 480}, + {"2.7 inch e-paper", 121, 276, 176}, + {"2.13 inch e-paper B", 106, 104, 212}, + {"1.54 inch e-paper B", 100, 200, 200}, + {"7.5 inch e-paper HD", 120, 800, 480}, }; static int CmdHelp(const char *Cmd); @@ -104,16 +106,18 @@ static int usage_hf_waveshare_loadbmp(void) { return PM3_SUCCESS; } -static int picture_bit_depth(const uint8_t *bmp, const size_t bmpsize) { +static int picture_bit_depth(const uint8_t *bmp, const size_t bmpsize, const uint8_t model_nr) { if (bmpsize < sizeof(BMP_HEADER)) return PM3_ESOFT; BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; PrintAndLogEx(DEBUG, "colorsused = %d", pbmpheader->colorsused); PrintAndLogEx(DEBUG, "pbmpheader->bpp = %d", pbmpheader->bpp); + if ((pbmpheader->BMP_Width != models[model_nr].width) || (pbmpheader->BMP_Height != models[model_nr].height)) { + PrintAndLogEx(WARNING, "Invalid BMP size, expected %ix%i, got %ix%i", pbmpheader->BMP_Width, pbmpheader->BMP_Height, models[model_nr].width, models[model_nr].height); + } return pbmpheader->bpp; } - static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t **black) { BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; // check file is bitmap @@ -696,7 +700,7 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { return PM3_EIO; } - int depth = picture_bit_depth(bmp, bytes_read); + int depth = picture_bit_depth(bmp, bytes_read, model_nr); if (depth == PM3_ESOFT) { PrintAndLogEx(ERR, "Error, BMP file is too small"); free(bmp); From 9751f629409f55db2a8ec357fa906b069981bd2f Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 14 Sep 2020 01:31:16 +0200 Subject: [PATCH 64/92] waveshare: swap some screen dimensions, to be tested... --- client/src/cmdhfwaveshare.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 6cf38de9d..ec76c0c5b 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -81,9 +81,9 @@ static model_t models[] = { {"2.13 inch e-paper", 16, 122, 250}, // tested {"2.9 inch e-paper", 16, 128, 296}, {"4.2 inch e-paper", 100, 400, 300}, - {"7.5 inch e-paper", 120, 800, 480}, + {"7.5 inch e-paper", 120, 480, 800}, {"2.7 inch e-paper", 121, 276, 176}, - {"2.13 inch e-paper B", 106, 104, 212}, + {"2.13 inch e-paper B", 106, 212, 104}, {"1.54 inch e-paper B", 100, 200, 200}, {"7.5 inch e-paper HD", 120, 800, 480}, }; From 9247613c0b1fd6bed5d31d73671480fb9d2c5283 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 14 Sep 2020 01:54:19 +0200 Subject: [PATCH 65/92] waveshare: fix dimensions --- client/src/cmdhfwaveshare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index ec76c0c5b..02841e53f 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -85,7 +85,7 @@ static model_t models[] = { {"2.7 inch e-paper", 121, 276, 176}, {"2.13 inch e-paper B", 106, 212, 104}, {"1.54 inch e-paper B", 100, 200, 200}, - {"7.5 inch e-paper HD", 120, 800, 480}, + {"7.5 inch e-paper HD", 120, 880, 528}, }; static int CmdHelp(const char *Cmd); From 3146305de14bbb27a4c4333d44c54e5fe9043c4b Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 14 Sep 2020 09:48:33 +0200 Subject: [PATCH 66/92] waveshare: fix RGB for some screensizes --- client/src/cmdhfwaveshare.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 02841e53f..bcddce856 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -216,8 +216,8 @@ static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **blac Black_data = Black_data << 1; Red_data = Red_data << 1; } - // Skip BMP line padding - offset+=(((pbmpheader->BMP_Width*3/4)+1)*4)-pbmpheader->BMP_Width*3; + // Skip BMP line padding: we accumulate 3* %4 per line and need one more %4 as padding + offset += pbmpheader->BMP_Width % 4; } return PM3_SUCCESS; } From 8268be539017e0147380cdfa859d8bdedb3d359d Mon Sep 17 00:00:00 2001 From: byron1901 Date: Mon, 14 Sep 2020 17:09:30 +0100 Subject: [PATCH 67/92] hf mf autopwn: fix static nonce detection --- client/src/cmdhfmf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 332821384..0220a026d 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -2348,7 +2348,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) { // Check if at least one sector key was found if (know_target_key == false) { // Check if the darkside attack can be used - if (prng_type && has_staticnonce == false) { + if (prng_type && has_staticnonce != NONCE_STATIC) { if (verbose) { PrintAndLogEx(INFO, "======================= " _YELLOW_("START DARKSIDE ATTACK") " ======================="); } @@ -2485,7 +2485,7 @@ noValidKeyFound: skipReadBKey: if (e_sector[current_sector_i].foundKey[current_key_type_i] == 0) { - if (has_staticnonce) + if (has_staticnonce == NONCE_STATIC) goto tryStaticnested; if (prng_type && (nested_failed == false)) { @@ -2578,7 +2578,7 @@ tryHardnested: // If the nested attack fails then we try the hardnested attack e_sector[current_sector_i].foundKey[current_key_type_i] = 'H'; } - if (has_staticnonce) { + if (has_staticnonce == NONCE_STATIC) { tryStaticnested: if (verbose) { PrintAndLogEx(INFO, "======================= " _YELLOW_("START STATIC NESTED ATTACK") " ======================="); From daa23990663639a0d9ae6710146873882299afa6 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 14 Sep 2020 22:15:33 +0200 Subject: [PATCH 68/92] more traces --- traces/README.txt | 2 + traces/lf_gprox_36_30_14489.pm3 | 39999 ++++++++++++++++++++++++ traces/lf_idteck_4944544BAC40E069.pm3 | 30000 ++++++++++++++++++ 3 files changed, 70001 insertions(+) create mode 100644 traces/lf_gprox_36_30_14489.pm3 create mode 100644 traces/lf_idteck_4944544BAC40E069.pm3 diff --git a/traces/README.txt b/traces/README.txt index a55786807..8d6a6733d 100644 --- a/traces/README.txt +++ b/traces/README.txt @@ -13,6 +13,8 @@ indala-504278295.pm3: PSK 26 bit indala homeagain.pm3: HomeAgain animal (cat) tag - ID 985121004515220 homeagain1600.pm3: HomeAgain animal (cat) tag - ID 985121004515220 keri.pm3: Keri PSK-3 Key Ring tag (back of tag: 1460 3411) +lf_gprox_36_30_14489.pm3: G-Prox-II FC: 30 Card: 3949, Format 36b ASK/BIPHASE +lf_idteck_4944544BAC40E069.pm3: IDTECK raw 4944544BAC40E069 , PSK Transit999-best.pm3: Transit 999 format (UID 99531670) ATA5577-HIDemu-FC1-C9.pm3: ata5577 in hid prox 26 bit emulation facility code:1 card#:9 AWID-15-259.pm3: AWID FSK RF/50 FC: 15 Card: 259 diff --git a/traces/lf_gprox_36_30_14489.pm3 b/traces/lf_gprox_36_30_14489.pm3 new file mode 100644 index 000000000..89a75e390 --- /dev/null +++ b/traces/lf_gprox_36_30_14489.pm3 @@ -0,0 +1,39999 @@ +-22 +-25 +-22 +-24 +-22 +-26 +-25 +-19 +-17 +-12 +123 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +103 +96 +91 +14 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +109 +103 +95 +90 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +110 +102 +90 +84 +77 +71 +65 +62 +60 +56 +48 +45 +38 +36 +32 +31 +29 +26 +26 +20 +19 +20 +17 +17 +16 +15 +18 +16 +17 +12 +11 +8 +7 +6 +5 +4 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +106 +98 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +103 +98 +90 +85 +9 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +108 +100 +93 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +113 +105 +100 +92 +86 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +104 +97 +89 +83 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-103 +-100 +-91 +-88 +-80 +-78 +-70 +-64 +-56 +-50 +-47 +-43 +-41 +-37 +-35 +-30 +-31 +-28 +-29 +-27 +-27 +-22 +-22 +-17 +-19 +-17 +-19 +-18 +-21 +-18 +113 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +107 +100 +93 +85 +80 +75 +69 +65 +63 +61 +58 +48 +46 +38 +36 +31 +30 +26 +24 +24 +18 +16 +18 +17 +17 +14 +13 +13 +8 +7 +10 +6 +7 +5 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-103 +-98 +-90 +-86 +-79 +-77 +-70 +-64 +-61 +-55 +-54 +-48 +-49 +-43 +-40 +-37 +-33 +-32 +-31 +-27 +-27 +-26 +-20 +-19 +-16 +-16 +-15 +-17 +-15 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +105 +98 +89 +13 +-54 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +103 +97 +90 +86 +76 +72 +65 +61 +51 +49 +44 +41 +38 +35 +33 +30 +27 +26 +21 +20 +21 +17 +17 +15 +15 +12 +11 +11 +8 +7 +7 +6 +6 +10 +11 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-106 +-98 +-94 +-88 +-84 +-76 +-72 +-65 +-63 +-58 +-58 +-52 +-51 +-48 +-44 +-41 +-42 +-37 +-36 +-33 +-31 +-30 +-24 +-19 +-18 +-16 +-15 +-12 +-14 +-13 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +116 +107 +100 +94 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +110 +103 +96 +90 +85 +84 +8 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +108 +102 +92 +86 +84 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +105 +98 +87 +82 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +111 +104 +96 +88 +82 +70 +65 +58 +54 +50 +46 +44 +38 +36 +36 +30 +29 +26 +25 +24 +22 +21 +17 +15 +14 +14 +12 +12 +11 +10 +9 +12 +14 +12 +8 +7 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-117 +-106 +-100 +-91 +-86 +-82 +-76 +-73 +-66 +-60 +-57 +-54 +-51 +-48 +-42 +-38 +-37 +-36 +-36 +-35 +-35 +-31 +-32 +-29 +-30 +-26 +-24 +-22 +-19 +-22 +-18 +113 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +99 +94 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +112 +106 +98 +94 +86 +11 +-56 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +105 +98 +91 +84 +77 +66 +62 +54 +51 +49 +45 +42 +39 +38 +38 +31 +30 +24 +23 +21 +20 +19 +17 +16 +14 +13 +13 +9 +9 +9 +3 +2 +4 +3 +4 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-106 +-96 +-91 +-86 +-82 +-78 +-73 +-68 +-64 +-57 +-55 +-50 +-49 +-46 +-44 +-39 +-36 +-31 +-31 +-29 +-29 +-28 +-28 +-23 +-22 +-18 +-20 +-18 +-20 +-18 +112 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +105 +96 +90 +84 +77 +72 +68 +62 +58 +58 +53 +51 +43 +41 +36 +33 +30 +27 +26 +22 +20 +18 +15 +14 +14 +8 +6 +9 +9 +10 +5 +6 +2 +2 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +3 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +108 +96 +90 +80 +74 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +99 +93 +83 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-113 +-105 +-97 +-89 +-86 +-79 +-76 +-69 +-64 +-57 +-50 +-50 +-44 +-45 +-40 +-41 +-37 +-34 +-31 +-33 +-30 +-29 +-29 +-24 +-25 +-21 +-19 +-17 +-14 +-14 +-14 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +109 +97 +92 +82 +75 +73 +70 +67 +58 +54 +49 +45 +43 +38 +36 +34 +32 +29 +30 +28 +26 +26 +25 +20 +18 +15 +14 +15 +13 +13 +8 +7 +3 +2 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +115 +107 +101 +90 +85 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-106 +-98 +-88 +-86 +-79 +-74 +-69 +-62 +-61 +-57 +-54 +-52 +-48 +-45 +-42 +-36 +-32 +-35 +-31 +-34 +-31 +-32 +-29 +-27 +-24 +-22 +-21 +-18 +-17 +-18 +-15 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +113 +104 +98 +91 +15 +-52 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +101 +94 +89 +85 +76 +71 +64 +62 +57 +55 +50 +45 +40 +37 +31 +30 +29 +27 +26 +20 +18 +16 +15 +14 +12 +12 +14 +13 +12 +13 +12 +7 +6 +4 +3 +-2 +-68 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-109 +-101 +-93 +-90 +-83 +-74 +-70 +-64 +-61 +-56 +-52 +-47 +-48 +-44 +-45 +-40 +-38 +-37 +-33 +-34 +-29 +-30 +-26 +-23 +-25 +-21 +-18 +-20 +-16 +-16 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +105 +100 +90 +14 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +113 +104 +97 +86 +79 +5 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +105 +97 +94 +85 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +13 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +110 +102 +96 +87 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +113 +106 +97 +91 +86 +77 +71 +70 +65 +62 +55 +51 +46 +43 +36 +34 +28 +26 +28 +26 +26 +22 +21 +23 +18 +18 +13 +18 +16 +16 +12 +12 +12 +11 +8 +7 +5 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-108 +-98 +-94 +-87 +-84 +-78 +-74 +-69 +-65 +-59 +-54 +-48 +-47 +-42 +-42 +-39 +-38 +-33 +-32 +-27 +-28 +-26 +-27 +-24 +-25 +-23 +-26 +-23 +-23 +-23 +114 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +105 +104 +98 +90 +85 +80 +70 +65 +56 +53 +48 +45 +42 +38 +36 +31 +28 +27 +24 +22 +26 +25 +25 +24 +21 +17 +15 +12 +13 +12 +8 +6 +4 +5 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +109 +102 +96 +85 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-109 +-102 +-92 +-83 +-79 +-75 +-70 +-67 +-63 +-61 +-56 +-52 +-48 +-43 +-44 +-40 +-38 +-35 +-31 +-32 +-24 +-21 +-18 +-15 +-13 +-17 +-16 +-19 +-18 +-18 +-16 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +108 +99 +94 +86 +82 +76 +68 +63 +59 +49 +46 +39 +36 +36 +34 +33 +30 +28 +27 +23 +22 +21 +14 +12 +15 +12 +17 +17 +16 +17 +15 +12 +10 +7 +7 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +5 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +111 +104 +95 +89 +83 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +110 +103 +92 +86 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +105 +93 +89 +79 +74 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +13 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +103 +96 +90 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-108 +-101 +-94 +-87 +-79 +-73 +-71 +-65 +-62 +-57 +-54 +-49 +-43 +-41 +-39 +-37 +-33 +-32 +-26 +-24 +-25 +-22 +-19 +-17 +-18 +-18 +-18 +-14 +-14 +-18 +-17 +113 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +114 +108 +100 +95 +85 +79 +70 +64 +59 +55 +47 +45 +38 +35 +36 +33 +32 +30 +28 +27 +21 +20 +15 +13 +16 +13 +13 +12 +12 +9 +8 +8 +6 +6 +6 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-107 +-100 +-91 +-83 +-77 +-74 +-71 +-67 +-61 +-58 +-52 +-48 +-49 +-45 +-43 +-39 +-35 +-33 +-32 +-30 +-30 +-27 +-27 +-23 +-19 +-19 +-18 +-17 +-18 +-17 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +114 +106 +97 +91 +15 +-52 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +104 +92 +85 +78 +74 +67 +62 +58 +49 +46 +46 +41 +39 +36 +34 +28 +27 +26 +27 +26 +23 +24 +23 +20 +17 +14 +11 +10 +10 +8 +7 +4 +4 +6 +5 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-110 +-101 +-93 +-90 +-81 +-77 +-71 +-66 +-59 +-52 +-50 +-47 +-46 +-44 +-40 +-37 +-37 +-34 +-36 +-32 +-29 +-28 +-26 +-27 +-23 +-25 +-23 +-17 +-17 +-14 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +106 +100 +92 +16 +-52 +-111 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +104 +97 +84 +79 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +111 +103 +97 +89 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +110 +98 +93 +82 +77 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +115 +106 +99 +88 +82 +75 +69 +66 +57 +56 +51 +48 +46 +39 +37 +34 +32 +31 +27 +26 +23 +21 +20 +15 +14 +15 +15 +15 +9 +10 +8 +8 +8 +7 +7 +7 +2 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-115 +-105 +-99 +-91 +-86 +-79 +-73 +-66 +-64 +-59 +-57 +-52 +-52 +-47 +-42 +-42 +-36 +-36 +-33 +-28 +-23 +-19 +-20 +-19 +-20 +-19 +-19 +-16 +-15 +-11 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +106 +100 +92 +86 +79 +74 +70 +63 +58 +54 +49 +46 +43 +36 +35 +36 +33 +33 +28 +26 +22 +21 +23 +21 +20 +19 +18 +14 +12 +10 +10 +10 +8 +6 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-115 +-104 +-100 +-91 +-86 +-81 +-73 +-70 +-63 +-62 +-55 +-50 +-46 +-41 +-42 +-37 +-38 +-33 +-28 +-27 +-23 +-19 +-18 +-18 +-17 +-16 +-13 +-11 +-13 +-12 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +108 +96 +90 +14 +-53 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +114 +107 +100 +94 +86 +80 +75 +66 +62 +60 +54 +51 +48 +44 +42 +41 +38 +37 +35 +32 +28 +26 +18 +17 +14 +13 +13 +10 +9 +10 +5 +10 +11 +8 +10 +9 +6 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-111 +-99 +-92 +-83 +-80 +-73 +-71 +-65 +-63 +-58 +-56 +-49 +-44 +-40 +-36 +-32 +-33 +-30 +-31 +-29 +-29 +-28 +-27 +-24 +-22 +-18 +-19 +-17 +-18 +-17 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +119 +112 +104 +98 +92 +84 +75 +71 +67 +59 +53 +47 +45 +41 +37 +34 +27 +26 +23 +22 +19 +17 +16 +13 +13 +12 +10 +10 +8 +7 +8 +8 +10 +10 +9 +10 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +119 +111 +105 +94 +88 +77 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +116 +110 +104 +96 +88 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-108 +-101 +-92 +-85 +-82 +-78 +-74 +-71 +-67 +-62 +-57 +-50 +-48 +-45 +-44 +-42 +-40 +-36 +-34 +-29 +-29 +-28 +-27 +-26 +-26 +-21 +-20 +-17 +-19 +-17 +-18 +-17 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +109 +102 +91 +85 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +110 +102 +96 +84 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +103 +95 +88 +82 +77 +67 +63 +58 +54 +52 +48 +45 +47 +45 +44 +42 +38 +32 +29 +26 +25 +25 +22 +14 +13 +7 +6 +5 +5 +5 +4 +4 +8 +9 +9 +12 +11 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-108 +-104 +-96 +-92 +-86 +-77 +-71 +-64 +-60 +-54 +-50 +-44 +-42 +-40 +-36 +-32 +-32 +-31 +-30 +-30 +-28 +-26 +-26 +-21 +-22 +-20 +-20 +-17 +-16 +-13 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +113 +107 +97 +95 +90 +83 +78 +74 +66 +62 +59 +55 +47 +43 +38 +35 +27 +26 +22 +20 +20 +14 +12 +12 +16 +17 +12 +13 +9 +9 +7 +7 +12 +11 +11 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +115 +108 +99 +94 +86 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +111 +103 +97 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +111 +105 +98 +88 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +106 +98 +93 +82 +77 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-109 +-104 +-94 +-88 +-80 +-73 +-71 +-64 +-61 +-56 +-51 +-49 +-44 +-41 +-37 +-39 +-35 +-37 +-35 +-29 +-27 +-24 +-23 +-18 +-17 +-13 +-15 +-14 +-16 +-15 +-14 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +116 +109 +101 +94 +18 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +119 +110 +102 +91 +85 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +105 +98 +91 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +110 +102 +95 +89 +82 +77 +68 +64 +55 +52 +50 +46 +44 +45 +42 +40 +39 +36 +33 +32 +31 +28 +22 +19 +12 +10 +7 +7 +2 +0 +4 +4 +6 +2 +3 +5 +7 +-60 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-110 +-99 +-93 +-84 +-82 +-74 +-72 +-67 +-64 +-60 +-56 +-50 +-51 +-46 +-47 +-42 +-39 +-35 +-31 +-33 +-30 +-30 +-27 +-22 +-22 +-18 +-20 +-17 +-16 +-14 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +114 +107 +95 +90 +80 +76 +67 +65 +61 +54 +52 +52 +51 +48 +44 +42 +40 +36 +33 +26 +24 +17 +17 +14 +13 +13 +8 +10 +12 +13 +13 +16 +14 +15 +13 +13 +-55 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +107 +95 +89 +82 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +103 +98 +87 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +111 +105 +95 +87 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-109 +-99 +-90 +-88 +-79 +-75 +-67 +-63 +-58 +-53 +-51 +-49 +-47 +-46 +-43 +-43 +-39 +-36 +-32 +-28 +-27 +-26 +-25 +-25 +-23 +-22 +-19 +-15 +-17 +-16 +-15 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +102 +96 +86 +79 +77 +71 +67 +63 +60 +52 +48 +47 +43 +41 +38 +36 +31 +29 +27 +23 +22 +21 +15 +12 +14 +14 +14 +12 +11 +11 +9 +8 +6 +6 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-108 +-98 +-92 +-84 +-75 +-74 +-67 +-66 +-61 +-54 +-50 +-46 +-43 +-39 +-40 +-36 +-37 +-33 +-28 +-26 +-23 +-26 +-24 +-20 +-18 +-14 +-15 +-13 +-15 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +106 +99 +87 +11 +-55 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +109 +103 +98 +87 +82 +72 +68 +61 +57 +54 +49 +46 +44 +40 +38 +38 +36 +34 +33 +32 +26 +23 +19 +17 +13 +12 +11 +6 +6 +4 +5 +6 +5 +5 +4 +3 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-109 +-101 +-98 +-92 +-88 +-83 +-78 +-73 +-69 +-61 +-56 +-57 +-52 +-53 +-48 +-48 +-44 +-44 +-39 +-36 +-32 +-28 +-29 +-26 +-27 +-25 +-19 +-20 +-17 +-16 +-14 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +112 +104 +92 +86 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +24 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +103 +97 +84 +78 +68 +64 +58 +55 +49 +46 +44 +39 +37 +36 +32 +30 +32 +31 +30 +29 +26 +24 +21 +20 +18 +11 +10 +4 +4 +2 +2 +2 +4 +6 +1 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +11 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +115 +107 +98 +91 +84 +77 +2 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +116 +109 +97 +91 +83 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-105 +-100 +-94 +-92 +-85 +-82 +-75 +-70 +-65 +-64 +-58 +-54 +-49 +-44 +-45 +-40 +-37 +-35 +-29 +-26 +-22 +-23 +-21 +-23 +-22 +-20 +-18 +-19 +-17 +-15 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +113 +106 +98 +92 +15 +-52 +-111 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +111 +101 +94 +86 +83 +8 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +105 +100 +91 +85 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +108 +100 +95 +86 +79 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +103 +92 +85 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +112 +106 +95 +90 +84 +79 +79 +76 +72 +68 +64 +58 +53 +45 +41 +36 +32 +28 +22 +22 +17 +17 +13 +12 +15 +12 +17 +16 +17 +11 +11 +6 +7 +2 +4 +3 +3 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-105 +-100 +-93 +-87 +-82 +-77 +-71 +-66 +-59 +-57 +-52 +-50 +-48 +-45 +-42 +-43 +-39 +-37 +-35 +-32 +-30 +-27 +-29 +-25 +-22 +-23 +-21 +-23 +-22 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +120 +110 +102 +93 +86 +78 +74 +68 +57 +53 +46 +44 +43 +39 +38 +35 +35 +32 +23 +21 +15 +15 +12 +11 +12 +10 +10 +11 +9 +9 +7 +6 +6 +3 +2 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +5 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +110 +103 +96 +90 +82 +77 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-115 +-107 +-101 +-95 +-86 +-79 +-78 +-71 +-70 +-65 +-64 +-58 +-56 +-52 +-51 +-45 +-45 +-40 +-36 +-35 +-32 +-29 +-24 +-19 +-21 +-19 +-21 +-19 +-20 +-18 +-20 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +105 +98 +94 +87 +84 +74 +70 +63 +59 +54 +50 +47 +39 +37 +30 +27 +28 +27 +27 +20 +20 +18 +17 +15 +10 +12 +17 +16 +17 +17 +15 +12 +11 +9 +7 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +100 +93 +88 +81 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +113 +107 +100 +91 +85 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +107 +99 +93 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +107 +100 +93 +83 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-104 +-100 +-92 +-87 +-81 +-73 +-68 +-64 +-61 +-58 +-55 +-53 +-48 +-46 +-44 +-41 +-39 +-34 +-31 +-26 +-27 +-24 +-25 +-24 +-23 +-20 +-22 +-20 +-23 +-20 +-19 +113 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +103 +96 +84 +78 +67 +63 +54 +51 +43 +42 +40 +37 +36 +30 +29 +31 +28 +27 +25 +24 +16 +16 +11 +10 +6 +6 +9 +10 +12 +14 +12 +14 +12 +12 +-55 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +111 +102 +90 +84 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +107 +98 +92 +86 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-110 +-103 +-96 +-89 +-83 +-74 +-71 +-65 +-62 +-58 +-55 +-52 +-48 +-44 +-39 +-34 +-34 +-32 +-32 +-28 +-26 +-22 +-22 +-21 +-18 +-16 +-16 +-20 +-18 +-22 +-20 +112 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +112 +105 +97 +91 +85 +78 +73 +66 +58 +56 +48 +47 +43 +40 +38 +35 +33 +35 +35 +31 +30 +29 +28 +25 +20 +19 +18 +14 +12 +11 +10 +6 +5 +3 +2 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-106 +-98 +-93 +-85 +-78 +-74 +-69 +-66 +-63 +-59 +-56 +-53 +-46 +-42 +-43 +-37 +-35 +-31 +-29 +-28 +-28 +-24 +-22 +-26 +-24 +-26 +-23 +-26 +-23 +-21 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +110 +104 +97 +21 +-47 +-107 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +112 +105 +94 +88 +80 +76 +1 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +119 +113 +101 +95 +83 +79 +70 +66 +57 +53 +53 +49 +46 +44 +42 +35 +34 +28 +25 +26 +24 +25 +22 +21 +14 +15 +9 +7 +10 +10 +11 +7 +9 +9 +5 +5 +1 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-107 +-99 +-91 +-88 +-81 +-80 +-73 +-72 +-67 +-60 +-55 +-48 +-47 +-43 +-41 +-37 +-39 +-35 +-37 +-32 +-34 +-31 +-25 +-24 +-21 +-20 +-19 +-19 +-15 +-14 +122 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +103 +97 +89 +13 +-54 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +104 +96 +90 +80 +75 +73 +66 +63 +56 +53 +48 +46 +44 +39 +37 +34 +27 +24 +25 +24 +25 +19 +20 +14 +12 +14 +15 +15 +10 +10 +6 +4 +8 +7 +7 +6 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +105 +99 +88 +84 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-110 +-102 +-93 +-87 +-79 +-76 +-70 +-68 +-63 +-60 +-56 +-52 +-47 +-48 +-43 +-41 +-37 +-35 +-32 +-29 +-30 +-27 +-27 +-24 +-23 +-19 +-15 +-18 +-15 +-18 +-16 +114 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +111 +104 +98 +90 +83 +78 +72 +68 +66 +64 +59 +55 +50 +48 +44 +40 +37 +35 +32 +24 +22 +16 +15 +12 +12 +15 +14 +14 +12 +11 +5 +4 +2 +2 +2 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +0 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +113 +103 +95 +87 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +106 +99 +91 +85 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +102 +96 +88 +82 +73 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +101 +96 +88 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-112 +-102 +-98 +-90 +-86 +-79 +-78 +-70 +-65 +-59 +-52 +-52 +-47 +-44 +-44 +-39 +-35 +-35 +-30 +-32 +-28 +-29 +-26 +-20 +-19 +-17 +-17 +-16 +-16 +-15 +-16 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +105 +98 +91 +85 +77 +72 +68 +62 +58 +54 +50 +47 +48 +45 +42 +40 +38 +30 +28 +24 +22 +18 +17 +18 +16 +15 +10 +9 +7 +7 +6 +4 +4 +8 +6 +-60 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-110 +-102 +-95 +-87 +-85 +-78 +-76 +-69 +-68 +-61 +-58 +-51 +-45 +-42 +-40 +-37 +-34 +-35 +-32 +-30 +-28 +-27 +-29 +-24 +-25 +-23 +-17 +-17 +-15 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +119 +109 +104 +96 +19 +-49 +-108 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +102 +92 +85 +78 +74 +71 +66 +57 +53 +45 +42 +37 +35 +32 +29 +28 +25 +23 +22 +20 +19 +19 +16 +15 +9 +7 +10 +6 +7 +5 +6 +6 +5 +6 +4 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-114 +-105 +-97 +-89 +-88 +-82 +-81 +-75 +-72 +-67 +-62 +-57 +-57 +-51 +-51 +-46 +-38 +-38 +-32 +-32 +-29 +-27 +-24 +-27 +-24 +-26 +-22 +-21 +-19 +-19 +-15 +122 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +108 +98 +93 +16 +-51 +-111 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +109 +100 +93 +88 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +114 +106 +94 +88 +80 +75 +0 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +115 +104 +96 +87 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +116 +107 +101 +94 +87 +82 +72 +69 +60 +56 +56 +51 +48 +45 +42 +34 +33 +27 +26 +20 +18 +21 +18 +19 +18 +18 +15 +15 +14 +12 +11 +11 +6 +6 +9 +12 +10 +11 +-56 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-112 +-103 +-99 +-90 +-87 +-81 +-71 +-67 +-61 +-56 +-50 +-51 +-47 +-46 +-42 +-41 +-37 +-37 +-32 +-30 +-30 +-26 +-27 +-24 +-19 +-16 +-14 +-17 +-15 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +108 +100 +91 +87 +78 +72 +65 +62 +56 +54 +47 +44 +38 +35 +32 +30 +27 +25 +24 +21 +20 +19 +13 +10 +13 +12 +13 +8 +8 +3 +3 +6 +7 +8 +3 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +104 +98 +87 +82 +76 +1 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-104 +-96 +-88 +-84 +-80 +-76 +-73 +-68 +-64 +-58 +-51 +-50 +-47 +-46 +-44 +-40 +-36 +-37 +-34 +-32 +-29 +-27 +-25 +-22 +-25 +-22 +-20 +-16 +-14 +-17 +-14 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +115 +107 +100 +89 +84 +77 +71 +67 +62 +58 +53 +49 +47 +45 +41 +40 +36 +33 +30 +29 +28 +25 +22 +19 +18 +11 +11 +9 +8 +11 +11 +12 +6 +7 +4 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +13 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +107 +99 +91 +85 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +104 +92 +86 +77 +2 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +115 +108 +96 +90 +83 +77 +2 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +102 +91 +86 +77 +2 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-105 +-96 +-90 +-86 +-81 +-75 +-71 +-63 +-58 +-59 +-54 +-55 +-50 +-51 +-46 +-43 +-39 +-36 +-30 +-26 +-28 +-25 +-27 +-24 +-26 +-22 +-20 +-21 +-13 +-12 +-9 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +103 +96 +86 +80 +73 +69 +64 +59 +56 +50 +44 +42 +40 +40 +39 +36 +35 +34 +30 +27 +24 +23 +16 +15 +9 +7 +9 +9 +9 +5 +6 +1 +2 +5 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-108 +-101 +-94 +-85 +-80 +-74 +-71 +-67 +-62 +-57 +-57 +-52 +-51 +-47 +-44 +-40 +-40 +-36 +-29 +-29 +-26 +-26 +-24 +-23 +-20 +-23 +-21 +-22 +-19 +-16 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +107 +100 +87 +81 +71 +67 +62 +58 +55 +51 +48 +43 +40 +38 +34 +31 +29 +29 +29 +24 +24 +25 +21 +18 +17 +15 +13 +14 +11 +10 +8 +6 +2 +2 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +109 +104 +98 +91 +86 +79 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-114 +-106 +-101 +-93 +-90 +-82 +-79 +-71 +-66 +-58 +-51 +-48 +-42 +-38 +-33 +-34 +-31 +-33 +-31 +-31 +-30 +-28 +-25 +-27 +-24 +-22 +-18 +-14 +-14 +-12 +-12 +123 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +106 +96 +90 +82 +78 +75 +68 +67 +61 +58 +52 +48 +39 +36 +32 +30 +22 +20 +22 +17 +18 +16 +16 +14 +13 +12 +15 +16 +15 +14 +15 +15 +11 +8 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-111 +-102 +-97 +-88 +-82 +-78 +-70 +-68 +-63 +-57 +-50 +-44 +-43 +-40 +-38 +-33 +-30 +-26 +-28 +-25 +-27 +-25 +-25 +-20 +-19 +-15 +-18 +-16 +-18 +-16 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +113 +104 +97 +87 +11 +-56 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +102 +95 +88 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +113 +103 +96 +90 +81 +74 +69 +64 +63 +59 +56 +54 +50 +44 +41 +32 +29 +22 +22 +18 +18 +18 +15 +14 +14 +12 +12 +10 +9 +9 +9 +7 +8 +7 +6 +6 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +11 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +110 +103 +95 +89 +83 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +113 +105 +96 +92 +81 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-103 +-96 +-89 +-81 +-74 +-74 +-69 +-68 +-63 +-63 +-58 +-56 +-51 +-50 +-44 +-45 +-40 +-36 +-30 +-26 +-28 +-25 +-27 +-23 +-26 +-22 +-20 +-18 +-15 +-15 +-13 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +113 +105 +99 +88 +81 +76 +67 +62 +61 +59 +55 +52 +49 +41 +39 +32 +29 +30 +29 +28 +21 +21 +17 +16 +16 +14 +12 +11 +10 +10 +7 +6 +6 +7 +6 +6 +-60 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-114 +-103 +-99 +-90 +-82 +-74 +-66 +-65 +-58 +-58 +-53 +-53 +-48 +-48 +-43 +-42 +-39 +-35 +-32 +-27 +-23 +-20 +-21 +-18 +-20 +-19 +-19 +-15 +-14 +-10 +123 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +102 +94 +87 +11 +-56 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +115 +108 +96 +90 +80 +76 +1 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +114 +111 +104 +98 +93 +87 +12 +-55 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +113 +109 +101 +96 +85 +80 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +105 +94 +86 +78 +70 +65 +61 +52 +49 +45 +42 +39 +33 +32 +31 +32 +30 +28 +28 +29 +23 +25 +22 +22 +18 +17 +12 +11 +10 +7 +6 +1 +1 +2 +0 +1 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +116 +109 +101 +94 +89 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +98 +92 +84 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +112 +105 +93 +88 +78 +74 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-109 +-100 +-93 +-87 +-78 +-75 +-69 +-65 +-62 +-58 +-53 +-50 +-43 +-42 +-39 +-38 +-35 +-34 +-33 +-31 +-27 +-26 +-22 +-22 +-20 +-21 +-20 +-19 +-17 +-17 +-16 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +105 +98 +92 +85 +79 +75 +68 +62 +58 +56 +53 +47 +45 +45 +41 +39 +35 +34 +30 +26 +25 +23 +20 +17 +14 +14 +12 +12 +9 +8 +6 +6 +1 +2 +-3 +-69 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-113 +-104 +-101 +-91 +-89 +-81 +-75 +-66 +-59 +-55 +-51 +-48 +-43 +-41 +-35 +-33 +-35 +-31 +-34 +-30 +-33 +-30 +-26 +-22 +-18 +-21 +-19 +-22 +-19 +-22 +114 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +106 +99 +92 +16 +-52 +-111 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +112 +104 +91 +85 +74 +0 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +102 +96 +88 +82 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +101 +94 +86 +83 +76 +68 +65 +62 +58 +49 +46 +41 +37 +33 +32 +32 +27 +24 +22 +22 +19 +17 +16 +14 +13 +16 +17 +14 +13 +14 +14 +9 +8 +6 +5 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-106 +-97 +-95 +-87 +-85 +-78 +-76 +-69 +-67 +-61 +-58 +-52 +-52 +-47 +-42 +-41 +-37 +-38 +-33 +-31 +-31 +-26 +-28 +-24 +-20 +-21 +-19 +-21 +-18 +-11 +124 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +111 +99 +92 +85 +79 +74 +69 +64 +58 +51 +49 +43 +41 +42 +39 +37 +34 +31 +29 +26 +20 +20 +18 +17 +16 +11 +12 +13 +9 +11 +6 +7 +5 +5 +6 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +9 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +108 +99 +95 +88 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-109 +-101 +-96 +-92 +-86 +-80 +-75 +-67 +-61 +-56 +-52 +-49 +-44 +-41 +-39 +-40 +-37 +-40 +-37 +-39 +-35 +-36 +-32 +-26 +-26 +-22 +-21 +-19 +-18 +-15 +-15 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +101 +93 +88 +83 +76 +65 +61 +52 +47 +45 +44 +42 +36 +38 +35 +33 +26 +24 +21 +20 +18 +16 +15 +12 +10 +11 +12 +14 +13 +12 +12 +13 +10 +8 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +5 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +104 +100 +92 +86 +80 +5 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-109 +-100 +-91 +-87 +-80 +-78 +-70 +-66 +-60 +-54 +-54 +-49 +-50 +-44 +-39 +-40 +-34 +-32 +-29 +-26 +-28 +-25 +-22 +-20 +-16 +-16 +-14 +-16 +-15 +-18 +-15 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +111 +103 +92 +90 +14 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +109 +101 +94 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +107 +103 +96 +91 +81 +77 +68 +64 +58 +53 +50 +46 +43 +37 +35 +33 +29 +28 +26 +23 +22 +18 +17 +17 +14 +14 +14 +12 +11 +13 +15 +12 +13 +14 +12 +10 +10 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +5 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +116 +103 +96 +88 +82 +77 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +110 +101 +95 +89 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +106 +98 +92 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +107 +100 +92 +86 +81 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +103 +94 +86 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-115 +-106 +-101 +-95 +-91 +-83 +-78 +-72 +-68 +-61 +-54 +-52 +-49 +-46 +-44 +-41 +-38 +-36 +-30 +-27 +-30 +-27 +-30 +-27 +-29 +-25 +-26 +-23 +-21 +-18 +-22 +-18 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +111 +104 +97 +90 +84 +79 +73 +68 +62 +55 +53 +49 +46 +44 +39 +38 +35 +32 +30 +24 +22 +16 +14 +16 +15 +16 +11 +11 +9 +9 +10 +8 +7 +12 +12 +12 +-55 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-109 +-98 +-91 +-88 +-82 +-78 +-71 +-67 +-60 +-58 +-54 +-53 +-49 +-47 +-42 +-40 +-34 +-32 +-30 +-26 +-23 +-22 +-26 +-23 +-27 +-25 +-24 +-22 +-22 +-20 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +109 +102 +91 +15 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +109 +102 +94 +87 +82 +75 +68 +62 +58 +53 +51 +47 +40 +38 +37 +35 +27 +25 +19 +18 +16 +14 +18 +17 +18 +18 +17 +15 +13 +13 +10 +8 +5 +2 +2 +2 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-111 +-106 +-96 +-93 +-84 +-79 +-72 +-67 +-60 +-54 +-50 +-47 +-44 +-42 +-39 +-36 +-32 +-28 +-29 +-27 +-26 +-24 +-28 +-25 +-27 +-24 +-23 +-21 +-18 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +104 +98 +93 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +102 +95 +89 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +111 +106 +96 +89 +87 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +110 +103 +93 +88 +80 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +110 +103 +93 +87 +84 +78 +73 +67 +63 +57 +53 +50 +42 +40 +37 +35 +33 +30 +28 +28 +26 +26 +28 +26 +24 +23 +17 +14 +11 +10 +4 +4 +-1 +-2 +3 +2 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-109 +-104 +-96 +-90 +-82 +-74 +-70 +-66 +-61 +-59 +-55 +-51 +-46 +-41 +-40 +-38 +-37 +-33 +-31 +-27 +-28 +-26 +-26 +-24 +-26 +-21 +-20 +-16 +-17 +-15 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +106 +106 +99 +22 +-46 +-107 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +99 +93 +82 +76 +1 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +100 +94 +85 +81 +75 +68 +64 +61 +56 +51 +46 +44 +39 +38 +33 +31 +26 +25 +18 +17 +14 +14 +14 +11 +11 +9 +8 +10 +11 +12 +11 +10 +11 +12 +8 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-114 +-104 +-99 +-93 +-88 +-82 +-75 +-69 +-68 +-61 +-58 +-51 +-45 +-44 +-41 +-39 +-35 +-33 +-28 +-29 +-26 +-27 +-25 +-25 +-21 +-20 +-17 +-19 +-17 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +107 +99 +92 +86 +76 +72 +63 +58 +58 +52 +50 +45 +42 +35 +34 +27 +26 +27 +26 +26 +24 +23 +22 +16 +16 +12 +12 +12 +10 +10 +13 +12 +13 +10 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +116 +107 +99 +92 +86 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +116 +106 +99 +90 +86 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-108 +-104 +-95 +-91 +-84 +-80 +-73 +-71 +-64 +-63 +-56 +-52 +-48 +-44 +-38 +-34 +-34 +-32 +-31 +-26 +-25 +-21 +-23 +-20 +-21 +-20 +-19 +-16 +-20 +-17 +-20 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +102 +96 +86 +79 +71 +68 +62 +59 +52 +48 +40 +38 +34 +32 +27 +27 +26 +22 +21 +20 +16 +20 +21 +20 +20 +17 +17 +16 +16 +11 +8 +7 +6 +0 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +105 +98 +91 +86 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-107 +-99 +-93 +-87 +-79 +-73 +-72 +-64 +-60 +-55 +-52 +-52 +-48 +-50 +-45 +-46 +-43 +-37 +-34 +-28 +-29 +-26 +-27 +-25 +-26 +-20 +-18 +-15 +-17 +-15 +-15 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +115 +106 +103 +96 +91 +15 +-52 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +25 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +108 +101 +93 +87 +80 +73 +69 +60 +57 +49 +45 +43 +44 +43 +42 +39 +36 +35 +33 +29 +25 +21 +21 +17 +15 +12 +13 +11 +12 +7 +8 +4 +4 +3 +4 +-2 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-111 +-108 +-99 +-97 +-90 +-87 +-80 +-78 +-70 +-65 +-61 +-52 +-48 +-42 +-42 +-38 +-39 +-36 +-34 +-30 +-33 +-29 +-31 +-28 +-22 +-22 +-20 +-20 +-18 +-17 +-14 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +116 +104 +97 +20 +-48 +-108 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +100 +94 +87 +81 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +102 +94 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +108 +101 +94 +88 +85 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +104 +97 +91 +85 +79 +67 +62 +52 +49 +44 +42 +38 +36 +38 +36 +34 +33 +31 +26 +24 +21 +19 +17 +9 +10 +7 +6 +6 +5 +5 +6 +5 +5 +9 +10 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-105 +-98 +-90 +-85 +-80 +-75 +-72 +-67 +-65 +-58 +-52 +-48 +-50 +-45 +-47 +-42 +-43 +-38 +-38 +-34 +-35 +-30 +-32 +-27 +-22 +-22 +-18 +-19 +-17 +-19 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +116 +107 +102 +94 +87 +82 +78 +72 +61 +57 +47 +44 +39 +37 +35 +28 +28 +32 +31 +31 +30 +28 +24 +21 +18 +18 +18 +14 +12 +9 +10 +8 +9 +5 +4 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +112 +105 +94 +89 +81 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-110 +-101 +-97 +-88 +-80 +-74 +-69 +-64 +-60 +-57 +-52 +-47 +-47 +-43 +-43 +-39 +-36 +-33 +-30 +-30 +-26 +-28 +-26 +-20 +-21 +-18 +-20 +-16 +-16 +-14 +-11 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +113 +106 +100 +94 +85 +79 +72 +68 +61 +57 +53 +48 +44 +41 +34 +34 +35 +35 +34 +27 +25 +22 +20 +19 +16 +15 +9 +9 +9 +11 +11 +10 +11 +13 +10 +12 +-56 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +5 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +105 +98 +90 +85 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +115 +104 +97 +94 +88 +83 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +13 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +100 +94 +83 +79 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +115 +106 +97 +90 +82 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-110 +-101 +-94 +-89 +-84 +-76 +-72 +-67 +-61 +-57 +-58 +-54 +-54 +-50 +-49 +-44 +-43 +-37 +-34 +-28 +-30 +-27 +-27 +-25 +-27 +-23 +-26 +-22 +-24 +-20 +-22 +-20 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +101 +93 +84 +78 +71 +68 +62 +56 +53 +51 +45 +40 +37 +35 +27 +26 +22 +21 +17 +18 +19 +14 +14 +9 +10 +8 +8 +8 +7 +7 +7 +5 +6 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-108 +-104 +-96 +-92 +-85 +-82 +-76 +-66 +-63 +-56 +-52 +-47 +-48 +-43 +-43 +-39 +-39 +-34 +-32 +-30 +-25 +-23 +-18 +-20 +-17 +-19 +-18 +-17 +-16 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +114 +106 +100 +92 +16 +-51 +-111 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +114 +108 +103 +97 +90 +80 +75 +68 +64 +57 +54 +53 +49 +44 +41 +40 +33 +30 +26 +25 +22 +21 +20 +14 +13 +16 +12 +12 +11 +10 +10 +8 +8 +3 +4 +-1 +-1 +3 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-111 +-106 +-96 +-92 +-85 +-79 +-72 +-70 +-65 +-59 +-58 +-52 +-53 +-47 +-43 +-40 +-36 +-34 +-34 +-29 +-30 +-27 +-28 +-26 +-20 +-19 +-17 +-15 +-11 +-7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +115 +107 +99 +22 +-46 +-106 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +100 +93 +82 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +104 +97 +93 +85 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +104 +97 +86 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +100 +95 +88 +85 +79 +71 +64 +58 +54 +49 +45 +43 +41 +39 +31 +29 +22 +21 +15 +14 +15 +13 +14 +13 +12 +10 +10 +10 +6 +5 +7 +5 +6 +5 +5 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-111 +-103 +-96 +-88 +-86 +-78 +-73 +-67 +-62 +-55 +-49 +-47 +-44 +-42 +-41 +-39 +-38 +-35 +-32 +-27 +-23 +-23 +-18 +-18 +-15 +-18 +-17 +-20 +-18 +-19 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +104 +96 +90 +79 +75 +66 +62 +60 +57 +54 +49 +47 +46 +39 +38 +31 +28 +26 +24 +23 +21 +20 +17 +16 +16 +17 +17 +16 +15 +15 +11 +9 +8 +6 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-107 +-96 +-92 +-85 +-79 +-72 +-71 +-65 +-64 +-59 +-55 +-50 +-50 +-46 +-40 +-37 +-31 +-31 +-28 +-29 +-26 +-29 +-26 +-28 +-24 +-26 +-22 +-19 +-20 +-17 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +109 +101 +94 +18 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +105 +98 +88 +82 +76 +72 +64 +61 +60 +55 +52 +48 +46 +40 +37 +33 +30 +26 +26 +24 +25 +19 +19 +14 +12 +10 +10 +8 +5 +6 +2 +2 +6 +6 +7 +6 +7 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-106 +-97 +-91 +-83 +-76 +-73 +-65 +-62 +-57 +-55 +-54 +-51 +-48 +-46 +-41 +-39 +-37 +-35 +-35 +-33 +-29 +-28 +-24 +-24 +-21 +-22 +-21 +-20 +-17 +-16 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +115 +108 +97 +89 +87 +82 +78 +68 +65 +59 +56 +53 +49 +45 +41 +38 +37 +30 +29 +30 +25 +24 +22 +21 +20 +17 +16 +13 +8 +9 +6 +5 +8 +7 +8 +7 +7 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +105 +98 +90 +84 +79 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +118 +110 +103 +98 +92 +84 +9 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-114 +-106 +-96 +-89 +-84 +-80 +-72 +-67 +-67 +-61 +-59 +-55 +-52 +-45 +-42 +-45 +-42 +-43 +-39 +-40 +-35 +-36 +-31 +-27 +-28 +-25 +-17 +-15 +-11 +-14 +-12 +-15 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +105 +97 +91 +15 +-52 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +116 +108 +102 +93 +84 +9 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +114 +106 +98 +90 +85 +74 +69 +63 +59 +57 +52 +49 +46 +42 +40 +36 +33 +32 +27 +26 +25 +22 +20 +23 +22 +21 +21 +19 +15 +14 +10 +8 +4 +5 +5 +4 +5 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-105 +-96 +-89 +-88 +-82 +-80 +-73 +-68 +-60 +-58 +-54 +-52 +-49 +-47 +-44 +-41 +-37 +-32 +-28 +-31 +-27 +-29 +-26 +-25 +-23 +-19 +-22 +-19 +-18 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +106 +93 +88 +80 +76 +72 +63 +60 +58 +53 +49 +46 +43 +40 +34 +32 +32 +29 +29 +25 +22 +21 +16 +15 +17 +16 +15 +13 +12 +10 +8 +6 +4 +4 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +108 +102 +95 +83 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +107 +99 +90 +83 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +104 +97 +89 +84 +8 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +98 +91 +83 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-106 +-100 +-95 +-87 +-82 +-74 +-71 +-67 +-63 +-57 +-52 +-51 +-49 +-46 +-42 +-37 +-32 +-33 +-30 +-30 +-29 +-27 +-24 +-28 +-25 +-23 +-19 +-16 +-15 +-15 +-14 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +115 +103 +96 +85 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +108 +100 +93 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +104 +98 +87 +80 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +109 +100 +94 +83 +78 +68 +64 +63 +57 +55 +50 +50 +47 +45 +43 +41 +36 +33 +27 +25 +22 +20 +13 +13 +8 +7 +10 +8 +8 +8 +9 +4 +5 +0 +0 +4 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-112 +-105 +-99 +-92 +-86 +-78 +-70 +-67 +-62 +-58 +-54 +-54 +-49 +-50 +-46 +-46 +-41 +-39 +-35 +-32 +-33 +-29 +-31 +-28 +-25 +-26 +-22 +-21 +-21 +-17 +-19 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +104 +98 +91 +80 +77 +68 +64 +64 +57 +54 +49 +46 +41 +40 +40 +36 +35 +27 +26 +22 +21 +18 +18 +19 +17 +16 +9 +9 +7 +7 +12 +12 +13 +13 +11 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +113 +102 +95 +86 +82 +7 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +110 +104 +93 +88 +80 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +106 +99 +91 +85 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-110 +-101 +-94 +-88 +-79 +-74 +-66 +-65 +-60 +-59 +-54 +-53 +-49 +-46 +-41 +-43 +-38 +-39 +-35 +-32 +-29 +-26 +-25 +-23 +-19 +-22 +-20 +-18 +-13 +-10 +-14 +125 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +104 +96 +85 +79 +70 +66 +63 +58 +56 +52 +48 +45 +45 +44 +41 +38 +37 +35 +30 +27 +24 +22 +15 +15 +12 +11 +11 +5 +5 +6 +5 +5 +6 +1 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-110 +-101 +-97 +-89 +-86 +-78 +-74 +-66 +-58 +-57 +-51 +-51 +-46 +-47 +-43 +-41 +-34 +-31 +-27 +-28 +-26 +-27 +-24 +-23 +-21 +-21 +-20 +-17 +-20 +-18 +113 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +118 +111 +102 +96 +94 +18 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +110 +102 +96 +85 +80 +73 +69 +63 +58 +55 +51 +47 +45 +40 +38 +35 +32 +30 +27 +22 +22 +19 +18 +18 +12 +10 +11 +12 +14 +12 +13 +14 +14 +8 +7 +3 +2 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-110 +-106 +-97 +-94 +-86 +-78 +-72 +-65 +-64 +-61 +-53 +-46 +-41 +-40 +-37 +-37 +-31 +-29 +-25 +-28 +-25 +-28 +-26 +-27 +-25 +-23 +-20 +-20 +-18 +-15 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +119 +107 +100 +90 +14 +-53 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +101 +90 +83 +75 +70 +65 +56 +54 +50 +47 +45 +41 +39 +37 +33 +31 +33 +32 +30 +30 +28 +23 +21 +18 +14 +14 +12 +10 +8 +9 +7 +8 +4 +4 +1 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +111 +105 +97 +91 +86 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +119 +113 +103 +97 +90 +86 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-107 +-97 +-90 +-84 +-78 +-73 +-69 +-62 +-59 +-55 +-53 +-50 +-48 +-46 +-42 +-41 +-37 +-35 +-34 +-28 +-26 +-25 +-24 +-24 +-23 +-22 +-18 +-15 +-16 +-16 +-16 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +105 +98 +93 +16 +-51 +-111 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +116 +109 +102 +95 +89 +82 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +104 +97 +86 +83 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +104 +94 +87 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +115 +107 +95 +90 +81 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +110 +103 +96 +89 +79 +74 +65 +60 +60 +53 +51 +47 +45 +40 +37 +35 +31 +29 +28 +25 +23 +20 +15 +14 +16 +12 +14 +10 +10 +9 +10 +8 +7 +7 +3 +3 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-110 +-104 +-98 +-92 +-85 +-76 +-69 +-66 +-61 +-58 +-55 +-53 +-51 +-47 +-43 +-37 +-33 +-33 +-28 +-26 +-23 +-23 +-22 +-22 +-18 +-20 +-19 +-20 +-20 +-20 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +105 +99 +89 +83 +73 +70 +65 +61 +59 +56 +51 +47 +45 +38 +36 +37 +35 +33 +33 +30 +28 +25 +25 +22 +15 +14 +8 +7 +4 +4 +5 +3 +4 +4 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +117 +109 +102 +97 +92 +85 +9 +-58 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-109 +-103 +-94 +-88 +-79 +-74 +-70 +-67 +-59 +-55 +-57 +-52 +-53 +-48 +-48 +-43 +-43 +-38 +-39 +-34 +-34 +-30 +-25 +-20 +-16 +-18 +-16 +-18 +-17 +-19 +-16 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +102 +93 +88 +83 +74 +68 +62 +59 +50 +47 +42 +39 +34 +33 +33 +30 +28 +24 +21 +20 +20 +21 +16 +18 +15 +15 +10 +10 +5 +5 +3 +4 +4 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +115 +106 +98 +93 +81 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +108 +102 +98 +90 +86 +10 +-56 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +114 +108 +99 +92 +85 +79 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +11 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +113 +106 +95 +89 +82 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-111 +-102 +-98 +-90 +-87 +-79 +-76 +-69 +-64 +-61 +-56 +-54 +-48 +-48 +-42 +-39 +-39 +-34 +-31 +-29 +-26 +-27 +-23 +-25 +-21 +-20 +-20 +-14 +-12 +-9 +-12 +124 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +115 +107 +99 +95 +88 +78 +72 +65 +62 +60 +57 +49 +46 +40 +38 +34 +31 +29 +23 +21 +22 +18 +18 +16 +16 +14 +13 +13 +7 +8 +3 +2 +5 +4 +9 +11 +-56 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +3 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +104 +99 +88 +82 +79 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +117 +109 +102 +95 +90 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-106 +-100 +-94 +-88 +-83 +-78 +-71 +-67 +-59 +-58 +-53 +-51 +-48 +-44 +-40 +-41 +-38 +-36 +-33 +-32 +-31 +-28 +-26 +-23 +-22 +-20 +-19 +-20 +-14 +-13 +-10 +126 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +105 +98 +89 +82 +74 +70 +68 +62 +60 +55 +53 +47 +42 +40 +39 +34 +30 +26 +25 +21 +22 +17 +17 +15 +14 +7 +7 +10 +12 +11 +11 +9 +10 +7 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-107 +-99 +-97 +-89 +-87 +-80 +-78 +-71 +-69 +-62 +-60 +-57 +-49 +-45 +-42 +-38 +-33 +-28 +-25 +-26 +-24 +-23 +-22 +-25 +-22 +-25 +-22 +-24 +-21 +-18 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +105 +99 +94 +18 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +98 +93 +82 +78 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +112 +100 +94 +84 +78 +76 +69 +65 +59 +54 +51 +49 +41 +39 +33 +31 +24 +24 +26 +21 +22 +17 +17 +15 +15 +15 +14 +14 +13 +9 +10 +7 +8 +8 +6 +6 +11 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-110 +-102 +-92 +-84 +-80 +-74 +-71 +-67 +-63 +-60 +-56 +-52 +-47 +-42 +-41 +-38 +-37 +-33 +-31 +-27 +-26 +-25 +-25 +-21 +-21 +-20 +-20 +-16 +-16 +-13 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +106 +99 +86 +10 +-56 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +104 +98 +89 +83 +78 +69 +66 +62 +58 +55 +48 +45 +41 +39 +37 +34 +31 +28 +27 +26 +19 +19 +21 +19 +19 +18 +14 +14 +11 +10 +10 +7 +7 +7 +2 +3 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +106 +100 +92 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-115 +-106 +-100 +-90 +-87 +-79 +-73 +-65 +-57 +-54 +-51 +-48 +-43 +-45 +-41 +-41 +-37 +-36 +-31 +-26 +-25 +-24 +-23 +-21 +-17 +-13 +-15 +-14 +-16 +-16 +-16 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +103 +95 +87 +80 +74 +70 +68 +62 +59 +50 +47 +40 +44 +42 +40 +39 +34 +30 +28 +26 +21 +19 +17 +14 +13 +12 +11 +11 +11 +12 +12 +11 +9 +10 +6 +-60 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +104 +98 +90 +83 +77 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +113 +105 +98 +87 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +101 +96 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +112 +104 +97 +90 +79 +5 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-105 +-99 +-92 +-86 +-81 +-76 +-72 +-66 +-61 +-58 +-51 +-49 +-45 +-43 +-41 +-39 +-35 +-33 +-28 +-26 +-27 +-25 +-21 +-21 +-21 +-21 +-21 +-20 +-19 +-16 +-12 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +98 +92 +82 +77 +70 +68 +66 +61 +57 +47 +44 +40 +37 +35 +29 +28 +31 +30 +30 +31 +29 +30 +26 +24 +22 +17 +14 +9 +6 +5 +4 +5 +6 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-104 +-100 +-92 +-90 +-83 +-79 +-73 +-68 +-62 +-62 +-56 +-56 +-51 +-47 +-41 +-35 +-35 +-29 +-27 +-23 +-26 +-23 +-25 +-23 +-24 +-22 +-23 +-18 +-17 +-13 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +102 +101 +95 +18 +-50 +-109 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +109 +101 +93 +87 +82 +75 +70 +66 +60 +56 +51 +46 +44 +36 +34 +29 +26 +27 +25 +24 +23 +22 +19 +18 +17 +11 +12 +12 +8 +8 +5 +6 +8 +8 +9 +7 +7 +-60 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-104 +-95 +-87 +-79 +-74 +-71 +-66 +-59 +-55 +-56 +-52 +-51 +-46 +-41 +-38 +-38 +-36 +-36 +-34 +-33 +-28 +-26 +-22 +-24 +-21 +-22 +-21 +-20 +-17 +-20 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +108 +98 +93 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +107 +100 +94 +86 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +113 +104 +94 +87 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +114 +106 +102 +93 +88 +81 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +105 +98 +87 +82 +75 +70 +66 +60 +56 +48 +46 +44 +40 +38 +36 +33 +32 +28 +26 +25 +21 +19 +19 +16 +16 +20 +19 +18 +18 +16 +14 +11 +11 +10 +4 +3 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-114 +-106 +-96 +-91 +-84 +-80 +-75 +-71 +-65 +-61 +-54 +-50 +-51 +-47 +-48 +-44 +-45 +-40 +-40 +-35 +-31 +-32 +-28 +-27 +-23 +-20 +-23 +-19 +-21 +-20 +-15 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +100 +95 +89 +80 +70 +64 +57 +54 +52 +48 +45 +37 +34 +30 +27 +25 +22 +21 +24 +23 +22 +22 +20 +19 +15 +16 +14 +8 +7 +2 +3 +-2 +-2 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +4 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +103 +94 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-105 +-96 +-95 +-86 +-80 +-72 +-71 +-66 +-64 +-60 +-58 +-54 +-52 +-48 +-44 +-40 +-40 +-36 +-34 +-31 +-30 +-28 +-25 +-27 +-24 +-21 +-16 +-15 +-14 +-11 +-8 +123 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +114 +107 +95 +89 +80 +75 +69 +65 +63 +57 +52 +47 +45 +40 +38 +36 +32 +30 +26 +23 +22 +17 +16 +11 +10 +13 +11 +12 +11 +12 +9 +8 +8 +4 +2 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +107 +99 +87 +81 +75 +0 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +115 +106 +99 +92 +82 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +111 +104 +93 +88 +81 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +105 +97 +88 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-114 +-104 +-98 +-91 +-86 +-82 +-77 +-73 +-68 +-63 +-57 +-51 +-49 +-46 +-44 +-42 +-40 +-37 +-37 +-34 +-33 +-30 +-28 +-27 +-22 +-18 +-16 +-17 +-15 +-16 +-14 +-11 +122 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +109 +104 +100 +96 +90 +83 +76 +69 +65 +62 +56 +54 +49 +46 +41 +38 +31 +28 +25 +23 +16 +16 +11 +10 +13 +10 +11 +10 +10 +14 +15 +13 +13 +11 +12 +7 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-109 +-102 +-94 +-86 +-84 +-78 +-75 +-70 +-67 +-60 +-53 +-49 +-48 +-44 +-43 +-37 +-33 +-32 +-31 +-28 +-30 +-28 +-30 +-27 +-27 +-24 +-23 +-21 +-17 +-20 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +100 +93 +84 +79 +68 +64 +55 +49 +49 +44 +42 +39 +38 +34 +32 +31 +27 +26 +25 +19 +18 +20 +15 +15 +13 +13 +12 +10 +10 +10 +5 +6 +9 +11 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +3 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +102 +95 +88 +82 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-108 +-101 +-92 +-86 +-79 +-72 +-68 +-64 +-61 +-59 +-55 +-56 +-51 +-49 +-44 +-38 +-36 +-35 +-32 +-29 +-25 +-22 +-22 +-21 +-22 +-21 +-21 +-18 +-18 +-14 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +109 +96 +90 +78 +73 +64 +61 +55 +52 +48 +44 +42 +41 +41 +39 +35 +32 +30 +26 +24 +15 +14 +15 +14 +14 +10 +9 +4 +5 +8 +8 +9 +4 +5 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-104 +-93 +-86 +-78 +-72 +-70 +-65 +-60 +-58 +-55 +-51 +-46 +-48 +-43 +-45 +-40 +-37 +-32 +-27 +-28 +-25 +-27 +-24 +-23 +-21 +-20 +-15 +-12 +-13 +124 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +107 +100 +96 +19 +-49 +-109 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +114 +106 +94 +89 +82 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +104 +96 +86 +80 +74 +65 +60 +55 +50 +45 +42 +40 +36 +33 +30 +31 +31 +24 +23 +18 +18 +13 +13 +8 +8 +11 +12 +12 +12 +7 +7 +6 +6 +6 +1 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +121 +113 +107 +96 +90 +82 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +113 +105 +101 +93 +88 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-111 +-106 +-96 +-90 +-83 +-78 +-69 +-63 +-57 +-51 +-45 +-46 +-42 +-42 +-40 +-40 +-37 +-35 +-31 +-26 +-23 +-25 +-23 +-23 +-19 +-18 +-15 +-17 +-15 +-18 +-16 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +109 +105 +97 +91 +82 +75 +69 +65 +60 +53 +47 +45 +44 +39 +36 +32 +32 +27 +28 +26 +22 +20 +13 +12 +9 +8 +8 +6 +6 +10 +10 +10 +13 +12 +13 +-54 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-108 +-102 +-97 +-90 +-84 +-76 +-69 +-66 +-62 +-59 +-57 +-53 +-48 +-46 +-40 +-39 +-37 +-37 +-34 +-33 +-32 +-29 +-26 +-22 +-19 +-20 +-19 +-20 +-19 +-18 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +115 +108 +101 +93 +17 +-51 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +116 +108 +101 +91 +86 +10 +-56 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +100 +95 +88 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +116 +106 +100 +92 +80 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +113 +100 +95 +84 +80 +73 +69 +64 +60 +56 +48 +46 +44 +36 +35 +34 +30 +29 +27 +25 +24 +18 +18 +13 +14 +16 +15 +16 +18 +14 +16 +14 +14 +9 +9 +6 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +3 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +114 +107 +98 +91 +86 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +113 +106 +99 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +108 +101 +94 +84 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-107 +-98 +-89 +-83 +-83 +-77 +-76 +-70 +-69 +-63 +-61 +-56 +-55 +-50 +-45 +-41 +-36 +-37 +-32 +-34 +-30 +-27 +-25 +-22 +-21 +-19 +-16 +-18 +-16 +-19 +-16 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +105 +99 +94 +86 +82 +75 +72 +66 +61 +58 +51 +46 +40 +39 +35 +34 +30 +27 +26 +25 +21 +21 +18 +18 +13 +12 +8 +7 +6 +5 +1 +1 +4 +3 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-111 +-104 +-93 +-86 +-80 +-74 +-69 +-70 +-66 +-66 +-61 +-61 +-56 +-55 +-50 +-44 +-40 +-36 +-37 +-34 +-29 +-30 +-27 +-29 +-25 +-23 +-25 +-20 +-19 +-20 +-16 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +102 +95 +18 +-49 +-109 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +107 +100 +89 +84 +75 +0 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +106 +98 +90 +85 +9 +-58 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +115 +107 +100 +92 +86 +80 +76 +78 +72 +68 +60 +57 +50 +48 +40 +37 +32 +30 +22 +21 +15 +15 +11 +12 +12 +8 +10 +12 +8 +10 +5 +6 +5 +5 +5 +5 +5 +10 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-111 +-101 +-91 +-86 +-81 +-76 +-72 +-67 +-62 +-55 +-50 +-46 +-49 +-45 +-47 +-43 +-44 +-39 +-35 +-34 +-26 +-24 +-20 +-23 +-20 +-24 +-21 +-23 +-20 +-17 +114 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +108 +101 +90 +85 +77 +72 +67 +61 +57 +54 +49 +46 +46 +45 +42 +38 +34 +33 +29 +26 +23 +22 +14 +13 +9 +8 +4 +3 +6 +7 +9 +6 +7 +7 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +9 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +116 +104 +96 +90 +84 +74 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-114 +-111 +-103 +-99 +-92 +-87 +-81 +-77 +-70 +-68 +-61 +-60 +-54 +-50 +-45 +-41 +-42 +-38 +-32 +-26 +-22 +-23 +-21 +-20 +-19 +-19 +-18 +-16 +-20 +-17 +-20 +-19 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +106 +100 +92 +87 +77 +72 +63 +58 +49 +47 +40 +38 +38 +38 +36 +35 +35 +34 +29 +26 +23 +21 +15 +14 +11 +10 +10 +5 +6 +8 +4 +6 +2 +2 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +116 +106 +99 +87 +82 +72 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-112 +-104 +-97 +-88 +-85 +-78 +-76 +-69 +-64 +-60 +-51 +-47 +-40 +-42 +-37 +-38 +-35 +-35 +-28 +-27 +-23 +-26 +-23 +-25 +-22 +-25 +-22 +-19 +-18 +-15 +-18 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +112 +102 +94 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +99 +94 +83 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +102 +95 +88 +83 +72 +69 +63 +60 +57 +53 +49 +44 +41 +39 +32 +29 +30 +28 +27 +21 +20 +14 +13 +13 +15 +16 +14 +15 +16 +14 +15 +13 +15 +12 +13 +11 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +108 +99 +93 +85 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +102 +96 +88 +83 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +108 +100 +94 +82 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +109 +99 +96 +90 +86 +10 +-56 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +115 +107 +96 +90 +83 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-111 +-101 +-93 +-85 +-78 +-76 +-69 +-67 +-61 +-58 +-53 +-49 +-47 +-42 +-42 +-37 +-38 +-34 +-30 +-25 +-21 +-24 +-20 +-23 +-20 +-22 +-19 +-21 +-18 +-20 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +110 +102 +96 +90 +80 +74 +64 +60 +53 +49 +45 +42 +38 +36 +34 +30 +29 +31 +31 +26 +23 +21 +21 +17 +16 +14 +12 +11 +8 +7 +6 +1 +2 +-2 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-110 +-101 +-98 +-90 +-87 +-82 +-72 +-67 +-62 +-56 +-50 +-50 +-46 +-44 +-41 +-38 +-34 +-36 +-33 +-29 +-30 +-26 +-25 +-22 +-20 +-22 +-19 +-19 +-19 +-16 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +108 +101 +95 +18 +-49 +-109 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +100 +95 +85 +81 +77 +71 +67 +62 +58 +54 +52 +51 +49 +44 +43 +41 +38 +29 +28 +21 +19 +17 +16 +16 +10 +10 +12 +8 +10 +8 +9 +8 +7 +7 +6 +5 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-113 +-104 +-101 +-92 +-89 +-81 +-76 +-69 +-65 +-58 +-51 +-51 +-43 +-41 +-36 +-34 +-33 +-30 +-26 +-25 +-28 +-26 +-29 +-26 +-28 +-25 +-25 +-18 +-15 +-14 +123 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +115 +105 +96 +90 +14 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +116 +107 +100 +94 +84 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +107 +98 +89 +81 +74 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +114 +108 +96 +91 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +107 +103 +95 +89 +79 +74 +65 +60 +56 +53 +44 +42 +38 +36 +35 +28 +26 +28 +27 +26 +20 +20 +17 +16 +16 +14 +13 +12 +7 +7 +9 +4 +6 +5 +5 +6 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-114 +-105 +-99 +-91 +-88 +-79 +-77 +-71 +-63 +-59 +-53 +-50 +-44 +-39 +-38 +-35 +-33 +-32 +-30 +-28 +-24 +-20 +-22 +-22 +-21 +-18 +-15 +-13 +-16 +-15 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +106 +101 +94 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +106 +98 +91 +86 +82 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +13 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +104 +96 +91 +84 +73 +68 +58 +55 +50 +46 +43 +42 +41 +38 +36 +28 +27 +22 +21 +15 +15 +15 +11 +9 +12 +9 +11 +7 +8 +6 +6 +7 +3 +5 +8 +9 +-58 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-109 +-102 +-94 +-88 +-80 +-78 +-72 +-68 +-62 +-53 +-50 +-44 +-46 +-42 +-43 +-39 +-39 +-36 +-34 +-30 +-32 +-28 +-23 +-24 +-21 +-22 +-19 +-18 +-17 +-20 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +115 +109 +102 +93 +84 +77 +72 +68 +64 +59 +50 +46 +41 +37 +34 +34 +32 +29 +28 +29 +26 +26 +22 +22 +19 +16 +15 +15 +12 +11 +5 +5 +2 +2 +2 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +105 +94 +88 +84 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +104 +97 +90 +84 +74 +0 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-106 +-96 +-92 +-86 +-81 +-77 +-72 +-69 +-63 +-58 +-54 +-49 +-44 +-44 +-42 +-40 +-38 +-36 +-33 +-29 +-25 +-26 +-25 +-24 +-21 +-24 +-22 +-24 +-21 +-20 +-18 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +110 +97 +91 +79 +74 +67 +63 +58 +54 +50 +51 +47 +45 +43 +40 +37 +34 +32 +29 +27 +26 +23 +16 +14 +8 +8 +3 +8 +10 +10 +11 +9 +7 +6 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +4 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +115 +105 +99 +92 +82 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-109 +-103 +-94 +-84 +-82 +-75 +-74 +-67 +-65 +-59 +-57 +-52 +-48 +-43 +-44 +-40 +-41 +-36 +-31 +-32 +-28 +-24 +-22 +-20 +-19 +-18 +-15 +-18 +-15 +-16 +-14 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +105 +98 +91 +15 +-52 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +99 +93 +81 +76 +67 +64 +59 +53 +51 +47 +45 +44 +37 +34 +35 +33 +32 +25 +24 +19 +18 +20 +16 +17 +15 +15 +12 +12 +11 +8 +8 +8 +6 +6 +6 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-108 +-101 +-92 +-87 +-78 +-71 +-68 +-65 +-62 +-60 +-56 +-52 +-47 +-42 +-40 +-37 +-36 +-35 +-32 +-30 +-32 +-29 +-31 +-27 +-26 +-26 +-23 +-25 +-21 +-18 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +113 +105 +98 +90 +14 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +109 +97 +90 +87 +82 +7 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +116 +106 +99 +87 +82 +72 +-2 +-68 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +106 +98 +90 +84 +77 +2 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +102 +96 +88 +81 +74 +70 +68 +61 +58 +53 +51 +44 +41 +36 +34 +27 +25 +26 +26 +26 +21 +19 +16 +15 +12 +11 +11 +9 +8 +8 +6 +5 +9 +11 +10 +9 +-58 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-113 +-103 +-93 +-86 +-85 +-78 +-76 +-70 +-68 +-62 +-61 +-55 +-52 +-48 +-43 +-43 +-38 +-33 +-34 +-30 +-31 +-30 +-25 +-22 +-20 +-18 +-16 +-15 +-11 +-13 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +104 +97 +91 +83 +78 +73 +63 +60 +57 +53 +50 +42 +41 +38 +35 +32 +30 +28 +26 +23 +22 +21 +15 +14 +16 +13 +14 +12 +13 +16 +14 +15 +10 +10 +5 +-61 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +3 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +106 +93 +86 +75 +0 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-104 +-102 +-94 +-89 +-82 +-81 +-74 +-72 +-66 +-64 +-58 +-53 +-48 +-44 +-44 +-40 +-35 +-30 +-26 +-27 +-25 +-26 +-24 +-24 +-20 +-18 +-14 +-16 +-14 +-17 +-16 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +103 +97 +93 +86 +83 +76 +76 +70 +65 +55 +51 +43 +41 +33 +32 +28 +27 +25 +24 +22 +24 +21 +22 +18 +16 +14 +12 +11 +5 +5 +1 +2 +4 +2 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +107 +98 +90 +85 +78 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +102 +93 +89 +82 +6 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +110 +105 +97 +88 +84 +8 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +105 +100 +92 +84 +9 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-109 +-105 +-96 +-87 +-80 +-71 +-66 +-60 +-54 +-53 +-50 +-48 +-46 +-44 +-42 +-39 +-34 +-32 +-29 +-26 +-24 +-27 +-26 +-27 +-25 +-26 +-24 +-24 +-18 +-16 +-12 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +116 +107 +99 +94 +89 +80 +73 +68 +64 +55 +52 +46 +43 +41 +37 +35 +34 +32 +31 +25 +24 +19 +18 +16 +15 +15 +17 +18 +17 +16 +13 +14 +10 +8 +5 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-108 +-103 +-95 +-90 +-84 +-82 +-74 +-72 +-65 +-60 +-55 +-51 +-45 +-39 +-42 +-37 +-38 +-33 +-32 +-29 +-27 +-26 +-24 +-24 +-21 +-18 +-19 +-16 +-14 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +116 +107 +100 +96 +20 +-48 +-108 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +113 +106 +94 +88 +81 +77 +72 +67 +62 +61 +57 +56 +50 +47 +42 +38 +32 +31 +31 +28 +26 +20 +18 +15 +13 +13 +11 +11 +14 +13 +13 +12 +12 +7 +6 +4 +4 +-2 +-68 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-111 +-101 +-91 +-84 +-82 +-76 +-75 +-69 +-67 +-62 +-60 +-55 +-51 +-46 +-47 +-42 +-42 +-39 +-32 +-31 +-28 +-27 +-24 +-25 +-22 +-24 +-22 +-19 +-21 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +105 +96 +89 +12 +-54 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +102 +96 +89 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +113 +107 +99 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +107 +100 +88 +82 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +106 +98 +90 +85 +79 +72 +66 +59 +56 +52 +44 +40 +35 +34 +31 +30 +25 +24 +21 +20 +14 +14 +11 +10 +11 +6 +5 +9 +9 +9 +7 +8 +8 +5 +5 +5 +-61 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-106 +-96 +-89 +-87 +-81 +-79 +-73 +-70 +-65 +-61 +-57 +-57 +-52 +-51 +-46 +-39 +-38 +-33 +-31 +-28 +-30 +-27 +-30 +-26 +-23 +-19 +-15 +-18 +-15 +-18 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +105 +98 +87 +80 +78 +71 +68 +64 +60 +51 +48 +41 +38 +38 +37 +36 +29 +28 +25 +23 +23 +20 +19 +18 +13 +13 +11 +11 +11 +9 +9 +8 +7 +7 +10 +-57 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-114 +-105 +-100 +-92 +-89 +-81 +-78 +-70 +-61 +-59 +-53 +-51 +-47 +-47 +-42 +-42 +-38 +-32 +-29 +-24 +-25 +-22 +-23 +-22 +-25 +-21 +-24 +-20 +-17 +-12 +124 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +116 +106 +97 +92 +16 +-52 +-111 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +96 +91 +81 +76 +67 +62 +61 +59 +54 +51 +48 +41 +39 +32 +30 +31 +27 +27 +25 +24 +18 +18 +18 +13 +12 +15 +14 +15 +9 +10 +12 +11 +11 +12 +12 +9 +-58 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-106 +-98 +-90 +-80 +-76 +-70 +-66 +-62 +-58 +-52 +-49 +-43 +-42 +-39 +-38 +-36 +-36 +-32 +-29 +-25 +-26 +-24 +-25 +-23 +-23 +-18 +-17 +-14 +-13 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +112 +105 +96 +90 +86 +79 +72 +65 +61 +58 +55 +49 +45 +36 +34 +27 +26 +21 +20 +20 +24 +23 +23 +22 +20 +20 +17 +14 +12 +10 +10 +10 +9 +8 +2 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +113 +103 +97 +91 +83 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +101 +94 +86 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-102 +-95 +-85 +-78 +-77 +-70 +-67 +-62 +-56 +-56 +-51 +-52 +-47 +-42 +-39 +-34 +-37 +-32 +-34 +-30 +-26 +-26 +-19 +-17 +-14 +-16 +-15 +-18 +-16 +-16 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +115 +103 +100 +93 +17 +-51 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +108 +101 +93 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +111 +99 +98 +93 +88 +83 +76 +70 +64 +55 +50 +42 +44 +40 +38 +32 +30 +22 +22 +19 +17 +18 +16 +16 +20 +18 +18 +17 +17 +11 +10 +7 +6 +3 +4 +8 +7 +-60 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-108 +-99 +-92 +-90 +-82 +-77 +-69 +-64 +-59 +-54 +-53 +-50 +-47 +-49 +-45 +-46 +-43 +-44 +-39 +-36 +-36 +-31 +-32 +-28 +-24 +-25 +-21 +-16 +-18 +-16 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +106 +99 +91 +84 +78 +71 +66 +63 +54 +51 +44 +40 +41 +39 +38 +34 +32 +31 +25 +24 +21 +19 +24 +22 +21 +15 +15 +11 +10 +10 +7 +6 +6 +4 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +105 +97 +91 +86 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +107 +99 +88 +82 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +13 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +106 +98 +93 +85 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +109 +101 +92 +89 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-104 +-97 +-92 +-84 +-78 +-73 +-66 +-61 +-61 +-58 +-58 +-53 +-52 +-48 +-44 +-40 +-42 +-37 +-39 +-36 +-29 +-28 +-24 +-26 +-21 +-24 +-20 +-17 +-18 +-16 +-18 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +103 +97 +93 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +109 +97 +91 +83 +77 +2 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +112 +109 +102 +97 +91 +86 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +13 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +108 +100 +91 +85 +81 +75 +72 +65 +63 +57 +55 +50 +46 +44 +39 +34 +30 +26 +24 +22 +20 +19 +12 +12 +9 +9 +9 +4 +3 +6 +6 +8 +4 +5 +1 +2 +2 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-109 +-105 +-96 +-93 +-85 +-80 +-75 +-68 +-62 +-61 +-56 +-51 +-47 +-43 +-41 +-39 +-33 +-31 +-26 +-27 +-25 +-26 +-24 +-24 +-22 +-21 +-19 +-22 +-20 +-22 +114 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +110 +102 +98 +94 +84 +80 +70 +67 +61 +57 +53 +49 +45 +41 +35 +35 +33 +34 +33 +31 +30 +30 +26 +24 +21 +19 +13 +12 +9 +9 +12 +12 +12 +14 +11 +10 +-57 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +105 +100 +97 +89 +83 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +106 +99 +90 +82 +7 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +109 +102 +91 +86 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-112 +-99 +-92 +-84 +-80 +-73 +-69 +-62 +-60 +-56 +-54 +-48 +-44 +-43 +-41 +-39 +-35 +-32 +-28 +-28 +-27 +-28 +-26 +-26 +-23 +-19 +-16 +-18 +-16 +-18 +-17 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +115 +108 +98 +92 +86 +78 +73 +69 +63 +60 +53 +50 +47 +40 +38 +34 +32 +34 +32 +31 +24 +23 +18 +17 +16 +14 +13 +11 +10 +10 +7 +4 +5 +4 +4 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-101 +-97 +-89 +-85 +-78 +-72 +-66 +-63 +-58 +-52 +-52 +-48 +-48 +-45 +-39 +-35 +-31 +-32 +-29 +-31 +-27 +-25 +-20 +-16 +-18 +-16 +-16 +-16 +-15 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +115 +106 +100 +90 +14 +-53 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +108 +101 +96 +92 +85 +81 +72 +68 +61 +57 +52 +46 +44 +36 +34 +28 +28 +22 +20 +22 +20 +20 +19 +19 +14 +13 +15 +12 +13 +11 +11 +8 +7 +7 +2 +3 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-110 +-101 +-99 +-91 +-88 +-81 +-77 +-70 +-68 +-61 +-57 +-54 +-48 +-47 +-42 +-42 +-37 +-38 +-33 +-27 +-28 +-25 +-26 +-23 +-24 +-22 +-20 +-17 +-18 +-15 +122 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +115 +107 +95 +89 +14 +-54 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +105 +98 +95 +87 +83 +76 +72 +62 +60 +52 +48 +48 +43 +41 +38 +36 +30 +27 +22 +21 +23 +20 +20 +17 +21 +19 +20 +20 +17 +17 +14 +14 +12 +11 +9 +7 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +5 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +112 +102 +97 +90 +85 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +11 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +104 +91 +85 +83 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-107 +-97 +-89 +-88 +-80 +-77 +-69 +-65 +-58 +-57 +-52 +-50 +-44 +-42 +-40 +-36 +-38 +-36 +-37 +-34 +-34 +-30 +-28 +-26 +-27 +-26 +-20 +-15 +-13 +-13 +-11 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +114 +108 +100 +94 +18 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +111 +103 +95 +88 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +100 +94 +89 +83 +8 +-59 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +116 +109 +98 +91 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +116 +111 +103 +98 +88 +83 +8 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +102 +94 +88 +79 +72 +66 +62 +57 +55 +50 +46 +40 +37 +33 +31 +24 +23 +20 +18 +18 +13 +14 +15 +11 +12 +8 +8 +12 +8 +8 +8 +8 +6 +6 +6 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-106 +-98 +-92 +-82 +-75 +-67 +-66 +-60 +-59 +-55 +-53 +-50 +-47 +-44 +-44 +-39 +-40 +-35 +-29 +-30 +-26 +-28 +-24 +-26 +-22 +-19 +-14 +-11 +-13 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +116 +108 +94 +89 +78 +74 +66 +62 +59 +58 +56 +51 +50 +49 +46 +38 +36 +29 +27 +24 +23 +22 +20 +19 +15 +14 +13 +11 +11 +10 +9 +10 +12 +12 +12 +11 +-56 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +2 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +100 +94 +85 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-110 +-102 +-95 +-90 +-81 +-74 +-71 +-65 +-58 +-55 +-53 +-49 +-51 +-46 +-45 +-38 +-35 +-30 +-33 +-29 +-31 +-28 +-30 +-27 +-26 +-23 +-25 +-22 +-18 +-18 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +114 +107 +101 +90 +85 +78 +71 +68 +66 +63 +58 +54 +49 +45 +37 +35 +30 +28 +26 +20 +20 +22 +17 +18 +12 +10 +12 +10 +11 +8 +8 +7 +8 +6 +2 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +103 +96 +90 +84 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +105 +97 +85 +80 +73 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +24 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +114 +106 +98 +92 +89 +83 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +105 +98 +89 +83 +73 +-1 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-108 +-97 +-89 +-85 +-80 +-76 +-71 +-67 +-60 +-56 +-49 +-48 +-44 +-43 +-40 +-40 +-37 +-38 +-34 +-35 +-31 +-29 +-26 +-23 +-25 +-21 +-22 +-20 +-15 +-16 +-12 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +111 +105 +99 +91 +86 +85 +78 +74 +65 +61 +52 +49 +44 +42 +39 +36 +34 +30 +28 +27 +23 +22 +21 +19 +18 +21 +19 +18 +19 +16 +14 +14 +14 +10 +7 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +9 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +113 +103 +95 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +108 +99 +93 +85 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-108 +-98 +-91 +-84 +-79 +-72 +-66 +-67 +-62 +-62 +-57 +-57 +-52 +-48 +-42 +-35 +-36 +-32 +-34 +-30 +-31 +-28 +-29 +-26 +-24 +-22 +-21 +-19 +-16 +-19 +-17 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +101 +92 +86 +79 +71 +69 +63 +59 +57 +54 +50 +45 +42 +40 +35 +34 +30 +29 +25 +22 +18 +19 +17 +10 +10 +5 +6 +1 +2 +3 +2 +2 +3 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-117 +-109 +-100 +-95 +-85 +-76 +-72 +-69 +-65 +-60 +-56 +-49 +-45 +-47 +-44 +-43 +-41 +-39 +-34 +-29 +-25 +-26 +-24 +-26 +-20 +-19 +-16 +-19 +-17 +-19 +-17 +114 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +104 +96 +90 +14 +-54 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +26 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +103 +95 +88 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +111 +104 +96 +90 +82 +75 +69 +63 +59 +52 +49 +49 +46 +44 +37 +35 +31 +28 +27 +24 +23 +18 +17 +18 +14 +14 +10 +10 +9 +9 +5 +5 +8 +7 +7 +6 +7 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-112 +-102 +-96 +-87 +-82 +-76 +-73 +-67 +-64 +-58 +-54 +-48 +-45 +-45 +-41 +-40 +-36 +-31 +-30 +-29 +-29 +-29 +-27 +-27 +-23 +-19 +-20 +-19 +-18 +-14 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +109 +101 +90 +85 +9 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +25 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +109 +101 +94 +89 +82 +76 +72 +63 +60 +61 +58 +55 +47 +44 +38 +34 +33 +29 +27 +25 +23 +21 +15 +15 +10 +8 +12 +8 +14 +14 +15 +15 +13 +11 +9 +7 +7 +-59 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +9 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +117 +108 +101 +89 +83 +73 +-1 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-106 +-99 +-93 +-88 +-81 +-74 +-73 +-67 +-66 +-60 +-56 +-51 +-51 +-47 +-41 +-38 +-32 +-32 +-29 +-30 +-27 +-28 +-25 +-27 +-24 +-26 +-24 +-18 +-20 +-16 +-18 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +105 +98 +94 +85 +81 +72 +68 +62 +59 +49 +47 +40 +37 +38 +36 +34 +32 +30 +29 +22 +22 +16 +14 +16 +16 +16 +15 +14 +8 +8 +8 +6 +6 +6 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +11 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +108 +97 +90 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +106 +100 +98 +92 +87 +12 +-55 +-115 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +111 +104 +100 +93 +88 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +110 +102 +94 +89 +85 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-111 +-107 +-98 +-92 +-86 +-77 +-71 +-68 +-65 +-61 +-57 +-53 +-47 +-43 +-46 +-41 +-43 +-39 +-39 +-35 +-36 +-32 +-29 +-28 +-22 +-18 +-15 +-12 +-10 +-12 +-11 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +105 +97 +90 +84 +81 +78 +72 +68 +62 +59 +54 +50 +46 +43 +38 +34 +32 +31 +25 +22 +18 +16 +14 +14 +9 +9 +7 +6 +6 +6 +6 +4 +1 +3 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-107 +-98 +-94 +-86 +-83 +-74 +-69 +-62 +-54 +-53 +-47 +-47 +-42 +-42 +-38 +-36 +-33 +-32 +-30 +-25 +-21 +-19 +-17 +-16 +-13 +-14 +-13 +-15 +-15 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +104 +96 +89 +13 +-54 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +111 +101 +97 +90 +82 +76 +65 +60 +52 +49 +41 +38 +38 +36 +36 +30 +29 +22 +22 +24 +21 +21 +19 +18 +16 +15 +15 +12 +11 +11 +9 +9 +8 +7 +7 +2 +2 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-114 +-105 +-99 +-93 +-88 +-84 +-77 +-71 +-63 +-57 +-52 +-54 +-50 +-52 +-47 +-44 +-41 +-38 +-33 +-28 +-28 +-21 +-20 +-18 +-21 +-19 +-21 +-20 +-22 +-20 +-20 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +101 +89 +13 +-54 +-113 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +24 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +113 +106 +99 +90 +83 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +114 +106 +98 +92 +86 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +114 +107 +96 +87 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +106 +99 +94 +86 +80 +75 +70 +65 +57 +51 +50 +47 +44 +42 +41 +38 +35 +31 +30 +27 +27 +24 +21 +19 +20 +15 +13 +11 +10 +5 +5 +0 +-1 +2 +2 +6 +6 +-60 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-103 +-99 +-91 +-87 +-81 +-77 +-72 +-68 +-63 +-61 +-56 +-52 +-48 +-45 +-45 +-40 +-40 +-35 +-36 +-31 +-27 +-25 +-23 +-22 +-20 +-17 +-18 +-17 +-15 +-12 +124 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +111 +103 +97 +95 +89 +84 +80 +75 +65 +60 +51 +47 +42 +40 +35 +32 +30 +24 +21 +22 +20 +19 +18 +18 +12 +12 +7 +7 +10 +10 +10 +9 +8 +8 +3 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +109 +102 +91 +86 +79 +74 +0 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-107 +-103 +-94 +-88 +-82 +-76 +-72 +-66 +-64 +-58 +-57 +-51 +-45 +-44 +-40 +-41 +-36 +-35 +-34 +-29 +-30 +-27 +-28 +-24 +-21 +-19 +-16 +-18 +-15 +-12 +-13 +123 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +111 +102 +93 +87 +82 +74 +68 +61 +57 +52 +50 +44 +41 +36 +33 +30 +29 +22 +21 +16 +16 +11 +9 +12 +11 +14 +13 +15 +11 +10 +8 +7 +5 +4 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +113 +101 +95 +85 +81 +78 +4 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +108 +101 +91 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +106 +98 +85 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +116 +107 +100 +91 +85 +9 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-112 +-105 +-99 +-90 +-83 +-75 +-68 +-65 +-59 +-54 +-52 +-49 +-46 +-45 +-42 +-39 +-37 +-32 +-30 +-32 +-29 +-32 +-28 +-29 +-26 +-28 +-24 +-23 +-19 +-14 +-14 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +112 +101 +94 +91 +86 +81 +72 +68 +62 +59 +50 +48 +43 +41 +38 +35 +33 +31 +28 +28 +28 +28 +26 +24 +23 +23 +18 +15 +12 +13 +10 +11 +5 +6 +4 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-111 +-107 +-99 +-96 +-88 +-85 +-78 +-72 +-66 +-66 +-59 +-53 +-49 +-43 +-42 +-38 +-37 +-34 +-36 +-33 +-34 +-30 +-26 +-27 +-24 +-26 +-22 +-19 +-17 +-15 +-18 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +114 +104 +97 +88 +80 +72 +67 +59 +53 +51 +50 +47 +40 +38 +34 +32 +29 +26 +25 +24 +22 +21 +22 +21 +14 +13 +10 +9 +10 +5 +5 +3 +3 +3 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +117 +106 +100 +96 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-111 +-107 +-98 +-95 +-87 +-83 +-75 +-70 +-63 +-58 +-56 +-51 +-47 +-44 +-44 +-39 +-36 +-36 +-34 +-28 +-26 +-23 +-22 +-17 +-17 +-13 +-15 +-14 +-15 +-14 +-16 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +112 +99 +93 +82 +76 +74 +67 +63 +58 +54 +46 +44 +37 +36 +29 +29 +30 +27 +28 +29 +26 +25 +22 +22 +17 +16 +17 +16 +12 +11 +9 +7 +3 +3 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-108 +-100 +-92 +-89 +-81 +-78 +-72 +-67 +-61 +-58 +-57 +-51 +-51 +-45 +-40 +-40 +-37 +-33 +-30 +-26 +-28 +-25 +-21 +-23 +-20 +-23 +-19 +-16 +-18 +-14 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +108 +98 +91 +15 +-52 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +102 +96 +89 +84 +83 +8 +-59 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +111 +99 +93 +82 +78 +68 +64 +62 +59 +57 +49 +46 +42 +39 +38 +34 +32 +30 +27 +25 +27 +25 +25 +24 +22 +21 +17 +17 +16 +11 +8 +6 +5 +0 +1 +-1 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +112 +105 +97 +91 +84 +77 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +115 +106 +99 +92 +84 +8 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-105 +-98 +-95 +-88 +-83 +-78 +-72 +-67 +-60 +-54 +-52 +-49 +-45 +-47 +-42 +-43 +-40 +-41 +-36 +-32 +-31 +-28 +-28 +-25 +-27 +-24 +-18 +-18 +-14 +-16 +-14 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +109 +96 +90 +78 +74 +68 +63 +59 +55 +52 +48 +43 +41 +39 +35 +33 +31 +28 +27 +24 +22 +22 +18 +16 +22 +20 +18 +14 +14 +15 +12 +10 +4 +4 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-111 +-103 +-92 +-85 +-76 +-73 +-67 +-65 +-60 +-58 +-55 +-50 +-46 +-46 +-41 +-39 +-36 +-35 +-32 +-29 +-31 +-27 +-29 +-25 +-27 +-25 +-19 +-19 +-16 +-15 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +105 +99 +91 +15 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +113 +105 +95 +91 +84 +9 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +108 +100 +89 +82 +73 +-1 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +110 +101 +93 +86 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +114 +104 +98 +89 +85 +78 +70 +65 +61 +56 +47 +43 +35 +33 +27 +26 +24 +22 +21 +17 +17 +12 +13 +16 +13 +13 +11 +12 +10 +9 +9 +5 +4 +6 +7 +8 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +106 +100 +88 +84 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +112 +104 +93 +85 +78 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +110 +102 +95 +85 +79 +4 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-110 +-103 +-97 +-90 +-83 +-76 +-68 +-67 +-58 +-54 +-48 +-46 +-46 +-43 +-41 +-37 +-33 +-32 +-31 +-30 +-30 +-28 +-28 +-25 +-24 +-21 +-17 +-17 +-17 +-16 +-17 +117 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +106 +99 +90 +84 +78 +70 +66 +57 +54 +51 +50 +48 +45 +43 +42 +37 +37 +33 +32 +28 +24 +23 +22 +18 +14 +12 +12 +6 +6 +1 +2 +3 +2 +2 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-119 +-111 +-100 +-91 +-89 +-82 +-81 +-74 +-73 +-66 +-64 +-53 +-48 +-43 +-43 +-41 +-36 +-34 +-29 +-30 +-27 +-27 +-25 +-24 +-24 +-20 +-18 +-16 +-13 +-11 +-13 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +106 +98 +90 +14 +-53 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +108 +102 +94 +89 +84 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +111 +102 +94 +88 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +117 +105 +98 +95 +86 +82 +76 +72 +65 +61 +57 +49 +47 +40 +38 +37 +34 +33 +30 +28 +27 +23 +21 +20 +17 +17 +20 +18 +18 +11 +11 +9 +7 +7 +8 +8 +3 +4 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-114 +-105 +-97 +-88 +-81 +-81 +-75 +-74 +-68 +-67 +-61 +-60 +-54 +-52 +-43 +-38 +-35 +-30 +-26 +-28 +-25 +-25 +-20 +-21 +-20 +-21 +-21 +-20 +-18 +-21 +-18 +114 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +106 +94 +88 +80 +74 +67 +63 +59 +53 +50 +47 +42 +40 +37 +31 +30 +24 +23 +25 +21 +21 +19 +17 +15 +14 +14 +16 +16 +16 +14 +15 +14 +11 +8 +7 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +6 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +110 +102 +92 +85 +77 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-102 +-95 +-93 +-86 +-85 +-78 +-76 +-70 +-67 +-60 +-57 +-52 +-49 +-44 +-37 +-38 +-34 +-34 +-31 +-32 +-28 +-30 +-26 +-27 +-24 +-26 +-22 +-20 +-20 +-17 +-19 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +103 +96 +91 +80 +76 +72 +66 +62 +62 +60 +56 +47 +44 +39 +36 +34 +30 +28 +26 +22 +20 +16 +15 +15 +13 +12 +17 +16 +16 +16 +13 +10 +8 +8 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +7 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +116 +107 +100 +94 +82 +78 +3 +-63 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-116 +-105 +-97 +-88 +-81 +-80 +-73 +-72 +-67 +-66 +-60 +-58 +-53 +-50 +-45 +-47 +-42 +-42 +-37 +-37 +-35 +-28 +-25 +-21 +-24 +-20 +-23 +-20 +-16 +-18 +-16 +-14 +122 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +105 +98 +88 +12 +-55 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +22 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +114 +105 +98 +90 +82 +7 +-60 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +102 +96 +89 +82 +75 +70 +67 +58 +56 +48 +44 +44 +43 +41 +35 +34 +30 +26 +26 +23 +22 +22 +20 +19 +17 +16 +15 +12 +11 +10 +9 +8 +13 +12 +12 +12 +10 +-57 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +10 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +107 +100 +92 +86 +79 +5 +-62 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +23 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +117 +111 +100 +94 +85 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +112 +102 +95 +89 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +110 +101 +94 +87 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +115 +104 +97 +90 +85 +74 +0 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-113 +-104 +-102 +-93 +-91 +-83 +-80 +-74 +-66 +-58 +-52 +-50 +-46 +-44 +-38 +-36 +-33 +-32 +-29 +-28 +-26 +-23 +-26 +-24 +-24 +-23 +-22 +-19 +-16 +-13 +-16 +-14 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +118 +111 +104 +92 +85 +75 +70 +63 +58 +55 +51 +48 +43 +40 +38 +34 +32 +29 +26 +25 +18 +19 +21 +17 +16 +14 +13 +11 +10 +10 +6 +6 +6 +5 +5 +6 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-113 +-109 +-102 +-97 +-90 +-84 +-78 +-76 +-70 +-68 +-62 +-58 +-54 +-50 +-50 +-44 +-44 +-40 +-34 +-28 +-24 +-25 +-22 +-22 +-19 +-23 +-20 +-23 +-21 +-23 +-22 +118 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +117 +110 +100 +93 +17 +-50 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +116 +106 +98 +91 +86 +81 +73 +68 +61 +58 +49 +46 +41 +38 +36 +33 +32 +34 +31 +30 +30 +28 +21 +20 +15 +13 +10 +9 +9 +7 +6 +7 +5 +5 +4 +3 +4 +2 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-115 +-107 +-97 +-93 +-87 +-84 +-79 +-74 +-68 +-61 +-55 +-53 +-50 +-48 +-46 +-43 +-39 +-37 +-32 +-32 +-29 +-29 +-23 +-22 +-19 +-19 +-17 +-18 +-15 +-17 +-16 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +110 +104 +97 +93 +17 +-51 +-110 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +111 +97 +91 +80 +75 +1 +-65 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +25 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +116 +106 +98 +89 +84 +9 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +114 +106 +98 +92 +86 +10 +-57 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +118 +108 +102 +95 +90 +79 +74 +68 +64 +60 +55 +51 +46 +42 +40 +33 +32 +26 +24 +26 +25 +25 +24 +22 +21 +17 +15 +15 +10 +10 +5 +6 +10 +11 +10 +11 +11 +10 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-113 +-104 +-95 +-86 +-77 +-72 +-67 +-63 +-60 +-55 +-50 +-50 +-47 +-46 +-43 +-40 +-36 +-38 +-35 +-32 +-29 +-26 +-25 +-22 +-25 +-22 +-20 +-22 +-19 +-21 +115 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +114 +108 +101 +89 +13 +-54 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +21 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +102 +95 +88 +83 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +20 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +122 +114 +102 +94 +86 +80 +69 +65 +59 +55 +52 +45 +43 +36 +35 +29 +28 +30 +26 +26 +24 +23 +21 +20 +19 +17 +16 +16 +12 +12 +11 +5 +6 +9 +7 +8 +6 +5 +-62 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-109 +-101 +-93 +-85 +-83 +-76 +-75 +-68 +-63 +-59 +-53 +-54 +-48 +-48 +-43 +-36 +-36 +-31 +-31 +-28 +-26 +-23 +-26 +-23 +-26 +-23 +-20 +-16 +-13 +-16 +120 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +126 +112 +104 +92 +87 +76 +72 +66 +63 +60 +55 +52 +52 +49 +46 +44 +43 +36 +33 +28 +26 +22 +20 +18 +13 +12 +10 +10 +10 +6 +6 +8 +5 +6 +2 +3 +-1 +-67 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +9 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +120 +112 +100 +93 +90 +85 +81 +6 +-61 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +114 +108 +100 +95 +89 +13 +-54 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-112 +-100 +-95 +-86 +-82 +-75 +-71 +-67 +-62 +-56 +-52 +-46 +-42 +-45 +-41 +-38 +-35 +-37 +-33 +-34 +-31 +-32 +-28 +-26 +-23 +-20 +-22 +-20 +-18 +-17 +-14 +121 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +113 +106 +95 +90 +87 +82 +78 +74 +70 +64 +57 +54 +51 +45 +40 +36 +34 +27 +25 +21 +20 +19 +17 +16 +10 +10 +5 +5 +8 +6 +6 +6 +7 +2 +3 +5 +-61 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +115 +108 +99 +92 +83 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-108 +-100 +-90 +-87 +-79 +-76 +-71 +-68 +-63 +-60 +-54 +-54 +-49 +-47 +-42 +-44 +-38 +-37 +-33 +-28 +-30 +-28 +-22 +-22 +-19 +-18 +-16 +-19 +-17 +-20 +-17 +124 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +114 +107 +101 +91 +15 +-52 +-112 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +17 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +125 +118 +113 +103 +97 +90 +85 +79 +72 +65 +63 +59 +53 +46 +42 +40 +35 +32 +30 +26 +25 +18 +18 +13 +12 +15 +12 +12 +12 +12 +16 +14 +15 +9 +9 +4 +4 +0 +1 +-66 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-109 +-102 +-93 +-87 +-81 +-76 +-71 +-66 +-60 +-57 +-50 +-49 +-45 +-44 +-42 +-40 +-35 +-32 +-29 +-26 +-23 +-21 +-26 +-24 +-26 +-23 +-20 +-18 +-16 +-15 +122 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +103 +96 +88 +12 +-55 +-114 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +111 +100 +93 +90 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +110 +102 +95 +84 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +15 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +123 +113 +104 +96 +91 +84 +8 +-58 +-117 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +16 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +110 +102 +95 +84 +79 +72 +68 +62 +57 +53 +49 +46 +44 +40 +37 +33 +30 +29 +22 +22 +22 +23 +21 +20 +21 +21 +20 +12 +11 +4 +5 +2 +3 +4 +3 +4 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-120 +-112 +-104 +-96 +-93 +-87 +-84 +-78 +-74 +-68 +-67 +-61 +-61 +-56 +-52 +-51 +-45 +-44 +-39 +-32 +-32 +-28 +-26 +-24 +-23 +-23 +-21 +-23 +-20 +-22 +-18 +-16 +116 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +121 +112 +105 +97 +91 +85 +73 +70 +67 +61 +56 +52 +48 +46 +39 +37 +37 +32 +31 +29 +27 +22 +22 +23 +22 +20 +14 +13 +10 +10 +9 +8 +7 +3 +3 +6 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +12 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +105 +98 +86 +81 +6 +-60 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-109 +-102 +-91 +-84 +-83 +-77 +-73 +-69 +-63 +-59 +-55 +-48 +-44 +-46 +-38 +-36 +-31 +-33 +-30 +-30 +-26 +-24 +-27 +-24 +-27 +-25 +-23 +-21 +-19 +-15 +-12 +119 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +112 +104 +96 +90 +81 +75 +71 +64 +59 +54 +50 +48 +42 +39 +37 +31 +28 +30 +26 +25 +22 +25 +23 +22 +22 +21 +16 +15 +12 +12 +12 +10 +8 +6 +6 +8 +-59 +-119 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +8 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +124 +114 +108 +100 +96 +90 +82 +7 +-59 +-118 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +14 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +114 +107 +99 +93 +87 +80 +5 +-61 +-120 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +18 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +118 +109 +102 +91 +86 +76 +2 +-64 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +19 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +127 +119 +109 +101 +94 +89 +84 +9 +-58 +-116 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-121 +-118 +-114 +-103 +-99 +-90 +-85 +-72 +-66 +-60 +-59 +-54 +-54 +-50 +-50 +-45 +-45 +-40 +-37 +-35 +-28 +-26 diff --git a/traces/lf_idteck_4944544BAC40E069.pm3 b/traces/lf_idteck_4944544BAC40E069.pm3 new file mode 100644 index 000000000..7ef46247e --- /dev/null +++ b/traces/lf_idteck_4944544BAC40E069.pm3 @@ -0,0 +1,30000 @@ +-42 +-11 +-20 +5 +-9 +10 +-6 +14 +-3 +15 +-4 +15 +-3 +14 +-4 +14 +-3 +15 +-5 +13 +-4 +14 +-4 +12 +-6 +13 +-5 +12 +-7 +12 +-5 +11 +24 +0 +17 +-4 +11 +-8 +11 +-7 +11 +-10 +10 +-8 +11 +-9 +9 +-8 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +12 +-8 +-42 +-11 +-19 +5 +-10 +10 +-5 +14 +-4 +14 +-4 +16 +-3 +13 +-5 +14 +-3 +14 +-5 +13 +-4 +14 +-5 +12 +-5 +14 +-5 +12 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +11 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-7 +10 +-7 +11 +-8 +10 +23 +1 +17 +-6 +11 +-8 +11 +-9 +8 +-10 +10 +-9 +10 +-11 +10 +-8 +10 +-9 +10 +-7 +12 +-9 +10 +-9 +11 +-8 +9 +-10 +11 +-8 +11 +-9 +-41 +-9 +-20 +4 +-10 +12 +-5 +13 +-5 +14 +-3 +15 +-5 +13 +-4 +15 +-4 +13 +-5 +14 +-5 +13 +-6 +14 +-4 +12 +-6 +12 +-5 +13 +-7 +11 +25 +1 +17 +-6 +12 +-7 +11 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +11 +-7 +12 +-9 +10 +-8 +-40 +-9 +-21 +3 +-9 +12 +-5 +13 +-4 +16 +-3 +15 +-4 +16 +-2 +14 +-4 +14 +-3 +14 +-6 +12 +-5 +14 +-5 +11 +-6 +13 +-6 +11 +-7 +12 +-5 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +25 +0 +15 +-6 +13 +-8 +10 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-10 +9 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-9 +11 +-7 +-40 +-11 +-21 +5 +-9 +11 +-7 +13 +-4 +14 +-4 +14 +-3 +15 +-4 +14 +-4 +15 +-4 +12 +-6 +13 +-4 +13 +-7 +12 +-5 +12 +-6 +11 +-5 +13 +-6 +11 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +12 +-7 +10 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +24 +0 +17 +-4 +12 +-8 +10 +-8 +11 +-11 +9 +-9 +11 +-9 +9 +-10 +10 +-9 +10 +-10 +11 +-8 +10 +-9 +10 +-7 +11 +-9 +10 +-8 +12 +-8 +-43 +-11 +-19 +4 +-10 +10 +-5 +14 +-4 +14 +-4 +16 +-2 +14 +-4 +14 +-3 +14 +-5 +13 +-4 +14 +-5 +12 +-5 +14 +-6 +12 +-6 +13 +-5 +11 +24 +1 +18 +-4 +12 +-8 +12 +-8 +10 +-10 +10 +-8 +10 +-10 +10 +-8 +11 +-10 +10 +-8 +12 +-8 +10 +-9 +11 +-8 +11 +-9 +11 +-7 +11 +-9 +-42 +-9 +-19 +3 +-11 +10 +-5 +14 +-5 +13 +-4 +15 +-4 +13 +-4 +15 +-4 +13 +-5 +14 +-4 +12 +-6 +12 +-4 +13 +-7 +11 +-6 +13 +-6 +11 +-6 +13 +-6 +12 +-7 +12 +-5 +11 +-7 +11 +-5 +12 +-7 +11 +-6 +12 +-6 +10 +-8 +11 +-7 +11 +-8 +11 +-7 +10 +-8 +10 +-7 +11 +-9 +10 +-8 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +11 +-7 +10 +-8 +10 +-7 +11 +-8 +10 +-7 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-6 +11 +-7 +11 +25 +2 +16 +-5 +13 +-6 +12 +-10 +9 +-9 +11 +-9 +8 +-10 +11 +-9 +10 +-9 +11 +-8 +10 +-9 +10 +-7 +11 +-10 +10 +-8 +12 +-8 +10 +-9 +-40 +-10 +-20 +3 +-10 +12 +-6 +13 +-4 +16 +-2 +14 +-4 +15 +-2 +15 +-5 +13 +-4 +14 +-5 +12 +-5 +13 +-5 +12 +-7 +13 +-5 +11 +-7 +11 +-5 +12 +-8 +11 +-6 +12 +-6 +10 +-7 +12 +-7 +11 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +25 +0 +15 +-6 +13 +-8 +10 +-10 +10 +-9 +9 +-10 +10 +-8 +11 +-10 +9 +-8 +11 +-8 +9 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-9 +11 +-7 +-41 +-11 +-21 +5 +-9 +11 +-7 +13 +-3 +15 +-3 +14 +-3 +16 +-4 +13 +-5 +15 +-4 +12 +-6 +13 +-5 +13 +-7 +12 +-5 +13 +-5 +12 +-5 +13 +25 +1 +17 +-3 +14 +-8 +10 +-8 +12 +-8 +9 +-10 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +10 +-7 +12 +-9 +10 +-8 +12 +-8 +9 +-9 +11 +-8 +-41 +-11 +-19 +5 +-10 +10 +-6 +15 +-3 +14 +-5 +14 +-3 +15 +-5 +13 +-4 +15 +-4 +12 +-5 +14 +-6 +12 +-6 +14 +-5 +12 +-6 +12 +-5 +12 +24 +0 +17 +-4 +13 +-8 +11 +-8 +10 +-10 +9 +-9 +11 +-10 +9 +-9 +11 +-9 +9 +-10 +10 +-9 +10 +-10 +11 +-8 +11 +-9 +10 +-8 +11 +-9 +-42 +-11 +-19 +4 +-11 +10 +-5 +14 +-4 +14 +-3 +16 +-3 +15 +-4 +16 +-3 +13 +-5 +14 +-3 +14 +-6 +12 +-5 +13 +-6 +11 +-6 +12 +-6 +11 +-7 +12 +-5 +11 +-7 +11 +-5 +12 +-8 +11 +-6 +12 +-7 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +24 +1 +16 +-7 +11 +-8 +11 +-9 +9 +-9 +11 +-10 +9 +-10 +11 +-8 +9 +-10 +11 +-7 +11 +-10 +10 +-8 +11 +-8 +10 +-8 +11 +-9 +10 +-9 +-41 +-10 +-21 +3 +-10 +12 +-5 +12 +-5 +15 +-3 +15 +-4 +15 +-3 +14 +-4 +14 +-3 +15 +-5 +13 +-5 +14 +-5 +11 +-7 +12 +-5 +12 +-7 +12 +-5 +12 +-6 +11 +-5 +13 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-7 +12 +-8 +10 +-8 +11 +-7 +9 +-8 +11 +25 +1 +15 +-6 +13 +-7 +11 +-10 +10 +-8 +10 +-10 +10 +-8 +11 +-10 +9 +-9 +11 +-8 +9 +-10 +11 +-8 +10 +-10 +10 +-8 +10 +-9 +10 +-7 +-40 +-11 +-21 +5 +-8 +12 +-6 +13 +-3 +15 +-3 +14 +-3 +15 +-4 +14 +-4 +15 +-4 +13 +-5 +13 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +13 +26 +1 +16 +-5 +13 +-8 +10 +-9 +11 +-8 +9 +-10 +10 +-8 +11 +-9 +10 +-8 +11 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +10 +-7 +12 +-8 +10 +-8 +12 +-8 +11 +-9 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +12 +-8 +10 +-8 +12 +-8 +11 +-9 +12 +-7 +10 +-9 +12 +-6 +12 +-9 +11 +-7 +13 +-7 +11 +-7 +12 +-8 +11 +-8 +12 +-7 +11 +-9 +11 +-6 +12 +-9 +11 +-7 +12 +-8 +10 +-8 +12 +-7 +-41 +-10 +-19 +5 +-10 +10 +-6 +15 +-3 +14 +-4 +15 +-2 +15 +-5 +14 +-3 +14 +-5 +13 +-4 +14 +-6 +12 +-6 +14 +-5 +11 +-7 +12 +-5 +12 +24 +1 +18 +-5 +13 +-7 +13 +-7 +10 +-9 +11 +-8 +11 +-10 +9 +-9 +11 +-9 +9 +-10 +10 +-10 +9 +-10 +11 +-8 +9 +-10 +11 +-7 +12 +-9 +-42 +-10 +-19 +4 +-11 +11 +-5 +14 +-4 +14 +-3 +15 +-4 +14 +-4 +15 +-4 +12 +-6 +14 +-4 +13 +-6 +12 +-5 +13 +-6 +12 +-6 +13 +-6 +12 +25 +2 +18 +-5 +13 +-7 +13 +-8 +10 +-10 +11 +-8 +10 +-10 +10 +-8 +10 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-8 +11 +-9 +11 +-7 +11 +-9 +10 +-7 +12 +-9 +11 +-8 +13 +-7 +10 +-9 +12 +-7 +12 +-9 +11 +-7 +12 +-8 +11 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +-40 +-9 +-19 +4 +-10 +12 +-5 +14 +-5 +15 +-3 +14 +-4 +14 +-3 +15 +-5 +13 +-4 +15 +-4 +12 +-6 +13 +-5 +12 +-7 +12 +-5 +12 +-7 +11 +-5 +13 +-7 +11 +-6 +13 +-6 +11 +-7 +12 +-6 +12 +-8 +12 +-5 +12 +-7 +11 +-5 +13 +-7 +11 +-6 +13 +-6 +11 +-7 +12 +-6 +12 +-8 +11 +-7 +11 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +25 +1 +15 +-6 +13 +-8 +10 +-10 +10 +-9 +9 +-10 +9 +-9 +10 +-10 +9 +-9 +11 +-9 +9 +-10 +11 +-8 +10 +-10 +10 +-8 +10 +-9 +10 +-8 +-40 +-11 +-21 +4 +-9 +11 +-7 +13 +-4 +16 +-3 +13 +-4 +15 +-4 +14 +-5 +14 +-4 +13 +-5 +13 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +13 +-5 +13 +-7 +13 +-5 +12 +-6 +12 +-5 +13 +-7 +11 +-7 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-8 +11 +-6 +11 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +9 +-9 +11 +-6 +11 +-9 +10 +-6 +11 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-8 +9 +-7 +11 +-8 +10 +-8 +12 +-6 +11 +-7 +12 +-6 +12 +-8 +10 +-6 +12 +-7 +11 +-7 +12 +-7 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +9 +-8 +11 +-8 +9 +-8 +11 +-8 +10 +-8 +11 +-6 +10 +24 +0 +18 +-4 +11 +-9 +11 +-8 +11 +-10 +10 +-9 +10 +-10 +9 +-9 +11 +-10 +9 +-10 +11 +-8 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +12 +-8 +11 +-7 +12 +-8 +11 +-8 +13 +-7 +10 +-9 +12 +-7 +12 +-9 +11 +-7 +11 +-8 +10 +-7 +12 +-9 +11 +-8 +13 +-7 +10 +-9 +12 +-6 +12 +-9 +11 +-7 +12 +-8 +11 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +-41 +-9 +-19 +3 +-11 +11 +-5 +14 +-5 +15 +-3 +15 +-4 +14 +-3 +15 +-5 +13 +-4 +15 +-4 +12 +-6 +13 +-5 +12 +-7 +12 +-5 +12 +-6 +11 +-6 +13 +-7 +11 +-7 +13 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +13 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +11 +-6 +11 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-9 +11 +-6 +11 +-9 +10 +-7 +11 +-7 +10 +-8 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +11 +-8 +10 +-8 +11 +-8 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-8 +10 +-8 +11 +-8 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-7 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-7 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +24 +-1 +15 +-5 +13 +-8 +10 +-9 +11 +-10 +9 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-10 +10 +-9 +10 +-10 +9 +-9 +11 +-10 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +12 +-8 +11 +-7 +13 +-8 +11 +-8 +12 +-7 +10 +-9 +11 +-7 +12 +-9 +11 +-7 +12 +-7 +11 +-8 +12 +-8 +-41 +-10 +-19 +5 +-11 +10 +-6 +15 +-4 +13 +-5 +15 +-3 +15 +-5 +14 +-3 +14 +-4 +13 +-4 +15 +-5 +13 +-5 +14 +-5 +11 +-7 +12 +-6 +12 +23 +0 +17 +-5 +12 +-9 +11 +-8 +10 +-10 +10 +-8 +11 +-10 +9 +-9 +11 +-8 +10 +-9 +11 +-8 +11 +-9 +11 +-7 +11 +-8 +11 +-7 +13 +-8 +-42 +-10 +-19 +5 +-11 +10 +-5 +15 +-4 +14 +-3 +16 +-3 +14 +-4 +15 +-3 +13 +-5 +14 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +13 +-6 +12 +-7 +13 +-5 +11 +-7 +12 +-5 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +23 +1 +16 +-6 +11 +-8 +11 +-10 +9 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-10 +10 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +-41 +-9 +-20 +3 +-11 +11 +-6 +13 +-6 +14 +-3 +14 +-5 +14 +-3 +15 +-5 +13 +-5 +14 +-5 +12 +-6 +13 +-5 +13 +-7 +13 +-5 +12 +-7 +11 +26 +2 +16 +-6 +12 +-7 +11 +-10 +9 +-9 +11 +-9 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +11 +-7 +12 +-9 +11 +-8 +12 +-8 +10 +-8 +-40 +-10 +-20 +4 +-9 +12 +-6 +13 +-4 +16 +-3 +14 +-4 +15 +-3 +14 +-5 +14 +-4 +14 +-5 +13 +-4 +14 +-6 +12 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +25 +-1 +15 +-6 +13 +-8 +9 +-10 +10 +-9 +10 +-11 +10 +-9 +10 +-10 +9 +-9 +11 +-10 +9 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-10 +11 +-8 +-42 +-11 +-21 +5 +-9 +10 +-6 +14 +-3 +16 +-4 +14 +-3 +16 +-3 +14 +-4 +15 +-4 +14 +-5 +14 +-4 +12 +-6 +12 +-5 +13 +-7 +11 +-6 +13 +-6 +11 +-7 +12 +-6 +12 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +13 +-6 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +23 +-1 +16 +-5 +12 +-10 +10 +-9 +10 +-10 +9 +-10 +10 +-10 +10 +-10 +11 +-8 +10 +-10 +11 +-7 +12 +-9 +11 +-8 +12 +-8 +10 +-8 +12 +-9 +-42 +-11 +-19 +5 +-11 +10 +-6 +15 +-4 +14 +-5 +15 +-3 +15 +-5 +14 +-4 +14 +-5 +12 +-4 +14 +-6 +12 +-5 +14 +-5 +11 +-7 +13 +-6 +12 +24 +1 +17 +-5 +12 +-8 +12 +-8 +10 +-10 +10 +-8 +11 +-10 +10 +-9 +11 +-9 +10 +-8 +12 +-8 +11 +-9 +11 +-8 +10 +-10 +10 +-8 +11 +-10 +-43 +-10 +-19 +5 +-11 +10 +-5 +14 +-4 +14 +-3 +16 +-4 +14 +-4 +15 +-3 +13 +-5 +14 +-4 +14 +-7 +12 +-5 +13 +-6 +12 +-6 +13 +-6 +12 +-6 +13 +-5 +11 +-7 +12 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +11 +-7 +10 +-8 +10 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +24 +1 +17 +-7 +11 +-8 +11 +-9 +9 +-9 +11 +-10 +10 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-10 +10 +-8 +12 +-8 +10 +-8 +12 +-8 +11 +-9 +-41 +-9 +-21 +3 +-11 +12 +-5 +12 +-5 +15 +-2 +16 +-4 +14 +-3 +15 +-4 +13 +-5 +14 +-5 +13 +-5 +15 +-4 +12 +-6 +13 +-5 +13 +-7 +11 +-6 +12 +-6 +11 +-6 +13 +-7 +11 +-7 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-8 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +25 +-1 +15 +-6 +13 +-8 +9 +-10 +10 +-9 +10 +-11 +10 +-9 +10 +-10 +9 +-9 +11 +-10 +10 +-9 +12 +-8 +10 +-10 +11 +-8 +11 +-10 +10 +-8 +-41 +-10 +-21 +5 +-9 +11 +-6 +13 +-3 +16 +-5 +14 +-4 +16 +-4 +13 +-5 +14 +-4 +13 +-6 +13 +-5 +13 +-6 +12 +-5 +14 +-7 +12 +-6 +14 +26 +0 +16 +-4 +14 +-7 +10 +-8 +11 +-9 +10 +-10 +11 +-8 +9 +-10 +10 +-8 +11 +-10 +10 +-9 +11 +-9 +10 +-9 +12 +-9 +10 +-9 +12 +-8 +-42 +-11 +-20 +6 +-9 +10 +-6 +14 +-3 +15 +-4 +15 +-3 +15 +-4 +14 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +13 +-5 +13 +-7 +12 +-5 +12 +25 +1 +18 +-4 +13 +-8 +11 +-7 +11 +-10 +10 +-8 +11 +-9 +10 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-10 +10 +-8 +11 +-10 +10 +-8 +12 +-8 +-43 +-11 +-19 +4 +-11 +10 +-5 +15 +-5 +14 +-4 +16 +-3 +14 +-4 +15 +-3 +15 +-6 +13 +-4 +13 +-6 +12 +-5 +14 +-6 +12 +-6 +14 +-5 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +24 +1 +17 +-6 +12 +-7 +12 +-10 +9 +-10 +10 +-10 +8 +-11 +10 +-9 +10 +-11 +10 +-9 +10 +-10 +10 +-8 +11 +-10 +10 +-9 +12 +-8 +10 +-9 +-41 +-9 +-19 +4 +-10 +12 +-6 +13 +-5 +16 +-3 +14 +-4 +15 +-3 +15 +-5 +13 +-4 +15 +-5 +12 +-5 +14 +-5 +13 +-6 +13 +-5 +12 +-7 +12 +-5 +13 +-7 +11 +-6 +13 +-6 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +25 +-1 +16 +-6 +14 +-7 +10 +-10 +10 +-9 +10 +-11 +9 +-9 +10 +-10 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-10 +11 +-8 +11 +-10 +10 +-8 +-41 +-10 +-21 +4 +-10 +11 +-6 +13 +-3 +15 +-5 +14 +-4 +16 +-3 +13 +-5 +15 +-3 +14 +-5 +14 +-4 +14 +-5 +12 +-5 +14 +-6 +12 +-6 +14 +26 +0 +16 +-5 +14 +-7 +10 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-10 +10 +-8 +11 +-10 +10 +-9 +12 +-9 +10 +-9 +12 +-8 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +11 +-8 +12 +-8 +10 +-9 +12 +-8 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +11 +-8 +12 +-8 +10 +-8 +13 +-7 +12 +-8 +13 +-7 +11 +-8 +11 +-7 +12 +-9 +11 +-7 +13 +-7 +11 +-8 +12 +-7 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +11 +-8 +13 +-7 +-42 +-10 +-19 +5 +-10 +10 +-5 +15 +-4 +14 +-4 +16 +-3 +14 +-5 +15 +-3 +15 +-5 +13 +-4 +14 +-5 +12 +-5 +14 +-6 +13 +-6 +14 +-5 +12 +25 +1 +18 +-5 +11 +-9 +11 +-9 +10 +-11 +10 +-8 +10 +-9 +10 +-8 +12 +-9 +10 +-9 +12 +-9 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +-42 +-9 +-19 +4 +-11 +10 +-5 +14 +-5 +14 +-3 +16 +-3 +14 +-4 +16 +-3 +14 +-5 +15 +-4 +13 +-5 +13 +-4 +14 +-6 +12 +-6 +14 +-6 +11 +25 +2 +18 +-5 +12 +-7 +12 +-9 +10 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-10 +10 +-9 +11 +-9 +10 +-9 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +12 +-10 +10 +-8 +12 +-8 +10 +-8 +12 +-8 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +11 +-8 +12 +-8 +10 +-8 +12 +-8 +11 +-9 +-41 +-9 +-21 +3 +-11 +12 +-6 +12 +-6 +14 +-3 +15 +-5 +14 +-4 +15 +-4 +14 +-3 +15 +-5 +13 +-5 +15 +-5 +12 +-7 +13 +-5 +13 +-7 +11 +-5 +13 +-6 +11 +-6 +13 +-7 +11 +-7 +12 +-6 +11 +-8 +12 +-5 +12 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +12 +-8 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +11 +-8 +10 +-9 +11 +25 +-1 +15 +-6 +13 +-8 +9 +-10 +10 +-8 +10 +-11 +10 +-9 +11 +-9 +10 +-9 +11 +-9 +10 +-9 +12 +-8 +10 +-10 +11 +-8 +11 +-10 +10 +-8 +-41 +-10 +-21 +4 +-10 +10 +-7 +13 +-3 +16 +-4 +14 +-4 +16 +-3 +14 +-5 +15 +-4 +14 +-6 +13 +-5 +13 +-6 +12 +-4 +14 +-6 +12 +-6 +14 +-5 +11 +-7 +12 +-6 +12 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +12 +-6 +12 +-8 +10 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +12 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-7 +10 +-9 +10 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-7 +11 +-7 +12 +-7 +11 +-7 +13 +-6 +10 +-8 +11 +-6 +12 +23 +-1 +17 +-5 +12 +-10 +10 +-9 +9 +-10 +9 +-9 +11 +-10 +9 +-9 +11 +-9 +9 +-10 +11 +-8 +11 +-10 +11 +-8 +11 +-9 +11 +-7 +12 +-9 +11 +-8 +13 +-7 +11 +-9 +12 +-7 +12 +-9 +11 +-7 +11 +-9 +10 +-8 +12 +-9 +10 +-8 +13 +-7 +11 +-9 +12 +-7 +12 +-9 +11 +-7 +11 +-9 +10 +-8 +12 +-9 +10 +-9 +12 +-8 +10 +-10 +11 +-8 +11 +-10 +11 +-8 +12 +-8 +10 +-8 +12 +-9 +10 +-9 +12 +-7 +10 +-9 +12 +-7 +12 +-9 +-42 +-9 +-20 +4 +-11 +11 +-5 +13 +-5 +14 +-3 +16 +-5 +14 +-4 +16 +-3 +13 +-5 +15 +-4 +14 +-6 +14 +-4 +13 +-6 +13 +-4 +14 +-6 +12 +-6 +13 +-6 +11 +-8 +12 +-6 +12 +-8 +11 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +12 +-6 +12 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +-8 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-7 +13 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +11 +-7 +11 +-8 +11 +-6 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +12 +-6 +12 +-8 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +12 +-6 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +12 +-8 +11 +-7 +12 +-6 +10 +-8 +12 +-6 +12 +-9 +10 +-7 +11 +-8 +10 +-8 +11 +24 +-1 +15 +-5 +13 +-9 +10 +-9 +11 +-9 +9 +-10 +11 +-9 +10 +-10 +10 +-8 +10 +-10 +10 +-8 +11 +-10 +10 +-9 +12 +-8 +10 +-9 +12 +-8 +11 +-10 +11 +-8 +11 +-9 +10 +-8 +12 +-9 +10 +-9 +12 +-8 +10 +-9 +12 +-8 +11 +-10 +11 +-7 +11 +-8 +11 +-7 +13 +-8 +11 +-8 +12 +-7 +-42 +-11 +-19 +6 +-10 +10 +-6 +15 +-4 +15 +-4 +16 +-2 +15 +-4 +14 +-3 +15 +-5 +13 +-5 +15 +-5 +12 +-6 +13 +-5 +13 +-7 +13 +-5 +12 +25 +1 +18 +-4 +12 +-8 +11 +-8 +11 +-10 +9 +-9 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +12 +-7 +10 +-9 +11 +-7 +12 +-9 +11 +-8 +12 +-8 +-42 +-10 +-20 +4 +-11 +10 +-5 +14 +-5 +14 +-3 +16 +-3 +14 +-4 +15 +-3 +14 +-5 +14 +-4 +13 +-6 +12 +-5 +13 +-7 +12 +-6 +14 +-5 +11 +-7 +13 +-5 +12 +-8 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +23 +1 +17 +-7 +11 +-8 +11 +-9 +8 +-11 +10 +-10 +9 +-11 +10 +-9 +10 +-10 +10 +-8 +11 +-10 +10 +-9 +12 +-8 +10 +-10 +11 +-8 +11 +-9 +-41 +-9 +-20 +4 +-10 +12 +-5 +13 +-5 +15 +-2 +16 +-5 +14 +-4 +15 +-4 +13 +-5 +14 +-5 +13 +-6 +14 +-5 +12 +-7 +13 +-5 +13 +-7 +12 +26 +2 +18 +-5 +13 +-7 +11 +-9 +10 +-8 +11 +-10 +9 +-9 +11 +-9 +9 +-10 +11 +-9 +10 +-11 +10 +-9 +10 +-9 +10 +-8 +12 +-9 +10 +-9 +-41 +-10 +-22 +3 +-10 +12 +-6 +13 +-4 +16 +-4 +15 +-4 +16 +-3 +14 +-5 +14 +-3 +14 +-6 +13 +-5 +14 +-5 +12 +-6 +13 +-6 +12 +-7 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +11 +-6 +13 +-6 +11 +-7 +12 +-7 +11 +-8 +11 +-6 +11 +-8 +11 +-6 +13 +-8 +11 +-7 +12 +-7 +10 +-8 +12 +25 +0 +15 +-6 +13 +-9 +10 +-10 +11 +-9 +9 +-11 +10 +-8 +11 +-10 +10 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +12 +-7 +11 +-9 +12 +-7 +-40 +-11 +-21 +5 +-9 +11 +-7 +13 +-4 +14 +-4 +14 +-3 +15 +-5 +14 +-4 +16 +-4 +13 +-6 +14 +-4 +13 +-7 +12 +-6 +12 +-7 +11 +-6 +13 +-7 +11 +-7 +13 +-6 +11 +-8 +12 +-5 +12 +-8 +11 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +11 +-8 +12 +-6 +12 +-9 +10 +-7 +11 +24 +-1 +16 +-5 +12 +-9 +10 +-9 +11 +-11 +9 +-10 +11 +-9 +9 +-10 +11 +-8 +11 +-10 +11 +-7 +12 +-8 +11 +-8 +12 +-9 +10 +-9 +12 +-8 +-43 +-12 +-21 +4 +-11 +9 +-7 +14 +-4 +14 +-4 +15 +-3 +14 +-5 +14 +-3 +15 +-6 +12 +-5 +14 +-5 +11 +-7 +13 +-6 +12 +-7 +12 +-6 +12 +25 +1 +18 +-4 +12 +-9 +11 +-8 +11 +-10 +10 +-8 +12 +-8 +10 +-8 +12 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +12 +-10 +10 +-8 +12 +-8 +-42 +-10 +-19 +5 +-10 +10 +-5 +15 +-5 +14 +-4 +16 +-3 +14 +-5 +15 +-3 +15 +-6 +13 +-4 +14 +-6 +12 +-6 +13 +-6 +12 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-8 +11 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-9 +10 +-8 +11 +-8 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-9 +10 +-8 +12 +-7 +10 +24 +1 +17 +-6 +12 +-8 +12 +-10 +10 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-11 +9 +-9 +11 +-10 +9 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-10 +-42 +-10 +-20 +3 +-11 +11 +-5 +14 +-5 +15 +-3 +15 +-4 +14 +-3 +16 +-5 +14 +-4 +15 +-4 +12 +-6 +13 +-5 +13 +-7 +12 +-5 +12 +-7 +11 +-6 +13 +-7 +11 +-7 +13 +-6 +11 +-8 +12 +-6 +12 +-8 +11 +-7 +11 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +12 +-6 +12 +-8 +11 +-7 +11 +-8 +10 +-8 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-8 +11 +-8 +10 +-8 +11 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +26 +1 +15 +-6 +13 +-7 +11 +-11 +9 +-9 +10 +-10 +9 +-9 +11 +-10 +10 +-9 +12 +-8 +10 +-10 +11 +-7 +11 +-9 +11 +-7 +12 +-8 +11 +-8 +-40 +-10 +-21 +4 +-9 +12 +-7 +13 +-4 +16 +-3 +14 +-5 +15 +-4 +14 +-6 +14 +-4 +13 +-6 +13 +-5 +14 +-6 +12 +-6 +14 +-6 +11 +-7 +12 +26 +1 +16 +-5 +14 +-8 +11 +-9 +11 +-8 +10 +-10 +10 +-8 +11 +-10 +9 +-9 +11 +-9 +10 +-9 +12 +-8 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +-40 +-11 +-21 +5 +-9 +11 +-7 +13 +-4 +15 +-4 +14 +-4 +15 +-5 +14 +-5 +15 +-4 +13 +-5 +14 +-3 +14 +-6 +12 +-5 +13 +-6 +11 +-7 +12 +25 +0 +16 +-4 +14 +-9 +10 +-9 +11 +-9 +9 +-10 +11 +-9 +10 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +10 +-9 +12 +-8 +10 +-9 +12 +-8 +-41 +-11 +-20 +5 +-10 +11 +-6 +15 +-3 +14 +-4 +15 +-2 +16 +-5 +13 +-4 +15 +-5 +12 +-6 +14 +-5 +13 +-6 +13 +-5 +12 +-7 +12 +-5 +13 +-7 +11 +-6 +13 +-6 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +13 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +11 +-7 +13 +-7 +10 +-8 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +23 +0 +17 +-6 +11 +-10 +11 +-9 +9 +-11 +9 +-9 +10 +-11 +9 +-9 +11 +-9 +9 +-10 +11 +-9 +10 +-10 +11 +-8 +10 +-10 +10 +-8 +11 +-10 +-43 +-10 +-19 +5 +-12 +10 +-5 +14 +-5 +14 +-4 +15 +-4 +14 +-4 +16 +-3 +13 +-5 +14 +-4 +14 +-7 +12 +-5 +14 +-6 +12 +-6 +13 +-6 +12 +-6 +14 +-5 +12 +-7 +13 +-5 +13 +-8 +11 +-7 +12 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +25 +1 +17 +-6 +12 +-7 +12 +-9 +10 +-9 +11 +-9 +9 +-11 +10 +-9 +10 +-11 +10 +-9 +10 +-10 +9 +-9 +11 +-10 +10 +-10 +12 +-8 +10 +-10 +-42 +-9 +-20 +3 +-11 +12 +-5 +14 +-5 +15 +-3 +15 +-4 +14 +-3 +15 +-5 +13 +-4 +15 +-4 +12 +-6 +14 +-5 +13 +-6 +13 +-5 +13 +-6 +12 +27 +2 +17 +-6 +13 +-7 +11 +-11 +9 +-10 +10 +-10 +9 +-10 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +12 +-10 +10 +-9 +12 +-9 +10 +-9 +12 +-8 +11 +-9 +12 +-8 +11 +-9 +11 +-7 +12 +-9 +11 +-8 +13 +-7 +10 +-9 +12 +-7 +12 +-9 +12 +-7 +12 +-8 +12 +-6 +13 +-9 +10 +-8 +12 +-8 +10 +-9 +12 +-7 +12 +-9 +12 +-7 +12 +-8 +11 +-7 +13 +-9 +11 +-8 +13 +-8 +10 +-9 +12 +-7 +12 +-9 +12 +-7 +11 +-9 +11 +-7 +-40 +-10 +-20 +5 +-8 +12 +-6 +14 +-3 +16 +-3 +14 +-3 +16 +-4 +14 +-4 +15 +-3 +13 +-5 +14 +-4 +14 +-7 +12 +-6 +13 +-6 +11 +-7 +12 +25 +0 +16 +-5 +14 +-8 +11 +-9 +12 +-8 +10 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +10 +-9 +12 +-8 +10 +-10 +11 +-7 +-41 +-11 +-20 +5 +-9 +11 +-6 +14 +-3 +15 +-4 +14 +-3 +15 +-5 +13 +-5 +15 +-4 +12 +-6 +14 +-4 +13 +-6 +13 +-5 +13 +-6 +12 +-5 +13 +25 +0 +17 +-4 +14 +-9 +10 +-9 +11 +-9 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +11 +-8 +12 +-10 +10 +-8 +12 +-8 +10 +-9 +12 +-8 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +10 +-8 +13 +-7 +10 +-9 +12 +-7 +11 +-9 +12 +-7 +11 +-8 +11 +-7 +13 +-9 +11 +-8 +13 +-7 +-42 +-11 +-20 +5 +-10 +10 +-6 +15 +-4 +14 +-4 +15 +-3 +14 +-5 +14 +-3 +15 +-5 +13 +-5 +14 +-5 +12 +-7 +13 +-6 +12 +-7 +13 +-5 +12 +-7 +12 +-5 +13 +-7 +11 +-6 +13 +-6 +11 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-7 +12 +-5 +13 +-8 +11 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +-8 +11 +-7 +10 +-8 +10 +-7 +12 +-8 +10 +-7 +13 +-6 +10 +-8 +12 +-6 +12 +-8 +11 +-6 +11 +-8 +10 +-7 +12 +-8 +11 +-7 +12 +-6 +10 +24 +1 +18 +-5 +11 +-8 +12 +-9 +10 +-11 +10 +-9 +9 +-11 +10 +-9 +11 +-11 +9 +-9 +11 +-9 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +-42 +-9 +-19 +3 +-11 +11 +-5 +14 +-5 +14 +-3 +15 +-4 +14 +-3 +15 +-4 +14 +-5 +15 +-4 +12 +-7 +13 +-5 +13 +-7 +12 +-5 +13 +-6 +11 +-6 +13 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-8 +10 +-8 +12 +-7 +10 +-9 +10 +-7 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-6 +13 +-6 +10 +-8 +12 +-7 +11 +-8 +11 +-7 +10 +-8 +10 +-7 +12 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-7 +10 +-9 +10 +-7 +11 +-9 +10 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +13 +-6 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +25 +-1 +16 +-5 +13 +-8 +9 +-10 +11 +-10 +9 +-11 +10 +-9 +9 +-10 +10 +-8 +11 +-10 +10 +-9 +12 +-9 +9 +-10 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +11 +-7 +12 +-9 +11 +-8 +13 +-7 +11 +-9 +12 +-7 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +11 +-7 +13 +-7 +11 +-9 +12 +-7 +12 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +11 +-8 +13 +-7 +11 +-9 +12 +-7 +12 +-9 +12 +-7 +12 +-8 +11 +-7 +13 +-9 +11 +-8 +13 +-7 +-42 +-10 +-19 +6 +-10 +10 +-6 +14 +-5 +14 +-5 +15 +-3 +14 +-5 +14 +-3 +15 +-5 +13 +-4 +14 +-5 +12 +-6 +13 +-6 +12 +-7 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +13 +-6 +10 +-8 +12 +-6 +12 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +11 +-7 +13 +-6 +10 +-8 +12 +-6 +12 +-8 +11 +-7 +11 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-6 +11 +-8 +12 +-6 +12 +-8 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +10 +25 +1 +16 +-7 +12 +-7 +11 +-10 +9 +-9 +10 +-12 +8 +-11 +10 +-10 +8 +-11 +10 +-9 +10 +-11 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +11 +-8 +13 +-7 +11 +-9 +12 +-7 +12 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +11 +-9 +13 +-7 +11 +-9 +12 +-6 +12 +-9 +11 +-7 +12 +-8 +11 +-8 +-41 +-11 +-21 +4 +-9 +12 +-7 +13 +-4 +16 +-2 +14 +-4 +16 +-3 +15 +-5 +14 +-4 +13 +-6 +12 +-5 +14 +-7 +12 +-6 +13 +-6 +11 +-7 +13 +27 +2 +16 +-5 +14 +-7 +11 +-10 +11 +-9 +9 +-11 +10 +-9 +10 +-11 +9 +-9 +11 +-9 +10 +-9 +11 +-9 +11 +-9 +12 +-8 +10 +-9 +11 +-7 +-41 +-12 +-21 +5 +-9 +11 +-6 +14 +-3 +15 +-3 +14 +-3 +16 +-4 +14 +-4 +16 +-3 +13 +-5 +14 +-4 +14 +-6 +13 +-5 +13 +-6 +11 +-6 +13 +-7 +11 +-7 +13 +-6 +10 +-8 +12 +-6 +12 +-8 +11 +-6 +12 +-7 +11 +-6 +13 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +24 +-1 +16 +-5 +12 +-9 +11 +-8 +11 +-10 +10 +-9 +11 +-9 +9 +-11 +10 +-9 +10 +-11 +10 +-9 +10 +-10 +9 +-9 +11 +-10 +10 +-9 +12 +-8 +-43 +-11 +-20 +5 +-10 +10 +-6 +15 +-3 +15 +-4 +16 +-3 +14 +-5 +14 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +14 +-6 +12 +-7 +13 +-5 +12 +25 +1 +18 +-4 +12 +-9 +11 +-8 +11 +-11 +9 +-9 +10 +-10 +10 +-8 +12 +-9 +10 +-9 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +-42 +-9 +-19 +4 +-11 +11 +-4 +15 +-5 +14 +-3 +16 +-3 +14 +-4 +15 +-4 +14 +-5 +14 +-4 +13 +-6 +13 +-4 +14 +-7 +12 +-6 +14 +-5 +11 +-7 +13 +-5 +12 +-7 +12 +-5 +12 +-7 +11 +-6 +13 +-7 +11 +-7 +13 +-6 +11 +-8 +12 +-6 +12 +-8 +12 +-6 +12 +-7 +10 +-7 +12 +-8 +10 +24 +1 +16 +-7 +11 +-8 +11 +-9 +9 +-10 +10 +-10 +10 +-11 +10 +-8 +10 +-10 +10 +-8 +11 +-10 +9 +-9 +11 +-9 +9 +-10 +11 +-8 +11 +-10 +-42 +-10 +-21 +3 +-11 +12 +-5 +13 +-4 +15 +-2 +16 +-4 +14 +-3 +15 +-4 +13 +-5 +14 +-5 +13 +-6 +14 +-5 +12 +-6 +13 +-5 +13 +-7 +11 +-6 +13 +-6 +11 +-7 +12 +-6 +12 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +11 +-8 +11 +25 +1 +16 +-6 +12 +-7 +11 +-11 +9 +-9 +10 +-10 +8 +-10 +10 +-10 +10 +-10 +11 +-8 +10 +-9 +11 +-7 +12 +-10 +10 +-8 +12 +-8 +10 +-9 +-41 +-10 +-20 +4 +-9 +12 +-6 +13 +-4 +16 +-3 +14 +-5 +15 +-3 +14 +-6 +13 +-4 +14 +-5 +12 +-5 +14 +-6 +12 +-6 +14 +-5 +12 +-7 +12 +27 +2 +16 +-6 +13 +-7 +11 +-10 +10 +-9 +10 +-10 +10 +-8 +11 +-10 +10 +-9 +12 +-8 +9 +-10 +11 +-7 +11 +-9 +11 +-7 +11 +-9 +10 +-8 +-41 +-11 +-21 +4 +-9 +11 +-7 +12 +-4 +15 +-4 +13 +-5 +15 +-4 +14 +-5 +14 +-4 +13 +-6 +12 +-4 +14 +-7 +12 +-6 +14 +-6 +11 +-7 +12 +-6 +12 +-8 +12 +-6 +12 +-7 +11 +-6 +12 +-8 +11 +-7 +13 +-6 +11 +-7 +12 +-6 +12 +-8 +12 +-6 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +12 +-6 +11 +-9 +11 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +24 +-1 +15 +-5 +13 +-9 +9 +-10 +11 +-9 +8 +-11 +10 +-9 +10 +-10 +11 +-8 +10 +-9 +11 +-7 +12 +-9 +10 +-9 +12 +-8 +10 +-10 +11 +-8 +-42 +-11 +-20 +5 +-10 +10 +-6 +15 +-3 +14 +-4 +15 +-2 +15 +-5 +13 +-4 +14 +-5 +12 +-5 +14 +-5 +13 +-6 +14 +-5 +12 +-7 +12 +-5 +12 +-8 +11 +-6 +12 +-6 +11 +-7 +12 +-6 +11 +-8 +12 +-6 +11 +-8 +11 +-5 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +12 +-6 +11 +-8 +10 +-7 +12 +-9 +10 +-8 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +10 +-7 +11 +-9 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +23 +-1 +17 +-5 +12 +-9 +11 +-8 +10 +-10 +9 +-9 +11 +-10 +9 +-9 +12 +-8 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +-42 +-10 +-19 +5 +-11 +10 +-5 +15 +-4 +13 +-4 +15 +-4 +14 +-5 +14 +-4 +14 +-5 +13 +-4 +15 +-6 +12 +-5 +14 +-5 +11 +-7 +13 +-5 +12 +24 +1 +18 +-5 +13 +-8 +12 +-8 +10 +-10 +10 +-8 +11 +-10 +9 +-9 +11 +-9 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +10 +-8 +11 +-10 +-43 +-10 +-20 +4 +-12 +10 +-5 +14 +-4 +14 +-3 +16 +-4 +14 +-4 +16 +-3 +13 +-5 +14 +-4 +14 +-6 +12 +-5 +13 +-6 +12 +-5 +13 +-6 +12 +25 +2 +18 +-5 +12 +-7 +13 +-8 +10 +-10 +11 +-8 +11 +-10 +10 +-8 +10 +-9 +10 +-8 +12 +-9 +10 +-9 +12 +-8 +10 +-10 +11 +-8 +11 +-10 +-42 +-10 +-20 +4 +-11 +11 +-5 +13 +-5 +14 +-2 +16 +-4 +14 +-3 +16 +-3 +14 +-4 +15 +-4 +13 +-6 +14 +-4 +12 +-6 +13 +-4 +14 +-6 +12 +-5 +13 +-6 +11 +-7 +12 +-6 +11 +-8 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +25 +1 +16 +-7 +12 +-7 +10 +-10 +10 +-9 +11 +-10 +9 +-9 +11 +-8 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +10 +-8 +-40 +-10 +-21 +3 +-10 +12 +-5 +12 +-5 +15 +-4 +14 +-5 +15 +-3 +13 +-5 +13 +-4 +14 +-6 +12 +-5 +14 +-5 +11 +-7 +13 +-5 +12 +-7 +12 +-5 +12 +-7 +11 +-5 +13 +-7 +11 +-7 +13 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-7 +11 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +25 +0 +15 +-6 +12 +-8 +10 +-11 +10 +-9 +9 +-10 +9 +-8 +11 +-10 +9 +-9 +11 +-9 +9 +-10 +11 +-8 +11 +-9 +11 +-7 +11 +-8 +11 +-7 +-40 +-11 +-21 +4 +-9 +11 +-7 +13 +-3 +15 +-3 +14 +-3 +16 +-4 +14 +-5 +15 +-4 +12 +-6 +13 +-4 +13 +-7 +12 +-5 +14 +-6 +11 +-6 +13 +26 +1 +17 +-4 +14 +-8 +10 +-9 +11 +-9 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +12 +-9 +11 +-7 +12 +-8 +11 +-7 +13 +-8 +11 +-8 +13 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +11 +-9 +10 +-9 +11 +-9 +10 +-9 +12 +-7 +10 +-8 +12 +-6 +13 +-8 +11 +-7 +13 +-7 +11 +-7 +12 +-8 +11 +-8 +13 +-7 +11 +-9 +12 +-6 +12 +-9 +11 +-7 +12 +-8 +11 +-8 +12 +-8 +-41 +-10 +-19 +5 +-11 +10 +-6 +15 +-3 +14 +-4 +16 +-2 +15 +-4 +14 +-3 +14 +-5 +13 +-4 +14 +-6 +12 +-6 +14 +-5 +11 +-7 +12 +-6 +12 +23 +0 +17 +-5 +12 +-8 +11 +-8 +10 +-10 +10 +-8 +11 +-10 +9 +-9 +11 +-8 +9 +-9 +11 +-8 +11 +-9 +11 +-7 +11 +-9 +11 +-7 +12 +-9 +-42 +-10 +-19 +5 +-11 +10 +-5 +15 +-4 +14 +-4 +16 +-4 +14 +-4 +15 +-3 +13 +-5 +13 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +13 +-6 +12 +24 +2 +18 +-5 +12 +-7 +13 +-8 +10 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-8 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-9 +11 +-8 +13 +-7 +11 +-8 +12 +-7 +12 +-9 +11 +-8 +12 +-8 +11 +-8 +12 +-8 +11 +-8 +13 +-7 +11 +-9 +-41 +-9 +-19 +3 +-11 +11 +-5 +14 +-5 +15 +-3 +15 +-4 +14 +-3 +15 +-4 +13 +-4 +15 +-4 +12 +-6 +14 +-4 +13 +-7 +12 +-5 +12 +-7 +11 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +11 +-7 +10 +-7 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +12 +-6 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +11 +-8 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +25 +1 +15 +-6 +12 +-7 +11 +-11 +10 +-9 +9 +-10 +9 +-9 +10 +-11 +8 +-10 +11 +-9 +9 +-10 +11 +-7 +11 +-9 +11 +-8 +11 +-9 +10 +-8 +-41 +-12 +-21 +4 +-9 +11 +-7 +13 +-3 +16 +-3 +14 +-3 +16 +-3 +14 +-5 +14 +-4 +13 +-6 +13 +-4 +13 +-7 +12 +-5 +14 +-5 +11 +-7 +13 +-6 +12 +-7 +12 +-5 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-8 +12 +-7 +9 +-9 +11 +-6 +12 +-8 +11 +-6 +12 +-7 +11 +-6 +12 +-8 +10 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-7 +11 +-8 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +11 +-7 +10 +-8 +10 +-6 +11 +-9 +9 +-8 +11 +-8 +9 +-8 +12 +-7 +11 +-7 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +12 +-8 +12 +-6 +10 +23 +0 +17 +-5 +11 +-9 +10 +-8 +10 +-11 +9 +-9 +10 +-10 +9 +-9 +11 +-10 +10 +-9 +12 +-8 +10 +-9 +11 +-8 +11 +-10 +9 +-9 +11 +-9 +10 +-8 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-10 +10 +-8 +12 +-7 +10 +-8 +12 +-8 +11 +-9 +12 +-7 +11 +-9 +11 +-7 +12 +-9 +10 +-8 +12 +-8 +10 +-8 +12 +-8 +11 +-9 +12 +-7 +11 +-8 +11 +-6 +12 +-9 +10 +-8 +12 +-8 +10 +-8 +12 +-7 +12 +-8 +12 +-6 +12 +-8 +-40 +-8 +-18 +4 +-10 +11 +-5 +14 +-5 +14 +-3 +15 +-4 +14 +-3 +15 +-4 +14 +-4 +15 +-4 +12 +-6 +13 +-4 +13 +-6 +12 +-5 +13 +-6 +11 +-6 +13 +-6 +11 +-7 +12 +-6 +11 +-7 +12 +-5 +13 +-7 +11 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +11 +-8 +9 +-8 +11 +-8 +10 +-9 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-9 +10 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-7 +11 +-9 +10 +-7 +11 +-7 +10 +-6 +12 +-7 +11 +-7 +13 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +25 +-1 +15 +-5 +13 +-8 +9 +-10 +11 +-9 +9 +-10 +10 +-9 +9 +-10 +10 +-8 +11 +-10 +10 +-8 +12 +-8 +10 +-9 +12 +-8 +11 +-9 +11 +-7 +10 +-9 +11 +-7 +12 +-9 +11 +-8 +12 +-7 +10 +-9 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-7 +12 +-10 +10 +-9 +12 +-8 +9 +-10 +11 +-9 +-42 +-12 +-20 +5 +-10 +11 +-5 +15 +-3 +14 +-4 +15 +-2 +15 +-5 +13 +-4 +15 +-4 +12 +-5 +14 +-5 +12 +-6 +13 +-5 +11 +-7 +12 +-5 +13 +24 +0 +17 +-4 +13 +-9 +11 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +12 +-7 +10 +-9 +12 +-7 +12 +-9 +11 +-8 +11 +-9 +10 +-8 +12 +-9 +-42 +-11 +-19 +5 +-11 +10 +-5 +15 +-3 +14 +-4 +15 +-3 +14 +-5 +14 +-4 +13 +-5 +13 +-4 +14 +-6 +12 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-7 +12 +-5 +11 +-7 +11 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +12 +-6 +12 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +23 +0 +17 +-5 +11 +-8 +11 +-9 +10 +-10 +10 +-9 +9 +-11 +9 +-9 +10 +-11 +9 +-9 +11 +-9 +9 +-9 +11 +-8 +11 +-9 +12 +-7 +11 +-8 +-41 +-9 +-19 +3 +-11 +11 +-5 +14 +-5 +14 +-3 +15 +-4 +13 +-4 +15 +-5 +13 +-6 +14 +-4 +12 +-6 +12 +-5 +13 +-7 +11 +-6 +13 +-6 +11 +24 +2 +17 +-5 +12 +-7 +12 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +10 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-9 +-41 +-9 +-19 +4 +-10 +12 +-4 +14 +-4 +15 +-2 +14 +-4 +14 +-3 +15 +-5 +12 +-5 +14 +-4 +12 +-6 +13 +-4 +13 +-7 +12 +-5 +12 +-6 +12 +-5 +13 +-7 +11 +-7 +13 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +24 +0 +15 +-7 +12 +-7 +10 +-10 +9 +-9 +10 +-11 +9 +-9 +11 +-9 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-10 +10 +-7 +11 +-10 +10 +-8 +-40 +-10 +-21 +4 +-9 +11 +-6 +13 +-4 +15 +-4 +14 +-4 +16 +-3 +13 +-5 +14 +-3 +14 +-6 +13 +-4 +13 +-6 +12 +-5 +13 +-7 +11 +-7 +13 +-6 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +11 +-7 +11 +-6 +13 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-7 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +24 +0 +15 +-5 +12 +-10 +9 +-10 +10 +-10 +8 +-11 +10 +-9 +10 +-10 +11 +-8 +11 +-9 +10 +-8 +11 +-10 +10 +-9 +11 +-8 +9 +-9 +11 +-7 +-41 +-11 +-20 +5 +-10 +11 +-6 +14 +-3 +14 +-4 +14 +-2 +15 +-5 +13 +-4 +14 +-5 +12 +-6 +13 +-5 +12 +-6 +13 +-5 +12 +-6 +12 +-5 +13 +25 +1 +17 +-3 +14 +-8 +11 +-7 +11 +-9 +9 +-9 +11 +-10 +9 +-10 +11 +-8 +9 +-10 +10 +-7 +11 +-9 +10 +-8 +12 +-8 +10 +-8 +12 +-8 +-42 +-11 +-19 +5 +-11 +10 +-6 +15 +-3 +14 +-4 +15 +-2 +15 +-5 +14 +-3 +14 +-4 +13 +-4 +15 +-5 +13 +-5 +14 +-5 +11 +-7 +13 +-5 +13 +-7 +11 +-5 +12 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +11 +-6 +11 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +23 +1 +16 +-7 +11 +-8 +12 +-8 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-9 +9 +-8 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +-41 +-9 +-19 +4 +-11 +11 +-5 +13 +-5 +14 +-3 +15 +-5 +13 +-4 +15 +-4 +12 +-5 +14 +-4 +14 +-5 +14 +-4 +13 +-6 +12 +-5 +13 +-7 +11 +-6 +12 +-6 +10 +-8 +12 +-6 +11 +-8 +12 +-6 +11 +-7 +11 +-5 +12 +-7 +11 +-6 +13 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +25 +1 +16 +-6 +13 +-7 +11 +-9 +10 +-8 +11 +-11 +9 +-9 +11 +-9 +9 +-10 +10 +-9 +10 +-10 +10 +-8 +10 +-10 +9 +-8 +11 +-10 +9 +-9 +-40 +-10 +-21 +4 +-9 +12 +-5 +13 +-3 +16 +-3 +15 +-4 +15 +-3 +13 +-5 +13 +-4 +14 +-6 +12 +-5 +14 +-5 +11 +-6 +12 +-6 +11 +-7 +13 +26 +1 +16 +-5 +14 +-6 +10 +-9 +11 +-8 +11 +-10 +10 +-8 +10 +-9 +10 +-8 +11 +-9 +10 +-9 +11 +-8 +9 +-9 +11 +-7 +11 +-9 +11 +-7 +-41 +-10 +-21 +4 +-9 +10 +-6 +14 +-2 +16 +-4 +14 +-3 +16 +-3 +13 +-5 +14 +-4 +14 +-6 +13 +-4 +13 +-6 +12 +-5 +13 +-6 +12 +-5 +14 +26 +1 +16 +-4 +14 +-7 +10 +-9 +11 +-9 +10 +-10 +10 +-9 +9 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-8 +10 +-8 +12 +-8 +11 +-9 +12 +-7 +-42 +-11 +-20 +5 +-9 +10 +-6 +14 +-3 +15 +-5 +14 +-3 +15 +-4 +13 +-4 +14 +-5 +12 +-5 +14 +-5 +11 +-7 +12 +-5 +12 +-7 +11 +-6 +12 +-6 +11 +-6 +13 +-6 +12 +-7 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +-6 +12 +-6 +11 +-7 +12 +-7 +11 +-7 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +10 +-8 +11 +-7 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +10 +-8 +11 +-7 +10 +23 +-1 +17 +-5 +11 +-9 +10 +-8 +10 +-11 +9 +-9 +10 +-10 +8 +-9 +11 +-10 +9 +-10 +11 +-8 +9 +-10 +10 +-8 +11 +-10 +10 +-8 +12 +-8 +-42 +-10 +-19 +5 +-10 +10 +-5 +15 +-4 +14 +-3 +16 +-2 +14 +-4 +15 +-3 +14 +-5 +13 +-4 +13 +-5 +12 +-4 +14 +-6 +12 +-6 +14 +-5 +11 +-7 +12 +-6 +12 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +24 +1 +17 +-6 +11 +-8 +12 +-8 +9 +-10 +10 +-9 +10 +-10 +10 +-8 +10 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +-41 +-9 +-20 +4 +-10 +12 +-5 +13 +-5 +15 +-2 +15 +-5 +13 +-4 +15 +-4 +13 +-4 +14 +-4 +13 +-5 +14 +-4 +12 +-6 +12 +-5 +13 +-8 +10 +24 +1 +16 +-7 +11 +-8 +10 +-9 +9 +-9 +11 +-10 +9 +-9 +11 +-8 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-8 +10 +-7 +12 +-8 +11 +-9 +12 +-7 +10 +-9 +11 +-6 +12 +-9 +11 +-7 +12 +-7 +11 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +11 +-7 +12 +-9 +10 +-8 +12 +-8 +10 +-8 +12 +-7 +11 +-8 +12 +-7 +11 +-8 +11 +-6 +12 +-9 +10 +-8 +12 +-8 +10 +-9 +12 +-7 +11 +-8 +12 +-7 +11 +-8 +11 +-6 +12 +-9 +10 +-8 +-39 +-9 +-20 +4 +-9 +12 +-5 +13 +-4 +16 +-4 +14 +-4 +16 +-3 +13 +-5 +14 +-3 +14 +-6 +12 +-5 +13 +-5 +11 +-6 +13 +-6 +12 +-7 +13 +26 +1 +16 +-5 +14 +-7 +10 +-10 +10 +-8 +10 +-10 +9 +-8 +11 +-9 +9 +-8 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +-40 +-10 +-21 +4 +-9 +11 +-6 +13 +-3 +15 +-4 +14 +-4 +16 +-3 +13 +-5 +14 +-3 +14 +-6 +12 +-5 +13 +-6 +11 +-5 +13 +-7 +11 +-7 +13 +25 +0 +16 +-4 +14 +-7 +10 +-9 +11 +-8 +10 +-10 +11 +-8 +10 +-10 +10 +-8 +11 +-9 +10 +-8 +12 +-7 +10 +-8 +12 +-7 +11 +-9 +11 +-7 +11 +-9 +11 +-7 +12 +-9 +11 +-7 +13 +-7 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +11 +-7 +12 +-9 +10 +-8 +12 +-8 +10 +-9 +11 +-8 +-41 +-11 +-19 +5 +-10 +11 +-5 +15 +-2 +15 +-3 +16 +-1 +16 +-4 +14 +-3 +15 +-4 +12 +-5 +14 +-5 +13 +-6 +13 +-5 +12 +-6 +12 +-5 +13 +-7 +11 +-6 +13 +-6 +10 +-7 +12 +-6 +11 +-7 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +11 +-8 +11 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +12 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-7 +11 +22 +0 +16 +-6 +11 +-9 +11 +-8 +9 +-10 +10 +-8 +10 +-10 +9 +-9 +11 +-9 +9 +-9 +11 +-8 +10 +-9 +11 +-8 +10 +-9 +11 +-7 +11 +-10 +-42 +-10 +-19 +4 +-11 +10 +-5 +14 +-4 +14 +-3 +16 +-4 +14 +-3 +16 +-3 +13 +-5 +13 +-4 +13 +-7 +11 +-5 +12 +-6 +11 +-6 +13 +-6 +12 +-7 +13 +-5 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +11 +-6 +10 +-8 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-8 +11 +-7 +11 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +9 +-9 +11 +-7 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-8 +11 +-7 +9 +-9 +11 +-7 +10 +-9 +11 +-7 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-7 +11 +-9 +10 +-7 +10 +-8 +9 +-7 +11 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +25 +1 +15 +-6 +13 +-8 +11 +-10 +11 +-8 +9 +-10 +9 +-9 +10 +-11 +8 +-10 +11 +-9 +9 +-10 +11 +-7 +11 +-9 +11 +-7 +12 +-8 +11 +-6 +13 +-8 +11 +-8 +13 +-7 +10 +-9 +12 +-7 +11 +-9 +11 +-7 +11 +-8 +10 +-7 +12 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +12 +-7 +12 +-8 +11 +-7 +13 +-8 +11 +-8 +13 +-7 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +12 +-8 +11 +-6 +13 +-7 +12 +-7 +13 +-6 +11 +-8 +12 +-7 +-40 +-11 +-20 +5 +-10 +11 +-6 +14 +-3 +14 +-4 +15 +-2 +16 +-4 +14 +-4 +15 +-4 +12 +-6 +13 +-5 +12 +-7 +13 +-5 +12 +-7 +12 +-5 +12 +-7 +11 +-6 +12 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +10 +-7 +12 +-5 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +11 +-8 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-8 +11 +-8 +10 +-8 +11 +-7 +10 +-8 +11 +-5 +12 +-8 +11 +-6 +12 +-6 +10 +-7 +12 +-7 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-9 +9 +-7 +11 +-7 +10 +-8 +11 +-7 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-9 +9 +-8 +12 +-7 +10 +23 +1 +18 +-5 +12 +-8 +12 +-9 +9 +-10 +10 +-9 +9 +-10 +9 +-8 +10 +-11 +9 +-9 +10 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +12 +-8 +10 +-9 +12 +-8 +11 +-9 +12 +-7 +11 +-8 +11 +-7 +12 +-9 +11 +-7 +12 +-7 +10 +-8 +12 +-8 +11 +-9 +-40 +-9 +-20 +4 +-10 +12 +-4 +13 +-4 +15 +-2 +15 +-5 +14 +-4 +14 +-5 +12 +-5 +14 +-5 +12 +-6 +13 +-5 +12 +-6 +12 +-4 +13 +-7 +11 +25 +2 +17 +-6 +12 +-7 +11 +-9 +9 +-9 +10 +-10 +9 +-10 +11 +-8 +9 +-10 +11 +-8 +11 +-10 +10 +-8 +11 +-8 +11 +-7 +13 +-7 +11 +-7 +-39 +-8 +-20 +4 +-9 +12 +-5 +12 +-5 +15 +-3 +14 +-5 +14 +-3 +14 +-5 +13 +-3 +15 +-5 +13 +-4 +15 +-4 +12 +-6 +13 +-5 +12 +-7 +12 +-6 +12 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +11 +-5 +13 +-7 +11 +-6 +13 +-5 +10 +-8 +12 +25 +1 +15 +-6 +12 +-8 +9 +-11 +9 +-10 +8 +-11 +8 +-9 +10 +-11 +8 +-9 +11 +-9 +9 +-10 +11 +-8 +10 +-10 +11 +-8 +10 +-9 +10 +-7 +-40 +-11 +-21 +4 +-9 +11 +-7 +13 +-3 +16 +-3 +14 +-3 +16 +-3 +14 +-4 +15 +-3 +13 +-5 +13 +-4 +14 +-6 +11 +-5 +13 +-5 +11 +-7 +13 +26 +1 +16 +-4 +14 +-7 +11 +-9 +11 +-8 +9 +-10 +10 +-9 +10 +-11 +9 +-9 +11 +-9 +9 +-8 +11 +-9 +10 +-9 +12 +-7 +10 +-9 +11 +-7 +-41 +-12 +-21 +4 +-10 +11 +-7 +13 +-3 +14 +-4 +14 +-2 +16 +-4 +14 +-3 +16 +-3 +13 +-5 +14 +-4 +14 +-6 +12 +-5 +12 +-6 +11 +-5 +13 +-6 +11 +-6 +13 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +24 +-1 +16 +-5 +12 +-8 +10 +-8 +11 +-10 +9 +-9 +11 +-8 +9 +-10 +11 +-8 +10 +-10 +11 +-8 +10 +-9 +10 +-7 +12 +-9 +10 +-8 +12 +-7 +-42 +-11 +-19 +5 +-10 +9 +-6 +14 +-4 +14 +-4 +15 +-3 +14 +-4 +14 +-3 +15 +-5 +13 +-4 +14 +-5 +11 +-6 +13 +-6 +12 +-7 +12 +-5 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +23 +1 +17 +-6 +12 +-8 +11 +-8 +9 +-10 +10 +-8 +10 +-10 +9 +-9 +10 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-7 +10 +-9 +11 +-7 +12 +-9 +-42 +-10 +-19 +4 +-11 +11 +-5 +14 +-4 +14 +-2 +16 +-3 +15 +-3 +16 +-3 +13 +-5 +14 +-4 +13 +-6 +12 +-5 +12 +-6 +11 +-6 +12 +-7 +11 +24 +2 +18 +-6 +12 +-7 +12 +-8 +9 +-10 +10 +-9 +10 +-10 +10 +-8 +10 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +-41 +-9 +-19 +4 +-10 +12 +-4 +13 +-4 +14 +-2 +16 +-4 +13 +-4 +15 +-4 +12 +-5 +14 +-4 +13 +-6 +13 +-4 +13 +-6 +12 +-5 +13 +-6 +11 +-6 +13 +-5 +10 +-7 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-7 +11 +-7 +13 +-5 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +11 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +11 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +24 +1 +16 +-6 +12 +-7 +10 +-10 +9 +-9 +10 +-10 +9 +-9 +11 +-8 +9 +-10 +10 +-8 +10 +-10 +10 +-8 +10 +-9 +10 +-8 +11 +-9 +10 +-8 +-40 +-10 +-21 +3 +-10 +11 +-5 +12 +-4 +15 +-4 +14 +-4 +15 +-3 +14 +-4 +14 +-3 +15 +-5 +13 +-4 +14 +-5 +11 +-6 +13 +-6 +12 +-7 +12 +-5 +11 +-7 +12 +-5 +13 +-7 +11 +-6 +12 +-6 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +11 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-8 +10 +-7 +11 +-8 +10 +-7 +12 +25 +-1 +15 +-5 +13 +-7 +9 +-10 +10 +-9 +10 +-11 +10 +-8 +9 +-10 +9 +-8 +11 +-10 +9 +-10 +11 +-9 +8 +-10 +10 +-9 +10 +-10 +10 +-8 +-41 +-11 +-20 +5 +-9 +10 +-6 +13 +-3 +15 +-4 +14 +-3 +16 +-3 +13 +-4 +15 +-4 +14 +-5 +14 +-4 +12 +-6 +12 +-5 +13 +-7 +11 +-6 +13 +25 +0 +16 +-4 +14 +-7 +11 +-8 +12 +-9 +10 +-9 +11 +-8 +10 +-9 +10 +-8 +11 +-10 +9 +-9 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-7 +-42 +-11 +-19 +6 +-9 +10 +-6 +15 +-2 +15 +-4 +14 +-3 +14 +-5 +13 +-4 +14 +-5 +12 +-5 +14 +-4 +12 +-6 +13 +-5 +13 +-7 +11 +-6 +12 +24 +0 +17 +-4 +13 +-8 +11 +-7 +12 +-9 +10 +-8 +12 +-8 +10 +-9 +11 +-8 +11 +-9 +11 +-7 +11 +-9 +10 +-7 +12 +-9 +10 +-9 +12 +-8 +-42 +-12 +-20 +4 +-10 +9 +-6 +14 +-4 +14 +-4 +15 +-3 +13 +-5 +14 +-3 +15 +-5 +13 +-4 +14 +-5 +12 +-5 +13 +-5 +12 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-7 +11 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +12 +-6 +11 +-7 +10 +-6 +11 +-8 +10 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +23 +1 +17 +-5 +11 +-8 +11 +-9 +9 +-10 +11 +-8 +9 +-10 +9 +-8 +10 +-11 +9 +-9 +11 +-9 +9 +-9 +11 +-8 +11 +-9 +12 +-7 +11 +-9 +-41 +-9 +-19 +3 +-10 +11 +-4 +14 +-4 +15 +-2 +15 +-3 +14 +-3 +15 +-4 +13 +-5 +14 +-4 +11 +-7 +12 +-5 +13 +-7 +11 +-5 +13 +-6 +11 +-6 +13 +-6 +11 +-7 +13 +-5 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +13 +-6 +12 +-6 +13 +-5 +11 +-7 +11 +-6 +11 +-9 +10 +24 +1 +16 +-6 +12 +-7 +11 +-9 +9 +-8 +11 +-9 +9 +-9 +11 +-9 +9 +-10 +10 +-9 +10 +-11 +9 +-8 +11 +-8 +10 +-8 +12 +-9 +10 +-9 +-40 +-10 +-21 +2 +-11 +11 +-6 +12 +-5 +15 +-3 +15 +-4 +15 +-3 +14 +-4 +14 +-3 +15 +-5 +12 +-5 +14 +-5 +11 +-6 +13 +-5 +12 +-7 +12 +25 +1 +16 +-5 +13 +-7 +10 +-10 +10 +-8 +10 +-10 +9 +-8 +12 +-8 +10 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +12 +-8 +9 +-9 +11 +-8 +10 +-9 +11 +-7 +11 +-8 +11 +-7 +12 +-9 +10 +-8 +12 +-8 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-7 +12 +-9 +10 +-8 +12 +-7 +10 +-9 +12 +-7 +11 +-9 +12 +-7 +11 +-8 +11 +-7 +12 +-9 +10 +-8 +13 +-7 +10 +-9 +12 +-7 +12 +-9 +11 +-7 +-40 +-10 +-20 +5 +-9 +10 +-6 +14 +-2 +16 +-4 +14 +-2 +16 +-3 +14 +-4 +15 +-4 +13 +-6 +13 +-5 +12 +-6 +12 +-4 +14 +-6 +12 +-5 +14 +26 +1 +17 +-3 +14 +-7 +11 +-8 +11 +-10 +9 +-10 +11 +-8 +9 +-10 +10 +-8 +11 +-10 +10 +-7 +12 +-8 +10 +-8 +12 +-9 +10 +-9 +12 +-7 +-42 +-11 +-20 +5 +-10 +9 +-7 +14 +-4 +14 +-4 +15 +-2 +14 +-4 +14 +-3 +15 +-5 +13 +-4 +15 +-4 +12 +-6 +13 +-5 +12 +-7 +11 +-6 +11 +24 +0 +17 +-4 +12 +-8 +11 +-7 +11 +-10 +10 +-8 +11 +-8 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +10 +-7 +12 +-9 +10 +-8 +12 +-8 +10 +-9 +11 +-8 +11 +-9 +11 +-7 +11 +-8 +11 +-6 +13 +-8 +11 +-7 +13 +-7 +10 +-9 +12 +-7 +11 +-9 +11 +-7 +11 +-8 +10 +-7 +12 +-9 +-42 +-10 +-18 +5 +-10 +10 +-5 +15 +-3 +14 +-3 +16 +-3 +15 +-4 +15 +-3 +14 +-5 +14 +-3 +14 +-6 +12 +-5 +14 +-5 +11 +-6 +13 +-5 +12 +-7 +12 +-5 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +9 +-8 +11 +-7 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-7 +10 +-9 +10 +-7 +10 +-8 +9 +-7 +11 +-8 +10 +24 +1 +17 +-6 +11 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-10 +11 +-8 +10 +-9 +10 +-8 +11 +-10 +9 +-9 +11 +-8 +9 +-9 +11 +-8 +11 +-9 +-40 +-9 +-20 +4 +-10 +12 +-4 +13 +-4 +15 +-2 +15 +-5 +13 +-4 +14 +-4 +12 +-4 +14 +-5 +12 +-5 +14 +-4 +12 +-6 +12 +-4 +13 +-7 +11 +-5 +12 +-6 +11 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-7 +11 +-5 +12 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +11 +-7 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +10 +-9 +10 +-7 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-7 +10 +-6 +12 +-8 +10 +-8 +11 +-7 +9 +-8 +11 +-7 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-7 +11 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-6 +12 +-7 +10 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +10 +-6 +11 +-9 +10 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +12 +-6 +11 +-7 +11 +-5 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +12 +24 +0 +15 +-5 +13 +-9 +9 +-10 +10 +-9 +8 +-11 +10 +-8 +10 +-10 +9 +-8 +11 +-9 +10 +-8 +11 +-9 +10 +-9 +12 +-8 +9 +-10 +10 +-8 +11 +-10 +10 +-8 +11 +-8 +10 +-7 +13 +-7 +12 +-7 +13 +-6 +11 +-8 +11 +-7 +12 +-9 +10 +-7 +12 +-8 +11 +-7 +13 +-7 +11 +-8 +13 +-7 +10 +-9 +11 +-8 +11 +-10 +10 +-8 +11 +-8 +10 +-8 +12 +-8 +11 +-8 +12 +-7 +10 +-8 +12 +-6 +12 +-9 +11 +-7 +12 +-8 +10 +-8 +12 +-8 +-41 +-10 +-18 +6 +-10 +11 +-4 +16 +-3 +14 +-4 +16 +-3 +14 +-5 +13 +-4 +13 +-5 +12 +-4 +14 +-5 +12 +-5 +14 +-5 +11 +-6 +13 +-4 +12 +-7 +12 +-5 +12 +-7 +11 +-6 +12 +-7 +10 +-7 +12 +-6 +10 +-8 +12 +-6 +11 +-8 +10 +-7 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-8 +9 +-8 +11 +-7 +10 +-8 +11 +-6 +12 +-7 +11 +-6 +11 +-7 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +11 +-8 +9 +-8 +11 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-5 +12 +-8 +10 +-6 +11 +-7 +10 +-7 +11 +-8 +10 +-8 +11 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +12 +-6 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +11 +-6 +12 +-6 +10 +-7 +12 +-7 +11 +-8 +11 +-6 +10 +-7 +11 +-5 +12 +-8 +10 +-6 +12 +-6 +10 +-7 +12 +-6 +11 +-7 +12 +-6 +10 +-8 +10 +25 +1 +15 +-6 +12 +-7 +11 +-10 +9 +-9 +10 +-9 +9 +-9 +11 +-10 +10 +-9 +11 +-8 +10 +-9 +11 +-7 +11 +-10 +9 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +-39 +-9 +-20 +4 +-9 +11 +-5 +13 +-3 +16 +-4 +14 +-4 +15 +-3 +12 +-5 +13 +-4 +14 +-6 +12 +-5 +13 +-5 +11 +-5 +13 +-6 +12 +-6 +13 +26 +0 +16 +-5 +14 +-7 +10 +-10 +10 +-9 +9 +-11 +9 +-9 +9 +-10 +9 +-8 +11 +-10 +10 +-8 +12 +-8 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +-40 +-10 +-20 +5 +-8 +11 +-6 +14 +-3 +15 +-5 +13 +-3 +15 +-3 +13 +-4 +15 +-3 +14 +-5 +14 +-4 +13 +-6 +12 +-4 +13 +-7 +11 +-5 +13 +-5 +11 +-7 +12 +-6 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +12 +-8 +10 +-8 +12 +-7 +9 +-8 +11 +-7 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +23 +0 +16 +-4 +13 +-9 +9 +-9 +10 +-10 +8 +-10 +10 +-10 +9 +-10 +11 +-8 +10 +-9 +10 +-7 +11 +-9 +10 +-8 +11 +-8 +9 +-9 +11 +-8 +-41 +-11 +-19 +5 +-10 +10 +-6 +15 +-3 +14 +-4 +15 +-2 +15 +-5 +13 +-3 +14 +-4 +12 +-4 +14 +-5 +12 +-6 +14 +-5 +11 +-6 +12 +-5 +13 +24 +1 +18 +-3 +14 +-8 +11 +-8 +10 +-10 +9 +-9 +10 +-10 +9 +-10 +11 +-9 +9 +-10 +10 +-8 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +-8 +-41 +-10 +-18 +5 +-11 +10 +-5 +14 +-4 +13 +-4 +15 +-3 +15 +-4 +15 +-3 +13 +-5 +13 +-4 +13 +-7 +11 +-6 +13 +-6 +11 +-7 +12 +-5 +12 +-7 +12 +-5 +12 +-7 +10 +-6 +12 +-7 +11 +-7 +13 +-6 +10 +-7 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +9 +23 +1 +17 +-5 +11 +-8 +11 +-8 +10 +-10 +10 +-9 +9 +-10 +9 +-8 +10 +-11 +8 +-9 +11 +-9 +9 +-10 +11 +-9 +10 +-9 +11 +-7 +11 +-8 +-41 +-9 +-18 +4 +-11 +11 +-4 +14 +-5 +14 +-3 +15 +-3 +13 +-4 +15 +-4 +14 +-4 +15 +-4 +12 +-6 +13 +-4 +13 +-7 +11 +-5 +13 +-6 +11 +-6 +13 +-6 +11 +-7 +12 +-6 +10 +-8 +11 +-5 +12 +-7 +11 +-6 +12 +-6 +11 +-6 +12 +-6 +11 +-7 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +23 +1 +16 +-7 +11 +-7 +11 +-9 +9 +-9 +10 +-10 +9 +-10 +11 +-9 +9 +-10 +10 +-7 +11 +-10 +10 +-8 +11 +-9 +9 +-8 +11 +-9 +10 +-9 +-41 +-10 +-22 +2 +-11 +11 +-5 +12 +-5 +15 +-3 +15 +-4 +15 +-2 +14 +-4 +13 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +13 +-4 +13 +-6 +12 +26 +1 +16 +-6 +13 +-7 +10 +-10 +10 +-8 +10 +-10 +9 +-9 +11 +-8 +10 +-9 +11 +-8 +10 +-9 +11 +-8 +10 +-9 +10 +-7 +11 +-9 +10 +-8 +-40 +-10 +-20 +4 +-9 +11 +-5 +13 +-3 +16 +-4 +14 +-3 +16 +-3 +13 +-5 +14 +-3 +14 +-6 +12 +-5 +13 +-5 +12 +-5 +14 +-6 +12 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-7 +11 +-6 +12 +-6 +11 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +11 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +10 +-6 +11 +-9 +9 +-7 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +-7 +10 +-8 +10 +-6 +11 +-8 +10 +-6 +12 +25 +0 +16 +-4 +13 +-8 +10 +-8 +10 +-10 +8 +-10 +10 +-9 +8 +-11 +9 +-8 +10 +-10 +10 +-8 +11 +-8 +10 +-8 +12 +-8 +11 +-9 +12 +-8 +-42 +-12 +-20 +5 +-10 +9 +-7 +14 +-3 +15 +-4 +15 +-2 +15 +-4 +14 +-3 +15 +-5 +12 +-5 +14 +-5 +11 +-7 +12 +-5 +12 +-7 +12 +-5 +12 +-6 +11 +-5 +13 +-7 +11 +-6 +13 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +11 +-6 +12 +-7 +10 +-7 +11 +-8 +9 +-8 +11 +-7 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +12 +-7 +10 +-6 +12 +-7 +11 +-8 +12 +-6 +10 +23 +0 +17 +-4 +11 +-8 +11 +-8 +10 +-10 +10 +-9 +9 +-10 +9 +-9 +11 +-10 +9 +-9 +11 +-8 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-8 +-41 +-9 +-18 +4 +-10 +11 +-4 +15 +-4 +14 +-4 +15 +-3 +12 +-5 +14 +-4 +14 +-6 +13 +-4 +13 +-5 +13 +-4 +14 +-6 +12 +-6 +13 +-5 +11 +24 +1 +18 +-4 +12 +-7 +12 +-8 +10 +-10 +10 +-8 +9 +-10 +9 +-8 +10 +-11 +9 +-9 +11 +-8 +9 +-9 +11 +-8 +11 +-9 +12 +-6 +11 +-8 +-41 +-9 +-19 +3 +-11 +11 +-5 +14 +-5 +13 +-3 +15 +-3 +13 +-4 +15 +-4 +13 +-5 +14 +-4 +12 +-6 +13 +-4 +13 +-6 +12 +-5 +13 +-5 +11 +25 +2 +16 +-5 +12 +-7 +12 +-9 +10 +-9 +11 +-8 +9 +-10 +10 +-8 +10 +-10 +10 +-8 +10 +-9 +9 +-8 +11 +-9 +10 +-8 +12 +-7 +10 +-9 +-40 +-9 +-19 +3 +-10 +11 +-5 +13 +-5 +15 +-2 +14 +-4 +15 +-2 +15 +-5 +13 +-4 +15 +-4 +12 +-5 +13 +-5 +12 +-7 +12 +-6 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-7 +12 +-5 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +10 +-8 +9 +-7 +11 +-8 +9 +-8 +11 +-7 +9 +-8 +10 +24 +0 +14 +-6 +13 +-8 +10 +-10 +11 +-8 +9 +-10 +9 +-8 +10 +-11 +9 +-9 +11 +-9 +9 +-9 +11 +-8 +11 +-9 +11 +-7 +11 +-8 +11 +-7 +-40 +-11 +-20 +5 +-8 +12 +-6 +13 +-4 +15 +-3 +13 +-4 +15 +-3 +14 +-4 +15 +-3 +13 +-5 +13 +-4 +14 +-6 +12 +-5 +14 +-5 +12 +-6 +13 +-5 +12 +-7 +12 +-5 +11 +-7 +11 +-6 +12 +-8 +9 +-8 +11 +-8 +9 +-8 +11 +-7 +11 +-8 +11 +-6 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +12 +24 +-1 +15 +-5 +13 +-8 +10 +-9 +10 +-10 +9 +-10 +10 +-9 +8 +-10 +10 +-8 +10 +-10 +9 +-8 +11 +-8 +10 +-8 +12 +-8 +10 +-8 +12 +-7 +-41 +-11 +-19 +6 +-9 +10 +-6 +15 +-3 +15 +-4 +15 +-2 +14 +-4 +14 +-2 +15 +-5 +13 +-4 +14 +-5 +11 +-7 +12 +-6 +12 +-7 +12 +-5 +12 +24 +1 +18 +-3 +12 +-8 +11 +-7 +11 +-10 +9 +-8 +10 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-8 +9 +-10 +10 +-7 +11 +-10 +9 +-9 +11 +-8 +9 +-8 +12 +-8 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-8 +11 +-8 +11 +-9 +11 +-7 +11 +-8 +11 +-7 +12 +-9 +10 +-7 +13 +-7 +10 +-8 +12 +-7 +12 +-8 +12 +-6 +11 +-7 +12 +-6 +13 +-8 +11 +-7 +13 +-7 +10 +-9 +12 +-7 +11 +-9 +11 +-7 +11 +-8 +-40 +-9 +-18 +4 +-10 +11 +-4 +14 +-5 +14 +-2 +16 +-3 +14 +-3 +15 +-4 +13 +-4 +14 +-4 +12 +-6 +12 +-5 +12 +-7 +11 +-6 +12 +-6 +10 +24 +2 +16 +-5 +12 +-6 +12 +-9 +10 +-9 +11 +-8 +9 +-10 +10 +-8 +11 +-9 +11 +-7 +11 +-8 +10 +-8 +11 +-9 +10 +-9 +12 +-7 +10 +-9 +-40 +-9 +-19 +3 +-10 +11 +-5 +13 +-5 +14 +-3 +14 +-4 +13 +-3 +14 +-6 +12 +-5 +14 +-5 +11 +-6 +13 +-5 +12 +-6 +13 +-4 +13 +-5 +12 +26 +2 +16 +-6 +12 +-6 +11 +-10 +9 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-8 +10 +-9 +10 +-7 +11 +-9 +10 +-8 +12 +-8 +10 +-9 +12 +-8 +11 +-9 +11 +-7 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +13 +-6 +11 +-8 +12 +-7 +11 +-9 +11 +-7 +11 +-8 +11 +-7 +12 +-8 +11 +-8 +-39 +-9 +-20 +4 +-9 +12 +-5 +13 +-4 +15 +-3 +15 +-4 +15 +-2 +14 +-4 +13 +-3 +14 +-6 +12 +-5 +13 +-5 +11 +-6 +13 +-5 +12 +-6 +13 +-5 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-7 +12 +-5 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-5 +12 +-7 +11 +-5 +11 +-7 +10 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +12 +-8 +11 +-6 +11 +-7 +10 +-7 +11 +-8 +9 +-8 +11 +24 +-2 +14 +-5 +12 +-8 +9 +-9 +10 +-9 +9 +-11 +10 +-9 +9 +-10 +10 +-7 +11 +-9 +10 +-8 +11 +-8 +10 +-8 +11 +-8 +10 +-9 +11 +-8 +-42 +-12 +-21 +5 +-10 +9 +-7 +13 +-3 +15 +-4 +14 +-3 +15 +-4 +13 +-4 +14 +-5 +13 +-5 +14 +-4 +12 +-6 +12 +-4 +13 +-7 +11 +-6 +12 +-6 +10 +-6 +12 +-6 +11 +-7 +12 +-5 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-8 +12 +-7 +11 +-8 +12 +-5 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +12 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-7 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-7 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +10 +-8 +11 +-5 +11 +-8 +10 +-7 +11 +-8 +9 +-7 +11 +-7 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +10 +-6 +11 +-9 +10 +-7 +11 +-7 +10 +-6 +12 +-7 +11 +24 +2 +17 +-6 +12 +-8 +11 +-9 +8 +-11 +10 +-9 +9 +-10 +10 +-8 +9 +-10 +9 +-8 +11 +-10 +9 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +11 +-8 +10 +-8 +12 +-8 +11 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-9 +10 +-7 +11 +-8 +9 +-8 +11 +-8 +11 +-8 +12 +-6 +11 +-8 +12 +-6 +13 +-8 +11 +-7 +13 +-7 +10 +-8 +12 +-7 +11 +-8 +-40 +-9 +-19 +4 +-10 +12 +-5 +12 +-5 +15 +-2 +15 +-4 +14 +-3 +15 +-3 +13 +-3 +15 +-5 +12 +-5 +14 +-4 +11 +-7 +12 +-5 +12 +-8 +11 +-6 +12 +-6 +11 +-6 +13 +-6 +11 +-7 +12 +-6 +10 +-8 +10 +-6 +12 +-8 +10 +-6 +12 +-7 +10 +-7 +11 +-7 +10 +-7 +12 +-6 +10 +-7 +11 +-6 +11 +-8 +10 +-7 +12 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +9 +-8 +11 +-7 +9 +-9 +10 +-7 +10 +-9 +10 +-7 +10 +-8 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-8 +10 +-7 +11 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +10 +-7 +11 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-7 +11 +23 +-1 +15 +-5 +12 +-9 +9 +-9 +11 +-9 +8 +-10 +11 +-8 +10 +-10 +10 +-8 +10 +-9 +9 +-8 +11 +-9 +10 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +10 +-8 +10 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +11 +-7 +11 +-8 +11 +-6 +13 +-8 +11 +-7 +13 +-6 +-41 +-10 +-19 +5 +-9 +10 +-6 +14 +-4 +14 +-4 +16 +-2 +14 +-4 +14 +-3 +14 +-6 +12 +-5 +13 +-5 +11 +-6 +13 +-6 +12 +-7 +12 +-5 +11 +23 +1 +18 +-4 +11 +-8 +11 +-7 +11 +-10 +9 +-8 +11 +-8 +10 +-8 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +10 +-8 +11 +-8 +-42 +-10 +-19 +3 +-10 +10 +-4 +14 +-4 +14 +-3 +16 +-3 +13 +-4 +15 +-3 +14 +-5 +13 +-4 +12 +-6 +11 +-5 +12 +-7 +11 +-6 +13 +-5 +11 +-7 +12 +-5 +12 +-7 +11 +-5 +11 +-6 +11 +-5 +12 +-7 +11 +-6 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +10 +-8 +10 +-6 +11 +-8 +9 +22 +1 +16 +-7 +10 +-8 +11 +-9 +8 +-10 +10 +-9 +9 +-10 +11 +-7 +10 +-9 +10 +-7 +12 +-9 +10 +-7 +12 +-7 +10 +-9 +11 +-8 +10 +-9 +-40 +-9 +-20 +4 +-10 +12 +-4 +12 +-4 +15 +-2 +15 +-4 +14 +-3 +14 +-4 +12 +-4 +14 +-5 +12 +-5 +14 +-4 +12 +-6 +13 +-4 +13 +-6 +11 +25 +2 +17 +-6 +12 +-7 +10 +-9 +9 +-9 +10 +-11 +8 +-10 +11 +-8 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-8 +10 +-8 +11 +-9 +10 +-8 +-39 +-9 +-21 +3 +-10 +11 +-5 +12 +-4 +15 +-3 +14 +-4 +15 +-3 +14 +-4 +14 +-3 +15 +-5 +13 +-4 +14 +-5 +11 +-6 +12 +-5 +12 +-6 +12 +-5 +11 +-6 +11 +-5 +12 +-7 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-8 +11 +-6 +10 +-8 +9 +-7 +11 +-8 +10 +-7 +11 +-7 +9 +-8 +11 +24 +0 +14 +-6 +13 +-8 +10 +-9 +11 +-8 +9 +-10 +9 +-8 +10 +-10 +9 +-9 +11 +-8 +9 +-9 +11 +-8 +10 +-9 +11 +-7 +10 +-8 +11 +-6 +-39 +-11 +-20 +5 +-9 +11 +-7 +12 +-3 +15 +-3 +13 +-3 +15 +-4 +13 +-4 +14 +-3 +12 +-5 +13 +-3 +14 +-6 +12 +-5 +13 +-5 +11 +-5 +13 +-5 +12 +-6 +12 +-5 +11 +-7 +11 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-7 +12 +-5 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +11 +23 +-1 +15 +-5 +12 +-8 +9 +-9 +11 +-9 +9 +-10 +11 +-8 +9 +-10 +10 +-7 +11 +-9 +10 +-8 +11 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-7 +-41 +-11 +-19 +6 +-8 +10 +-6 +14 +-3 +14 +-5 +14 +-3 +14 +-4 +13 +-3 +15 +-4 +13 +-4 +14 +-4 +12 +-6 +12 +-5 +12 +-7 +11 +-6 +11 +23 +-1 +16 +-5 +11 +-9 +10 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +11 +-8 +10 +-10 +10 +-8 +10 +-9 +10 +-7 +12 +-8 +10 +-7 +12 +-7 +-42 +-11 +-19 +4 +-10 +9 +-5 +14 +-4 +14 +-3 +16 +-1 +14 +-4 +15 +-2 +14 +-5 +12 +-4 +13 +-5 +11 +-6 +12 +-6 +11 +-6 +13 +-5 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +11 +-7 +10 +-7 +12 +-6 +11 +-7 +12 +-5 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +11 +-7 +9 +-8 +11 +-7 +10 +-7 +11 +-6 +10 +-7 +10 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-7 +12 +-7 +9 +22 +1 +16 +-5 +11 +-7 +11 +-9 +9 +-9 +10 +-8 +8 +-10 +9 +-8 +10 +-11 +8 +-9 +11 +-9 +9 +-8 +11 +-9 +10 +-9 +11 +-7 +10 +-9 +-40 +-9 +-18 +3 +-10 +11 +-4 +14 +-5 +14 +-3 +15 +-3 +14 +-2 +16 +-4 +14 +-4 +15 +-3 +12 +-6 +13 +-5 +12 +-7 +11 +-6 +11 +-7 +10 +-6 +12 +-6 +11 +-6 +13 +-5 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-7 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +11 +-5 +12 +-7 +11 +-6 +12 +-6 +10 +-6 +12 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-7 +11 +25 +1 +15 +-6 +12 +-7 +10 +-10 +9 +-9 +9 +-10 +9 +-9 +10 +-9 +9 +-9 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +10 +-8 +11 +-8 +10 +-8 +-40 +-11 +-20 +4 +-8 +11 +-6 +12 +-4 +15 +-3 +13 +-4 +15 +-2 +15 +-4 +14 +-3 +14 +-4 +13 +-3 +14 +-6 +11 +-6 +13 +-5 +10 +-7 +12 +25 +2 +15 +-4 +14 +-7 +11 +-9 +11 +-8 +9 +-9 +9 +-8 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +11 +-8 +10 +-9 +11 +-7 +10 +-9 +10 +-7 +-40 +-11 +-20 +4 +-9 +11 +-6 +13 +-3 +15 +-3 +14 +-3 +16 +-3 +14 +-4 +14 +-3 +12 +-6 +12 +-4 +12 +-7 +11 +-5 +13 +-5 +11 +-5 +13 +24 +1 +16 +-4 +13 +-8 +10 +-9 +11 +-8 +9 +-10 +10 +-8 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-9 +11 +-8 +9 +-9 +10 +-7 +-40 +-11 +-20 +5 +-8 +11 +-5 +14 +-2 +15 +-3 +14 +-2 +16 +-4 +13 +-3 +15 +-4 +12 +-6 +13 +-4 +12 +-6 +12 +-5 +12 +-6 +11 +-5 +13 +-6 +11 +-6 +13 +-5 +10 +-7 +11 +-6 +11 +-8 +10 +-6 +10 +-7 +10 +-7 +11 +-8 +10 +-7 +12 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +9 +-7 +11 +-8 +9 +-8 +11 +-6 +10 +-8 +11 +-5 +11 +-8 +10 +-6 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +12 +-6 +10 +-8 +10 +-6 +11 +22 +-1 +16 +-5 +12 +-9 +10 +-8 +10 +-9 +9 +-8 +11 +-9 +10 +-8 +11 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-8 +10 +-9 +9 +-8 +11 +-9 +-41 +-10 +-18 +5 +-10 +10 +-5 +15 +-3 +13 +-4 +15 +-3 +14 +-5 +14 +-3 +13 +-5 +13 +-3 +14 +-5 +12 +-4 +14 +-4 +11 +-6 +12 +-5 +12 +-7 +11 +-6 +11 +-7 +10 +-6 +12 +-7 +10 +-6 +12 +-5 +10 +-8 +11 +-6 +11 +-8 +11 +-5 +12 +-6 +11 +-5 +12 +-6 +11 +-7 +12 +-5 +10 +23 +1 +17 +-4 +11 +-8 +11 +-7 +10 +-10 +10 +-8 +9 +-10 +9 +-8 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +10 +-8 +10 +-10 +10 +-8 +9 +-9 +-42 +-11 +-20 +2 +-11 +10 +-5 +13 +-5 +13 +-3 +15 +-3 +13 +-4 +15 +-4 +13 +-5 +14 +-4 +12 +-5 +13 +-4 +13 +-6 +11 +-5 +12 +-6 +10 +24 +2 +16 +-5 +11 +-7 +11 +-9 +9 +-9 +11 +-8 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +11 +-8 +10 +-7 +11 +-8 +10 +-8 +12 +-7 +10 +-9 +11 +-6 +11 +-9 +11 +-7 +12 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +10 +-9 +11 +-7 +11 +-9 +9 +-8 +11 +-8 +10 +-7 +12 +-8 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-9 +10 +-7 +11 +-8 +9 +-8 +11 +-8 +10 +-8 +12 +-7 +10 +-8 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +10 +-7 +-39 +-10 +-19 +4 +-8 +12 +-6 +13 +-3 +16 +-2 +14 +-3 +15 +-2 +15 +-5 +13 +-3 +13 +-5 +12 +-5 +13 +-6 +11 +-6 +13 +-5 +11 +-6 +12 +26 +2 +15 +-6 +12 +-7 +10 +-10 +10 +-8 +9 +-9 +9 +-7 +11 +-9 +10 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-8 +10 +-9 +10 +-7 +-39 +-11 +-20 +5 +-8 +12 +-6 +13 +-3 +15 +-3 +14 +-3 +15 +-4 +13 +-5 +14 +-3 +12 +-5 +12 +-4 +13 +-7 +11 +-6 +12 +-6 +10 +-7 +12 +24 +1 +15 +-4 +14 +-7 +11 +-8 +12 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-8 +10 +-9 +9 +-9 +11 +-9 +10 +-9 +11 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-7 +10 +-7 +12 +-8 +11 +-8 +12 +-7 +10 +-9 +10 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +-40 +-10 +-19 +5 +-9 +10 +-6 +14 +-3 +14 +-5 +13 +-3 +14 +-4 +12 +-4 +14 +-5 +13 +-4 +15 +-3 +12 +-5 +13 +-4 +13 +-6 +12 +-4 +13 +-5 +11 +-5 +12 +-6 +11 +-7 +12 +-6 +10 +-7 +11 +-5 +11 +-7 +11 +-5 +12 +-5 +11 +-6 +12 +-6 +11 +-7 +12 +-5 +10 +-7 +11 +-6 +11 +-8 +10 +-6 +12 +-6 +10 +-7 +11 +-7 +10 +-8 +11 +-6 +9 +-8 +10 +-7 +10 +-9 +9 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +23 +1 +18 +-4 +11 +-8 +11 +-7 +10 +-10 +9 +-8 +9 +-10 +8 +-9 +10 +-10 +9 +-9 +11 +-8 +9 +-9 +11 +-7 +11 +-9 +10 +-8 +10 +-9 +-42 +-11 +-19 +3 +-10 +10 +-4 +14 +-4 +13 +-3 +16 +-3 +13 +-4 +14 +-4 +13 +-5 +14 +-4 +12 +-5 +12 +-4 +13 +-7 +11 +-6 +12 +-5 +10 +-7 +12 +-5 +12 +-7 +12 +-5 +12 +-6 +11 +-5 +12 +-7 +11 +-6 +12 +-5 +10 +-7 +12 +-5 +11 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-5 +11 +-8 +10 +-6 +11 +-7 +10 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-9 +9 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +12 +-6 +10 +-8 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-6 +11 +-7 +9 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-7 +11 +-7 +11 +-7 +11 +-6 +10 +-7 +10 +-5 +11 +-8 +10 +-7 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +24 +0 +15 +-5 +13 +-6 +9 +-9 +10 +-8 +9 +-11 +8 +-9 +9 +-10 +8 +-9 +10 +-9 +9 +-9 +11 +-8 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +10 +-9 +9 +-8 +11 +-9 +9 +-9 +11 +-7 +10 +-9 +11 +-6 +11 +-9 +11 +-6 +12 +-7 +10 +-7 +12 +-8 +10 +-9 +11 +-7 +9 +-9 +11 +-6 +12 +-8 +11 +-7 +12 +-7 +11 +-7 +12 +-7 +11 +-8 +11 +-7 +10 +-9 +10 +-7 +11 +-9 +10 +-7 +12 +-7 +11 +-7 +13 +-6 +11 +-7 +12 +-6 +-40 +-10 +-19 +5 +-9 +9 +-6 +13 +-3 +14 +-5 +13 +-3 +14 +-4 +13 +-3 +15 +-4 +13 +-4 +15 +-3 +12 +-5 +13 +-4 +13 +-6 +11 +-5 +12 +-6 +11 +-6 +12 +-6 +11 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-7 +10 +-5 +12 +-6 +10 +-6 +12 +-7 +10 +-8 +11 +-6 +9 +-8 +10 +-6 +10 +-9 +9 +-7 +11 +-7 +10 +-7 +12 +-6 +11 +-7 +12 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-6 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-6 +10 +-7 +10 +-5 +11 +-8 +10 +-6 +12 +-6 +9 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-7 +10 +-5 +12 +-7 +10 +-6 +12 +-6 +9 +-8 +11 +-7 +10 +-8 +10 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +11 +-6 +11 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-8 +10 +-6 +10 +-8 +10 +-6 +11 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +10 +-7 +9 +-6 +11 +-8 +10 +23 +1 +16 +-6 +11 +-7 +12 +-8 +9 +-9 +11 +-8 +10 +-10 +10 +-8 +9 +-9 +9 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +11 +-8 +10 +-9 +11 +-6 +10 +-8 +11 +-6 +12 +-9 +10 +-8 +12 +-8 +9 +-9 +11 +-7 +11 +-9 +11 +-7 +10 +-9 +10 +-7 +11 +-9 +10 +-8 +12 +-7 +10 +-8 +-39 +-9 +-18 +4 +-8 +12 +-5 +13 +-4 +15 +-2 +13 +-4 +14 +-3 +14 +-5 +12 +-3 +14 +-4 +12 +-4 +14 +-5 +12 +-6 +13 +-5 +11 +-7 +11 +25 +1 +14 +-6 +13 +-6 +11 +-9 +10 +-7 +10 +-9 +9 +-8 +10 +-10 +9 +-9 +11 +-8 +9 +-9 +10 +-7 +11 +-9 +11 +-7 +11 +-7 +10 +-7 +-39 +-11 +-20 +3 +-8 +11 +-7 +12 +-3 +15 +-3 +13 +-4 +15 +-3 +14 +-5 +14 +-3 +13 +-5 +12 +-3 +13 +-6 +11 +-5 +13 +-5 +11 +-6 +13 +-5 +11 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-6 +12 +-6 +10 +-7 +12 +-6 +11 +-7 +11 +-5 +11 +-7 +11 +-5 +12 +-8 +10 +-7 +11 +23 +-1 +14 +-5 +12 +-8 +9 +-9 +10 +-9 +9 +-10 +10 +-8 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +12 +-6 +-40 +-11 +-19 +5 +-9 +9 +-7 +13 +-3 +14 +-4 +14 +-2 +15 +-3 +13 +-3 +15 +-4 +12 +-5 +13 +-4 +11 +-7 +11 +-5 +12 +-7 +11 +-5 +12 +24 +0 +17 +-3 +12 +-7 +10 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +10 +-7 +10 +-9 +10 +-8 +10 +-9 +9 +-8 +11 +-9 +10 +-8 +12 +-6 +-41 +-11 +-18 +5 +-9 +9 +-5 +14 +-4 +14 +-4 +15 +-2 +13 +-4 +14 +-2 +15 +-5 +12 +-4 +14 +-4 +11 +-6 +13 +-5 +12 +-7 +12 +-5 +11 +-7 +11 +-5 +12 +-7 +10 +-6 +12 +-6 +9 +-8 +10 +-7 +10 +-9 +10 +-6 +10 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +9 +-8 +11 +-6 +10 +22 +0 +16 +-5 +12 +-8 +11 +-8 +9 +-10 +9 +-8 +10 +-10 +9 +-8 +11 +-8 +9 +-9 +11 +-8 +10 +-8 +11 +-7 +11 +-8 +11 +-6 +12 +-8 +-40 +-9 +-17 +5 +-10 +10 +-4 +14 +-4 +13 +-3 +15 +-4 +13 +-4 +14 +-3 +12 +-5 +13 +-3 +13 +-6 +11 +-4 +13 +-5 +11 +-5 +12 +-6 +11 +-7 +12 +-5 +10 +-7 +11 +-5 +11 +-8 +10 +-6 +11 +-6 +10 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +22 +1 +16 +-5 +11 +-7 +11 +-9 +9 +-9 +11 +-8 +8 +-10 +10 +-7 +10 +-9 +10 +-7 +11 +-7 +10 +-7 +12 +-8 +10 +-8 +12 +-7 +9 +-9 +-41 +-10 +-19 +2 +-11 +10 +-5 +13 +-4 +14 +-2 +14 +-3 +14 +-2 +15 +-4 +12 +-4 +14 +-4 +11 +-6 +13 +-4 +12 +-6 +12 +-5 +11 +-6 +11 +25 +2 +16 +-5 +13 +-5 +12 +-9 +9 +-8 +10 +-9 +8 +-9 +10 +-9 +9 +-9 +10 +-8 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +11 +-8 +9 +-8 +-39 +-10 +-19 +4 +-8 +12 +-6 +12 +-4 +15 +-3 +12 +-5 +13 +-3 +13 +-5 +13 +-3 +13 +-5 +12 +-4 +13 +-5 +12 +-5 +13 +-5 +11 +-7 +12 +-5 +12 +-7 +11 +-5 +12 +-6 +10 +-6 +12 +-6 +11 +-6 +12 +-5 +10 +-7 +12 +-5 +11 +-8 +10 +-7 +11 +-7 +9 +-7 +11 +-6 +10 +-8 +11 +-6 +9 +-8 +10 +-6 +10 +-9 +9 +-7 +10 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-5 +10 +-7 +11 +-5 +11 +-8 +10 +-7 +11 +-7 +8 +-9 +10 +22 +-1 +14 +-6 +12 +-8 +10 +-9 +10 +-8 +8 +-10 +9 +-8 +10 +-10 +9 +-7 +11 +-8 +10 +-7 +12 +-8 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +-39 +-11 +-20 +5 +-8 +11 +-7 +13 +-3 +14 +-4 +14 +-2 +15 +-4 +13 +-4 +14 +-4 +11 +-6 +12 +-4 +12 +-7 +11 +-5 +12 +-6 +11 +-6 +12 +-6 +11 +-7 +12 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-6 +11 +-6 +10 +-6 +12 +-6 +11 +-7 +12 +-5 +10 +-7 +11 +-5 +12 +-7 +10 +-6 +12 +-6 +10 +-7 +11 +-7 +10 +-7 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-6 +12 +-6 +10 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +21 +-1 +15 +-4 +12 +-9 +10 +-8 +10 +-9 +9 +-8 +10 +-9 +9 +-10 +10 +-8 +8 +-10 +9 +-8 +10 +-10 +9 +-8 +11 +-8 +10 +-7 +12 +-7 +-40 +-10 +-18 +5 +-10 +10 +-5 +14 +-3 +13 +-4 +15 +-2 +14 +-4 +13 +-4 +13 +-5 +11 +-5 +13 +-6 +11 +-6 +13 +-5 +11 +-6 +12 +-4 +13 +24 +1 +17 +-3 +13 +-7 +11 +-7 +10 +-9 +9 +-8 +11 +-10 +9 +-9 +11 +-8 +9 +-9 +11 +-7 +10 +-9 +10 +-8 +10 +-9 +9 +-8 +11 +-9 +-41 +-11 +-18 +5 +-10 +10 +-5 +14 +-3 +13 +-4 +15 +-3 +14 +-4 +14 +-3 +13 +-4 +13 +-3 +14 +-6 +11 +-5 +13 +-5 +11 +-6 +13 +-5 +12 +23 +2 +17 +-4 +12 +-7 +11 +-8 +8 +-10 +8 +-9 +9 +-11 +8 +-8 +11 +-8 +9 +-8 +11 +-7 +10 +-9 +11 +-7 +9 +-9 +10 +-7 +11 +-8 +-41 +-9 +-18 +5 +-10 +10 +-4 +14 +-3 +13 +-3 +15 +-4 +13 +-4 +15 +-3 +13 +-5 +13 +-3 +14 +-5 +12 +-4 +14 +-5 +11 +-5 +13 +-5 +11 +-6 +12 +-5 +10 +-7 +11 +-5 +12 +-8 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +11 +-5 +12 +-7 +10 +-6 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +10 +-6 +9 +-8 +9 +-7 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +11 +-6 +11 +-8 +11 +-5 +11 +-6 +11 +-5 +12 +-6 +11 +24 +2 +16 +-6 +11 +-8 +11 +-8 +8 +-10 +10 +-9 +9 +-10 +10 +-8 +9 +-9 +10 +-7 +11 +-9 +10 +-8 +11 +-7 +9 +-9 +11 +-8 +10 +-9 +-40 +-9 +-20 +3 +-10 +11 +-5 +12 +-5 +14 +-3 +14 +-5 +13 +-3 +14 +-4 +12 +-4 +14 +-5 +12 +-6 +13 +-5 +11 +-7 +11 +-5 +12 +-7 +11 +-5 +12 +-5 +11 +-5 +13 +-5 +11 +-7 +12 +-6 +10 +-8 +10 +-5 +12 +-7 +10 +-6 +12 +-6 +10 +-7 +11 +-6 +11 +-7 +11 +-6 +10 +-7 +10 +24 +1 +14 +-6 +12 +-7 +10 +-9 +10 +-8 +10 +-9 +9 +-8 +10 +-10 +9 +-9 +11 +-8 +9 +-9 +10 +-8 +10 +-10 +10 +-7 +11 +-8 +10 +-7 +-39 +-11 +-20 +4 +-8 +11 +-6 +12 +-3 +15 +-3 +13 +-4 +14 +-3 +13 +-5 +14 +-3 +13 +-5 +12 +-4 +13 +-6 +11 +-5 +13 +-5 +10 +-6 +12 +24 +1 +15 +-4 +13 +-7 +10 +-8 +11 +-7 +9 +-9 +10 +-8 +10 +-10 +9 +-8 +11 +-8 +9 +-8 +11 +-8 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +9 +-8 +11 +-8 +10 +-9 +11 +-7 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +12 +-7 +11 +-9 +11 +-7 +11 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-7 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-7 +-40 +-12 +-20 +4 +-10 +10 +-6 +14 +-3 +13 +-4 +14 +-1 +15 +-4 +14 +-2 +15 +-3 +13 +-4 +14 +-4 +12 +-6 +12 +-5 +11 +-7 +11 +-5 +12 +22 +0 +17 +-3 +13 +-8 +11 +-7 +10 +-9 +9 +-8 +11 +-9 +9 +-9 +11 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-7 +10 +-7 +11 +-8 +-41 +-11 +-19 +4 +-11 +9 +-5 +14 +-3 +13 +-4 +15 +-3 +14 +-4 +14 +-3 +13 +-5 +12 +-4 +13 +-6 +11 +-5 +13 +-5 +10 +-7 +12 +-5 +12 +23 +2 +17 +-4 +12 +-7 +12 +-7 +9 +-9 +10 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +11 +-8 +10 +-9 +11 +-7 +10 +-8 +10 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-9 +11 +-7 +10 +-9 +11 +-7 +10 +-8 +10 +-7 +11 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +-40 +-9 +-18 +4 +-10 +11 +-4 +14 +-4 +13 +-2 +15 +-3 +13 +-3 +14 +-4 +13 +-5 +13 +-4 +11 +-6 +12 +-4 +13 +-6 +11 +-5 +12 +-5 +10 +-6 +12 +-6 +11 +-7 +12 +-5 +11 +-6 +11 +-5 +12 +-7 +10 +-7 +11 +-6 +9 +-7 +11 +-6 +11 +-8 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-7 +11 +-6 +9 +-7 +11 +-6 +11 +-7 +11 +-5 +11 +-7 +10 +-5 +12 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +9 +-6 +11 +-7 +10 +24 +2 +15 +-5 +12 +-6 +11 +-9 +9 +-9 +10 +-8 +8 +-10 +10 +-8 +9 +-10 +10 +-7 +10 +-8 +10 +-7 +11 +-9 +10 +-8 +11 +-7 +9 +-9 +-40 +-10 +-19 +3 +-10 +11 +-5 +13 +-4 +15 +-2 +14 +-4 +14 +-2 +14 +-5 +13 +-4 +14 +-4 +11 +-5 +13 +-5 +12 +-6 +13 +-4 +11 +-6 +11 +-5 +12 +-7 +10 +-6 +12 +-6 +10 +-6 +12 +-6 +11 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-8 +11 +-6 +11 +-8 +11 +-5 +11 +-7 +10 +-5 +12 +-7 +10 +-7 +12 +-6 +9 +-8 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +9 +-8 +10 +-7 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +12 +-6 +10 +-7 +11 +-5 +11 +-7 +11 +-5 +12 +-6 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +9 +-8 +10 +-6 +11 +-8 +9 +-6 +11 +-7 +9 +-7 +11 +-8 +9 +-8 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +12 +-6 +10 +-6 +12 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-5 +11 +-8 +10 +-6 +12 +23 +-1 +15 +-5 +11 +-8 +9 +-8 +11 +-9 +9 +-9 +10 +-9 +8 +-10 +9 +-8 +10 +-10 +9 +-8 +11 +-8 +9 +-8 +11 +-8 +10 +-8 +11 +-7 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +10 +-6 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-6 +11 +-8 +12 +-6 +11 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +-41 +-11 +-18 +5 +-9 +9 +-5 +14 +-3 +14 +-3 +15 +-2 +13 +-4 +13 +-3 +13 +-6 +11 +-5 +13 +-5 +10 +-6 +12 +-5 +12 +-6 +12 +-5 +11 +-6 +12 +-4 +13 +-6 +11 +-5 +13 +-5 +10 +-7 +12 +-6 +11 +-7 +11 +-6 +10 +-7 +10 +-5 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +11 +-5 +11 +-7 +11 +-5 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-8 +11 +-6 +10 +-8 +10 +-6 +10 +-8 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +9 +-6 +11 +-7 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +11 +-7 +11 +-6 +11 +-7 +10 +-6 +11 +-7 +10 +-7 +12 +-6 +10 +-7 +11 +-5 +11 +-7 +11 +-6 +11 +-7 +10 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +11 +-5 +11 +-7 +11 +-5 +11 +-6 +10 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-7 +11 +-7 +10 +-8 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +10 +24 +1 +16 +-6 +12 +-7 +10 +-9 +9 +-8 +10 +-10 +9 +-9 +10 +-8 +8 +-9 +10 +-8 +10 +-9 +10 +-7 +10 +-9 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +9 +-8 +11 +-7 +11 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +9 +-8 +11 +-7 +11 +-8 +11 +-6 +11 +-8 +10 +-6 +-39 +-11 +-20 +4 +-8 +11 +-6 +12 +-3 +15 +-3 +13 +-3 +15 +-3 +14 +-4 +14 +-3 +12 +-5 +12 +-4 +13 +-6 +11 +-5 +13 +-5 +10 +-6 +12 +24 +1 +15 +-4 +13 +-7 +10 +-8 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +11 +-8 +10 +-8 +11 +-9 +9 +-9 +11 +-8 +9 +-9 +10 +-7 +-40 +-11 +-20 +5 +-8 +11 +-5 +14 +-2 +14 +-4 +13 +-3 +14 +-5 +12 +-4 +14 +-4 +12 +-5 +13 +-4 +13 +-5 +12 +-4 +12 +-5 +11 +-4 +12 +-6 +11 +-6 +13 +-5 +10 +-7 +12 +-5 +11 +-7 +10 +-6 +11 +-7 +9 +-6 +11 +-7 +10 +-7 +12 +-6 +10 +-7 +11 +-5 +11 +-8 +10 +-6 +11 +22 +-1 +15 +-5 +11 +-8 +9 +-8 +10 +-10 +8 +-9 +10 +-9 +8 +-9 +10 +-8 +10 +-9 +11 +-7 +10 +-9 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +-42 +-12 +-19 +4 +-10 +9 +-5 +14 +-3 +14 +-3 +15 +-2 +13 +-5 +13 +-3 +14 +-5 +12 +-4 +14 +-4 +12 +-5 +13 +-5 +11 +-6 +12 +-5 +10 +22 +0 +17 +-4 +11 +-8 +11 +-7 +11 +-9 +10 +-7 +11 +-8 +9 +-8 +11 +-9 +9 +-9 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +11 +-7 +-40 +-10 +-18 +3 +-10 +9 +-5 +13 +-5 +13 +-3 +16 +-2 +13 +-4 +15 +-3 +14 +-5 +13 +-3 +12 +-5 +12 +-4 +13 +-6 +11 +-5 +13 +-5 +11 +-6 +12 +-5 +12 +-7 +11 +-5 +11 +-6 +10 +-5 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +9 +-7 +10 +-7 +9 +-7 +11 +-7 +10 +22 +1 +16 +-6 +11 +-7 +11 +-8 +8 +-10 +10 +-8 +9 +-10 +10 +-7 +10 +-9 +9 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +11 +-7 +10 +-9 +-40 +-9 +-19 +4 +-9 +12 +-4 +13 +-4 +14 +-1 +15 +-4 +13 +-3 +15 +-3 +12 +-4 +14 +-4 +12 +-5 +13 +-4 +12 +-6 +12 +-4 +13 +-6 +11 +-5 +12 +-5 +10 +-7 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-5 +12 +-7 +10 +-6 +12 +-6 +10 +-7 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +9 +23 +1 +14 +-6 +12 +-6 +11 +-9 +9 +-8 +10 +-8 +9 +-9 +10 +-8 +9 +-9 +10 +-8 +8 +-10 +9 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-8 +-39 +-10 +-19 +3 +-9 +11 +-5 +12 +-4 +15 +-2 +13 +-4 +14 +-3 +14 +-5 +12 +-4 +13 +-5 +11 +-5 +13 +-6 +11 +-6 +12 +-5 +10 +-7 +11 +25 +2 +15 +-5 +13 +-6 +11 +-9 +10 +-8 +9 +-9 +9 +-8 +11 +-9 +9 +-8 +11 +-7 +9 +-9 +11 +-7 +11 +-9 +10 +-7 +11 +-7 +10 +-7 +-39 +-11 +-20 +3 +-8 +11 +-6 +12 +-3 +16 +-2 +14 +-3 +15 +-2 +14 +-4 +14 +-3 +13 +-5 +12 +-3 +14 +-5 +12 +-5 +14 +-4 +11 +-6 +12 +-4 +12 +-6 +11 +-5 +11 +-6 +10 +-5 +12 +-7 +10 +-7 +11 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +9 +-6 +11 +-7 +10 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +9 +-6 +11 +-7 +9 +-7 +11 +22 +-1 +14 +-5 +12 +-8 +9 +-9 +10 +-8 +8 +-10 +10 +-8 +10 +-10 +9 +-8 +9 +-9 +9 +-7 +11 +-9 +10 +-8 +12 +-7 +10 +-8 +11 +-7 +-40 +-11 +-19 +5 +-9 +10 +-6 +13 +-3 +14 +-4 +14 +-2 +15 +-4 +13 +-3 +14 +-4 +12 +-5 +13 +-4 +12 +-6 +12 +-4 +12 +-6 +11 +-4 +12 +-6 +10 +-6 +12 +-5 +10 +-7 +12 +-5 +11 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +11 +-6 +11 +-8 +11 +-5 +11 +-6 +10 +-5 +12 +-7 +10 +-7 +12 +-6 +10 +-7 +11 +-6 +11 +-8 +10 +-5 +11 +-7 +10 +-6 +11 +-8 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +21 +-1 +16 +-5 +11 +-8 +11 +-7 +9 +-9 +9 +-7 +10 +-10 +9 +-8 +11 +-8 +9 +-9 +11 +-7 +10 +-9 +10 +-7 +10 +-9 +9 +-7 +11 +-9 +-41 +-11 +-18 +4 +-11 +9 +-4 +14 +-3 +13 +-3 +15 +-3 +14 +-4 +14 +-3 +13 +-4 +13 +-3 +14 +-5 +12 +-4 +13 +-5 +11 +-6 +12 +-5 +11 +23 +2 +17 +-5 +12 +-7 +12 +-7 +9 +-9 +10 +-7 +10 +-9 +9 +-7 +10 +-8 +9 +-7 +11 +-8 +10 +-8 +12 +-7 +10 +-9 +10 +-7 +11 +-9 +-41 +-10 +-19 +3 +-10 +10 +-5 +12 +-4 +13 +-3 +14 +-4 +13 +-4 +15 +-3 +12 +-5 +13 +-4 +12 +-6 +11 +-5 +12 +-5 +11 +-4 +13 +-6 +11 +24 +2 +17 +-6 +11 +-7 +11 +-8 +8 +-9 +10 +-9 +9 +-9 +10 +-7 +10 +-9 +10 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-8 +11 +-7 +11 +-8 +-39 +-9 +-19 +4 +-9 +12 +-4 +12 +-4 +14 +-2 +15 +-4 +13 +-2 +15 +-3 +13 +-3 +14 +-4 +12 +-5 +13 +-4 +11 +-6 +11 +-5 +12 +-7 +11 +-5 +12 +-5 +10 +-6 +12 +-6 +11 +-6 +12 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +11 +-6 +9 +-7 +11 +-6 +11 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-8 +10 +-6 +11 +-6 +9 +-7 +11 +-6 +11 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-8 +9 +-7 +11 +-7 +9 +-8 +10 +-7 +10 +-8 +10 +23 +0 +15 +-5 +13 +-6 +9 +-9 +10 +-8 +10 +-10 +8 +-8 +10 +-9 +8 +-9 +10 +-9 +9 +-10 +10 +-8 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +-39 +-10 +-20 +4 +-8 +10 +-5 +13 +-2 +16 +-3 +14 +-3 +15 +-2 +13 +-4 +14 +-3 +14 +-5 +12 +-3 +13 +-4 +11 +-5 +12 +-6 +11 +-6 +12 +-5 +10 +-7 +11 +-5 +12 +-7 +10 +-5 +12 +-6 +10 +-6 +12 +-6 +11 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-8 +9 +-6 +11 +-7 +9 +-7 +11 +23 +0 +14 +-5 +12 +-8 +9 +-9 +10 +-8 +8 +-10 +9 +-8 +10 +-10 +9 +-8 +10 +-9 +9 +-7 +11 +-9 +10 +-8 +11 +-7 +9 +-9 +11 +-7 +-39 +-11 +-19 +5 +-9 +10 +-5 +14 +-3 +12 +-5 +13 +-3 +13 +-5 +12 +-4 +14 +-4 +12 +-5 +13 +-4 +12 +-6 +12 +-4 +12 +-6 +11 +-4 +12 +22 +0 +16 +-4 +12 +-8 +10 +-8 +10 +-9 +8 +-9 +10 +-9 +9 +-9 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +11 +-8 +9 +-7 +11 +-8 +10 +-8 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +11 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-9 +10 +-7 +11 +-7 +9 +-7 +12 +-7 +11 +-7 +12 +-6 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +-40 +-9 +-18 +5 +-10 +10 +-4 +13 +-3 +13 +-2 +15 +-3 +14 +-3 +15 +-2 +12 +-4 +14 +-3 +13 +-5 +12 +-4 +12 +-5 +11 +-5 +12 +-6 +11 +23 +2 +16 +-6 +11 +-7 +11 +-8 +9 +-9 +10 +-8 +10 +-9 +10 +-7 +10 +-8 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +9 +-9 +11 +-7 +11 +-9 +-40 +-9 +-19 +3 +-10 +11 +-4 +12 +-4 +14 +-1 +15 +-4 +14 +-2 +15 +-3 +13 +-3 +14 +-4 +12 +-5 +13 +-4 +11 +-6 +11 +-4 +12 +-7 +10 +24 +2 +16 +-5 +12 +-6 +11 +-8 +10 +-7 +11 +-9 +9 +-8 +11 +-8 +9 +-9 +10 +-7 +10 +-9 +9 +-7 +11 +-8 +10 +-7 +12 +-8 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-7 +11 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +10 +-7 +-39 +-11 +-20 +3 +-9 +11 +-6 +11 +-4 +15 +-3 +12 +-4 +14 +-3 +14 +-4 +14 +-2 +14 +-4 +13 +-3 +13 +-6 +11 +-5 +13 +-5 +10 +-7 +11 +-5 +11 +-8 +10 +-6 +11 +-7 +9 +-6 +11 +-7 +10 +-7 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +10 +-6 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-5 +10 +-7 +11 +-5 +11 +-8 +10 +-6 +11 +-6 +10 +-6 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +11 +-6 +9 +-6 +11 +22 +0 +15 +-4 +12 +-8 +9 +-8 +11 +-8 +8 +-9 +10 +-8 +10 +-10 +9 +-8 +9 +-9 +8 +-8 +10 +-10 +9 +-9 +11 +-7 +9 +-8 +11 +-6 +-39 +-11 +-19 +4 +-9 +10 +-6 +13 +-3 +13 +-3 +14 +-1 +15 +-4 +13 +-3 +15 +-3 +12 +-4 +14 +-4 +12 +-5 +13 +-4 +12 +-6 +11 +-4 +12 +-6 +11 +-6 +12 +-5 +10 +-7 +11 +-6 +11 +-8 +10 +-6 +10 +-8 +9 +-6 +11 +-7 +10 +-6 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +11 +-5 +11 +-7 +10 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +11 +-6 +10 +-6 +11 +-7 +10 +-7 +12 +-5 +10 +-7 +11 +-5 +11 +-8 +10 +-6 +10 +-7 +9 +-7 +10 +-8 +9 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-8 +9 +-6 +10 +-7 +9 +-7 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +11 +-8 +10 +-6 +11 +-7 +9 +-7 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +9 +-7 +10 +-7 +9 +-6 +11 +-7 +10 +-7 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +10 +-6 +11 +-6 +9 +-7 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +22 +1 +15 +-5 +11 +-6 +11 +-9 +9 +-9 +11 +-8 +8 +-9 +10 +-8 +10 +-9 +10 +-7 +10 +-8 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +9 +-8 +11 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +12 +-7 +11 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-8 +10 +-7 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-6 +11 +-7 +10 +-6 +12 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +11 +-7 +10 +-7 +-38 +-10 +-19 +4 +-8 +11 +-6 +12 +-3 +15 +-2 +13 +-4 +14 +-3 +14 +-4 +13 +-3 +12 +-5 +12 +-4 +13 +-6 +11 +-5 +13 +-5 +10 +-7 +11 +-5 +11 +-7 +11 +-5 +11 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +10 +-6 +11 +-7 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-7 +11 +-5 +11 +-7 +10 +-5 +11 +-6 +10 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-5 +11 +-8 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +10 +-7 +12 +-5 +10 +-7 +11 +-5 +11 +-8 +10 +-6 +11 +-6 +10 +-6 +12 +-5 +11 +-7 +11 +-5 +10 +-8 +10 +-6 +11 +-8 +8 +-7 +11 +-7 +9 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-5 +12 +-7 +10 +-6 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +10 +-6 +10 +-7 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +11 +-5 +11 +-7 +11 +-5 +11 +-6 +10 +-6 +11 +-7 +10 +-6 +12 +-5 +9 +-7 +11 +-6 +11 +-8 +10 +-6 +11 +22 +-1 +15 +-5 +10 +-9 +9 +-8 +10 +-10 +8 +-9 +10 +-8 +8 +-9 +10 +-8 +10 +-9 +10 +-7 +9 +-9 +10 +-7 +11 +-9 +9 +-8 +12 +-7 +10 +-8 +11 +-7 +10 +-9 +10 +-7 +9 +-9 +9 +-8 +11 +-9 +9 +-8 +11 +-7 +9 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-8 +10 +-6 +12 +-8 +-40 +-10 +-17 +5 +-10 +10 +-4 +14 +-2 +13 +-3 +15 +-2 +14 +-4 +14 +-3 +12 +-5 +12 +-3 +14 +-5 +11 +-5 +13 +-4 +11 +-6 +12 +-5 +11 +22 +1 +16 +-5 +11 +-7 +11 +-7 +9 +-9 +10 +-7 +10 +-9 +9 +-7 +11 +-8 +9 +-8 +11 +-8 +9 +-8 +11 +-7 +9 +-8 +10 +-7 +11 +-9 +-41 +-10 +-18 +4 +-11 +9 +-5 +12 +-5 +12 +-3 +15 +-4 +13 +-4 +15 +-3 +12 +-5 +13 +-3 +13 +-6 +11 +-4 +12 +-5 +10 +-5 +12 +-6 +11 +-7 +12 +-5 +10 +-7 +11 +-4 +12 +-7 +10 +-5 +12 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-5 +10 +22 +1 +16 +-5 +11 +-7 +11 +-8 +9 +-9 +11 +-7 +9 +-9 +10 +-7 +10 +-9 +9 +-8 +10 +-8 +9 +-7 +11 +-8 +10 +-8 +11 +-7 +9 +-9 +-40 +-9 +-19 +3 +-10 +11 +-4 +14 +-3 +15 +-1 +15 +-3 +14 +-2 +14 +-5 +12 +-5 +13 +-4 +11 +-6 +12 +-4 +12 +-6 +12 +-4 +12 +-5 +11 +24 +2 +15 +-5 +12 +-6 +11 +-9 +9 +-8 +10 +-8 +8 +-9 +10 +-8 +10 +-8 +11 +-7 +9 +-9 +9 +-7 +10 +-9 +9 +-8 +11 +-7 +9 +-8 +-39 +-9 +-18 +3 +-8 +11 +-5 +13 +-4 +15 +-2 +13 +-4 +14 +-2 +14 +-4 +12 +-3 +14 +-4 +12 +-4 +13 +-5 +11 +-6 +13 +-4 +10 +-7 +11 +-5 +12 +-7 +10 +-5 +12 +-6 +10 +-6 +11 +-6 +11 +-6 +12 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-6 +10 +-7 +11 +-6 +10 +-7 +11 +23 +0 +14 +-5 +13 +-6 +9 +-9 +10 +-7 +10 +-10 +9 +-8 +10 +-9 +8 +-8 +10 +-9 +9 +-9 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +10 +-7 +-39 +-11 +-20 +4 +-9 +9 +-6 +12 +-3 +14 +-4 +13 +-2 +16 +-2 +13 +-4 +14 +-3 +13 +-5 +13 +-3 +12 +-5 +11 +-4 +12 +-6 +10 +-6 +12 +-6 +9 +-8 +10 +-6 +11 +-7 +10 +-5 +11 +-6 +10 +-5 +11 +-7 +10 +-6 +12 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +10 +-7 +10 +-5 +12 +22 +0 +15 +-4 +12 +-8 +9 +-8 +10 +-9 +8 +-9 +9 +-9 +9 +-10 +9 +-8 +8 +-9 +9 +-7 +11 +-9 +9 +-8 +11 +-7 +9 +-8 +11 +-7 +-39 +-11 +-18 +5 +-10 +9 +-6 +14 +-3 +13 +-4 +14 +-2 +14 +-4 +13 +-3 +14 +-3 +12 +-4 +14 +-5 +12 +-5 +13 +-4 +11 +-6 +11 +-4 +12 +22 +0 +16 +-4 +12 +-8 +10 +-7 +10 +-8 +9 +-7 +11 +-8 +9 +-8 +11 +-8 +8 +-9 +10 +-7 +10 +-9 +9 +-7 +10 +-8 +9 +-7 +11 +-8 +-40 +-10 +-17 +5 +-10 +10 +-4 +14 +-3 +13 +-3 +15 +-3 +14 +-4 +14 +-3 +13 +-5 +12 +-3 +13 +-6 +11 +-5 +13 +-5 +10 +-6 +12 +-5 +11 +-6 +11 +-5 +11 +-6 +10 +-5 +12 +-7 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +11 +-7 +11 +-5 +11 +-6 +10 +-5 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-7 +10 +-7 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +10 +-6 +10 +-7 +10 +-6 +11 +-7 +10 +22 +1 +15 +-6 +10 +-7 +11 +-8 +9 +-9 +10 +-8 +9 +-9 +10 +-8 +8 +-10 +9 +-7 +10 +-9 +9 +-8 +11 +-8 +9 +-8 +11 +-7 +10 +-9 +-40 +-10 +-20 +3 +-10 +10 +-5 +12 +-5 +13 +-2 +14 +-4 +13 +-3 +14 +-3 +12 +-4 +13 +-4 +12 +-5 +13 +-4 +12 +-5 +12 +-3 +13 +-6 +11 +-5 +12 +-5 +10 +-6 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-7 +10 +-6 +12 +-6 +9 +-8 +10 +-6 +11 +-7 +10 +-6 +10 +-7 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-7 +11 +-5 +11 +-7 +11 +24 +1 +15 +-5 +13 +-6 +10 +-9 +9 +-7 +10 +-10 +8 +-9 +10 +-9 +8 +-9 +10 +-8 +9 +-9 +10 +-7 +9 +-9 +10 +-7 +11 +-9 +9 +-7 +-39 +-10 +-20 +3 +-8 +11 +-5 +12 +-3 +14 +-3 +13 +-4 +15 +-2 +12 +-4 +13 +-3 +13 +-5 +11 +-4 +13 +-5 +11 +-5 +12 +-5 +11 +-6 +12 +25 +1 +15 +-4 +14 +-6 +9 +-8 +11 +-7 +10 +-9 +10 +-7 +10 +-8 +10 +-7 +11 +-8 +10 +-7 +11 +-7 +9 +-9 +10 +-7 +10 +-9 +10 +-7 +-40 +-12 +-20 +4 +-9 +9 +-6 +12 +-2 +14 +-4 +13 +-3 +15 +-3 +12 +-3 +14 +-4 +12 +-5 +13 +-4 +11 +-6 +11 +-4 +12 +-6 +11 +-5 +12 +24 +0 +15 +-3 +13 +-6 +10 +-7 +11 +-8 +9 +-9 +10 +-8 +8 +-10 +9 +-8 +10 +-10 +8 +-8 +10 +-8 +9 +-8 +11 +-8 +10 +-8 +11 +-6 +-40 +-11 +-19 +5 +-8 +9 +-6 +13 +-3 +14 +-4 +14 +-2 +14 +-3 +13 +-3 +14 +-4 +12 +-4 +14 +-4 +11 +-6 +12 +-4 +12 +-6 +11 +-5 +11 +-6 +10 +-6 +12 +-6 +10 +-7 +12 +-5 +10 +-7 +11 +-5 +12 +-7 +10 +-5 +12 +-6 +10 +-6 +12 +-6 +10 +-7 +11 +-6 +10 +-7 +10 +-5 +11 +-8 +9 +-7 +11 +-6 +9 +-7 +11 +-6 +11 +-7 +11 +-5 +11 +-7 +10 +-5 +11 +-8 +9 +-6 +11 +-6 +9 +-7 +11 +-5 +11 +-7 +10 +-6 +11 +22 +0 +16 +-4 +11 +-8 +10 +-7 +11 +-9 +9 +-8 +10 +-8 +8 +-9 +10 +-8 +9 +-9 +10 +-7 +10 +-9 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +-41 +-11 +-18 +4 +-9 +9 +-5 +13 +-4 +13 +-3 +15 +-2 +13 +-4 +14 +-2 +14 +-5 +12 +-4 +13 +-5 +11 +-5 +12 +-5 +11 +-6 +12 +-4 +11 +-6 +11 +-5 +12 +-7 +10 +-6 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-6 +10 +-5 +11 +-7 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +11 +22 +0 +16 +-5 +11 +-8 +10 +-8 +9 +-9 +9 +-7 +10 +-9 +9 +-8 +11 +-8 +8 +-9 +10 +-8 +9 +-9 +10 +-8 +9 +-9 +10 +-6 +11 +-8 +-40 +-9 +-17 +5 +-10 +10 +-4 +13 +-3 +13 +-2 +15 +-3 +13 +-4 +14 +-3 +12 +-5 +12 +-3 +13 +-6 +11 +-5 +12 +-5 +10 +-6 +12 +-6 +11 +23 +2 +17 +-5 +12 +-6 +12 +-7 +9 +-9 +10 +-7 +10 +-9 +9 +-8 +10 +-8 +9 +-7 +11 +-8 +9 +-8 +11 +-7 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-6 +12 +-7 +10 +-7 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +10 +-7 +11 +-7 +10 +-8 +12 +-6 +10 +-8 +10 +-6 +11 +-9 +10 +-7 +12 +-7 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-9 +9 +-7 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +-39 +-9 +-19 +3 +-9 +12 +-4 +12 +-4 +14 +-2 +15 +-3 +14 +-2 +15 +-3 +13 +-3 +14 +-4 +12 +-5 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +10 +24 +1 +16 +-5 +13 +-6 +11 +-8 +10 +-7 +11 +-8 +9 +-8 +11 +-7 +9 +-9 +10 +-7 +10 +-9 +10 +-7 +11 +-7 +10 +-7 +11 +-8 +10 +-8 +-39 +-10 +-20 +2 +-9 +11 +-5 +12 +-4 +15 +-2 +14 +-4 +14 +-2 +13 +-4 +12 +-3 +13 +-5 +11 +-5 +13 +-4 +11 +-6 +12 +-5 +11 +-7 +11 +24 +1 +16 +-5 +13 +-6 +10 +-8 +10 +-7 +11 +-9 +8 +-8 +10 +-8 +8 +-9 +10 +-8 +10 +-9 +10 +-7 +9 +-8 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +10 +-7 +12 +-6 +11 +-8 +11 +-6 +11 +-7 +10 +-6 +-38 +-11 +-19 +4 +-8 +11 +-6 +12 +-3 +14 +-3 +13 +-3 +14 +-3 +13 +-4 +14 +-3 +12 +-5 +12 +-3 +13 +-6 +11 +-4 +13 +-4 +11 +-5 +12 +-5 +11 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-7 +10 +-6 +10 +-7 +10 +-6 +11 +22 +-1 +14 +-4 +12 +-9 +8 +-9 +10 +-9 +7 +-10 +10 +-8 +10 +-9 +10 +-7 +10 +-8 +10 +-7 +11 +-9 +9 +-8 +11 +-7 +9 +-9 +10 +-7 +-40 +-12 +-19 +4 +-10 +10 +-5 +14 +-2 +14 +-3 +15 +-1 +15 +-4 +13 +-3 +14 +-4 +11 +-5 +12 +-5 +11 +-6 +12 +-5 +11 +-6 +11 +-4 +12 +-7 +10 +-5 +12 +-5 +10 +-5 +12 +-5 +11 +-6 +12 +-5 +10 +-7 +10 +-5 +11 +-8 +9 +-6 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-5 +10 +-7 +11 +-6 +10 +-7 +10 +-5 +10 +-7 +10 +-5 +11 +-8 +9 +-7 +11 +-6 +9 +-7 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-7 +10 +-5 +11 +-6 +10 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-7 +11 +-5 +11 +-7 +10 +-5 +11 +-6 +10 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +10 +-5 +11 +-7 +10 +-6 +11 +-6 +9 +-6 +11 +-7 +10 +-7 +10 +-6 +9 +-8 +9 +-6 +11 +-8 +9 +-6 +11 +-6 +9 +-6 +12 +-6 +10 +-6 +11 +-5 +10 +-7 +10 +-6 +11 +-8 +9 +-6 +11 +-6 +9 +21 +0 +15 +-6 +10 +-7 +11 +-9 +9 +-9 +10 +-8 +8 +-10 +9 +-7 +10 +-9 +9 +-7 +11 +-8 +9 +-7 +11 +-8 +10 +-8 +11 +-6 +10 +-8 +11 +-6 +11 +-9 +9 +-7 +11 +-7 +10 +-7 +11 +-7 +10 +-8 +11 +-7 +9 +-9 +10 +-7 +11 +-9 +9 +-7 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +11 +-6 +11 +-7 +12 +-5 +11 +-7 +11 +-6 +12 +-8 +10 +-7 +12 +-7 +10 +-8 +-39 +-9 +-18 +3 +-8 +11 +-4 +13 +-3 +15 +-2 +13 +-4 +13 +-2 +14 +-5 +12 +-3 +14 +-4 +11 +-4 +13 +-5 +11 +-6 +12 +-5 +10 +-7 +11 +-4 +12 +-6 +10 +-5 +12 +-5 +10 +-6 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +11 +-6 +9 +-7 +11 +-7 +9 +-8 +10 +-6 +9 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-6 +11 +-8 +9 +-6 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +10 +-6 +10 +-7 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-7 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +10 +-5 +11 +-6 +10 +-5 +12 +-6 +10 +-6 +12 +-5 +9 +-7 +10 +-6 +10 +-8 +9 +-7 +10 +-7 +8 +-7 +10 +-7 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +11 +-6 +10 +-6 +11 +-6 +10 +-7 +11 +-6 +9 +-8 +9 +-6 +10 +-8 +9 +-7 +11 +22 +-1 +15 +-4 +12 +-7 +9 +-8 +10 +-9 +8 +-9 +10 +-8 +8 +-10 +9 +-7 +10 +-9 +9 +-8 +10 +-8 +9 +-7 +11 +-8 +10 +-8 +12 +-6 +10 +-8 +11 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-7 +11 +-8 +10 +-8 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +12 +-7 +10 +-7 +11 +-7 +-40 +-11 +-18 +4 +-10 +9 +-5 +14 +-2 +13 +-3 +14 +-2 +14 +-4 +13 +-3 +13 +-4 +12 +-3 +14 +-5 +12 +-4 +14 +-4 +11 +-6 +12 +-4 +12 +22 +1 +17 +-4 +12 +-7 +11 +-7 +9 +-9 +9 +-7 +10 +-9 +9 +-8 +11 +-7 +9 +-9 +10 +-8 +9 +-9 +10 +-7 +9 +-9 +10 +-7 +11 +-8 +-40 +-10 +-17 +5 +-10 +10 +-4 +14 +-3 +13 +-2 +15 +-3 +13 +-4 +14 +-3 +12 +-4 +13 +-3 +13 +-5 +11 +-4 +12 +-5 +10 +-6 +12 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-5 +10 +-7 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-5 +11 +-7 +9 +-6 +12 +-6 +9 +22 +1 +16 +-5 +11 +-7 +11 +-8 +9 +-8 +11 +-7 +9 +-9 +10 +-7 +10 +-9 +9 +-8 +10 +-8 +9 +-8 +11 +-8 +10 +-9 +10 +-7 +10 +-8 +-39 +-8 +-17 +3 +-9 +11 +-4 +13 +-4 +13 +-2 +14 +-3 +13 +-3 +14 +-4 +12 +-4 +14 +-3 +11 +-5 +12 +-3 +12 +-6 +11 +-4 +12 +-5 +11 +24 +2 +16 +-5 +11 +-6 +11 +-9 +8 +-9 +10 +-8 +8 +-10 +9 +-8 +9 +-9 +9 +-7 +10 +-8 +9 +-7 +11 +-8 +9 +-8 +11 +-7 +9 +-8 +-39 +-9 +-18 +3 +-9 +12 +-4 +13 +-3 +15 +-1 +13 +-3 +14 +-2 +14 +-4 +12 +-3 +14 +-4 +11 +-6 +12 +-5 +11 +-7 +11 +-5 +10 +-7 +10 +-5 +12 +-6 +10 +-6 +12 +-5 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +10 +23 +0 +14 +-5 +12 +-6 +9 +-9 +10 +-7 +10 +-9 +9 +-8 +10 +-8 +9 +-8 +11 +-8 +10 +-8 +11 +-7 +9 +-8 +10 +-6 +11 +-9 +9 +-7 +-38 +-10 +-20 +3 +-8 +10 +-5 +12 +-3 +15 +-3 +13 +-3 +15 +-2 +12 +-4 +13 +-3 +13 +-5 +12 +-4 +12 +-5 +11 +-5 +12 +-6 +11 +-6 +12 +-5 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +12 +-6 +10 +-6 +12 +-6 +10 +-6 +11 +-5 +10 +-7 +10 +-5 +11 +-8 +9 +-6 +11 +-6 +9 +-6 +11 +23 +0 +15 +-4 +12 +-8 +9 +-8 +10 +-8 +8 +-9 +9 +-7 +9 +-10 +9 +-8 +9 +-9 +8 +-8 +10 +-9 +9 +-8 +11 +-7 +9 +-8 +10 +-6 +-39 +-12 +-19 +4 +-9 +10 +-6 +13 +-2 +13 +-3 +14 +-1 +15 +-4 +13 +-3 +14 +-3 +11 +-5 +12 +-4 +12 +-6 +12 +-4 +12 +-5 +11 +-4 +12 +22 +0 +16 +-3 +13 +-7 +10 +-7 +11 +-7 +9 +-8 +10 +-8 +9 +-9 +10 +-8 +8 +-9 +9 +-7 +10 +-9 +9 +-7 +11 +-7 +9 +-8 +11 +-7 +-39 +-11 +-18 +5 +-9 +10 +-5 +14 +-3 +12 +-4 +14 +-2 +14 +-4 +13 +-3 +14 +-4 +11 +-4 +13 +-5 +11 +-5 +12 +-4 +10 +-6 +11 +-4 +12 +-6 +10 +-5 +12 +-5 +10 +-6 +12 +-5 +11 +-6 +11 +-5 +10 +-6 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +10 +-8 +10 +-6 +9 +-7 +9 +-5 +11 +-7 +9 +-6 +12 +-5 +9 +-7 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +8 +-8 +10 +-6 +10 +20 +-1 +15 +-5 +11 +-8 +10 +-8 +8 +-9 +8 +-8 +10 +-10 +8 +-8 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +11 +-6 +10 +-8 +10 +-6 +11 +-8 +-40 +-10 +-17 +4 +-10 +9 +-4 +14 +-3 +13 +-3 +15 +-3 +14 +-4 +14 +-2 +12 +-4 +12 +-3 +13 +-5 +11 +-5 +12 +-5 +10 +-6 +12 +-4 +11 +-6 +12 +-4 +11 +-6 +11 +-4 +12 +-6 +10 +-6 +12 +-5 +9 +-7 +11 +-5 +10 +-8 +10 +-6 +10 +-7 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +10 +-7 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +11 +-8 +9 +-6 +10 +-7 +9 +-6 +11 +-7 +10 +22 +1 +16 +-6 +11 +-7 +11 +-7 +8 +-9 +10 +-8 +9 +-9 +9 +-7 +9 +-8 +9 +-7 +10 +-9 +8 +-8 +10 +-8 +8 +-8 +11 +-6 +11 +-8 +-39 +-9 +-18 +4 +-10 +10 +-4 +12 +-4 +13 +-1 +15 +-3 +13 +-2 +15 +-2 +13 +-4 +14 +-3 +13 +-5 +12 +-3 +12 +-5 +11 +-4 +12 +-6 +10 +23 +2 +16 +-5 +11 +-7 +10 +-8 +8 +-9 +10 +-9 +9 +-9 +10 +-7 +9 +-8 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-7 +11 +-7 +10 +-8 +-39 +-9 +-19 +3 +-9 +11 +-4 +12 +-4 +14 +-2 +14 +-4 +13 +-3 +13 +-4 +12 +-3 +13 +-5 +11 +-5 +13 +-4 +10 +-6 +11 +-4 +12 +-6 +11 +24 +2 +16 +-5 +13 +-6 +10 +-8 +9 +-7 +10 +-9 +8 +-8 +10 +-8 +8 +-9 +10 +-7 +10 +-8 +10 +-7 +9 +-8 +10 +-6 +11 +-8 +10 +-7 +-38 +-9 +-20 +3 +-8 +10 +-5 +12 +-3 +14 +-3 +13 +-4 +14 +-2 +13 +-4 +13 +-2 +13 +-5 +12 +-4 +13 +-4 +10 +-6 +11 +-6 +10 +-7 +11 +-5 +10 +-6 +11 +-4 +12 +-7 +10 +-5 +12 +-5 +10 +-6 +12 +-5 +11 +-6 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +11 +-5 +10 +-7 +10 +-5 +10 +-7 +10 +-5 +11 +-7 +9 +-7 +11 +-6 +8 +-8 +10 +-6 +10 +-8 +9 +-6 +10 +-7 +9 +-6 +11 +-7 +10 +-6 +12 +23 +-1 +14 +-5 +12 +-7 +9 +-9 +10 +-8 +9 +-9 +9 +-7 +9 +-9 +9 +-7 +10 +-9 +8 +-8 +11 +-7 +8 +-9 +10 +-7 +10 +-9 +10 +-7 +-39 +-11 +-19 +4 +-8 +10 +-5 +13 +-2 +15 +-4 +13 +-3 +15 +-3 +12 +-4 +13 +-3 +12 +-5 +13 +-3 +12 +-5 +11 +-4 +12 +-6 +10 +-5 +12 +-5 +10 +-6 +12 +-5 +11 +-7 +10 +-5 +10 +-6 +10 +-5 +11 +-7 +10 +-6 +12 +-5 +10 +-7 +11 +-5 +11 +-7 +10 +-6 +10 +-7 +9 +-6 +11 +21 +-1 +14 +-4 +12 +-8 +9 +-8 +10 +-8 +7 +-10 +9 +-9 +9 +-9 +9 +-7 +9 +-9 +9 +-7 +10 +-9 +9 +-8 +11 +-7 +9 +-8 +11 +-7 +-39 +-11 +-18 +5 +-9 +10 +-5 +14 +-2 +13 +-3 +14 +-1 +14 +-4 +13 +-3 +13 +-4 +12 +-4 +13 +-4 +11 +-5 +12 +-4 +10 +-6 +11 +-4 +12 +22 +1 +16 +-3 +12 +-7 +11 +-6 +10 +-8 +9 +-8 +10 +-9 +8 +-9 +10 +-7 +8 +-8 +10 +-7 +10 +-8 +11 +-6 +11 +-7 +11 +-6 +12 +-7 +10 +-7 +11 +-6 +9 +-8 +11 +-6 +11 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-7 +11 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +10 +-8 +9 +-7 +11 +-8 +10 +-7 +12 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-6 +12 +-7 +10 +-8 +11 +-7 +9 +-8 +10 +-6 +11 +-8 +-40 +-9 +-17 +4 +-10 +10 +-4 +12 +-4 +12 +-2 +14 +-4 +12 +-3 +14 +-3 +12 +-4 +13 +-3 +12 +-5 +12 +-4 +12 +-5 +11 +-4 +12 +-5 +10 +22 +2 +16 +-5 +11 +-6 +11 +-7 +9 +-8 +11 +-7 +10 +-9 +10 +-7 +9 +-8 +10 +-6 +11 +-9 +9 +-7 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +-38 +-9 +-18 +3 +-9 +11 +-4 +12 +-4 +14 +-2 +14 +-4 +13 +-2 +13 +-4 +12 +-4 +13 +-5 +11 +-5 +12 +-4 +10 +-6 +10 +-5 +11 +-7 +10 +23 +2 +16 +-5 +12 +-5 +11 +-8 +9 +-7 +10 +-9 +9 +-8 +11 +-7 +9 +-8 +11 +-6 +11 +-7 +11 +-6 +10 +-8 +9 +-7 +11 +-8 +9 +-7 +11 +-7 +9 +-8 +11 +-6 +11 +-7 +11 +-6 +11 +-7 +10 +-6 +11 +-8 +10 +-7 +12 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-6 +-37 +-10 +-19 +4 +-7 +11 +-5 +12 +-3 +15 +-2 +12 +-4 +14 +-3 +13 +-4 +13 +-3 +13 +-4 +12 +-3 +13 +-5 +11 +-5 +13 +-4 +10 +-6 +11 +-4 +11 +-6 +10 +-5 +11 +-5 +10 +-5 +12 +-6 +10 +-6 +11 +-5 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +11 +-6 +10 +-6 +11 +-6 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +11 +-6 +9 +-6 +11 +-6 +10 +-7 +11 +-5 +9 +-7 +10 +-6 +10 +-8 +9 +-6 +10 +-6 +9 +-6 +11 +22 +0 +14 +-4 +12 +-8 +9 +-8 +10 +-8 +8 +-9 +10 +-7 +10 +-9 +9 +-7 +9 +-8 +9 +-7 +11 +-8 +10 +-7 +11 +-7 +9 +-8 +10 +-6 +-38 +-11 +-19 +4 +-9 +9 +-6 +13 +-2 +13 +-3 +13 +-2 +14 +-4 +12 +-3 +14 +-3 +12 +-4 +13 +-3 +12 +-5 +12 +-4 +11 +-6 +10 +-4 +12 +-6 +10 +-5 +12 +-5 +9 +-7 +11 +-5 +11 +-7 +11 +-5 +11 +-6 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +10 +-8 +10 +-6 +10 +-6 +9 +-6 +11 +-6 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +11 +-6 +9 +-6 +11 +-6 +10 +-7 +11 +-5 +9 +-7 +10 +-5 +10 +-8 +9 +-6 +10 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +10 +-7 +10 +-5 +9 +-7 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-6 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +8 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +9 +-5 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +11 +-5 +11 +-7 +10 +-5 +10 +-7 +9 +-6 +10 +-8 +9 +-7 +10 +-6 +9 +21 +1 +16 +-4 +10 +-7 +11 +-8 +9 +-9 +10 +-7 +9 +-9 +9 +-7 +10 +-9 +9 +-8 +11 +-7 +9 +-9 +10 +-7 +10 +-8 +10 +-6 +10 +-7 +10 +-5 +12 +-7 +10 +-7 +11 +-7 +9 +-8 +11 +-6 +11 +-8 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-8 +10 +-7 +10 +-8 +10 +-6 +10 +-7 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +11 +-6 +11 +-8 +10 +-6 +11 +-7 +10 +-7 +11 +-8 +9 +-8 +11 +-6 +9 +-8 +-38 +-9 +-18 +3 +-9 +11 +-4 +13 +-4 +14 +-2 +13 +-3 +13 +-2 +14 +-4 +12 +-3 +14 +-3 +11 +-5 +12 +-4 +12 +-6 +11 +-4 +11 +-6 +10 +-5 +11 +-6 +10 +-5 +12 +-4 +10 +-6 +11 +-4 +11 +-7 +10 +-5 +11 +-6 +10 +-5 +12 +-6 +10 +-5 +12 +-4 +10 +-6 +11 +-5 +11 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-7 +10 +-7 +11 +-5 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +10 +-6 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +10 +-6 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-6 +11 +-6 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +11 +-6 +9 +-7 +10 +-7 +9 +-8 +10 +-6 +9 +-7 +10 +-5 +11 +-7 +9 +-6 +10 +-6 +8 +-7 +10 +-7 +9 +-7 +10 +-6 +9 +-8 +9 +-6 +10 +-8 +9 +-6 +11 +-6 +9 +-6 +11 +-5 +10 +-7 +11 +-5 +10 +-7 +9 +-5 +11 +-7 +9 +-6 +11 +22 +-1 +14 +-4 +12 +-7 +9 +-8 +10 +-8 +8 +-9 +10 +-8 +8 +-9 +9 +-7 +10 +-9 +9 +-7 +10 +-8 +8 +-8 +10 +-8 +9 +-9 +10 +-7 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +12 +-6 +10 +-7 +11 +-7 +10 +-8 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-7 +11 +-7 +9 +-8 +10 +-7 +-39 +-11 +-18 +4 +-9 +9 +-5 +14 +-2 +13 +-3 +14 +-1 +15 +-3 +13 +-2 +14 +-3 +11 +-4 +13 +-4 +11 +-5 +12 +-4 +11 +-5 +11 +-3 +12 +22 +1 +16 +-3 +12 +-7 +11 +-6 +10 +-8 +9 +-7 +10 +-9 +8 +-8 +11 +-7 +8 +-8 +10 +-7 +10 +-8 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +-40 +-11 +-17 +4 +-10 +9 +-5 +13 +-4 +12 +-3 +14 +-3 +13 +-4 +13 +-3 +12 +-5 +12 +-3 +12 +-6 +10 +-5 +12 +-4 +10 +-6 +12 +-5 +11 +-7 +11 +-5 +10 +-6 +10 +-5 +11 +-7 +10 +-6 +12 +-5 +9 +-7 +11 +-4 +11 +-7 +10 +-5 +11 +-6 +10 +-5 +11 +-6 +10 +-6 +11 +-5 +9 +21 +1 +15 +-5 +10 +-7 +11 +-8 +9 +-9 +9 +-7 +8 +-9 +9 +-6 +10 +-8 +9 +-7 +11 +-7 +8 +-8 +10 +-7 +9 +-8 +10 +-6 +9 +-8 +-39 +-9 +-18 +2 +-10 +10 +-4 +12 +-4 +13 +-2 +14 +-3 +12 +-2 +14 +-4 +12 +-4 +14 +-3 +11 +-5 +12 +-4 +12 +-6 +10 +-5 +11 +-5 +10 +23 +2 +15 +-4 +11 +-6 +11 +-8 +9 +-8 +11 +-7 +8 +-8 +10 +-6 +10 +-8 +9 +-7 +10 +-8 +9 +-7 +11 +-8 +9 +-8 +11 +-7 +9 +-8 +-38 +-9 +-18 +3 +-9 +11 +-4 +13 +-4 +14 +-2 +13 +-3 +13 +-2 +14 +-5 +11 +-4 +13 +-4 +10 +-5 +12 +-4 +11 +-6 +11 +-5 +10 +-6 +10 +-5 +12 +-6 +10 +-5 +12 +-5 +10 +-6 +11 +-5 +10 +-7 +10 +-5 +10 +-6 +10 +-5 +11 +-7 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-8 +9 +22 +0 +14 +-6 +11 +-6 +9 +-8 +9 +-7 +10 +-9 +8 +-8 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +10 +-6 +9 +-8 +10 +-6 +11 +-8 +9 +-7 +-38 +-10 +-19 +3 +-8 +10 +-5 +11 +-3 +14 +-4 +12 +-4 +13 +-3 +11 +-4 +12 +-2 +13 +-5 +11 +-3 +13 +-4 +11 +-4 +12 +-5 +11 +-6 +12 +-4 +10 +-6 +10 +-5 +11 +-7 +9 +-6 +10 +-6 +8 +-6 +11 +-6 +10 +-6 +11 +-5 +9 +-7 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-6 +11 +22 +0 +14 +-4 +12 +-7 +9 +-8 +10 +-7 +8 +-9 +9 +-8 +9 +-10 +8 +-7 +10 +-8 +9 +-7 +10 +-8 +9 +-8 +11 +-6 +9 +-8 +11 +-6 +-38 +-11 +-18 +5 +-8 +10 +-5 +13 +-2 +13 +-3 +13 +-1 +14 +-3 +13 +-3 +14 +-3 +11 +-4 +13 +-4 +12 +-5 +12 +-4 +11 +-5 +10 +-4 +12 +22 +0 +15 +-4 +12 +-8 +9 +-7 +10 +-8 +8 +-8 +10 +-8 +9 +-9 +10 +-7 +8 +-8 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +9 +-7 +11 +-7 +-39 +-11 +-18 +4 +-10 +9 +-4 +14 +-2 +13 +-3 +14 +-1 +14 +-3 +13 +-2 +13 +-4 +11 +-4 +12 +-5 +11 +-5 +13 +-4 +10 +-6 +11 +-4 +11 +-6 +10 +-4 +11 +-6 +9 +-6 +11 +-7 +9 +-7 +10 +-6 +8 +-8 +10 +-5 +10 +-7 +9 +-5 +11 +-6 +9 +-6 +11 +-6 +10 +-7 +11 +-5 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +11 +-5 +10 +-5 +12 +-6 +10 +-6 +11 +-5 +9 +-7 +9 +-5 +10 +-8 +8 +-6 +11 +-6 +8 +-7 +10 +-6 +9 +20 +0 +15 +-6 +10 +-7 +11 +-7 +8 +-9 +9 +-7 +9 +-9 +9 +-7 +9 +-9 +8 +-7 +10 +-8 +9 +-7 +11 +-6 +9 +-8 +11 +-6 +11 +-8 +-39 +-9 +-18 +3 +-10 +9 +-5 +11 +-5 +12 +-2 +14 +-4 +12 +-3 +14 +-3 +12 +-4 +13 +-3 +12 +-5 +12 +-4 +11 +-5 +11 +-4 +12 +-6 +10 +-5 +12 +-5 +10 +-6 +11 +-5 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-7 +9 +-6 +11 +-5 +9 +-7 +11 +-5 +11 +-7 +10 +-5 +10 +-6 +9 +-6 +11 +-7 +9 +-6 +11 +-5 +9 +-7 +10 +-6 +10 +-8 +9 +-6 +10 +-7 +9 +-5 +11 +-7 +10 +-6 +11 +-5 +9 +-6 +11 +-5 +11 +-7 +9 +22 +1 +14 +-6 +11 +-6 +9 +-9 +8 +-7 +10 +-9 +8 +-8 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +10 +-7 +9 +-8 +9 +-6 +11 +-8 +10 +-6 +-37 +-9 +-19 +3 +-8 +10 +-5 +11 +-4 +14 +-3 +12 +-4 +14 +-2 +12 +-4 +13 +-2 +13 +-5 +11 +-4 +12 +-4 +10 +-5 +11 +-5 +11 +-6 +11 +23 +1 +15 +-5 +13 +-5 +9 +-8 +10 +-6 +10 +-9 +8 +-7 +10 +-8 +8 +-8 +10 +-8 +9 +-8 +11 +-6 +9 +-7 +11 +-6 +11 +-8 +9 +-6 +-38 +-10 +-19 +4 +-8 +10 +-5 +12 +-2 +15 +-3 +13 +-2 +15 +-2 +12 +-4 +13 +-3 +13 +-5 +12 +-4 +12 +-5 +10 +-4 +12 +-6 +10 +-5 +12 +23 +0 +14 +-4 +13 +-6 +9 +-8 +10 +-8 +9 +-9 +9 +-7 +8 +-9 +8 +-7 +10 +-9 +8 +-7 +11 +-7 +9 +-8 +11 +-7 +10 +-8 +10 +-6 +-39 +-11 +-19 +4 +-8 +8 +-6 +12 +-2 +14 +-4 +13 +-2 +14 +-3 +12 +-3 +14 +-4 +12 +-4 +13 +-3 +11 +-5 +12 +-3 +12 +-6 +10 +-5 +12 +-5 +10 +-6 +11 +-6 +10 +-7 +11 +-5 +9 +-7 +10 +-5 +11 +-7 +10 +-5 +11 +-5 +10 +-5 +12 +-5 +11 +-6 +11 +-4 +10 +-6 +10 +-5 +11 +-7 +9 +-6 +10 +-6 +9 +-7 +10 +-6 +10 +-7 +10 +-5 +9 +-7 +9 +-5 +11 +-7 +9 +-6 +11 +-5 +9 +-7 +11 +-5 +10 +-7 +10 +-6 +9 +21 +-1 +15 +-4 +10 +-8 +9 +-7 +9 +-10 +8 +-8 +9 +-8 +8 +-8 +10 +-8 +9 +-8 +10 +-7 +9 +-8 +10 +-6 +11 +-8 +9 +-6 +11 +-6 +-39 +-10 +-17 +4 +-9 +9 +-4 +13 +-4 +12 +-3 +14 +-2 +12 +-4 +13 +-2 +13 +-5 +11 +-3 +12 +-4 +11 +-4 +12 +-5 +11 +-5 +12 +-4 +10 +-6 +11 +-4 +11 +-7 +9 +-5 +11 +-5 +9 +-6 +11 +-6 +10 +-7 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +10 +21 +1 +15 +-5 +10 +-7 +11 +-7 +8 +-9 +9 +-7 +10 +-9 +9 +-7 +10 +-8 +8 +-8 +10 +-9 +8 +-9 +10 +-7 +9 +-8 +10 +-6 +10 +-8 +-39 +-10 +-18 +4 +-9 +10 +-4 +12 +-4 +13 +-1 +15 +-3 +13 +-2 +15 +-2 +12 +-4 +13 +-3 +12 +-5 +12 +-4 +11 +-5 +10 +-4 +12 +-6 +10 +22 +2 +16 +-5 +11 +-6 +11 +-7 +8 +-8 +10 +-8 +9 +-9 +10 +-7 +8 +-9 +8 +-7 +10 +-9 +8 +-7 +10 +-7 +9 +-8 +11 +-7 +9 +-8 +10 +-7 +9 +-8 +10 +-6 +11 +-8 +9 +-6 +11 +-6 +9 +-7 +11 +-7 +10 +-8 +10 +-6 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +12 +-6 +10 +-7 +11 +-6 +11 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +10 +-6 +11 +-6 +9 +-7 +11 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-7 +10 +-6 +-37 +-9 +-19 +3 +-8 +11 +-4 +12 +-2 +14 +-2 +13 +-3 +14 +-2 +12 +-4 +13 +-2 +13 +-5 +11 +-4 +12 +-5 +10 +-5 +12 +-5 +11 +-6 +12 +24 +1 +15 +-4 +13 +-6 +9 +-8 +10 +-7 +9 +-9 +9 +-7 +10 +-8 +9 +-7 +10 +-8 +9 +-8 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +9 +-6 +-38 +-11 +-19 +4 +-8 +9 +-5 +12 +-2 +15 +-3 +13 +-2 +15 +-2 +12 +-4 +13 +-3 +12 +-5 +12 +-4 +11 +-5 +11 +-4 +12 +-6 +10 +-5 +12 +23 +0 +14 +-4 +12 +-6 +9 +-8 +10 +-8 +9 +-8 +10 +-7 +9 +-8 +10 +-6 +10 +-9 +8 +-7 +10 +-8 +8 +-8 +10 +-7 +9 +-8 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +9 +-6 +11 +-6 +10 +-7 +11 +-6 +10 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-6 +11 +-6 +10 +-7 +11 +-6 +-38 +-11 +-17 +5 +-9 +9 +-5 +14 +-2 +12 +-3 +14 +-2 +14 +-4 +12 +-2 +13 +-3 +12 +-3 +13 +-4 +11 +-4 +12 +-4 +10 +-6 +11 +-4 +11 +-7 +10 +-5 +11 +-6 +9 +-6 +11 +-6 +10 +-6 +11 +-5 +9 +-7 +10 +-5 +11 +-7 +9 +-5 +11 +-5 +9 +-6 +11 +-6 +10 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +11 +-6 +9 +-6 +11 +-6 +10 +-7 +10 +-5 +9 +-7 +9 +-5 +10 +-8 +9 +-6 +11 +-6 +9 +-6 +11 +-5 +10 +21 +1 +15 +-5 +10 +-7 +11 +-7 +8 +-9 +9 +-7 +10 +-9 +9 +-7 +10 +-8 +9 +-7 +10 +-8 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +-40 +-10 +-18 +3 +-10 +10 +-4 +12 +-4 +13 +-2 +14 +-3 +12 +-3 +14 +-3 +11 +-5 +12 +-3 +12 +-6 +11 +-4 +11 +-5 +11 +-4 +12 +-5 +10 +-5 +12 +-5 +9 +-7 +11 +-5 +11 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +10 +-6 +11 +-5 +9 +-6 +10 +-5 +11 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +9 +-6 +11 +-6 +9 +-7 +11 +-6 +8 +-7 +10 +-5 +10 +-7 +9 +-6 +10 +-6 +9 +-6 +11 +-6 +10 +-6 +11 +-5 +10 +-6 +10 +-5 +10 +-7 +8 +-6 +10 +-7 +8 +-6 +10 +-6 +10 +-7 +11 +-5 +9 +-7 +9 +-5 +10 +-7 +9 +-6 +11 +-6 +9 +-6 +11 +-6 +10 +-7 +11 +-5 +9 +-7 +9 +-5 +10 +-8 +9 +-6 +10 +-6 +8 +-7 +10 +-6 +9 +-7 +10 +-5 +9 +-7 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +10 +-7 +10 +-5 +9 +-7 +10 +-5 +11 +-6 +10 +-5 +11 +-5 +9 +-7 +10 +21 +0 +13 +-5 +12 +-7 +9 +-8 +10 +-7 +8 +-9 +9 +-7 +10 +-9 +8 +-7 +10 +-8 +8 +-8 +10 +-8 +9 +-8 +10 +-7 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +11 +-7 +9 +-6 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +10 +-6 +11 +-7 +9 +-7 +11 +-7 +9 +-8 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-6 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-6 +11 +-6 +10 +-7 +11 +-6 +-38 +-10 +-17 +5 +-8 +10 +-4 +14 +-2 +13 +-3 +14 +-1 +14 +-4 +13 +-2 +13 +-4 +11 +-3 +13 +-4 +11 +-5 +13 +-4 +10 +-5 +11 +-4 +12 +-6 +11 +-4 +11 +-5 +10 +-5 +11 +-6 +10 +-6 +11 +-5 +9 +-7 +10 +-4 +11 +-6 +10 +-5 +10 +-6 +8 +-7 +10 +-7 +9 +-7 +10 +-5 +9 +-7 +10 +-4 +11 +-7 +9 +-5 +11 +-6 +9 +-6 +11 +-6 +9 +-7 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +11 +-6 +9 +-6 +11 +-6 +9 +-7 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +9 +-5 +11 +-5 +10 +-5 +11 +-5 +10 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +11 +-6 +8 +-7 +10 +-6 +9 +-7 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +10 +-7 +10 +-6 +9 +-7 +9 +-5 +10 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +10 +-7 +10 +-5 +9 +-7 +10 +-5 +11 +-7 +9 +-6 +11 +-6 +8 +-7 +10 +-6 +9 +-7 +11 +-5 +9 +-6 +10 +23 +1 +13 +-5 +11 +-6 +10 +-9 +8 +-8 +9 +-9 +8 +-8 +10 +-9 +8 +-8 +10 +-7 +8 +-9 +9 +-6 +10 +-8 +9 +-7 +10 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +9 +-7 +10 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +10 +-6 +-37 +-10 +-18 +5 +-7 +10 +-4 +13 +-1 +15 +-3 +13 +-2 +14 +-3 +11 +-4 +13 +-3 +12 +-5 +11 +-4 +11 +-5 +10 +-4 +12 +-6 +10 +-5 +12 +23 +0 +14 +-4 +12 +-6 +9 +-7 +10 +-8 +9 +-8 +10 +-7 +8 +-8 +9 +-6 +10 +-9 +9 +-7 +10 +-7 +9 +-7 +10 +-8 +9 +-8 +10 +-6 +-39 +-11 +-18 +5 +-8 +9 +-5 +13 +-2 +14 +-3 +14 +-1 +14 +-3 +12 +-3 +13 +-4 +11 +-4 +13 +-4 +10 +-5 +12 +-4 +12 +-6 +11 +-4 +11 +-5 +10 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-6 +11 +-5 +11 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-7 +9 +-7 +11 +-5 +9 +-7 +10 +-5 +10 +20 +-1 +15 +-5 +11 +-8 +10 +-7 +9 +-9 +8 +-7 +9 +-9 +8 +-8 +10 +-7 +8 +-8 +10 +-7 +10 +-8 +10 +-7 +9 +-8 +9 +-6 +11 +-8 +-39 +-10 +-17 +4 +-10 +9 +-4 +13 +-3 +12 +-2 +14 +-3 +13 +-3 +14 +-2 +12 +-4 +13 +-2 +13 +-4 +11 +-4 +12 +-4 +10 +-5 +11 +-5 +10 +21 +2 +16 +-5 +11 +-6 +11 +-6 +8 +-8 +10 +-7 +9 +-9 +9 +-7 +9 +-8 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +11 +-8 +-38 +-9 +-18 +3 +-9 +10 +-4 +12 +-4 +13 +-1 +14 +-4 +12 +-3 +14 +-3 +11 +-4 +13 +-4 +11 +-5 +12 +-4 +10 +-6 +10 +-4 +11 +-6 +10 +-5 +11 +-5 +9 +-6 +11 +-6 +10 +-7 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +9 +-6 +11 +-5 +9 +-6 +11 +-5 +10 +-7 +10 +-5 +9 +-7 +9 +22 +1 +13 +-5 +11 +-6 +10 +-9 +8 +-7 +10 +-7 +9 +-7 +11 +-7 +9 +-8 +10 +-7 +8 +-8 +9 +-6 +10 +-9 +9 +-7 +10 +-7 +8 +-8 +-38 +-11 +-19 +2 +-8 +10 +-5 +11 +-3 +15 +-2 +12 +-3 +14 +-2 +13 +-4 +12 +-3 +12 +-4 +11 +-4 +12 +-5 +10 +-5 +12 +-4 +10 +-6 +11 +-4 +11 +-6 +10 +-4 +11 +-5 +9 +-5 +11 +-6 +10 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +10 +-5 +11 +-5 +10 +-5 +11 +-6 +10 +-6 +11 +23 +0 +14 +-5 +12 +-6 +8 +-9 +9 +-7 +9 +-9 +9 +-7 +9 +-8 +9 +-6 +11 +-8 +9 +-7 +11 +-7 +8 +-8 +10 +-6 +10 +-8 +10 +-6 +-39 +-11 +-19 +4 +-8 +8 +-6 +11 +-3 +13 +-4 +12 +-3 +14 +-3 +12 +-3 +14 +-3 +12 +-4 +13 +-3 +11 +-5 +11 +-3 +12 +-6 +10 +-5 +11 +22 +0 +15 +-3 +12 +-6 +9 +-7 +10 +-9 +8 +-8 +10 +-7 +8 +-9 +9 +-7 +9 +-8 +9 +-6 +10 +-7 +9 +-7 +11 +-8 +9 +-7 +11 +-6 +-40 +-11 +-18 +4 +-9 +8 +-5 +13 +-2 +14 +-3 +14 +-1 +13 +-2 +13 +-1 +14 +-4 +12 +-4 +13 +-4 +10 +-5 +12 +-4 +11 +-6 +11 +-4 +11 +-5 +11 +-4 +12 +-6 +10 +-5 +12 +-5 +9 +-6 +10 +-5 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-7 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +9 +-8 +9 +-6 +9 +-7 +9 +-5 +10 +-7 +9 +-6 +11 +-5 +9 +20 +1 +15 +-4 +10 +-7 +10 +-7 +9 +-9 +10 +-7 +8 +-9 +8 +-7 +9 +-9 +8 +-8 +10 +-8 +8 +-8 +10 +-7 +9 +-7 +11 +-6 +10 +-7 +-38 +-9 +-17 +3 +-9 +10 +-4 +12 +-4 +12 +-2 +13 +-3 +12 +-2 +14 +-4 +12 +-4 +13 +-4 +10 +-5 +11 +-3 +12 +-5 +10 +-4 +12 +-4 +10 +-5 +12 +-5 +10 +-6 +11 +-5 +9 +-6 +10 +-4 +11 +-6 +10 +-5 +11 +-5 +9 +-6 +10 +-6 +9 +-7 +10 +-5 +9 +-7 +10 +-5 +11 +-7 +9 +-5 +11 +-5 +9 +-6 +11 +-6 +9 +-7 +10 +-6 +8 +-7 +9 +-5 +10 +-7 +9 +-6 +10 +-6 +8 +-6 +10 +-6 +9 +-7 +10 +-6 +8 +-7 +9 +22 +1 +13 +-5 +12 +-5 +10 +-8 +9 +-7 +9 +-8 +8 +-8 +9 +-9 +8 +-8 +10 +-7 +8 +-8 +10 +-6 +10 +-8 +9 +-7 +10 +-7 +9 +-6 +-37 +-10 +-18 +4 +-7 +11 +-5 +12 +-3 +15 +-2 +12 +-3 +13 +-2 +13 +-4 +12 +-3 +12 +-5 +11 +-4 +12 +-5 +10 +-5 +12 +-5 +9 +-6 +10 +23 +1 +14 +-5 +12 +-6 +10 +-8 +10 +-7 +9 +-8 +9 +-6 +10 +-8 +9 +-7 +11 +-7 +9 +-8 +10 +-7 +9 +-8 +10 +-6 +9 +-8 +9 +-6 +-38 +-11 +-19 +4 +-7 +10 +-5 +12 +-2 +14 +-2 +12 +-2 +14 +-3 +12 +-3 +13 +-3 +11 +-5 +11 +-3 +11 +-6 +10 +-4 +11 +-5 +10 +-5 +12 +23 +1 +15 +-3 +13 +-6 +10 +-7 +11 +-7 +8 +-9 +10 +-6 +10 +-9 +9 +-6 +10 +-7 +9 +-7 +10 +-8 +9 +-7 +11 +-6 +9 +-7 +10 +-6 +-38 +-11 +-18 +4 +-8 +9 +-5 +13 +-2 +13 +-3 +13 +-1 +14 +-3 +12 +-3 +14 +-3 +11 +-5 +12 +-4 +12 +-5 +11 +-4 +11 +-6 +10 +-4 +11 +-6 +10 +-5 +12 +-4 +10 +-6 +11 +-4 +11 +-6 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +8 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +9 +-6 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +8 +-6 +10 +-7 +9 +-7 +10 +-5 +9 +-7 +10 +-5 +10 +20 +0 +15 +-4 +11 +-7 +10 +-7 +9 +-8 +8 +-7 +10 +-9 +8 +-8 +10 +-7 +8 +-8 +10 +-7 +9 +-9 +9 +-7 +9 +-8 +8 +-7 +10 +-8 +-39 +-11 +-17 +4 +-10 +8 +-4 +13 +-2 +12 +-3 +14 +-2 +13 +-3 +13 +-2 +12 +-4 +12 +-3 +12 +-5 +11 +-4 +12 +-4 +10 +-6 +11 +-4 +11 +-6 +10 +-4 +11 +-5 +10 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +21 +1 +15 +-4 +10 +-8 +10 +-7 +9 +-9 +9 +-7 +9 +-8 +9 +-7 +10 +-9 +8 +-8 +10 +-7 +8 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-6 +-38 +-9 +-16 +3 +-9 +10 +-3 +13 +-4 +12 +-2 +14 +-2 +12 +-3 +14 +-3 +12 +-4 +12 +-3 +11 +-5 +11 +-4 +12 +-6 +10 +-5 +12 +-4 +10 +21 +2 +15 +-4 +10 +-7 +10 +-8 +8 +-9 +9 +-7 +8 +-9 +9 +-6 +10 +-8 +9 +-6 +11 +-7 +9 +-7 +11 +-7 +10 +-7 +11 +-6 +9 +-8 +9 +-6 +10 +-8 +8 +-7 +11 +-7 +9 +-7 +11 +-6 +10 +-7 +11 +-6 +10 +-7 +10 +-5 +11 +-8 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-7 +11 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-7 +8 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-5 +11 +-7 +10 +-6 +12 +-5 +10 +-7 +-37 +-9 +-17 +3 +-8 +11 +-4 +12 +-3 +15 +-1 +13 +-3 +14 +-1 +14 +-4 +12 +-3 +13 +-3 +11 +-4 +13 +-4 +11 +-5 +12 +-4 +10 +-6 +10 +23 +2 +14 +-5 +12 +-5 +11 +-8 +9 +-6 +10 +-7 +8 +-7 +10 +-8 +8 +-8 +10 +-7 +8 +-9 +9 +-6 +10 +-8 +9 +-6 +11 +-7 +9 +-7 +-37 +-10 +-18 +3 +-7 +10 +-5 +11 +-3 +14 +-2 +12 +-3 +14 +-2 +13 +-4 +12 +-3 +12 +-4 +11 +-3 +12 +-5 +10 +-5 +12 +-4 +10 +-6 +11 +23 +1 +14 +-4 +12 +-6 +9 +-8 +9 +-7 +8 +-9 +8 +-7 +10 +-9 +8 +-8 +10 +-7 +8 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +11 +-5 +11 +-7 +10 +-5 +-37 +-9 +-18 +5 +-7 +10 +-5 +12 +-2 +14 +-3 +12 +-2 +14 +-2 +11 +-4 +12 +-3 +12 +-5 +11 +-3 +11 +-5 +11 +-3 +12 +-5 +10 +-5 +12 +-4 +10 +-6 +11 +-4 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-6 +11 +-4 +11 +-7 +9 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +10 +-6 +9 +-6 +11 +-6 +9 +-6 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +9 +-6 +10 +21 +-1 +13 +-4 +11 +-7 +8 +-7 +10 +-8 +8 +-8 +10 +-7 +8 +-8 +9 +-7 +9 +-9 +9 +-7 +9 +-8 +8 +-7 +10 +-8 +9 +-7 +11 +-6 +-39 +-11 +-17 +5 +-8 +8 +-5 +12 +-3 +13 +-3 +14 +-2 +13 +-3 +12 +-2 +13 +-5 +11 +-4 +13 +-4 +10 +-5 +12 +-4 +11 +-5 +11 +-4 +11 +-5 +10 +-5 +11 +-6 +10 +-6 +11 +-5 +9 +-6 +10 +-5 +10 +-7 +10 +-5 +11 +-5 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +9 +-6 +10 +-6 +9 +-7 +10 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-5 +11 +-6 +9 +-6 +11 +-6 +10 +-6 +11 +-5 +9 +-6 +9 +-5 +10 +-7 +8 +-6 +10 +-6 +8 +-7 +10 +-6 +9 +-7 +10 +-5 +9 +-6 +10 +-5 +10 +-7 +9 +-6 +11 +-5 +8 +-6 +11 +-5 +10 +-6 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +9 +-6 +11 +-5 +8 +-7 +10 +-5 +10 +-7 +10 +-5 +10 +-6 +10 +-5 +11 +-6 +9 +-5 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +8 +-6 +10 +-6 +8 +-7 +10 +-5 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +21 +2 +15 +-5 +10 +-6 +11 +-7 +8 +-8 +10 +-7 +9 +-9 +9 +-7 +9 +-8 +9 +-6 +10 +-8 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +10 +-6 +9 +-7 +9 +-6 +11 +-8 +9 +-7 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +10 +-6 +10 +-7 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-7 +10 +-5 +10 +-7 +10 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +10 +-6 +10 +-9 +9 +-6 +10 +-7 +9 +-6 +11 +-7 +10 +-7 +-37 +-9 +-19 +2 +-8 +11 +-4 +11 +-3 +14 +-1 +14 +-3 +14 +-1 +13 +-3 +12 +-2 +13 +-4 +11 +-4 +12 +-4 +10 +-5 +11 +-4 +11 +-5 +11 +-4 +11 +-5 +10 +-5 +11 +-6 +9 +-6 +11 +-5 +8 +-7 +10 +-5 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-5 +10 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +8 +-6 +10 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-4 +11 +-7 +9 +-5 +10 +-6 +9 +-6 +10 +-7 +9 +-6 +11 +-5 +9 +-7 +10 +-4 +10 +-7 +9 +-5 +10 +-6 +9 +-5 +11 +-6 +10 +-6 +11 +-5 +9 +-6 +10 +-4 +11 +-7 +9 +-5 +11 +-6 +9 +-6 +10 +-6 +9 +-7 +10 +-5 +8 +-7 +9 +-5 +10 +-7 +9 +-5 +11 +-5 +9 +-6 +10 +-6 +9 +-7 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +8 +-6 +10 +-6 +8 +-7 +10 +-5 +10 +-7 +10 +-5 +9 +-7 +9 +-5 +10 +-7 +8 +-6 +10 +-6 +8 +-7 +10 +-5 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +21 +0 +14 +-3 +11 +-8 +8 +-7 +10 +-8 +8 +-8 +9 +-8 +9 +-9 +9 +-7 +8 +-9 +8 +-7 +10 +-9 +8 +-7 +10 +-7 +8 +-8 +10 +-6 +10 +-8 +10 +-6 +9 +-8 +9 +-6 +10 +-8 +9 +-7 +11 +-6 +9 +-8 +10 +-6 +10 +-8 +10 +-6 +10 +-7 +10 +-6 +11 +-8 +9 +-7 +11 +-6 +-39 +-11 +-17 +5 +-8 +9 +-4 +13 +-2 +13 +-3 +14 +-1 +12 +-3 +12 +-2 +13 +-4 +11 +-3 +13 +-3 +11 +-5 +12 +-4 +11 +-5 +11 +-4 +11 +22 +1 +16 +-3 +11 +-7 +9 +-6 +10 +-9 +8 +-7 +10 +-7 +8 +-7 +10 +-7 +9 +-8 +10 +-6 +9 +-7 +10 +-6 +10 +-8 +9 +-6 +11 +-6 +-39 +-11 +-17 +4 +-8 +9 +-4 +13 +-3 +13 +-2 +14 +-2 +12 +-4 +12 +-2 +12 +-5 +11 +-4 +11 +-5 +10 +-5 +12 +-4 +11 +-5 +12 +-4 +10 +-5 +11 +-4 +11 +-6 +9 +-5 +11 +-5 +9 +-7 +10 +-6 +9 +-7 +10 +-5 +10 +-6 +10 +-4 +11 +-6 +9 +-5 +11 +-5 +9 +-6 +10 +-5 +10 +20 +1 +15 +-5 +10 +-7 +10 +-7 +8 +-9 +9 +-7 +9 +-9 +8 +-7 +10 +-7 +8 +-8 +10 +-8 +9 +-8 +10 +-7 +8 +-8 +9 +-6 +11 +-8 +-38 +-9 +-16 +4 +-9 +10 +-3 +13 +-3 +12 +-2 +14 +-3 +12 +-3 +14 +-2 +12 +-4 +12 +-2 +12 +-5 +11 +-4 +12 +-4 +10 +-5 +11 +-5 +11 +22 +3 +16 +-4 +11 +-6 +11 +-6 +8 +-8 +10 +-7 +9 +-9 +9 +-7 +9 +-8 +9 +-7 +10 +-8 +8 +-8 +10 +-7 +8 +-8 +10 +-6 +10 +-8 +-39 +-9 +-17 +3 +-9 +10 +-4 +11 +-4 +12 +-1 +14 +-3 +12 +-2 +14 +-2 +11 +-4 +13 +-3 +12 +-5 +11 +-4 +10 +-5 +10 +-4 +11 +-6 +10 +-5 +12 +-5 +9 +-6 +10 +-4 +10 +-6 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +8 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +8 +21 +1 +13 +-6 +10 +-5 +10 +-8 +8 +-7 +10 +-7 +8 +-8 +10 +-7 +9 +-8 +9 +-7 +9 +-8 +8 +-7 +10 +-8 +9 +-7 +11 +-6 +9 +-7 +-37 +-9 +-17 +2 +-8 +10 +-4 +12 +-3 +14 +-2 +12 +-3 +13 +-1 +14 +-4 +12 +-3 +13 +-3 +11 +-4 +12 +-3 +11 +-5 +11 +-4 +11 +-5 +10 +-4 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +10 +22 +0 +14 +-5 +11 +-6 +9 +-8 +8 +-7 +9 +-9 +8 +-8 +10 +-8 +7 +-9 +9 +-8 +8 +-9 +9 +-6 +9 +-7 +9 +-6 +11 +-7 +9 +-6 +-36 +-9 +-18 +3 +-7 +10 +-4 +11 +-2 +14 +-2 +12 +-3 +14 +-2 +12 +-4 +13 +-2 +13 +-4 +11 +-3 +12 +-4 +10 +-4 +12 +-5 +10 +-6 +11 +22 +-1 +13 +-5 +12 +-6 +8 +-9 +9 +-7 +9 +-9 +8 +-7 +9 +-7 +9 +-7 +10 +-8 +9 +-7 +11 +-6 +9 +-7 +10 +-6 +10 +-8 +9 +-6 +-37 +-10 +-19 +3 +-8 +9 +-5 +11 +-2 +13 +-4 +12 +-3 +14 +-2 +11 +-4 +13 +-2 +12 +-4 +12 +-3 +11 +-5 +10 +-4 +12 +-5 +10 +-5 +12 +-4 +9 +-6 +11 +-4 +10 +-7 +10 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +9 +-6 +10 +-4 +10 +-7 +9 +-5 +10 +-6 +9 +-5 +10 +-6 +9 +-6 +11 +-5 +9 +-6 +10 +-5 +10 +-7 +8 +-6 +10 +-6 +9 +-6 +11 +-6 +9 +-6 +11 +-5 +9 +-6 +10 +-5 +10 +-7 +9 +-5 +10 +21 +-1 +14 +-4 +11 +-7 +9 +-7 +10 +-9 +8 +-8 +10 +-7 +7 +-9 +9 +-7 +9 +-8 +9 +-6 +10 +-7 +9 +-7 +10 +-8 +8 +-7 +10 +-6 +-39 +-12 +-18 +4 +-9 +8 +-5 +12 +-3 +13 +-3 +14 +-2 +12 +-3 +12 +-2 +13 +-4 +11 +-3 +13 +-3 +11 +-4 +12 +-3 +11 +-5 +11 +-4 +10 +-5 +10 +-4 +11 +-6 +9 +-6 +11 +-5 +9 +-7 +10 +-5 +10 +-7 +10 +-5 +9 +-6 +9 +-5 +10 +-7 +9 +-6 +11 +-5 +8 +-7 +10 +-5 +10 +-7 +9 +-5 +10 +-6 +9 +-5 +11 +-6 +9 +-6 +11 +-5 +8 +-7 +9 +-5 +10 +-7 +9 +-6 +10 +-6 +8 +-6 +10 +-7 +9 +-7 +10 +-5 +8 +19 +0 +15 +-5 +9 +-8 +10 +-7 +9 +-9 +9 +-7 +9 +-8 +9 +-6 +10 +-8 +8 +-7 +10 +-7 +8 +-8 +10 +-7 +9 +-8 +9 +-6 +10 +-7 +-39 +-10 +-17 +3 +-9 +9 +-3 +13 +-4 +12 +-2 +14 +-2 +12 +-3 +13 +-3 +12 +-4 +12 +-3 +11 +-4 +11 +-3 +12 +-5 +11 +-4 +12 +-4 +9 +21 +1 +15 +-4 +10 +-6 +10 +-7 +9 +-8 +10 +-6 +8 +-8 +9 +-6 +10 +-8 +8 +-7 +10 +-7 +8 +-8 +9 +-8 +9 +-8 +10 +-6 +10 +-7 +-38 +-9 +-17 +2 +-9 +9 +-4 +12 +-4 +12 +-2 +13 +-3 +12 +-2 +14 +-3 +12 +-4 +13 +-3 +10 +-5 +11 +-3 +11 +-6 +10 +-4 +11 +-5 +9 +21 +1 +15 +-5 +10 +-6 +10 +-8 +8 +-8 +10 +-7 +8 +-8 +9 +-6 +10 +-8 +9 +-6 +10 +-7 +8 +-7 +10 +-8 +9 +-7 +11 +-6 +8 +-8 +-38 +-9 +-17 +2 +-9 +10 +-4 +12 +-4 +13 +-1 +13 +-3 +12 +-2 +14 +-3 +12 +-3 +14 +-2 +11 +-4 +12 +-3 +12 +-5 +10 +-4 +11 +-5 +9 +-5 +11 +-6 +9 +-6 +10 +-5 +8 +-7 +10 +-4 +10 +-7 +9 +-5 +10 +-5 +9 +-5 +11 +-6 +9 +-6 +10 +-5 +9 +-6 +9 +-4 +10 +-7 +9 +-5 +11 +-5 +9 +-6 +10 +-5 +9 +-7 +9 +-5 +9 +-7 +9 +-5 +10 +-7 +8 +-6 +10 +-6 +8 +-7 +10 +-6 +9 +-7 +10 +-5 +9 +-6 +9 +22 +1 +13 +-5 +11 +-5 +10 +-8 +9 +-6 +10 +-7 +8 +-7 +10 +-7 +9 +-8 +10 +-6 +8 +-8 +9 +-7 +9 +-9 +8 +-7 +11 +-7 +8 +-7 +-37 +-10 +-18 +3 +-7 +11 +-4 +12 +-3 +14 +-1 +12 +-3 +13 +-1 +14 +-4 +12 +-3 +13 +-4 +11 +-4 +12 +-5 +10 +-5 +12 +-4 +10 +-5 +10 +-4 +11 +-6 +9 +-5 +11 +-5 +9 +-6 +10 +-6 +9 +-7 +10 +-5 +8 +-7 +9 +-5 +10 +-7 +9 +-6 +10 +-6 +8 +-6 +10 +-6 +9 +-7 +10 +22 +0 +13 +-5 +12 +-6 +8 +-8 +9 +-7 +9 +-9 +8 +-7 +9 +-8 +8 +-7 +10 +-8 +8 +-8 +10 +-6 +8 +-8 +10 +-6 +10 +-8 +10 +-6 +-37 +-10 +-18 +4 +-7 +10 +-4 +12 +-1 +14 +-3 +12 +-2 +15 +-2 +12 +-3 +13 +-2 +12 +-4 +12 +-3 +11 +-5 +10 +-4 +11 +-6 +9 +-5 +11 +22 +0 +14 +-3 +13 +-6 +9 +-7 +10 +-7 +9 +-8 +9 +-7 +9 +-8 +9 +-6 +10 +-8 +8 +-7 +10 +-7 +8 +-8 +10 +-7 +9 +-8 +9 +-6 +9 +-8 +9 +-6 +10 +-8 +9 +-7 +11 +-6 +9 +-7 +11 +-6 +10 +-7 +11 +-5 +10 +-7 +9 +-6 +11 +-7 +9 +-6 +11 +-6 +9 +-7 +11 +-5 +10 +-7 +9 +-6 +10 +-7 +9 +-6 +11 +-7 +9 +-7 +11 +-6 +9 +-7 +10 +-5 +10 +-7 +9 +-6 +10 +-7 +9 +-6 +11 +-7 +10 +-7 +11 +-5 +-38 +-11 +-17 +5 +-8 +8 +-5 +13 +-2 +13 +-3 +14 +-1 +13 +-2 +12 +-2 +14 +-4 +12 +-3 +13 +-3 +11 +-5 +12 +-3 +11 +-6 +10 +-4 +11 +22 +1 +15 +-3 +11 +-7 +10 +-6 +10 +-8 +8 +-7 +10 +-7 +7 +-9 +9 +-7 +9 +-8 +9 +-7 +9 +-8 +9 +-6 +10 +-8 +9 +-7 +11 +-6 +-39 +-11 +-17 +4 +-8 +9 +-4 +13 +-3 +12 +-3 +14 +-1 +12 +-3 +12 +-2 +13 +-5 +11 +-4 +12 +-4 +10 +-5 +11 +-4 +10 +-6 +10 +-4 +10 +21 +0 +15 +-3 +10 +-7 +10 +-6 +10 +-8 +8 +-7 +10 +-7 +8 +-7 From ca3fe1db4a9c4f4e076a5c3807b89659c1afdbc1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 14 Sep 2020 22:22:16 +0200 Subject: [PATCH 69/92] more regression test, gproxII, idteck --- tools/pm3_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh index 00af93ba5..f718cc6b1 100755 --- a/tools/pm3_tests.sh +++ b/tools/pm3_tests.sh @@ -348,7 +348,9 @@ while true; do if ! CheckExecute "lf VIKING test" "$CLIENTBIN -c 'data load traces/Transit999-best.pm3;lf search 1'" "Viking ID found"; then break; fi if ! CheckExecute "lf FDX-B test" "$CLIENTBIN -c 'data load traces/homeagain1600.pm3;lf search 1'" "FDX-B ID found"; then break; fi if ! CheckExecute "lf INDALA test" "$CLIENTBIN -c 'data load traces/indala-504278295.pm3;lf search 1'" "Indala ID found"; then break; fi - if ! CheckExecute "lf FDX/BioThermo test" "$CLIENTBIN -c 'data load traces/lf_fdx_biothermo.pm3; lf fdx demo'" "95.2 F / 35.1 C"; then break; fi + if ! CheckExecute "lf FDX/BioThermo test" "$CLIENTBIN -c 'data load traces/lf_fdx_biothermo.pm3; lf fdx demod'" "95.2 F / 35.1 C"; then break; fi + if ! CheckExecute "lf GPROXII test" "$CLIENTBIN -c 'data load traces/lf_gprox_36_30_14489.pm3; lf search 1'" "Guardall G-Prox II ID found"; then break; fi + if ! CheckExecute "lf IDTECK test" "$CLIENTBIN -c 'data load traces/lf_idteck_4944544BAC40E069.pm3; lf search 1'" "Idteck ID found"; then break; fi echo -e "\n${C_BLUE}Testing HF:${C_NC}" if ! CheckExecute "hf mf offline text" "$CLIENTBIN -c 'hf mf'" "at_enc"; then break; fi From 0d58488bec38d96d3c836fc3856dbfaa8d122671 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 14 Sep 2020 22:22:40 +0200 Subject: [PATCH 70/92] text --- tools/pm3_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh index f718cc6b1..9543bf5d2 100755 --- a/tools/pm3_tests.sh +++ b/tools/pm3_tests.sh @@ -349,8 +349,8 @@ while true; do if ! CheckExecute "lf FDX-B test" "$CLIENTBIN -c 'data load traces/homeagain1600.pm3;lf search 1'" "FDX-B ID found"; then break; fi if ! CheckExecute "lf INDALA test" "$CLIENTBIN -c 'data load traces/indala-504278295.pm3;lf search 1'" "Indala ID found"; then break; fi if ! CheckExecute "lf FDX/BioThermo test" "$CLIENTBIN -c 'data load traces/lf_fdx_biothermo.pm3; lf fdx demod'" "95.2 F / 35.1 C"; then break; fi - if ! CheckExecute "lf GPROXII test" "$CLIENTBIN -c 'data load traces/lf_gprox_36_30_14489.pm3; lf search 1'" "Guardall G-Prox II ID found"; then break; fi - if ! CheckExecute "lf IDTECK test" "$CLIENTBIN -c 'data load traces/lf_idteck_4944544BAC40E069.pm3; lf search 1'" "Idteck ID found"; then break; fi + if ! CheckExecute "lf GPROXII test" "$CLIENTBIN -c 'data load traces/lf_gprox_36_30_14489.pm3; lf search 1'" "Guardall G-Prox II ID found"; then break; fi + if ! CheckExecute "lf IDTECK test" "$CLIENTBIN -c 'data load traces/lf_idteck_4944544BAC40E069.pm3; lf search 1'" "Idteck ID found"; then break; fi echo -e "\n${C_BLUE}Testing HF:${C_NC}" if ! CheckExecute "hf mf offline text" "$CLIENTBIN -c 'hf mf'" "at_enc"; then break; fi From 903d1a1d3650f8be057b2da5696a88d3957b68eb Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 15 Sep 2020 00:59:08 +0200 Subject: [PATCH 71/92] waveshare: add dithering --- client/src/cmdhfwaveshare.c | 376 ++++++++++++++++++++++++++++++------ 1 file changed, 320 insertions(+), 56 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index bcddce856..a6e0b1b3e 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -158,7 +158,198 @@ static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t **b return PM3_SUCCESS; } -static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **black, uint8_t **red) { +static void rgb_to_gray(int16_t *chanR, int16_t *chanG, int16_t *chanB, uint16_t width, uint16_t height, int16_t *chanGrey) { + for (uint16_t Y=0; Y 0.0031308 + chanGrey[X + Y * width] = Clinear; + } + } +} + +// Floyd-Steinberg dithering +static void dither_chan_inplace(int16_t *chan, uint16_t width, uint16_t height) { + for (uint16_t Y=0; Y 127 ? 255 : 0; + chan[X + Y * width] = newp; + int16_t err = oldp - newp; + float m[] = {7,3,5,1}; + if (X < width - 1){ + chan[X + 1 + Y * width] = chan[X + 1 + Y * width] + m[0]/16 * err; + } + if (Y < height - 1) { + chan[X - 1 + (Y + 1) * width] = chan[X - 1 + (Y + 1) * width] + m[1]/16 * err; + } + if (Y < height - 1){ + chan[X + (Y + 1) * width] = chan[X + (Y + 1) * width] + m[2]/16 * err; + } + if ((X < width - 1) && (Y < height - 1)){ + chan[X + 1 + (Y + 1) * width] = chan[X + 1 + (Y + 1) * width] + m[3]/16 * err; + } + } + } +} + +static uint32_t color_compare(int16_t r1, int16_t g1, int16_t b1, int16_t r2, int16_t g2, int16_t b2) { + // Compute (square of) distance from oldR/G/B to this color + int16_t inR = r1 - r2; + int16_t inG = g1 - g2; + int16_t inB = b1 - b2; + // use RGB-to-grey weighting + float dist = 0.2126 *inR*inR + 0.7152 *inG*inG + 0.0722 *inB*inB; + return dist; +} + +static void nearest_color(int16_t oldR, int16_t oldG, int16_t oldB, uint8_t *palette, uint16_t palettelen, uint8_t *newR, uint8_t *newG, uint8_t *newB) { + uint32_t bestdist=0x7FFFFFFF; + for (uint16_t i=0; i < palettelen; i++) { + uint8_t R = palette[i*3+0]; + uint8_t G = palette[i*3+1]; + uint8_t B = palette[i*3+2]; + uint32_t dist = color_compare(oldR, oldG, oldB, R, G, B); + if (dist < bestdist) { + bestdist = dist; + *newR = R; + *newG = G; + *newB = B; + } + } +} + +static void dither_rgb_inplace(int16_t *chanR, int16_t *chanG, int16_t *chanB, uint16_t width, uint16_t height, uint8_t *palette, uint16_t palettelen) { + for (uint16_t Y=0; Y 0) { + chanR[XX - 1 + Y * width] = (chanR[XX - 1 + Y * width] + m[0]/16 * errR); + chanG[XX - 1 + Y * width] = (chanG[XX - 1 + Y * width] + m[0]/16 * errG); + chanB[XX - 1 + Y * width] = (chanB[XX - 1 + Y * width] + m[0]/16 * errB); + } + if (Y < height - 1) { + chanR[XX - 1 + (Y + 1) * width] = (chanR[XX - 1 + (Y + 1) * width] + m[3]/16 * errR); + chanG[XX - 1 + (Y + 1) * width] = (chanG[XX - 1 + (Y + 1) * width] + m[3]/16 * errG); + chanB[XX - 1 + (Y + 1) * width] = (chanB[XX - 1 + (Y + 1) * width] + m[3]/16 * errB); + } + if (Y < height - 1) { + chanR[XX + (Y + 1) * width] = (chanR[XX + (Y + 1) * width] + m[2]/16 * errR); + chanG[XX + (Y + 1) * width] = (chanG[XX + (Y + 1) * width] + m[2]/16 * errG); + chanB[XX + (Y + 1) * width] = (chanB[XX + (Y + 1) * width] + m[2]/16 * errB); + } + if ((XX < width - 1) && (Y < height - 1)) { + chanR[XX + 1 + (Y + 1) * width] = (chanR[XX + 1 + (Y + 1) * width] + m[1]/16 * errR); + chanG[XX + 1 + (Y + 1) * width] = (chanG[XX + 1 + (Y + 1) * width] + m[1]/16 * errG); + chanB[XX + 1 + (Y + 1) * width] = (chanB[XX + 1 + (Y + 1) * width] + m[1]/16 * errB); + } + } else { + if (XX < width - 1) { + chanR[XX + 1 + Y * width] = (chanR[XX + 1 + Y * width] + m[0]/16 * errR); + chanG[XX + 1 + Y * width] = (chanG[XX + 1 + Y * width] + m[0]/16 * errG); + chanB[XX + 1 + Y * width] = (chanB[XX + 1 + Y * width] + m[0]/16 * errB); + } + if (Y < height - 1) { + chanR[XX - 1 + (Y + 1) * width] = (chanR[XX - 1 + (Y + 1) * width] + m[1]/16 * errR); + chanG[XX - 1 + (Y + 1) * width] = (chanG[XX - 1 + (Y + 1) * width] + m[1]/16 * errG); + chanB[XX - 1 + (Y + 1) * width] = (chanB[XX - 1 + (Y + 1) * width] + m[1]/16 * errB); + } + if (Y < height - 1) { + chanR[XX + (Y + 1) * width] = (chanR[XX + (Y + 1) * width] + m[2]/16 * errR); + chanG[XX + (Y + 1) * width] = (chanG[XX + (Y + 1) * width] + m[2]/16 * errG); + chanB[XX + (Y + 1) * width] = (chanB[XX + (Y + 1) * width] + m[2]/16 * errB); + } + if ((XX < width - 1) && (Y < height - 1)) { + chanR[XX + 1 + (Y + 1) * width] = (chanR[XX + 1 + (Y + 1) * width] + m[3]/16 * errR); + chanG[XX + 1 + (Y + 1) * width] = (chanG[XX + 1 + (Y + 1) * width] + m[3]/16 * errG); + chanB[XX + 1 + (Y + 1) * width] = (chanB[XX + 1 + (Y + 1) * width] + m[3]/16 * errB); + } + } + } + } +} + +static void rgb_to_gray_red_inplace(int16_t *chanR, int16_t *chanG, int16_t *chanB, uint16_t width, uint16_t height) { + for (uint16_t Y=0; Y threshold_red) && (chanG[X + Y * width] < threshold_black) && (chanB[X + Y * width] < threshold_black)) { + blackmap[X + Y * width] = 0; + redmap[X + Y * width] = 1; + } else { + blackmap[X + Y * width] = 0; + redmap[X + Y * width] = 0; + } + } + } +} + +static void map8to1(uint8_t *colormap, uint16_t width, uint16_t height, uint8_t *colormap8) { + uint16_t width8; + if (width % 8 == 0) { + width8 = width / 8; + } else { + width8 = width / 8 + 1; + } + uint8_t data = 0; + uint8_t count = 0; + for (uint16_t Y=0; Y= 8) || (X == width - 1)) { + colormap8[X / 8 + Y * width8] = (~data)&0xFF; + count = 0; + data = 0; + } + data = (data << 1)&0xFF; + } + } +} + +static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **black, uint8_t **black_minus_red, uint8_t **red) { BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; // check file is full color if (pbmpheader->bpp != 24) { @@ -176,49 +367,118 @@ static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **blac } // Get BMP file data pointer uint32_t offset = pbmpheader->offset; + uint16_t width = pbmpheader->BMP_Width; + uint16_t height = pbmpheader->BMP_Height; - uint16_t X, Y; - uint16_t Image_Width_Byte = (pbmpheader->BMP_Width % 8 == 0) ? (pbmpheader->BMP_Width / 8) : (pbmpheader->BMP_Width / 8 + 1); + int16_t *chanR = calloc(width*height, sizeof(int16_t)); + if (chanR == NULL) { + return PM3_EMALLOC; + } + int16_t *chanG = calloc(width*height, sizeof(int16_t)); + if (chanG == NULL) { + free(chanR); + return PM3_EMALLOC; + } + int16_t *chanB = calloc(width*height, sizeof(int16_t)); + if (chanB == NULL) { + free(chanR); + free(chanG); + return PM3_EMALLOC; + } + + // Extracting BMP chans + for (uint16_t Y=0; YBMP_Height; Y++) { // columns - for (X = 0; X < pbmpheader->BMP_Width; X++) { // lines - B = bmp[offset++]; - G = bmp[offset++]; - R = bmp[offset++]; - if (R < 128 && G < 128 && B < 128) { - Black_data = Black_data | (1); - } else if (R > 190 && G < 90 && B < 90) { - Red_data = Red_data | (1); - } - count++; - if ((count >= 8) || (X == pbmpheader->BMP_Width - 1)) { - (*black)[X / 8 + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = ~Black_data; - (*red)[X / 8 + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = ~Red_data; - count = 0; - Black_data = 0; - Red_data = 0; - } - Black_data = Black_data << 1; - Red_data = Red_data << 1; - } - // Skip BMP line padding: we accumulate 3* %4 per line and need one more %4 as padding - offset += pbmpheader->BMP_Width % 4; - } + map8to1(mapBlack, width, height, *black); + map8to1(mapBlackMinusRed, width, height, *black_minus_red); + map8to1(mapRed, width, height, *red); + free(mapBlack); + free(mapBlackMinusRed); + free(mapRed); + return PM3_SUCCESS; } @@ -286,7 +546,7 @@ static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red) if (model_nr == M1in54B) { step_5[2] = 100; } - PrintAndLogEx(INFO, "1.54_Step9: e-paper config2 (black)"); + PrintAndLogEx(DEBUG, "1.54_Step9: e-paper config2 (black)"); if (model_nr == M1in54B) { //1.54inch B Keychain for (i = 0; i < 50; i++) { read_black(i, step_5, model_nr, black); @@ -299,12 +559,12 @@ static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red) } } PROMPT_CLEARLINE; - PrintAndLogEx(INFO, "1.54_Step6: e-paper power on"); + PrintAndLogEx(DEBUG, "1.54_Step6: e-paper power on"); ret = transceive_blocking(step_4, 2, rx, 20, actrxlen, true); //cd 04 if (ret != PM3_SUCCESS) { return ret; } - PrintAndLogEx(INFO, "1.54_Step7: e-paper config2 (red)"); + PrintAndLogEx(DEBUG, "1.54_Step7: e-paper config2 (red)"); if (model_nr == M1in54B) { //1.54inch B Keychain for (i = 0; i < 50; i++) { read_red(i, step_5, model_nr, red); @@ -318,16 +578,16 @@ static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red) } PROMPT_CLEARLINE; // Send update instructions - PrintAndLogEx(INFO, "1.54_Step8: EDP load to main"); + PrintAndLogEx(DEBUG, "1.54_Step8: EDP load to main"); ret = transceive_blocking(step_6, 2, rx, 20, actrxlen, true); //cd 06 if (ret != PM3_SUCCESS) { return ret; } - PrintAndLogEx(INFO, "1.54_Step9"); + PrintAndLogEx(DEBUG, "1.54_Step9"); return PM3_SUCCESS; } -static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { +static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *black_minus_red, uint8_t *red) { uint8_t progress = 0; uint8_t step0[2] = {0xcd, 0x0d}; uint8_t step1[3] = {0xcd, 0x00, 10}; //select e-paper type and reset e-paper 4:2.13inch e-Paper 7:2.9inch e-Paper 10:4.2inch e-Paper 14:7.5inch e-Paper @@ -381,12 +641,12 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { } PrintAndLogEx(DEBUG, "model_nr = %d", model_nr); int ret; - PrintAndLogEx(INFO, "Step0"); + PrintAndLogEx(DEBUG, "Step0"); ret = transceive_blocking(step0, 2, rx, 20, actrxlen, true); //cd 0d if (ret != PM3_SUCCESS) { return ret; } - PrintAndLogEx(INFO, "Step1: e-paper config"); + PrintAndLogEx(DEBUG, "Step1: e-paper config"); //step1[2] screen model //step8[2] nr of bytes sent at once //step13[2] nr of bytes sent for the second time @@ -432,19 +692,19 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { return ret; } msleep(100); - PrintAndLogEx(INFO, "Step2: e-paper normal mode type"); + PrintAndLogEx(DEBUG, "Step2: e-paper normal mode type"); ret = transceive_blocking(step2, 2, rx, 20, actrxlen, true); //cd 01 if (ret != PM3_SUCCESS) { return ret; } msleep(100); - PrintAndLogEx(INFO, "Step3: e-paper config1"); + PrintAndLogEx(DEBUG, "Step3: e-paper config1"); ret = transceive_blocking(step3, 2, rx, 20, actrxlen, true); //cd 02 if (ret != PM3_SUCCESS) { return ret; } msleep(200); - PrintAndLogEx(INFO, "Step4: e-paper power on"); + PrintAndLogEx(DEBUG, "Step4: e-paper power on"); ret = transceive_blocking(step4, 2, rx, 20, actrxlen, true); //cd 03 if (ret != PM3_SUCCESS) { return ret; @@ -452,30 +712,30 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { if (model_nr == M1in54B) { // 1.54B Keychain handler PrintAndLogEx(DEBUG, "Start_Drawing_1in54B"); - ret = start_drawing_1in54B(model_nr, black, red); + ret = start_drawing_1in54B(model_nr, black_minus_red, red); if (ret != PM3_SUCCESS) { return ret; } //1.54B Data transfer is complete and wait for refresh } else { - PrintAndLogEx(INFO, "Step5: e-paper config2"); + PrintAndLogEx(DEBUG, "Step5: e-paper config2"); ret = transceive_blocking(step5, 2, rx, 20, actrxlen, true); //cd 05 if (ret != PM3_SUCCESS) { return ret; } msleep(100); - PrintAndLogEx(INFO, "Step6: EDP load to main") ; + PrintAndLogEx(DEBUG, "Step6: EDP load to main") ; ret = transceive_blocking(step6, 2, rx, 20, actrxlen, true); //cd 06 if (ret != PM3_SUCCESS) { return ret; } msleep(100); - PrintAndLogEx(INFO, "Step7: Data preparation"); + PrintAndLogEx(DEBUG, "Step7: Data preparation"); ret = transceive_blocking(step7, 2, rx, 20, actrxlen, true); //cd 07 if (ret != PM3_SUCCESS) { return ret; } - PrintAndLogEx(INFO, "Step8: Start data transfer"); + PrintAndLogEx(DEBUG, "Step8: Start data transfer"); if (model_nr == M2in13) { //2.13inch for (i = 0; i < 250; i++) { read_black(i, step8, model_nr, black); @@ -519,7 +779,7 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { } } else if (model_nr == M2in13B) { //2.13inch B for (i = 0; i < 26; i++) { - read_black(i, step8, model_nr, black); + read_black(i, step8, model_nr, black_minus_red); ret = transceive_blocking(step8, 109, rx, 20, actrxlen, true); // cd 08 if (ret != PM3_SUCCESS) { return ret; @@ -557,7 +817,7 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { } } PROMPT_CLEARLINE; - PrintAndLogEx(INFO, "Step9: e-paper power on"); + PrintAndLogEx(DEBUG, "Step9: e-paper power on"); if (model_nr == M2in13 || model_nr == M2in9 || model_nr == M4in2 || model_nr == M7in5 || model_nr == M7in5HD) { ret = transceive_blocking(step9, 2, rx, 20, actrxlen, true); //cd 18 // The black-and-white screen sending backplane is also shielded, with no effect. Except 2.7 @@ -569,7 +829,7 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { if (ret != PM3_SUCCESS) { return ret; } - PrintAndLogEx(INFO, "Step9b"); + PrintAndLogEx(DEBUG, "Step9b"); if (model_nr == M2in7) { for (i = 0; i < 48; i++) { read_black(i, step13, model_nr, black); @@ -594,14 +854,14 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { } PROMPT_CLEARLINE; } - PrintAndLogEx(INFO, "Step10: Refresh e-paper"); + PrintAndLogEx(DEBUG, "Step10: Refresh e-paper"); ret = transceive_blocking(step10, 2, rx, 20, actrxlen, true); //cd 09 refresh command if (ret != PM3_SUCCESS) { return ret; } msleep(200); } - PrintAndLogEx(INFO, "Step11: Wait tag to be ready"); + PrintAndLogEx(DEBUG, "Step11: Wait tag to be ready"); if (model_nr == M2in13B || model_nr == M1in54B) { // Black, white and red screen refresh time is longer, wait first msleep(9000); } else if (model_nr == M7in5HD) { @@ -635,7 +895,7 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { } } } - PrintAndLogEx(INFO, "Step12: e-paper power off command"); + PrintAndLogEx(DEBUG, "Step12: e-paper power off command"); ret = transceive_blocking(step12, 2, rx, 20, actrxlen, true); //cd 04 if (ret != PM3_SUCCESS) { return ret; @@ -693,6 +953,7 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { uint8_t *bmp = NULL; uint8_t *black = NULL; + uint8_t *black_minus_red = NULL; uint8_t *red = NULL; size_t bytes_read = 0; if (loadFile_safe(filename, ".bmp", (void **)&bmp, &bytes_read) != PM3_SUCCESS) { @@ -713,7 +974,7 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { } } else if (depth == 24) { PrintAndLogEx(DEBUG, "BMP file is a RGB"); - if (read_bmp_rgb(bmp, bytes_read, &black, &red) != PM3_SUCCESS) { + if (read_bmp_rgb(bmp, bytes_read, &black, &black_minus_red, &red) != PM3_SUCCESS) { free(bmp); return PM3_ESOFT; } @@ -728,8 +989,11 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { } free(bmp); - start_drawing(model_nr, black, red); + start_drawing(model_nr, black, black_minus_red, red); free(black); + if (black_minus_red != NULL) { + free(black_minus_red); + } if (red != NULL) { free(red); } From b4e513a2bbc3f421ba2a26fcda084dde92150163 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 04:28:52 +0200 Subject: [PATCH 72/92] inital draft --- doc/cloner_notes.md | 52 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 doc/cloner_notes.md diff --git a/doc/cloner_notes.md b/doc/cloner_notes.md new file mode 100644 index 000000000..b3f33a1c4 --- /dev/null +++ b/doc/cloner_notes.md @@ -0,0 +1,52 @@ +# Notes on Cloner gunes + +This document is based mostly on information posted on http://www.proxmark.org/forum/viewtopic.php?pid=39903#p39903 + +- [Blue and black cloners](#blue-and-black-cloners) +- [White cloner (pre 2015)](#white-cloner-(pre-2015)) +- [White cloner (after 2016)](#white-cloner-(after-2016)) +- [White cloner (after 2016 D Quality)](#white-cloner-(after-2016-d-quality)) +- [restore page1 data](#restore-page1-data) + + +# Blue and black cloners + +3 variants: + 1) EM cloner + 2) HID cloner + 3) EM/HID cloner + +Quality varies my manufacturer (Quality A (Good) until D (Bad)) +They set a password on block 7 of the chip and set the password enable bit in block 0 +Standard password is normally: 51243648 +Be sure to purchase the EM/HID version + +# White cloner (pre 2015) +Multifrequency +Buttons light up BLUE +Reads data correctly +Standard password is normally (for T55xx): *AA55BBBB* +Standard password 13,56mHz: individual per white cloner +Coil performance acceptable + +# White cloner (after 2016) +Multifrequency +Buttons light up WHITE +Data scrambled (variable per individual cloner, possibly due to prevent legal issues) +Standard password is normally (for T55xx): *AA55BBBB* +Standard password 13,56mHz: individual per white cloner +Coil performance good + +# White cloner (after 2016 D Quality) +Multifrequency (Well it says so....but it doesn't....) +Only works for EM/HID card (125kHz) +High frequency not working +Standard password is normally (for T55xx): *AA55BBBB* +*Note: Sets the HID card in TEST MODE* + + +# Restore page1 data +``` +lf t55xx write b 1 d E0150A48 1 +If t55xx write b 2 d 2D782308 1 +``` From 85a86e30098cfb27cf623e8f99fa468b71889ace Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 04:30:30 +0200 Subject: [PATCH 73/92] link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 076161cbe..287648038 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ |[Notes on external flash](/doc/ext_flash_notes.md)|[Notes on loclass](/doc/loclass_notes.md)|[Notes on Coverity Scan Config & Run](/doc/md/Development/Coverity-Scan-Config-%26-Run.md)| |[Notes on file formats used with Proxmark3](/doc/extensions_notes.md)|[Notes on MFU binary format](/doc/mfu_binary_format_notes.md)|[Notes on FPGA & ARM](/doc/fpga_arm_notes.md)| |[Developing standalone mode](/armsrc/Standalone/readme.md)|[Wiki about standalone mode](https://github.com/RfidResearchGroup/proxmark3/wiki/Standalone-mode)|[Notes on Magic cards](/doc/magic_cards_notes.md)| -|[Notes on Color usage](/doc/colors_notes.md)|[Makefile vs CMake](/doc/md/Development/Makefile-vs-CMake.md)| +|[Notes on Color usage](/doc/colors_notes.md)|[Makefile vs CMake](/doc/md/Development/Makefile-vs-CMake.md)|[Notes on Cloner guns](/doc/cloner_notes.md)| ## Build for non-RDV4 Proxmark3 platforms From 5e06eb9ca529a7ea4c9c2dab26a4d3947bae821b Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 04:33:50 +0200 Subject: [PATCH 74/92] text --- client/src/crypto/libpcrypto.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/crypto/libpcrypto.c b/client/src/crypto/libpcrypto.c index 2ed0b6bc7..3d8e7ffc4 100644 --- a/client/src/crypto/libpcrypto.c +++ b/client/src/crypto/libpcrypto.c @@ -372,7 +372,7 @@ int ecdsa_signature_verify(mbedtls_ecp_group_id curveid, uint8_t *key_xy, uint8_ return res; } - +// take signature bytes, converts to ASN1 signature and tries to verify int ecdsa_signature_r_s_verify(mbedtls_ecp_group_id curveid, uint8_t *key_xy, uint8_t *input, int length, uint8_t *r_s, size_t r_s_len, bool hash) { int res; uint8_t signature[MBEDTLS_ECDSA_MAX_LEN]; @@ -391,10 +391,8 @@ int ecdsa_signature_r_s_verify(mbedtls_ecp_group_id curveid, uint8_t *key_xy, ui } res = ecdsa_signature_verify(curveid, key_xy, input, length, signature, signature_len, hash); - mbedtls_mpi_free(&r); mbedtls_mpi_free(&s); - return res; } From dec00805cf4da6665b777adcbdbe61efb83ce324 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 04:37:29 +0200 Subject: [PATCH 75/92] working links --- doc/cloner_notes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/cloner_notes.md b/doc/cloner_notes.md index b3f33a1c4..378b5ba4a 100644 --- a/doc/cloner_notes.md +++ b/doc/cloner_notes.md @@ -3,9 +3,9 @@ This document is based mostly on information posted on http://www.proxmark.org/forum/viewtopic.php?pid=39903#p39903 - [Blue and black cloners](#blue-and-black-cloners) -- [White cloner (pre 2015)](#white-cloner-(pre-2015)) -- [White cloner (after 2016)](#white-cloner-(after-2016)) -- [White cloner (after 2016 D Quality)](#white-cloner-(after-2016-d-quality)) +- [White cloner (pre 2015)](#white-cloner-pre-2015) +- [White cloner (after 2016)](#white-cloner-after-2016) +- [White cloner (after 2016 D Quality)](#white-cloner-after-2016-d-quality) - [restore page1 data](#restore-page1-data) From 64a4abf60f052896a97579a1f3da0546eae8b4eb Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 04:43:22 +0200 Subject: [PATCH 76/92] rework --- doc/cloner_notes.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/doc/cloner_notes.md b/doc/cloner_notes.md index 378b5ba4a..6937e4c06 100644 --- a/doc/cloner_notes.md +++ b/doc/cloner_notes.md @@ -12,37 +12,48 @@ This document is based mostly on information posted on http://www.proxmark.org/f # Blue and black cloners 3 variants: - 1) EM cloner - 2) HID cloner - 3) EM/HID cloner +1. EM cloner +2. HID cloner +3. EM/HID cloner Quality varies my manufacturer (Quality A (Good) until D (Bad)) They set a password on block 7 of the chip and set the password enable bit in block 0 +``` Standard password is normally: 51243648 -Be sure to purchase the EM/HID version +``` +**Be sure to purchase the EM/HID version** # White cloner (pre 2015) + Multifrequency Buttons light up BLUE Reads data correctly -Standard password is normally (for T55xx): *AA55BBBB* -Standard password 13,56mHz: individual per white cloner Coil performance acceptable +``` +Standard password is normally (for T55xx): AA55BBBB +Standard password 13,56mHz: individual per white cloner +``` + # White cloner (after 2016) Multifrequency Buttons light up WHITE Data scrambled (variable per individual cloner, possibly due to prevent legal issues) -Standard password is normally (for T55xx): *AA55BBBB* -Standard password 13,56mHz: individual per white cloner Coil performance good +``` +Standard password is normally (for T55xx): AA55BBBB +Standard password 13,56mHz: individual per white cloner +``` + # White cloner (after 2016 D Quality) -Multifrequency (Well it says so....but it doesn't....) +Multifrequency (it says so but it doesn't) Only works for EM/HID card (125kHz) High frequency not working -Standard password is normally (for T55xx): *AA55BBBB* -*Note: Sets the HID card in TEST MODE* +``` +Standard password is normally (for T55xx): AA55BBBB +``` +**Note: Sets the HID card in TEST MODE** # Restore page1 data From 754a4520fb0a2f76d4ecd4212f9f0f5e1f2c5c5a Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 06:02:24 +0200 Subject: [PATCH 77/92] spark1 public key --- client/src/cmdhf15.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 1cba1e6a0..421e7488f 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -381,6 +381,7 @@ static int nxp_15693_print_signature(uint8_t *uid, uint8_t *signature) { {"NXP Ultralight Ev1", "0490933BDCD6E99B4E255E3DA55389A827564E11718E017292FAF23226A96614B8"}, {"NXP NTAG21x (2013)", "04494E1A386D3D3CFE3DC10E5DE68A499B1C202DB5B132393E89ED19FE5BE8BC61"}, {"MICRON Public key", "04f971eda742a4a80d32dcf6a814a707cc3dc396d35902f72929fdcd698b3468f2"}, + {"Spark1 Public key", "04d64bb732c0d214e7ec580736acf847284b502c25c0f7f2fa86aace1dada4387a"}, }; /* uint8_t nxp_15693_public_keys[][PUBLIC_ECDA_KEYLEN] = { From 102d8830a1bf460bfee00f93708c6f3effd4c1b1 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 06:46:24 +0200 Subject: [PATCH 78/92] rothult - read and decode NDEF --- client/src/cmdhfst.c | 112 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c index c38009eed..fe741b002 100644 --- a/client/src/cmdhfst.c +++ b/client/src/cmdhfst.c @@ -18,6 +18,7 @@ #include "cmdhf14a.h" #include "protocols.h" // definitions of ISO14A/7816 protocol #include "emv/apduinfo.h" // GetAPDUCodeDescription +#include "mifare/ndef.h" // NDEFRecordsDecodeAndPrint #define TIMEOUT 2000 static int CmdHelp(const char *Cmd); @@ -30,7 +31,6 @@ static int usage_hf_st_info(void) { PrintAndLogEx(NORMAL, _YELLOW_(" hf st info")); return PM3_SUCCESS; } - static int usage_hf_st_sim(void) { PrintAndLogEx(NORMAL, "\n Emulating ST25TA512B tag with 7 byte UID\n"); PrintAndLogEx(NORMAL, "Usage: hf st sim [h] u "); @@ -38,7 +38,17 @@ static int usage_hf_st_sim(void) { PrintAndLogEx(NORMAL, " h : This help"); PrintAndLogEx(NORMAL, " u : 7 byte UID"); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, _YELLOW_(" hf 14a sim u 02E2007D0FCA4C")); + PrintAndLogEx(NORMAL, _YELLOW_(" hf st sim u 02E2007D0FCA4C")); + return PM3_SUCCESS; +} +static int usage_hf_st_ndef(void) { + PrintAndLogEx(NORMAL, "\n Print NFC Data Exchange Format (NDEF)\n"); + PrintAndLogEx(NORMAL, "Usage: hf st ndef [h] p "); + PrintAndLogEx(NORMAL, "Options:"); + PrintAndLogEx(NORMAL, " h : This help"); + PrintAndLogEx(NORMAL, " p : 16 byte password"); + PrintAndLogEx(NORMAL, "Examples:"); + PrintAndLogEx(NORMAL, _YELLOW_(" hf st ndef p 82E80053D4CA5C0B656D852CC696C8A1")); return PM3_SUCCESS; } @@ -334,6 +344,103 @@ static int cmd_hf_st_sim(const char *Cmd) { return CmdHF14ASim(param); } +static int cmd_hf_st_ndef(const char *Cmd) { + char c = tolower(param_getchar(Cmd, 0)); + if (c == 'h' || c == 0x00) return usage_hf_st_ndef(); + + int pwdlen = 0; + uint8_t cmdp = 0; + uint8_t pwd[16] = {0}; + if (c == 'p') { + param_gethex_ex(Cmd, cmdp + 1, pwd, &pwdlen); + pwdlen >>= 1; + if (pwdlen != 16) { + return usage_hf_st_ndef(); + } + } + + bool activate_field = true; + bool keep_field_on = true; + uint8_t response[PM3_CMD_DATA_SIZE]; + int resplen = 0; + + // --------------- Select NDEF Tag application ---------------- + uint8_t aSELECT_AID[80]; + int aSELECT_AID_n = 0; + param_gethex_to_eol("00a4040007d276000085010100", 0, aSELECT_AID, sizeof(aSELECT_AID), &aSELECT_AID_n); + int res = ExchangeAPDU14a(aSELECT_AID, aSELECT_AID_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + if (resplen < 2) + return PM3_ESOFT; + + uint16_t sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "Selecting NDEF aid failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + + activate_field = false; + keep_field_on = true; + + // --------------- NDEF file reading ---------------- + uint8_t aSELECT_FILE_NDEF[30]; + int aSELECT_FILE_NDEF_n = 0; + param_gethex_to_eol("00a4000c020001", 0, aSELECT_FILE_NDEF, sizeof(aSELECT_FILE_NDEF), &aSELECT_FILE_NDEF_n); + res = ExchangeAPDU14a(aSELECT_FILE_NDEF, aSELECT_FILE_NDEF_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "Selecting NDEF file failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + + // --------------- VERIFY ---------------- + uint8_t aVERIFY[30]; + int aVERIFY_n = 0; + param_gethex_to_eol("0020000100", 0, aVERIFY, sizeof(aVERIFY), &aVERIFY_n); + res = ExchangeAPDU14a(aVERIFY, aVERIFY_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw == 0x6300) { + // need to provide 16byte password + param_gethex_to_eol("0020000110", 0, aVERIFY, sizeof(aVERIFY), &aVERIFY_n); + memcpy(aVERIFY + aVERIFY_n, pwd, pwdlen); + res = ExchangeAPDU14a(aVERIFY, aVERIFY_n + pwdlen, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "Verify password failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + } + + keep_field_on = false; + uint8_t aREAD_NDEF[30]; + int aREAD_NDEF_n = 0; + param_gethex_to_eol("00b000001d", 0, aREAD_NDEF, sizeof(aREAD_NDEF), &aREAD_NDEF_n); + res = ExchangeAPDU14a(aREAD_NDEF, aREAD_NDEF_n, activate_field, keep_field_on, response, sizeof(response), &resplen); + if (res) + return res; + + sw = get_sw(response, resplen); + if (sw != 0x9000) { + PrintAndLogEx(ERR, "reading NDEF file failed (%04x - %s).", sw, GetAPDUCodeDescription(sw >> 8, sw & 0xff)); + return PM3_ESOFT; + } + + PrintAndLogEx(INFO, "ice: %s", sprint_hex_inrow(response + 2, resplen - 4)); + NDEFRecordsDecodeAndPrint(response + 2, resplen - 4); + return PM3_SUCCESS; +} + static int cmd_hf_st_list(const char *Cmd) { (void)Cmd; // Cmd is not used so far CmdTraceList("7816"); @@ -344,6 +451,7 @@ static command_t CommandTable[] = { {"help", CmdHelp, AlwaysAvailable, "This help"}, {"info", cmd_hf_st_info, IfPm3Iso14443a, "Tag information"}, {"list", cmd_hf_st_list, AlwaysAvailable, "List ISO 14443A/7816 history"}, + {"ndef", cmd_hf_st_ndef, AlwaysAvailable, "read NDEF file on tag"}, {"sim", cmd_hf_st_sim, IfPm3Iso14443a, "Fake ISO 14443A/ST tag"}, {NULL, NULL, NULL, NULL} }; From 2ae3a84db65b16c3eb0b2dfbf2913587370fea45 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 11:46:41 +0200 Subject: [PATCH 79/92] remove debugstatement --- client/src/cmdhfst.c | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c index fe741b002..9aa44eea0 100644 --- a/client/src/cmdhfst.c +++ b/client/src/cmdhfst.c @@ -436,7 +436,6 @@ static int cmd_hf_st_ndef(const char *Cmd) { return PM3_ESOFT; } - PrintAndLogEx(INFO, "ice: %s", sprint_hex_inrow(response + 2, resplen - 4)); NDEFRecordsDecodeAndPrint(response + 2, resplen - 4); return PM3_SUCCESS; } From edebf17be558989b55071b9d9724aaaf2bc97428 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 17:26:24 +0200 Subject: [PATCH 80/92] keep WDT happy --- armsrc/legicrfsim.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/armsrc/legicrfsim.c b/armsrc/legicrfsim.c index 74609b326..00b40efb2 100644 --- a/armsrc/legicrfsim.c +++ b/armsrc/legicrfsim.c @@ -53,7 +53,7 @@ static uint32_t last_frame_end; /* ts of last bit of previews rx or tx frame */ #define RWD_TIME_PAUSE 4 /* 18.9us */ #define RWD_TIME_1 21 /* RWD_TIME_PAUSE 18.9us off + 80.2us on = 99.1us */ #define RWD_TIME_0 13 /* RWD_TIME_PAUSE 18.9us off + 42.4us on = 61.3us */ -#define RWD_CMD_TIMEOUT 120 /* 120 * 99.1us (arbitrary value) */ +#define RWD_CMD_TIMEOUT 400 /* 120 * 99.1us (arbitrary value) */ #define RWD_MIN_FRAME_LEN 6 /* Shortest frame is 6 bits */ #define RWD_MAX_FRAME_LEN 23 /* Longest frame is 23 bits */ @@ -68,6 +68,7 @@ static uint32_t last_frame_end; /* ts of last bit of previews rx or tx frame */ // Note: inlining this function would fail with -Os static bool wait_for(bool value, const uint32_t timeout) { while ((bool)(AT91C_BASE_PIOA->PIO_PDSR & GPIO_SSC_DIN) != value) { + WDT_HIT(); if (GetCountSspClk() > timeout) { return false; } @@ -215,7 +216,7 @@ static int32_t rx_frame(uint8_t *len) { last_frame_end -= 2; // wait for first pause (start of frame) - for (uint8_t i = 0; true; ++i) { + for (uint16_t i = 0; true; ++i) { // increment prng every TAG_BIT_PERIOD last_frame_end += TAG_BIT_PERIOD; legic_prng_forward(1); From 002029d32d5c24ab62f57cffce858e887940cdcd Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 15 Sep 2020 17:36:07 +0200 Subject: [PATCH 81/92] textual --- .../Windows-Installation-Instructions.md | 7 +++++++ doc/md/Use_of_Proxmark/0_Compilation-Instructions.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md index 02e8a2201..8930c0a04 100644 --- a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md +++ b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md @@ -76,8 +76,15 @@ If you want to run the graphical components of the Proxmark3 client, you need to Enter WSL prompt (`wsl`) and from there, follow the [Linux Installation Instructions](/doc/md/Installation_Instructions/Linux-Installation-Instructions.md) for Ubuntu, summarized here below: +Make sure your WSL guest OS is up-to-date first ```sh sudo apt-get update +sudo apt-get upgrade -y +sudo apt-get auto-remove -y +``` + +Install dependencies +```sh sudo apt-get install --no-install-recommends git ca-certificates build-essential pkg-config \ libreadline-dev gcc-arm-none-eabi libnewlib-dev libbz2-dev qtbase5-dev ``` diff --git a/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md b/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md index e423752ab..c40d18458 100644 --- a/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md +++ b/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md @@ -24,6 +24,13 @@ git pull make clean && make all ``` +### if you got an error +Read the [troubleshooting guide](/doc/md/Installation_Instructions/Troubleshooting.md), + +For instance, on WSl-1 you usually get the _libQt5Core.so.5 not found_ message +[solution](/doc/md/Installation_Instructions/Troubleshooting.md#libQt5Coreso5-not-found) + + ## Install This is an optional step. If you do From 32e04483fc6b6f02609e4422e4eee20e067ec333 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 15 Sep 2020 20:01:34 +0200 Subject: [PATCH 82/92] ws 4.2 tested, thans @tcprst! --- client/src/cmdhfwaveshare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index a6e0b1b3e..a2cce258f 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -80,7 +80,7 @@ typedef enum { static model_t models[] = { {"2.13 inch e-paper", 16, 122, 250}, // tested {"2.9 inch e-paper", 16, 128, 296}, - {"4.2 inch e-paper", 100, 400, 300}, + {"4.2 inch e-paper", 100, 400, 300}, // tested {"7.5 inch e-paper", 120, 480, 800}, {"2.7 inch e-paper", 121, 276, 176}, {"2.13 inch e-paper B", 106, 212, 104}, From 6ac7d282838fad467adc421b4b2196481badb214 Mon Sep 17 00:00:00 2001 From: tcprst Date: Tue, 15 Sep 2020 16:51:36 -0400 Subject: [PATCH 83/92] add ST25TA64K chip model --- client/src/cmdhfst.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/cmdhfst.c b/client/src/cmdhfst.c index 9aa44eea0..e16b513e4 100644 --- a/client/src/cmdhfst.c +++ b/client/src/cmdhfst.c @@ -79,6 +79,9 @@ static char *get_st_chip_model(uint8_t pc) { case 0xC: sprintf(s, "SRT512"); break; + case 0xC4: + sprintf(s, "ST25TA64K"); + break; case 0xE2: sprintf(s, "ST25??? IKEA Rothult"); break; From 9209f8fb7f305d79afa943619ae343c1c76f0176 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 15 Sep 2020 23:00:13 +0200 Subject: [PATCH 84/92] ws: another guess at width/height based on Android SDK decompilation --- client/src/cmdhfwaveshare.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index a2cce258f..ad260e988 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -79,9 +79,9 @@ typedef enum { static model_t models[] = { {"2.13 inch e-paper", 16, 122, 250}, // tested - {"2.9 inch e-paper", 16, 128, 296}, + {"2.9 inch e-paper", 16, 296, 128}, {"4.2 inch e-paper", 100, 400, 300}, // tested - {"7.5 inch e-paper", 120, 480, 800}, + {"7.5 inch e-paper", 120, 800, 480}, {"2.7 inch e-paper", 121, 276, 176}, {"2.13 inch e-paper B", 106, 212, 104}, {"1.54 inch e-paper B", 100, 200, 200}, From e15ebbe3d0737956e78c0e7d0d9444dc4168a03d Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 15 Sep 2020 23:59:53 +0200 Subject: [PATCH 85/92] ws: generate only needed version and add option to save conversion to file --- client/src/cmdhfwaveshare.c | 213 ++++++++++++++++++++++-------------- 1 file changed, 129 insertions(+), 84 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index ad260e988..0483af94c 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -78,24 +78,25 @@ typedef enum { } model_enum_t; static model_t models[] = { - {"2.13 inch e-paper", 16, 122, 250}, // tested - {"2.9 inch e-paper", 16, 296, 128}, - {"4.2 inch e-paper", 100, 400, 300}, // tested - {"7.5 inch e-paper", 120, 800, 480}, - {"2.7 inch e-paper", 121, 276, 176}, - {"2.13 inch e-paper B", 106, 212, 104}, - {"1.54 inch e-paper B", 100, 200, 200}, - {"7.5 inch e-paper HD", 120, 880, 528}, + {"2.13 inch e-paper", 16, 122, 250}, // tested + {"2.9 inch e-paper", 16, 296, 128}, + {"4.2 inch e-paper", 100, 400, 300}, // tested + {"7.5 inch e-paper", 120, 800, 480}, + {"2.7 inch e-paper", 121, 276, 176}, + {"2.13 inch e-paper B (with red)", 106, 212, 104}, + {"1.54 inch e-paper B (with red)", 100, 200, 200}, + {"7.5 inch e-paper HD", 120, 880, 528}, }; static int CmdHelp(const char *Cmd); static int usage_hf_waveshare_loadbmp(void) { PrintAndLogEx(NORMAL, "Load BMP file to Waveshare NFC ePaper."); - PrintAndLogEx(NORMAL, "Usage: hf waveshare loadbmp [h] f m "); + PrintAndLogEx(NORMAL, "Usage: hf waveshare loadbmp [h] f m [s]"); PrintAndLogEx(NORMAL, " Options :"); PrintAndLogEx(NORMAL, " f : " _YELLOW_("filename[.bmp]") " to upload to tag"); PrintAndLogEx(NORMAL, " m : " _YELLOW_("model number") " of your tag"); + PrintAndLogEx(NORMAL, " s : save dithered version in filename-[n].bmp, only for RGB BMP"); for (uint8_t i=0; i< MEND; i++) { PrintAndLogEx(NORMAL, " m %2i : %s", i, models[i].desc); } @@ -349,7 +350,7 @@ static void map8to1(uint8_t *colormap, uint16_t width, uint16_t height, uint8_t } } -static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **black, uint8_t **black_minus_red, uint8_t **red) { +static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, uint8_t **black, uint8_t **black_minus_red, uint8_t **red, char *filename, bool save_conversions) { BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; // check file is full color if (pbmpheader->bpp != 24) { @@ -397,88 +398,128 @@ static int read_bmp_rgb(const uint8_t *bmp, const size_t bmpsize, uint8_t **blac offset+=width%4; } - // for BW-only screens: - int16_t *chanGrey = calloc(width*height, sizeof(int16_t)); - if (chanGrey == NULL) { - free(chanR); - free(chanG); - free(chanB); - return PM3_EMALLOC; - } - rgb_to_gray(chanR, chanG, chanB, width, height, chanGrey); - dither_chan_inplace(chanGrey, width, height); + if ((model_nr == M1in54B) || (model_nr == M2in13B)) { + // for BW+Red screens: + uint8_t *mapBlackMinusRed = calloc(width*height, sizeof(uint8_t)); + if (mapBlackMinusRed == NULL) { + free(chanR); + free(chanG); + free(chanB); + return PM3_EMALLOC; + } + uint8_t *mapRed = calloc(width*height, sizeof(uint8_t)); + if (mapRed == NULL) { + free(chanR); + free(chanG); + free(chanB); + free(mapBlackMinusRed); + return PM3_EMALLOC; + } + rgb_to_gray_red_inplace(chanR, chanG, chanB, width, height); - uint8_t *mapBlack = calloc(width*height, sizeof(uint8_t)); - if (mapBlack == NULL) { + uint8_t palette[] ={0x00,0x00,0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00}; // black, white, red + dither_rgb_inplace(chanR, chanG, chanB, width, height, palette, sizeof(palette)/3); + + threshold_rgb_black_red(chanR, chanG, chanB, width, height, 128, 128, mapBlackMinusRed, mapRed); + if (save_conversions) { + // fill BMP chans + offset = pbmpheader->offset; + for (uint16_t Y=0; Yoffset; + for (uint16_t Y=0; Y Date: Wed, 16 Sep 2020 00:29:50 +0200 Subject: [PATCH 86/92] ws: fix few bugs --- client/src/cmdhfwaveshare.c | 57 ++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 0483af94c..364fda3c0 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -114,12 +114,12 @@ static int picture_bit_depth(const uint8_t *bmp, const size_t bmpsize, const uin PrintAndLogEx(DEBUG, "colorsused = %d", pbmpheader->colorsused); PrintAndLogEx(DEBUG, "pbmpheader->bpp = %d", pbmpheader->bpp); if ((pbmpheader->BMP_Width != models[model_nr].width) || (pbmpheader->BMP_Height != models[model_nr].height)) { - PrintAndLogEx(WARNING, "Invalid BMP size, expected %ix%i, got %ix%i", pbmpheader->BMP_Width, pbmpheader->BMP_Height, models[model_nr].width, models[model_nr].height); + PrintAndLogEx(WARNING, "Invalid BMP size, expected %ix%i, got %ix%i", models[model_nr].width, models[model_nr].height, pbmpheader->BMP_Width, pbmpheader->BMP_Height); } return pbmpheader->bpp; } -static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t **black) { +static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, uint8_t **black, uint8_t **black_minus_red, uint8_t **red) { BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; // check file is bitmap if (pbmpheader->bpp != 1) { @@ -143,17 +143,40 @@ static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t **b uint16_t Image_Width_Byte = (pbmpheader->BMP_Width % 8 == 0) ? (pbmpheader->BMP_Width / 8) : (pbmpheader->BMP_Width / 8 + 1); uint16_t Bmp_Width_Byte = (Image_Width_Byte % 4 == 0) ? Image_Width_Byte : ((Image_Width_Byte / 4 + 1) * 4); - *black = calloc(WSMAPSIZE, sizeof(uint8_t)); - if (*black == NULL) { - return PM3_EMALLOC; - } - // Write data into RAM - for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns - for (X = 0; X < Bmp_Width_Byte; X++) { // lines - if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { - (*black)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; + if ((model_nr == M1in54B) || (model_nr == M2in13B)) { + // for BW+Red screens: + *black_minus_red = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*black_minus_red == NULL) { + return PM3_EMALLOC; + } + *red = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*red == NULL) { + free(*black_minus_red); + return PM3_EMALLOC; + } + // Write data into RAM + for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns + for (X = 0; X < Bmp_Width_Byte; X++) { // lines + if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { + (*black_minus_red)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; + } + offset++; + } + } + } else { + // for BW-only screens: + *black = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*black == NULL) { + return PM3_EMALLOC; + } + // Write data into RAM + for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns + for (X = 0; X < Bmp_Width_Byte; X++) { // lines + if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { + (*black)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; + } + offset++; } - offset++; } } return PM3_SUCCESS; @@ -530,9 +553,7 @@ static void read_black(uint32_t i, uint8_t *l, uint8_t model_nr, uint8_t *black) } static void read_red(uint32_t i, uint8_t *l, uint8_t model_nr, uint8_t *red) { for (uint8_t j = 0; j < models[model_nr].len; j++) { - if (red == NULL) { - l[3 + j] = ~0x00; - } else if (model_nr == M1in54B) { + if (model_nr == M1in54B) { //1.54B needs to flip the red picture data, other screens do not need to flip data l[3 + j] = ~red[i * models[model_nr].len + j]; } else { @@ -1013,7 +1034,7 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { return PM3_ESOFT; } else if (depth == 1) { PrintAndLogEx(DEBUG, "BMP file is a bitmap"); - if (read_bmp_bitmap(bmp, bytes_read, &black) != PM3_SUCCESS) { + if (read_bmp_bitmap(bmp, bytes_read, model_nr, &black, &black_minus_red, &red) != PM3_SUCCESS) { free(bmp); return PM3_ESOFT; } @@ -1035,7 +1056,9 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { free(bmp); start_drawing(model_nr, black, black_minus_red, red); - free(black); + if (black != NULL) { + free(black); + } if (black_minus_red != NULL) { free(black_minus_red); } From 1208eb9e100c5154d5a8f804a4446ced2cb4b37d Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 16 Sep 2020 02:38:28 +0200 Subject: [PATCH 87/92] Add option for continuous mode to `lf read`, try e.g. `data plot` then `lf read d 3000 s c` --- CHANGELOG.md | 1 + client/src/cmdlf.c | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55d26c791..786d2c0e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] + - Add option for continuous mode to `lf read`, try e.g. `data plot` then `lf read d 3000 s c` (@doegox) - Add `hf waveshare` to upload picture to Waveshare NFC-Powered e-Paper (@doegox) - Add `hf 14a config` to deal with badly configured cards: invalid ATQA/BCC/SAK (@doegox) - Mikron JSC Russia Ultralight EV1 41 pages tag type support (@McEloff) diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index 165108fb8..eb79ca193 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -77,14 +77,16 @@ static int usage_lf_cmdread(void) { return PM3_SUCCESS; } static int usage_lf_read(void) { - PrintAndLogEx(NORMAL, "Usage: lf read [h] [s] [d numofsamples]"); + PrintAndLogEx(NORMAL, "Usage: lf read [h] [s] [d numofsamples] [c]"); PrintAndLogEx(NORMAL, "Options:"); PrintAndLogEx(NORMAL, " h This help"); PrintAndLogEx(NORMAL, " d #samples # samples to collect (optional)"); PrintAndLogEx(NORMAL, " s silent"); + PrintAndLogEx(NORMAL, " c run continuously until a key is pressed"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); PrintAndLogEx(NORMAL, " lf read s d 12000 - collects 12000 samples silent"); + PrintAndLogEx(NORMAL, " lf read d 3000 s c - to be used with 'data plot' for live oscillo style"); PrintAndLogEx(NORMAL, " lf read"); PrintAndLogEx(NORMAL, "Extras:"); PrintAndLogEx(NORMAL, " use " _YELLOW_("'lf config'")" to set parameters."); @@ -627,6 +629,7 @@ int CmdLFRead(const char *Cmd) { bool errors = false; bool verbose = true; + bool continuous = false; uint32_t samples = 0; uint8_t cmdp = 0; while (param_getchar(Cmd, cmdp) != 0x00 && !errors) { @@ -641,6 +644,10 @@ int CmdLFRead(const char *Cmd) { verbose = false; cmdp++; break; + case 'c': + continuous = true; + cmdp++; + break; default: PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp)); errors = true; @@ -650,8 +657,17 @@ int CmdLFRead(const char *Cmd) { //Validations if (errors) return usage_lf_read(); - - return lf_read(verbose, samples); + if (continuous) { + PrintAndLogEx(INFO, "Press " _GREEN_("Enter") " to exit"); + } + int ret = PM3_SUCCESS; + do { + ret = lf_read(verbose, samples); + if (kbd_enter_pressed()) { + break; + } + } while (continuous); + return ret; } int CmdLFSniff(const char *Cmd) { From 7621af2e883cb698d54026507d929f1ef95e1bf0 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 16 Sep 2020 09:19:41 +0200 Subject: [PATCH 88/92] ws: simplify --- client/src/cmdhfwaveshare.c | 91 ++++++++++++++----------------------- 1 file changed, 35 insertions(+), 56 deletions(-) diff --git a/client/src/cmdhfwaveshare.c b/client/src/cmdhfwaveshare.c index 364fda3c0..bbcee4e18 100644 --- a/client/src/cmdhfwaveshare.c +++ b/client/src/cmdhfwaveshare.c @@ -119,7 +119,7 @@ static int picture_bit_depth(const uint8_t *bmp, const size_t bmpsize, const uin return pbmpheader->bpp; } -static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, uint8_t **black, uint8_t **black_minus_red, uint8_t **red) { +static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, uint8_t **black, uint8_t **red) { BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; // check file is bitmap if (pbmpheader->bpp != 1) { @@ -143,41 +143,26 @@ static int read_bmp_bitmap(const uint8_t *bmp, const size_t bmpsize, uint8_t mod uint16_t Image_Width_Byte = (pbmpheader->BMP_Width % 8 == 0) ? (pbmpheader->BMP_Width / 8) : (pbmpheader->BMP_Width / 8 + 1); uint16_t Bmp_Width_Byte = (Image_Width_Byte % 4 == 0) ? Image_Width_Byte : ((Image_Width_Byte / 4 + 1) * 4); + *black = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*black == NULL) { + return PM3_EMALLOC; + } + // Write data into RAM + for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns + for (X = 0; X < Bmp_Width_Byte; X++) { // lines + if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { + (*black)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; + } + offset++; + } + } if ((model_nr == M1in54B) || (model_nr == M2in13B)) { // for BW+Red screens: - *black_minus_red = calloc(WSMAPSIZE, sizeof(uint8_t)); - if (*black_minus_red == NULL) { - return PM3_EMALLOC; - } *red = calloc(WSMAPSIZE, sizeof(uint8_t)); if (*red == NULL) { - free(*black_minus_red); + free(*black); return PM3_EMALLOC; } - // Write data into RAM - for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns - for (X = 0; X < Bmp_Width_Byte; X++) { // lines - if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { - (*black_minus_red)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; - } - offset++; - } - } - } else { - // for BW-only screens: - *black = calloc(WSMAPSIZE, sizeof(uint8_t)); - if (*black == NULL) { - return PM3_EMALLOC; - } - // Write data into RAM - for (Y = 0; Y < pbmpheader->BMP_Height; Y++) { // columns - for (X = 0; X < Bmp_Width_Byte; X++) { // lines - if ((X < Image_Width_Byte) && ((X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte) < WSMAPSIZE)) { - (*black)[X + (pbmpheader->BMP_Height - Y - 1) * Image_Width_Byte] = color_flag ? bmp[offset] : ~bmp[offset]; - } - offset++; - } - } } return PM3_SUCCESS; } @@ -373,7 +358,7 @@ static void map8to1(uint8_t *colormap, uint16_t width, uint16_t height, uint8_t } } -static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, uint8_t **black, uint8_t **black_minus_red, uint8_t **red, char *filename, bool save_conversions) { +static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, uint8_t **black, uint8_t **red, char *filename, bool save_conversions) { BMP_HEADER *pbmpheader = (BMP_HEADER *)bmp; // check file is full color if (pbmpheader->bpp != 24) { @@ -423,8 +408,8 @@ static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, ui if ((model_nr == M1in54B) || (model_nr == M2in13B)) { // for BW+Red screens: - uint8_t *mapBlackMinusRed = calloc(width*height, sizeof(uint8_t)); - if (mapBlackMinusRed == NULL) { + uint8_t *mapBlack = calloc(width*height, sizeof(uint8_t)); + if (mapBlack == NULL) { free(chanR); free(chanG); free(chanB); @@ -435,7 +420,7 @@ static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, ui free(chanR); free(chanG); free(chanB); - free(mapBlackMinusRed); + free(mapBlack); return PM3_EMALLOC; } rgb_to_gray_red_inplace(chanR, chanG, chanB, width, height); @@ -443,7 +428,7 @@ static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, ui uint8_t palette[] ={0x00,0x00,0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00}; // black, white, red dither_rgb_inplace(chanR, chanG, chanB, width, height, palette, sizeof(palette)/3); - threshold_rgb_black_red(chanR, chanG, chanB, width, height, 128, 128, mapBlackMinusRed, mapRed); + threshold_rgb_black_red(chanR, chanG, chanB, width, height, 128, 128, mapBlack, mapRed); if (save_conversions) { // fill BMP chans offset = pbmpheader->offset; @@ -462,7 +447,7 @@ static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, ui free(chanR); free(chanG); free(chanB); - free(mapBlackMinusRed); + free(mapBlack); free(mapRed); return PM3_EIO; } @@ -470,18 +455,18 @@ static int read_bmp_rgb(uint8_t *bmp, const size_t bmpsize, uint8_t model_nr, ui free(chanR); free(chanG); free(chanB); - *black_minus_red = calloc(WSMAPSIZE, sizeof(uint8_t)); - if (*black_minus_red == NULL) { - free(mapBlackMinusRed); + *black = calloc(WSMAPSIZE, sizeof(uint8_t)); + if (*black == NULL) { + free(mapBlack); free(mapRed); return PM3_EMALLOC; } - map8to1(mapBlackMinusRed, width, height, *black_minus_red); - free(mapBlackMinusRed); + map8to1(mapBlack, width, height, *black); + free(mapBlack); *red = calloc(WSMAPSIZE, sizeof(uint8_t)); if (*red == NULL) { free(mapRed); - free(*black_minus_red); + free(*black); return PM3_EMALLOC; } map8to1(mapRed, width, height, *red); @@ -649,7 +634,7 @@ static int start_drawing_1in54B(uint8_t model_nr, uint8_t *black, uint8_t *red) return PM3_SUCCESS; } -static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *black_minus_red, uint8_t *red) { +static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *red) { uint8_t progress = 0; uint8_t step0[2] = {0xcd, 0x0d}; uint8_t step1[3] = {0xcd, 0x00, 10}; //select e-paper type and reset e-paper 4:2.13inch e-Paper 7:2.9inch e-Paper 10:4.2inch e-Paper 14:7.5inch e-Paper @@ -774,7 +759,7 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *black_minus_ if (model_nr == M1in54B) { // 1.54B Keychain handler PrintAndLogEx(DEBUG, "Start_Drawing_1in54B"); - ret = start_drawing_1in54B(model_nr, black_minus_red, red); + ret = start_drawing_1in54B(model_nr, black, red); if (ret != PM3_SUCCESS) { return ret; } @@ -841,7 +826,7 @@ static int start_drawing(uint8_t model_nr, uint8_t *black, uint8_t *black_minus_ } } else if (model_nr == M2in13B) { //2.13inch B for (i = 0; i < 26; i++) { - read_black(i, step8, model_nr, black_minus_red); + read_black(i, step8, model_nr, black); ret = transceive_blocking(step8, 109, rx, 20, actrxlen, true); // cd 08 if (ret != PM3_SUCCESS) { return ret; @@ -1019,7 +1004,6 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { uint8_t *bmp = NULL; uint8_t *black = NULL; - uint8_t *black_minus_red = NULL; uint8_t *red = NULL; size_t bytes_read = 0; if (loadFile_safe(filename, ".bmp", (void **)&bmp, &bytes_read) != PM3_SUCCESS) { @@ -1034,13 +1018,13 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { return PM3_ESOFT; } else if (depth == 1) { PrintAndLogEx(DEBUG, "BMP file is a bitmap"); - if (read_bmp_bitmap(bmp, bytes_read, model_nr, &black, &black_minus_red, &red) != PM3_SUCCESS) { + if (read_bmp_bitmap(bmp, bytes_read, model_nr, &black, &red) != PM3_SUCCESS) { free(bmp); return PM3_ESOFT; } } else if (depth == 24) { PrintAndLogEx(DEBUG, "BMP file is a RGB"); - if (read_bmp_rgb(bmp, bytes_read, model_nr, &black, &black_minus_red, &red, filename, save_conversions) != PM3_SUCCESS) { + if (read_bmp_rgb(bmp, bytes_read, model_nr, &black, &red, filename, save_conversions) != PM3_SUCCESS) { free(bmp); return PM3_ESOFT; } @@ -1055,14 +1039,9 @@ static int CmdHF14AWSLoadBmp(const char *Cmd) { } free(bmp); - start_drawing(model_nr, black, black_minus_red, red); - if (black != NULL) { - free(black); - } - if (black_minus_red != NULL) { - free(black_minus_red); - } - if (red != NULL) { + start_drawing(model_nr, black, red); + free(black); + if ((model_nr == M1in54B) || (model_nr == M2in13B)) { free(red); } return PM3_SUCCESS; From c99432310509def4594f43868a80c42f9fd1a929 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 16 Sep 2020 12:52:04 +0200 Subject: [PATCH 89/92] Unify 'lf read' and 'lf cmdread options', add options to cmdread --- CHANGELOG.md | 3 +- armsrc/appmain.c | 8 +-- armsrc/lfops.c | 4 +- armsrc/lfops.h | 3 +- armsrc/lfsampling.c | 2 +- client/src/cmdlf.c | 128 ++++++++++++++++++++++++++++++-------------- 6 files changed, 100 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 786d2c0e6..9b4bebe33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] - - Add option for continuous mode to `lf read`, try e.g. `data plot` then `lf read d 3000 s c` (@doegox) + - Add options to `lf read` and `lf cmdread` (@doegox) + - Change options of `lf read` to match `lf cmdread`, this affects historical `d` and `s` options (@doegox) - Add `hf waveshare` to upload picture to Waveshare NFC-Powered e-Paper (@doegox) - Add `hf 14a config` to deal with badly configured cards: invalid ATQA/BCC/SAK (@doegox) - Mikron JSC Russia Ultralight EV1 41 pages tag type support (@McEloff) diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 92e9f82f0..0fc9dd63d 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -759,8 +759,8 @@ static void PacketReceived(PacketCommandNG *packet) { } case CMD_LF_ACQ_RAW_ADC: { struct p { - bool verbose; - uint32_t samples; + uint32_t samples : 31; + bool verbose : 1; } PACKED; struct p *payload = (struct p *)packet->data.asBytes; uint32_t bits = SampleLF(payload->verbose, payload->samples); @@ -772,9 +772,11 @@ static void PacketReceived(PacketCommandNG *packet) { uint32_t delay; uint16_t ones; uint16_t zeros; + uint32_t samples : 31; + bool verbose : 1; } PACKED; struct p *payload = (struct p *)packet->data.asBytes; - ModThenAcquireRawAdcSamples125k(payload->delay, payload->zeros, payload->ones, packet->data.asBytes + 8); + ModThenAcquireRawAdcSamples125k(payload->delay, payload->zeros, payload->ones, packet->data.asBytes + sizeof(struct p), payload->verbose, payload->samples); break; } case CMD_LF_SNIFF_RAW_ADC: { diff --git a/armsrc/lfops.c b/armsrc/lfops.c index 93e9cd230..8c4b1e454 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -383,7 +383,7 @@ void loadT55xxConfig(void) { * @param period_1 * @param command (in binary char array) */ -void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint32_t period_0, uint32_t period_1, uint8_t *command) { +void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint32_t period_0, uint32_t period_1, uint8_t *command, bool verbose, uint32_t samples) { FpgaDownloadAndGo(FPGA_BITSTREAM_LF); @@ -475,7 +475,7 @@ void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint32_t period_0, uint FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_READER | FPGA_LF_ADC_READER_FIELD); // now do the read - DoAcquisition_config(true, 0); + DoAcquisition_config(verbose, samples); // Turn off antenna FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); diff --git a/armsrc/lfops.h b/armsrc/lfops.h index 2d76bef48..17c79ef61 100644 --- a/armsrc/lfops.h +++ b/armsrc/lfops.h @@ -15,8 +15,7 @@ #include "pm3_cmd.h" // struct -void AcquireRawAdcSamples125k(int divisor); -void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint32_t period_0, uint32_t period_1, uint8_t *command); +void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint32_t period_0, uint32_t period_1, uint8_t *command, bool verbose, uint32_t samples); void ReadTItag(void); void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc); diff --git a/armsrc/lfsampling.c b/armsrc/lfsampling.c index b5e074e5b..91bde7569 100644 --- a/armsrc/lfsampling.c +++ b/armsrc/lfsampling.c @@ -329,7 +329,7 @@ uint32_t DoAcquisition(uint8_t decimation, uint8_t bits_per_sample, bool avg, in if (verbose) { if (checked == -1) { Dbprintf("lf sampling aborted"); - } else if (cancel_counter == cancel_after) { + } else if ((cancel_counter == cancel_after) && (cancel_after > 0)){ Dbprintf("lf sampling cancelled after %u", cancel_counter); } diff --git a/client/src/cmdlf.c b/client/src/cmdlf.c index eb79ca193..c324a7ba9 100644 --- a/client/src/cmdlf.c +++ b/client/src/cmdlf.c @@ -61,33 +61,43 @@ static bool g_lf_threshold_set = false; static int CmdHelp(const char *Cmd); static int usage_lf_cmdread(void) { - PrintAndLogEx(NORMAL, "Usage: lf cmdread d z o c "); + PrintAndLogEx(NORMAL, "Usage: lf cmdread d z o c [q] [s #samples] [@]"); PrintAndLogEx(NORMAL, "Options:"); PrintAndLogEx(NORMAL, " h This help"); PrintAndLogEx(NORMAL, " d delay OFF period, (0 for bitbang mode) (decimal)"); PrintAndLogEx(NORMAL, " z ZERO time period (decimal)"); PrintAndLogEx(NORMAL, " o ONE time period (decimal)"); PrintAndLogEx(NORMAL, " c Command bytes (in ones and zeros)"); + PrintAndLogEx(NORMAL, " q silent (optional)"); + PrintAndLogEx(NORMAL, " s #samples number of samples to collect (optional)"); + PrintAndLogEx(NORMAL, " @ run continuously until a key is pressed (optional)"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, " ************* " _YELLOW_("All periods in microseconds (us)")); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, " lf cmdread d 80 z 100 o 200 c 11000"); + PrintAndLogEx(NORMAL, "- probing for HT2:"); + PrintAndLogEx(NORMAL, " lf cmdread d 50 z 116 o 166 c 011000"); + PrintAndLogEx(NORMAL, "- probing for HT2, oscilloscope style:"); + PrintAndLogEx(NORMAL, " data plot"); + PrintAndLogEx(NORMAL, " lf cmdread d 50 z 116 o 166 c 011000 q s 2000 @"); PrintAndLogEx(NORMAL, "Extras:"); PrintAndLogEx(NORMAL, " use " _YELLOW_("'lf config'")" to set parameters."); return PM3_SUCCESS; } static int usage_lf_read(void) { - PrintAndLogEx(NORMAL, "Usage: lf read [h] [s] [d numofsamples] [c]"); + PrintAndLogEx(NORMAL, "Usage: lf read [h] [q] [s #samples] [@]"); PrintAndLogEx(NORMAL, "Options:"); PrintAndLogEx(NORMAL, " h This help"); - PrintAndLogEx(NORMAL, " d #samples # samples to collect (optional)"); - PrintAndLogEx(NORMAL, " s silent"); - PrintAndLogEx(NORMAL, " c run continuously until a key is pressed"); + PrintAndLogEx(NORMAL, " q silent (optional)"); + PrintAndLogEx(NORMAL, " s #samples number of samples to collect (optional)"); + PrintAndLogEx(NORMAL, " @ run continuously until a key is pressed (optional)"); PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "Examples:"); - PrintAndLogEx(NORMAL, " lf read s d 12000 - collects 12000 samples silent"); - PrintAndLogEx(NORMAL, " lf read d 3000 s c - to be used with 'data plot' for live oscillo style"); - PrintAndLogEx(NORMAL, " lf read"); + PrintAndLogEx(NORMAL, " lf read"); + PrintAndLogEx(NORMAL, "- collecting quietly 12000 samples:"); + PrintAndLogEx(NORMAL, " lf read q s 12000 - "); + PrintAndLogEx(NORMAL, "- oscilloscope style:"); + PrintAndLogEx(NORMAL, " data plot"); + PrintAndLogEx(NORMAL, " lf read q s 3000 @"); PrintAndLogEx(NORMAL, "Extras:"); PrintAndLogEx(NORMAL, " use " _YELLOW_("'lf config'")" to set parameters."); return PM3_SUCCESS; @@ -309,14 +319,22 @@ int CmdLFCommandRead(const char *Cmd) { if (!session.pm3_present) return PM3_ENOTTY; bool errors = false; + bool verbose = true; + bool continuous = false; + uint32_t samples = 0; uint16_t datalen = 0; + uint8_t payload_header_size = 12; struct p { uint32_t delay; uint16_t ones; uint16_t zeros; - uint8_t data[PM3_CMD_DATA_SIZE - 8]; + uint32_t samples : 31; + bool verbose : 1; + uint8_t data[PM3_CMD_DATA_SIZE - payload_header_size]; } PACKED payload; + payload.samples = samples; + payload.verbose = verbose; uint8_t cmdp = 0; while (param_getchar(Cmd, cmdp) != 0x00 && !errors) { @@ -339,6 +357,20 @@ int CmdLFCommandRead(const char *Cmd) { payload.ones = param_get32ex(Cmd, cmdp + 1, 0, 10) & 0xFFFF; cmdp += 2; break; + case 's': + samples = param_get32ex(Cmd, cmdp + 1, 0, 10); + payload.samples = samples; + cmdp += 2; + break; + case 'q': + verbose = false; + payload.verbose = verbose; + cmdp++; + break; + case '@': + continuous = true; + cmdp++; + break; default: PrintAndLogEx(WARNING, "Unknown parameter '%c'", param_getchar(Cmd, cmdp)); errors = true; @@ -356,33 +388,51 @@ int CmdLFCommandRead(const char *Cmd) { //Validations if (errors || cmdp == 0) return usage_lf_cmdread(); - - PrintAndLogEx(SUCCESS, "sending"); - clearCommandBuffer(); - SendCommandNG(CMD_LF_MOD_THEN_ACQ_RAW_ADC, (uint8_t *)&payload, 8 + datalen); - - PacketResponseNG resp; - - uint8_t i = 10; - // 20sec wait loop - while (!WaitForResponseTimeout(CMD_LF_MOD_THEN_ACQ_RAW_ADC, &resp, 2000) && i != 0) { - PrintAndLogEx(NORMAL, "." NOLF); - i--; + if (continuous) { + PrintAndLogEx(INFO, "Press " _GREEN_("Enter") " to exit"); + } + if (verbose) { + PrintAndLogEx(SUCCESS, "Sending command..."); } - PrintAndLogEx(NORMAL, ""); - if (resp.status == PM3_SUCCESS) { - if (i) { - PrintAndLogEx(SUCCESS, "downloading response signal data"); - getSamples(0, false); - return PM3_SUCCESS; - } else { - PrintAndLogEx(WARNING, "timeout while waiting for reply."); - return PM3_ETIMEOUT; + int ret = PM3_SUCCESS; + do { + clearCommandBuffer(); + SendCommandNG(CMD_LF_MOD_THEN_ACQ_RAW_ADC, (uint8_t *)&payload, payload_header_size + datalen); + + PacketResponseNG resp; + + uint8_t i = 10; + // 20sec wait loop + while (!WaitForResponseTimeout(CMD_LF_MOD_THEN_ACQ_RAW_ADC, &resp, 2000) && i != 0) { + if (verbose) { + PrintAndLogEx(NORMAL, "." NOLF); + } + i--; } - } - PrintAndLogEx(WARNING, "command failed."); - return PM3_ESOFT; + if (verbose) { + PrintAndLogEx(NORMAL, ""); + } + if (resp.status == PM3_SUCCESS) { + if (i) { + if (verbose) { + PrintAndLogEx(SUCCESS, "downloading response signal data"); + } + getSamples(samples, false); + ret = PM3_SUCCESS; + } else { + PrintAndLogEx(WARNING, "timeout while waiting for reply."); + return PM3_ETIMEOUT; + } + } else { + PrintAndLogEx(WARNING, "command failed."); + return PM3_ESOFT; + } + if (kbd_enter_pressed()) { + break; + } + } while (continuous); + return ret; } int CmdFlexdemod(const char *Cmd) { @@ -597,8 +647,8 @@ int lf_read(bool verbose, uint32_t samples) { if (!session.pm3_present) return PM3_ENOTTY; struct p { - bool verbose; - uint32_t samples; + uint32_t samples : 31; + bool verbose : 1; } PACKED; struct p payload; @@ -636,15 +686,15 @@ int CmdLFRead(const char *Cmd) { switch (tolower(param_getchar(Cmd, cmdp))) { case 'h': return usage_lf_read(); - case 'd': + case 's': samples = param_get32ex(Cmd, cmdp + 1, 0, 10); cmdp += 2; break; - case 's': + case 'q': verbose = false; cmdp++; break; - case 'c': + case '@': continuous = true; cmdp++; break; From 6f869cb462d862449d97f438d40effa0eade2168 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 16 Sep 2020 13:00:11 +0200 Subject: [PATCH 90/92] typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b4bebe33..d95130493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,7 +104,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac - Change appveyor verbose (@doegox) - Change `lf nexwatch demod` - now detects type, and show parity /chksum (@iceman1001) - Change `lfsampling` - interruptible only when logging not yet triggered (@doegox) - - Change `lf keri demod - more leanient when it comes to bits (@iceman1001) + - Change `lf keri demod` - more leanient when it comes to bits (@iceman1001) - fix, proper filtering of RL markers (@doegox) - Change, clean deps [compiler trials] (@doegox) - Change, remove c99 restrictions [compiler trials] (@doegox) From 06dfa3c32de26ee5fa1862d16e9962d35b2a4dd2 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 16 Sep 2020 15:29:14 +0200 Subject: [PATCH 91/92] coffee --- client/src/cmdparser.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/cmdparser.c b/client/src/cmdparser.c index dee76a8fe..837c13fed 100644 --- a/client/src/cmdparser.c +++ b/client/src/cmdparser.c @@ -186,6 +186,12 @@ int CmdsParse(const command_t Commands[], const char *Cmd) { dumpCommandsRecursive(Commands, 1); return PM3_SUCCESS; } + + if (strcmp(Cmd, "coffee") == 0) { + PrintAndLogEx(NORMAL, ""); + PrintAndLogEx(NORMAL, " ((\n ))\n" _YELLOW_(" .______.\n | |]\n \\ /\n `----ยด\n\n")); + return PM3_SUCCESS; + } char cmd_name[128]; memset(cmd_name, 0, sizeof(cmd_name)); From 3e4400507724a88a99ea56b34a7dc9e37ed2b81c Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Wed, 16 Sep 2020 23:03:47 +0200 Subject: [PATCH 92/92] Corrected ProxSpace installation. ProxSpace can not be cloned, as this causes errors during the installation. runme.bat does no longer exist. --- .../Windows-Installation-Instructions.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md index 8930c0a04..b51548108 100644 --- a/doc/md/Installation_Instructions/Windows-Installation-Instructions.md +++ b/doc/md/Installation_Instructions/Windows-Installation-Instructions.md @@ -17,12 +17,10 @@ There are two ways to install, build and use Proxmark3 on Windows: Install required drivers for your Windows installation. You may need admin privileges to do this. Step by step guides are online such as [RyscCorps](https://store.ryscc.com/blogs/news/how-to-install-a-proxmark3-driver-on-windows-10). -## Download / clone ProxSpace repo +## Download ProxSpace repo Download the Gator96100 ProxSpace package from https://github.com/Gator96100/ProxSpace/releases -If you prefer, you can clone it, provided that you installed Github for Windows https://desktop.github.com/. - Extract 'ProxSpace' to a location path without spaces. For example D:\OneDrive\Documents\GitHub is ok whereas C:\My Documents\My Projects\proxspace is not. @@ -30,7 +28,7 @@ If you're running Windows in a Virtualbox guest, make sure not to install ProxSp ## Launch ProxSpace -Run `runme.bat` or `runme64.bat` depending on your Windows architecture. +Run `runme64.bat`. You'll get a Bash prompt and your home directory should become the ProxSpace `pm3` sub-directory.