financial_statement_lines = {
    'accountsreceivable': 'Accounts Receivable',
    'accruedexpenses': 'Accrued Expenses',
    'accruedinterestpayable': 'Accrued Interest Payable',
    'accruedinvestmentincome': 'Accrued Investment Income',
    'accumulateddepreciation': 'Accumulated Depreciation',
    'acquisitions': 'Acquisitions',
    'allowanceforloanandleaselosses': 'Allowance for Loan and Lease Losses',
    'amortizationexpense': 'Amortization Expense',
    'amortizationofdeferredpolicyacquisitioncosts': 'Amortization of Deferred Policy Acquisition Costs',
    'aoci': 'Accumulated Other Comprehensive Income / (Loss)',
    'assetretirementandlitigationobligation': 'Asset Retirement Reserve & Litigation Obligation',
    'bankersacceptances': 'Bankers Acceptance Outstanding',
    'basicdilutedeps': 'Basic & Diluted Earnings per Share',
    'basiceps': 'Basic Earnings per Share',
    'capitalizedleaseobligationinterestexpense': 'Capitalized Lease Obligations Interest Expense',
    'capitalleaseobligations': 'Capital Lease Obligations',
    'cashandequivalents': 'Cash & Equivalents',
    'cashdividendspershare': 'Cash Dividends to Common per Share',
    'cashincometaxespaid': 'Cash Income Taxes Paid',
    'cashinterestpaid': 'Cash Interest Paid',
    'cashinterestreceived': 'Cash Interest Received',
    'claimsandclaimexpenses': 'Claims and Claim Expense',
    'commitmentsandcontingencies': 'Commitments & Contingencies',
    'commonequity': 'Common Stock',
    'currentandfuturebenefits': 'Current and Future Benefits',
    'currentdeferredrevenue': 'Current Deferred Revenue',
    'currentdeferredtaxassets': 'Current Deferred & Refundable Income Taxes',
    'currentdeferredtaxliabilities': 'Current Deferred & Payable Income Tax Liabilities',
    'currentemployeebenefitliabilities': 'Current Employee Benefit Liabilities',
    'customerandotherreceivables': 'Customer and Other Receivables',
    'customerdeposits': 'Customer Deposits',
    'deferredacquisitioncost': 'Deferred Acquisition Cost',
    'depletionexpense': 'Depletion Expense',
    'depositsinterestexpense': 'Deposits Interest Expense',
    'depositsinterestincome': 'Deposits and Money Market Investments Interest Income',
    'depreciationexpense': 'Depreciation Expense',
    'dilutedeps': 'Diluted Earnings per Share',
    'divestitures': 'Divestitures',
    'dividendspayable': 'Dividends Payable',
    'effectofexchangeratechanges': 'Effect of Exchange Rate Changes',
    'employeebenefitassets': 'Employee Benefit Assets',
    'explorationexpense': 'Exploration Expense',
    'extraordinaryincome': 'Extraordinary Income / (Loss), net',
    'fedfundsandrepointerestexpense': 'Federal Funds Purchased and Securities Sold Interest Expense',
    'fedfundsandrepointerestincome': 'Federal Funds Sold and Securities Borrowed Interest Income',
    'fedfundspurchased': 'Federal Funds Purchased and Securities Sold',
    'fedfundssold': 'Federal Funds Sold',
    'futurepolicybenefits': 'Future Policy Benefits',
    'goodwill': 'Goodwill',
    'grossppe': 'Plant, Property & Equipment, gross',
    'impairmentexpense': 'Impairment Charge',
    'incometaxexpense': 'Income Tax Expense',
    'increasedecreaseinoperatingcapital': 'Changes in Operating Assets and Liabilities, net',
    'intangibleassets': 'Intangible Assets',
    'interestbearingdeposits': 'Interest Bearing Deposits',
    'interestbearingdepositsatotherbanks': 'Interest Bearing Deposits at Other Banks',
    'investmentbankingincome': 'Investment Banking Income',
    'investmentsecuritiesinterestincome': 'Investment Securities Interest Income',
    'issuanceofcommonequity': 'Issuance of Common Equity',
    'issuanceofdebt': 'Issuance of Debt',
    'issuanceofpreferredequity': 'Issuance of Preferred Equity',
    'loansandleaseinterestincome': 'Loans and Leases Interest Income',
    'loansandleases': 'Loans and Leases',
    'loansheldforsale': 'Loans Held for Sale',
    'loansheldforsalenet': 'Loans Held for Sale, Net',
    'longtermdebt': 'Long-Term Debt',
    'longtermdebtinterestexpense': 'Long-Term Debt Interest Expense',
    'longterminvestments': 'Long-Term Investments',
    'marketingexpense': 'Marketing Expense',
    'mortgageservicingrights': 'Mortgage Servicing Rights',
    'netcashfromcontinuingfinancingactivities': 'Net Cash From Continuing Financing Activities',
    'netcashfromcontinuinginvestingactivities': 'Net Cash From Continuing Investing Activities',
    'netcashfromcontinuingoperatingactivities': 'Net Cash From Continuing Operating Activities',
    'netcashfromdiscontinuedfinancingactivities': 'Net Cash From Discontinued Financing Activities',
    'netcashfromdiscontinuedinvestingactivities': 'Net Cash From Discontinued Investing Activities',
    'netcashfromdiscontinuedoperatingactivities': 'Net Cash From Discontinued Operating Activities',
    'netcashfromfinancingactivities': 'Net Cash From Financing Activities',
    'netcashfrominvestingactivities': 'Net Cash From Investing Activities',
    'netcashfromoperatingactivities': 'Net Cash From Operating Activities',
    'netchangeincash': 'Net Change in Cash & Equivalents',
    'netchangeindeposits': 'Net Change in Deposits',
    'netincome': 'Consolidated Net Income / (Loss)',
    'netincomecontinuing': 'Net Income / (Loss) Continuing Operations',
    'netincomediscontinued': 'Net Income / (Loss) Discontinued Operations',
    'netincometocommon': 'Net Income / (Loss) Attributable to Common Shareholders',
    'netincometononcontrollinginterest': 'Net Income / (Loss) Attributable to Noncontrolling Interest',
    'netincreaseinfedfundssold': 'Net Increase in Fed Funds Sold',
    'netinterestincome': 'Net Interest Income / (Expense)',
    'netinventory': 'Inventories, net',
    'netloansandleases': 'Loans and Leases, Net of Allowance',
    'netoccupancyequipmentexpense': 'Net Occupancy & Equipment Expense',
    'netppe': 'Plant, Property, & Equipment, net',
    'netpremisesandequipment': 'Premises and Equipment, Net',
    'netrealizedcapitalgains': 'Net Realized & Unrealized Capital Gains on Investments',
    'noncashadjustmentstonetincome': 'Non-Cash Adjustments to Reconcile Net Income',
    'noncontrollinginterests': 'Noncontrolling Interest',
    'noncurrentdeferredrevenue': 'Noncurrent Deferred Revenue',
    'noncurrentdeferredtaxassets': 'Noncurrent Deferred & Refundable Income Taxes',
    'noncurrentdeferredtaxliabilities': 'Noncurrent Deferred & Payable Income Tax Liabilities',
    'noncurrentemployeebenefitliabilities': 'Noncurrent Employee Benefit Liabilities',
    'noncurrentnotereceivables': 'Noncurrent Note & Lease Receivables',
    'noninterestbearingdeposits': 'Non-Interest Bearing Deposits',
    'nonoperatingincome': 'Nonoperating Income / (Expense), net',
    'notereceivable': 'Note & Lease Receivable',
    'operatingcostofrevenue': 'Operating Cost of Revenue',
    'operatingrevenue': 'Operating Revenue',
    'otheradjustmentstoconsolidatednetincome': 'Other Adjustments to Consolidated Net Income / (Loss)',
    'otheradjustmentstonetincometocommon': 'Other Adjustments to Net Income / (Loss) Attributable to Common Shareholders)',
    'otherassets': 'Other Assets',
    'othercostofrevenue': 'Other Cost of Revenue',
    'othercurrentassets': 'Other Current Assets',
    'othercurrentliabilities': 'Other Current Liabilities',
    'othercurrentnonoperatingassets': 'Other Current Nonoperating Assets',
    'othercurrentnonoperatingliabilities': 'Other Current Nonoperating Liabilities',
    'otherequity': 'Other Equity Adjustments',
    'otherfinancingactivitiesnet': 'Other Financing Activities, Net',
    'othergains': 'Other Gains / (Losses), net',
    'otherincome': 'Other Income / (Expense), net',
    'otherinterestexpense': 'Other Interest Expense',
    'otherinterestincome': 'Other Interest Income',
    'otherinvestingactivitiesnet': 'Other Investing Activities, net',
    'otherlongtermliabilities': 'Other Long-Term Liabilities',
    'othernetchangesincash': 'Other Net Changes in Cash',
    'othernoncurrentassets': 'Other Noncurrent Operating Assets',
    'othernoncurrentliabilities': 'Other Noncurrent Operating Liabilities',
    'othernoncurrentnonoperatingassets': 'Other Noncurrent Nonoperating Assets',
    'othernoncurrentnonoperatingliabilities': 'Other Noncurrent Nonoperating Liabilities',
    'othernoninterestincome': 'Other Non-Interest Income',
    'otheroperatingexpenses': 'Other Operating Expenses',
    'otherrevenue': 'Other Revenue',
    'otherservicechargeincome': 'Other Service Charges',
    'othershorttermpayables': 'Other Short-Term Payables',
    'otherspecialcharges': 'Other Special Charges',
    'othertaxespayable': 'Other Taxes Payable',
    'participatingpolicyholderequity': 'Participating Policy Holder Equity',
    'paymentofdividends': 'Payment of Dividends',
    'policyacquisitioncosts': 'Insurance Policy Acquisition Costs',
    'policyholderfunds': 'Policy Holder Funds',
    'preferreddividends': 'Preferred Stock Dividends Declared',
    'premiumsearned': 'Premiums Earned',
    'prepaidexpenses': 'Prepaid Expenses',
    'propertyliabilityinsuranceclaims': 'Property & Liability Insurance Claims',
    'provisionforcreditlosses': 'Provision for Credit Losses',
    'provisionforloanlosses': 'Provision For Loan Losses',
    'purchaseofinvestments': 'Purchase of Investments',
    'purchaseofplantpropertyandequipment': 'Purchase of Property, Plant & Equipment',
    'rdexpense': 'Research & Development Expense',
    'redeemablenoncontrollinginterest': 'Redeemable Noncontrolling Interest',
    'repaymentofdebt': 'Repayment of Debt',
    'repurchaseofcommonequity': 'Repurchase of Common Equity',
    'repurchaseofpreferredequity': 'Repurchase of Preferred Equity',
    'restrictedcash': 'Restricted Cash',
    'restructuringcharge': 'Restructuring Charge',
    'retainedearnings': 'Retained Earnings',
    'salariesandemployeebenefitsexpense': 'Salaries and Employee Benefits',
    'saleofinvestments': 'Sale and/or Maturity of Investments',
    'saleofplantpropertyandequipment': 'Sale of Property, Plant & Equipment',
    'separateaccountbusinessassets': 'Separate Account Business Assets',
    'separateaccountbusinessliabilities': 'Separate Account Business Liabilities',
    'servicechargesondepositsincome': 'Service Charges on Deposit Accounts',
    'sgaexpense': 'Selling, General & Admin Expense',
    'shorttermborrowinginterestexpense': 'Short-Term Borrowings Interest Expense',
    'shorttermdebt': 'Short-Term Debt',
    'shortterminvestments': 'Short-Term Investments',
    'timedepositsplaced': 'Time Deposits Placed and Other Short-Term Investments',
    'totalassets': 'Total Assets',
    'totalcommonequity': 'Total Common Equity',
    'totalcostofrevenue': 'Total Cost of Revenue',
    'totalcurrentassets': 'Total Current Assets',
    'totalcurrentliabilities': 'Total Current Liabilities',
    'totalequity': 'Total Preferred & Common Equity',
    'totalequityandnoncontrollinginterests': 'Total Equity & Noncontrolling Interests',
    'totalgrossprofit': 'Total Gross Profit',
    'totalinterestexpense': 'Total Interest Expense',
    'totalinterestincome': 'Total Interest Income',
    'totalliabilities': 'Total Liabilities',
    'totalliabilitiesandequity': 'Total Liabilities & Shareholders’ Equity',
    'totalnoninterestexpense': 'Total Non-Interest Expense',
    'totalnoninterestincome': 'Total Non-Interest Income',
    'totaloperatingexpenses': 'Total Operating Expenses',
    'totaloperatingincome': 'Total Operating Income',
    'totalotherincome': 'Total Other Income / (Expense), net',
    'totalpretaxincome': 'Total Pre-Tax Income',
    'totalrevenue': 'Total Revenue',
    'tradingaccountinterestincome': 'Trading Account Interest Income',
    'trustfeeincome': 'Trust Fees by Commissions',
    'weightedavebasicdilutedsharesos': 'Weighted Average Basic & Diluted Shares Outstanding',
    'weightedavebasicsharesos': 'Weighted Average Basic Shares Outstanding'
    }

