# Task
 Consider the following ciphering algorithm:
```
For each character replace it with its code.
Concatenate all of the obtained numbers.
```
Given a ciphered string, return the initial one if it is known that it consists only of lowercase letters.

 Note: here the character's code means its `decimal ASCII code`, the numerical representation of a character used by most modern programming languages.

# Example

 For `cipher = "10197115121"`, the output should be `"easy"`.

 Explanation: 
 ```
 charCode('e') = 101, 
 charCode('a') = 97, 
 charCode('s') = 115 
 charCode('y') = 121.
```
# Input/Output


 - `[input]` string `cipher`

   A non-empty string which is guaranteed to be a cipher for some other string of lowercase letters.


 - `[output]` a string

Difficulty: introductory

Starter code:

def decipher(cipher):
	

Solutions:
def decipher(cipher):
    out = ""
    while cipher:
        l = 2 if cipher[0] == "9" else 3
        out += chr(int(cipher[:l]))
        cipher = cipher[l:]
    return out

import re

def decipher(cipher):
    return re.sub(r'1?\d\d', lambda m: chr(int(m.group())), cipher)


import re
def decipher(cipher):
    return re.sub('1?\d{2}',lambda m:chr(int(m.group())),cipher)

def decipher(cipher):
    lst,it = [],iter(cipher)
    for c in it:
        lst.append(chr(int(''.join(
                     (c, next(it), next(it)) if c=='1' else (c, next(it))
                   ))))
    return ''.join(lst) 

def decipher(cipher):
    answer = ""
    while cipher:
        l = 3 if cipher[0] == "1" else 2
        answer += chr(int(cipher[:l]))
        cipher = cipher[l:]
    return answer

def decipher(cipher):
    s = ''
    while cipher != '':
        if int(cipher[:3]) <= 122:
            s +=  chr(int(cipher[:3]))
            cipher = cipher[3:]
        else:
            s += chr(int(cipher[:2]))
            cipher = cipher[2:]
    return s     

def decipher(cipher):
    temp,aus = "",""
    for dig in cipher:
        temp = temp + dig
        if int(temp) >= 97 and int(temp) <= 122:
            aus += chr(int(temp))
            temp = ""
    return aus

from re import findall
def decipher(cipher):
    return "".join(chr(int(d)) for d in findall("9\d|1[01]\d|12[012]",cipher))

import re
def decipher(cipher):
    pattern = re.compile(r'[a-z]')
    num = ''
    code = ''
    for i in cipher:
        num += i
        ascii_char = chr(int(num))
        
        if pattern.search(ascii_char):
            code += ascii_char
            num = ''
            
    return code


import re

def decipher(cipher):
    return ''.join(chr(int(x)) for x in re.findall(r'1\d\d|\d\d', cipher))