You are given an input string.

For each symbol in the string if it's the first character occurrence, replace it with a '1', else replace it with the amount of times you've already seen it...
      
But will your code be **performant enough**?

___

## Examples:

```
input   =  "Hello, World!"
result  =  "1112111121311"

input   =  "aaaaaaaaaaaa"
result  =  "123456789101112"
```

There might be some non-ascii characters in the string.

~~~if:java
Note: there will be no int domain overflow (character occurrences will be less than 2 billion).
~~~
~~~if:c
(this does not apply to the C language translation)
~~~

Difficulty: EASY
Starter code: def numericals(s):
	

Solutions:
def numericals(s):
	dictio = {}
	t = ''
	for i in s:
		dictio[i] = dictio.get(i, 0) + 1
		t += str(dictio[i])
	return t


from collections import defaultdict

def numericals(s):
	(d, lst) = (defaultdict(int), [])
	for c in s:
		d[c] += 1
		lst.append(d[c])
	return ''.join(map(str, lst))


def numericals(line):
	counts = dict.fromkeys(line, 0)
	output = []
	for char in line:
		counts[char] += 1
		output.append(counts[char])
	return ''.join((str(number) for number in output))


def numericals(s):
	history = {}
	result = []
	for char in s:
		if char not in history:
			history[char] = 1
		else:
			history[char] += 1
		result.append(history[char])
	return ''.join(map(str, result))


from collections import defaultdict

def numericals(s):
	temp = []
	a = defaultdict(int)
	for i in s:
		a[i] = a[i] + 1
		temp.append(a[i])
	return ''.join(map(str, temp))


from collections import Counter

def numericals(s):

	def f(s):
		cnts = Counter()
		for c in s:
			cnts[c] += 1
			yield cnts[c]
	return ''.join(map(str, f(s)))


def numericals(s):
	d = {x: 0 for x in s}
	result = []
	for symbol in s:
		d[symbol] += 1
		result.append(str(d[symbol]))
	return ''.join(result)


from collections import defaultdict

def numericals(stg):
	(count, result) = (defaultdict(int), [])
	for c in stg:
		count[c] += 1
		result.append(f'{count[c]}')
	return ''.join(result)


def numericals(s):
	sdict = {}
	ans = ''
	for i in range(len(s)):
		sdict[s[i]] = 0
	for i in range(len(s)):
		sdict[s[i]] += 1
		ans += str(sdict[s[i]])
	return ans


def numericals(s):
	seen_liters = {l: 0 for l in set(s)}
	result = ''
	for l in s:
		seen_liters[l] += 1
		result += str(seen_liters[l])
	return result