commercial_income_statement_sequence = {
    'operatingrevenue': 1,
    'otherrevenue': 2,
    'totalrevenue': 3,
    'operatingcostofrevenue': 4,
    'othercostofrevenue': 5,
    'totalcostofrevenue': 6,
    'totalgrossprofit': 7,
    'sgaexpense': 8,
    'marketingexpense': 9,
    'rdexpense': 10,
    'explorationexpense': 11,
    'depreciationexpense': 12,
    'amortizationexpense': 13,
    'depletionexpense': 14,
    'otheroperatingexpenses': 15,
    'impairmentexpense': 16,
    'restructuringcharge': 17,
    'otherspecialcharges': 18,
    'totaloperatingexpenses': 19,
    'totaloperatingincome': 20,
    'totalinterestexpense': 21,
    'totalinterestincome': 22,
    'otherincome': 23,
    'totalotherincome': 24,
    'totalpretaxincome': 25,
    'incometaxexpense': 26,
    'othergains': 27,
    'netincomecontinuing': 28,
    'netincomediscontinued': 29,
    'extraordinaryincome': 30,
    'otheradjustmentstoconsolidatednetincome': 31,
    'netincome': 32,
    'preferreddividends': 33,
    'netincometononcontrollinginterest': 34,
    'otheradjustmentstonetincometocommon': 35,
    'netincometocommon': 36,
    'weightedavebasicsharesos': 37,
    'basiceps': 38,
    'dilutedeps': 40,
    'weightedavebasicdilutedsharesos': 41,
    'basicdilutedeps': 42,
    'cashdividendspershare': 43,
    }

