def get_val(val_str):
    """Converts a string into a, integer, float, or string."""
    try:
        val = int(val_str)
        return val
    except ValueError:
        try:
            val = float(val_str)
            return val
        except ValueError:
            return val_str