Crypto Japanese Cave: Smörgåsbord (Example)

Solve #right #link=https://tinyurl.com/23eh274t

Rules:

Place numbers from 1 to 6 in some empty cells, and some positive integers in some given clue cells such that all numbers are orthogonally connected and all orthogonally connected groups of empty cells touch the boundary of the grid. No number from 1 to 6 may repeat in a row or column.

The letters are split into two distinct ciphers; one that consists of letters only outside the grid (E, L, M, P, and X) and one that consists of letters only inside the grid (B and C). Within a cipher, each letter replaces a unique number between 1 and 6 inclusive. The letter that appears both inside and outside the grid (A) takes on a different value between 1 and 6 in each occurrence.

Clues outside the grid indicate the sums of connected groups of numbers in the respective row or column, in order, where empty cells serve as delimiters between groups. A question mark can be any number from 0 to 9, and for all clues, none may have a leading zero.

If a cell with a given clue contains a number, the given clue indicates the total amount of numbers seen in all four orthogonal directions, including itself, where empty cells block vision. However, the number placed in that cell must be exactly one greater or exactly one less than the given clue. If a given clue is empty, then it indicates the size of the orthogonally connected block of empty cells that cell belongs to. A block of empty cells may contain multiple given clues as long as the given clues are identical in value.