financial_income_statement_sequence = {
    'loansandleaseinterestincome': 1,
    'investmentsecuritiesinterestincome': 2,
    'depositsinterestincome': 3,
    'fedfundsandrepointerestincome': 4,
    'tradingaccountinterestincome': 5,
    'otherinterestincome': 6,
    'totalinterestincome': 7,
    'depositsinterestexpense': 8,
    'shorttermborrowinginterestexpense': 9,
    'longtermdebtinterestexpense': 10,
    'fedfundsandrepointerestexpense': 11,
    'capitalizedleaseobligationinterestexpense': 12,
    'otherinterestexpense': 13,
    'totalinterestexpense': 14,
    'netinterestincome': 15,
    'trustfeeincome': 16,
    'servicechargesondepositsincome': 17,
    'otherservicechargeincome': 18,
    'netrealizedcapitalgains': 19,
    'premiumsearned': 20,
    'investmentbankingincome': 21,
    'othernoninterestincome': 22,
    'totalnoninterestincome': 23,
    'totalrevenue': 24,
    'provisionforcreditlosses': 25,
    'salariesandemployeebenefitsexpense': 26,
    'netoccupancyequipmentexpense': 27,
    'marketingexpense': 28,
    'propertyliabilityinsuranceclaims': 29,
    'policyacquisitioncosts': 30,
    'amortizationofdeferredpolicyacquisitioncosts': 31,
    'currentandfuturebenefits': 32,
    'otheroperatingexpenses': 33,
    'depreciationexpense': 34,
    'amortizationexpense': 35,
    'impairmentexpense': 36,
    'restructuringcharge': 37,
    'otherspecialcharges': 38,
    'totalnoninterestexpense': 39,
    'nonoperatingincome': 40,
    'totalpretaxincome': 41,
    'incometaxexpense': 42,
    'othergains': 43,
    'netincomecontinuing': 44,
    'netincomediscontinued': 45,
    'extraordinaryincome': 46,
    'otheradjustmentstoconsolidatednetincome': 47,
    'netincome': 48,
    'preferreddividends': 49,
    'netincometononcontrollinginterest': 50,
    'otheradjustmentstonetincometocommon': 51,
    'netincometocommon': 52,
    'weightedavebasicsharesos': 53,
    'basiceps': 54,
    'dilutedeps': 56,
    'weightedavebasicdilutedsharesos': 57,
    'basicdilutedeps': 58,
    'cashdividendspershare': 59
    }

