import re


def validate_account_to_dashed(account):
    """
    Validates the the provided string is in valid AdWords account format and converts it to dashed format.

    :param str account: AdWords Account
    :rtype:             str
    :return:            Dashed format
    """

    account = str(account).strip()
    if re.match("[0-9]{3}-[0-9]{3}-[0-9]{4}", account):
        return account
    if re.match("^[0-9]{10}$", account):
        return '-'.join([str(account)[0:3], str(account)[3:6], str(account)[6:]])
    raise ValueError("Invalid account format provided: {}".format(account))