from typing import Dict
from typing import Union


def formula_dict_to_str(formula: Dict[str, Union[int, float]]) -> str:
    """
    Converts a sum formula from a dictionary like {'C': 12, 'H': 6, 'O': 3} to a
    string like C12 H6 O3

    >>> formula_dict_to_str({'Elem_C': 12, 'Elem_H': 6.5, 'Elem_O': 3, 'Elem_Mn': 7})
    'C12 H6.5 O3 Mn7'
    """
    formstr = ' '.join([x[5:] + str(formula[x]) for x in formula.keys()])
    return formstr