commercial_balance_sheet_sequence = {
    'cashandequivalents': 1,
    'restrictedcash': 2,
    'shortterminvestments': 3,
    'notereceivable': 4,
    'accountsreceivable': 5,
    'netinventory': 6,
    'prepaidexpenses': 7,
    'currentdeferredtaxassets': 8,
    'othercurrentassets': 9,
    'othercurrentnonoperatingassets': 10,
    'totalcurrentassets': 11,
    'grossppe': 12,
    'accumulateddepreciation': 13,
    'netppe': 14,
    'longterminvestments': 15,
    'noncurrentnotereceivables': 16,
    'goodwill': 17,
    'intangibleassets': 18,
    'noncurrentdeferredtaxassets': 19,
    'employeebenefitassets': 20,
    'othernoncurrentassets': 21,
    'othernoncurrentnonoperatingassets': 22,
    'totalassets': 24,
    'shorttermdebt': 25,
    'accountspayable': 26,
    'accruedexpenses': 27,
    'customerdeposits': 28,
    'dividendspayable': 29,
    'currentdeferredrevenue': 30,
    'currentdeferredtaxliabilities': 31,
    'currentemployeebenefitliabilities': 32,
    'othertaxespayable': 33,
    'othercurrentliabilities': 34,
    'othercurrentnonoperatingliabilities': 35,
    'totalcurrentliabilities': 36,
    'longtermdebt': 37,
    'capitalleaseobligations': 38,
    'assetretirementandlitigationobligation': 39,
    'noncurrentdeferredrevenue': 40,
    'noncurrentdeferredtaxliabilities': 41,
    'noncurrentemployeebenefitliabilities': 42,
    'othernoncurrentliabilities': 43,
    'othernoncurrentnonoperatingliabilities': 44,
    'totalliabilities': 46,
    'commitmentsandcontingencies': 47,
    'redeemablenoncontrollinginterest': 48,
    'commonequity': 50,
    'retainedearnings': 51,
    'aoci': 53,
    'otherequity': 54,
    'totalcommonequity': 55,
    'totalequity': 56,
    'noncontrollinginterests': 57,
    'totalequityandnoncontrollinginterests': 58,
    'totalliabilitiesandequity': 59
    }

