Generate keyboard shortcuts for a menu Menu Shortcuts

Traditionally, user menus are accessible by keyboard shortcuts, such as Alt + (a letter), or even simply hitting the letter when all textboxes are unfocused (gmail style).

Your task

Given the menu entries as an input, your task is to grant each menu entry a proper shortcut letter.

Write a function or a program that accepts a set of words - the menu entries (as an array of strings, or your language equivalent), and returns a dictionary, or a hashmap, from a single letter to a menu entry.

You can either use a parameter and return a value, or use the STDIN and output your results to STDOUT. You are not allowed to assume a global/scope variable is already populated with the input.

Algorithm to determine the proper letter


Basically it's the first available letter of the word. See assumptions and examples below.
In case all entry's letters are not available, the shortcut will be (a letter) + (a number). Which letter you pick from the entry is arbitrary. The number should start from 0 and be incremented by 1 - such that all shortcuts are unique. See third example below.


Assumptions


The input will be a Set, i.e. no repetitions, every entry is unique.
Length of the input can be any non-negative integer (up to MAX_INT of your language).
Case sensitivity: Input is case-sensitive, (but will stay unique when ignoring case). The results should contain the original entries with their original casing. However, the output shortcut letters are not case-sensitive.
All input words will not end with numbers.
No "evil input" will be tested. "Evil input" is such that you have to increment the counter of a certain letter more than 10 times.


Examples

Examples below are in JSON, but you can use your language equivalent for an array and a Dictionary, or - in case you're using STD I/O - any readable format for your input and output (such as csv, or even space-separated values).

1.

Input:  ['File', 'Edit', 'View', 'Help']
Output: {f:'File', e:'Edit', v:'View', h:'Help'}


2.

Input:  ['Foo', 'Bar', 'FooBar', 'FooBars']
Output: {f:'Foo', b:'Bar', o:'FooBar', a:'FooBars'}


3.

Input:  ['a', 'b', 'aa', 'bb', 'bbq', 'bbb', 'ba']
Output: {a:'a', b:'b', a0:'aa', b0:'bb', q:'bbq', b1:'bbb', b2:'ba'}


Winning conditions

Shortest code wins. Only ASCII is allowed.
Javascript (ES6) 106 105 100
This function takes input as an an array and outputs a javascript object.
f=i=&gt;i.map(a=&gt;{for(b of c=a.toLowerCase(d=0)+d+123456789)d&lt;!o[e=b&gt;=0?c[0]+b:b]&amp;&amp;(o[d=e]=a)},o={})&amp;&amp;o

Results:
f(['File', 'Edit', 'View', 'Help']);
// {&quot;f&quot;:&quot;File&quot;,&quot;e&quot;:&quot;Edit&quot;,&quot;v&quot;:&quot;View&quot;,&quot;h&quot;:&quot;Help&quot;}

f(['Foo', 'Bar', 'FooBar', 'FooBars']);
// {&quot;f&quot;:&quot;Foo&quot;,&quot;b&quot;:&quot;Bar&quot;,&quot;o&quot;:&quot;FooBar&quot;,&quot;a&quot;:&quot;FooBars&quot;}

f(['a', 'b', 'aa', 'bb', 'bbq', 'bbb', 'ba']);
// {&quot;a&quot;:&quot;a&quot;,&quot;b&quot;:&quot;b&quot;,&quot;a0&quot;:&quot;aa&quot;,&quot;b0&quot;:&quot;bb&quot;,&quot;q&quot;:&quot;bbq&quot;,&quot;b1&quot;:&quot;bbb&quot;,&quot;b2&quot;:&quot;ba&quot;}

Ungolfed / Commented:
f=i=&gt;{
  o={};                                        // initialize an object for output
  i.map(a=&gt;                                    // loop through all values in input
    for(b of c=a.toLowerCase(d=0)+d+123456789) // loop through all characters of the string with 0123456789 appended to the end
                                               // and initialize d as 0 to be used as a flag 
      e=b&gt;=0?c[0]+b:b                          // if b is a number, set e to the first character + the number, otherwise b
      if(d&lt;!o[e])                              // if the flag hasn't been triggered and o doesn't have a property e
        o[d=e]=a                               // then store the value at e and trigger the d flag
  )
  return o                                     // return the output object
}