financial_balance_sheet_sequence = {
    'cashandequivalents': 1,
    'restrictedcash': 2,
    'fedfundssold': 3, 'interestbearingdepositsatotherbanks': 4,
    'timedepositsplaced': 5,
    'loansandleases': 7,
    'allowanceforloanandleaselosses': 8,
    'netloansandleases': 9,
    'loansheldforsale': 10,
    'accruedinvestmentincome': 11,
    'customerandotherreceivables': 12,
    'netpremisesandequipment': 13,
    'mortgageservicingrights': 14,
    'deferredacquisitioncost': 16,
    'separateaccountbusinessassets': 17,
    'goodwill': 18,
    'intangibleassets': 19,
    'otherassets': 20,
    'totalassets': 21,
    'noninterestbearingdeposits': 22,
    'interestbearingdeposits': 23,
    'fedfundspurchased': 24,
    'shorttermdebt': 25,
    'bankersacceptances': 26,
    'accruedinterestpayable': 27,
    'othershorttermpayables': 28,
    'longtermdebt': 29,
    'capitalleaseobligations': 30,
    'claimsandclaimexpenses': 31,
    'futurepolicybenefits': 32,
    'policyholderfunds': 34,
    'participatingpolicyholderequity': 35,
    'separateaccountbusinessliabilities': 36,
    'otherlongtermliabilities': 37,
    'totalliabilities': 38,
    'commitmentsandcontingencies': 39,
    'redeemablenoncontrollinginterest': 40,
    'commonequity': 42,
    'retainedearnings': 43,
    'aoci': 45,
    'otherequity': 46,
    'totalcommonequity': 47,
    'totalequity': 48,
    'noncontrollinginterests': 49,
    'totalequityandnoncontrollinginterests': 50
    }

commercial_cash_flow_statement_sequence = {
    'netincomediscontinued': 2,
    'netincomecontinuing': 3,
    'depreciationexpense': 4,
    'amortizationexpense': 5,
    'noncashadjustmentstonetincome': 6,
    'increasedecreaseinoperatingcapital': 7,
    'netcashfromcontinuingoperatingactivities': 8,
    'netcashfromdiscontinuedoperatingactivities': 9,
    'netcashfromoperatingactivities': 10,
    'purchaseofplantpropertyandequipment': 11,
    'acquisitions': 12,
    'purchaseofinvestments': 13,
    'saleofplantpropertyandequipment': 14,
    'divestitures': 15,
    'saleofinvestments': 16,
    'otherinvestingactivitiesnet': 17,
    'netcashfromcontinuinginvestingactivities': 18,
    'netcashfromdiscontinuedinvestingactivities': 19,
    'netcashfrominvestingactivities': 20,
    'repaymentofdebt': 21,
    'repurchaseofpreferredequity': 22,
    'repurchaseofcommonequity': 23,
    'paymentofdividends': 24,
    'issuanceofdebt': 25,
    'issuanceofpreferredequity': 26,
    'issuanceofcommonequity': 27,
    'otherfinancingactivitiesnet': 28,
    'netcashfromcontinuingfinancingactivities': 29,
    'netcashfromdiscontinuedfinancingactivities': 30,
    'netcashfromfinancingactivities': 31,
    'effectofexchangeratechanges': 32,
    'othernetchangesincash': 33,
    'netchangeincash': 34,
    'cashinterestpaid': 35,
    'cashinterestreceived': 36,
    'cashincometaxespaid': 37
    }

financial_cash_flow_statement_sequence = {
    'netincome': 1,
    'netincomediscontinued': 2,
    'netincomecontinuing': 3,
    'provisionforloanlosses': 4,
    'depreciationexpense': 5,
    'amortizationexpense': 6,
    'noncashadjustmentstonetincome': 7,
    'increasedecreaseinoperatingcapital': 8,
    'netcashfromcontinuingoperatingactivities': 9,
    'netcashfromdiscontinuedoperatingactivities': 10,
    'netcashfromoperatingactivities': 11,
    'purchaseofplantpropertyandequipment': 12,
    'acquisitions': 13,
    'purchaseofinvestments': 14,
    'saleofplantpropertyandequipment': 15,
    'divestitures': 16,
    'saleofinvestments': 17,
    'netincreaseinfedfundssold': 18,
    'loansheldforsalenet': 19,
    'otherinvestingactivitiesnet': 20,
    'netcashfromcontinuinginvestingactivities': 21,
    'netcashfromdiscontinuedinvestingactivities': 22,
    'netcashfrominvestingactivities': 23,
    'netchangeindeposits': 24,
    'issuanceofdebt': 25,
    'issuanceofpreferredequity': 26,
    'issuanceofcommonequity': 27,
    'repaymentofdebt': 28,
    'repurchaseofpreferredequity': 29,
    'repurchaseofcommonequity': 30,
    'paymentofdividends': 31,
    'otherfinancingactivitiesnet': 32,
    'netcashfromcontinuingfinancingactivities': 33,
    'netcashfromdiscontinuedfinancingactivities': 34,
    'netcashfromfinancingactivities': 35,
    'effectofexchangeratechanges': 36,
    'othernetchangesincash': 37,
    'netchangeincash': 38,
    'cashinterestpaid': 39,
    'cashinterestreceived': 40,
    'cashincometaxespaid': 41,
    }
