pragma solidity ^0.5.0;
//.............''''''''''''''''''''''''''''''''.                                                                          ..............................
//............'',,,,,,,,,,,,,,,,,,,,,,,,',,'....'''.'''.....'''...............................'..................'''....................................
//,,,',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.. .;k0OO00000000000000000000000000000000000000000000O0000O00000000000000OO00Ol.   ..........................
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'....,::d0KKKKKKKKK0KKKK00KKKK0000000KKKKKKKKK00KKKKKKKKKKKKKK0KKKKKKKKKKKKKKKKKKKkc;,.   .......................
//,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,',..  .dKKKKKKKKKKK000000000000000000000000000000000000000000000000000000000KKKKKKKKKKKO;    ......................
//,,,,,,,,,,,,;::::::::::::::::::::::::,.  .dKKKKKKKKKK00000000000000000000000OOkxxkO00000OOOkxkO000000000000000000KKKKKKKKKO;    ......................
//,,,,,,,,,,,;:odxxxxxxxxxxxxxxxxxxdxxd:.  .dKXKKKKK0000000000OO000000000000OOOkdlloxO00000OxolokOO0000000000000O00000KKKKKKO;    ......................
//llllccccllllodxxxxxxxxxxxxxxxxxxxxxxxc.  .dKKKKKK0000OkkkkO0O000000000000000OkxoodkO00000OxdodkOO00000OO000000000000KKKKKKO;    ......................
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc.  .dKKK000000OkdlloxO000000000000000O00OOOOO000OO00OOOO0000000000000OO0O000000000KKO;    ......................
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc.  .dKKK000000OkdoldkO00000000000000000000000000000kl::::cc:cdO0000OOOkkkOO0000000KKO;    .....      ...........
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc.  .dKK00O00000OOOOOO000000000000000000000000OO000Oo.       .:k0000OkdoloxO0000000KKO;    ...         ..........
//kkxxxxxxxxxxkOOOOOOOOOOOOOOOOOOOOOOOOl.  .dKK00000000000000000000000000000000000000O0Odll:,.......';clldO0OxdddkO0000000KKO;       .........   .......
//0kxxxxxxxxxkOKXXXXXXXXXXXXXXXXXXXXXXXd.  .dKK0000000000000000000000000000000000000000k;. .cdddddddo,   ,x000OOOO00000000KKO;       .ldddddo,    ......
//K00000000000KXXXXXXXXXXXXXXXXXXXXXXXXd.  .dKK00O000000000000000000000000OkkxkkO000000k;  .cddddddddc;;,;;;cxO00000000000KKO;   .';,:odddddo,    ......
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXd.  .dKK000000000000000000000000000OxollokO00000k;  .cdddddddddddd;  .lO00000000000KKO;   'odddddddddo,    ......
//XXXXXXXXXXXX0dllllllllllllllldOXXXXXXd.  .dKK000000000000000000000000000OxolodkO00000k;  .cddddddddddddl,',;:::::::::::cccc;'',codddddddddo'    ......
//XXXXXXXXXXXXd.               .dKXXXXXd.  .dKKK000000000000OO0000000000000OkkkOO000000k;  .cddddddddddddddxl.               ;odddddddddddddo'    ......
//0KXXXXXXOddoc,............   .;ooodoo;.  .dKKK00000000000OkxxkO0000000000000000000000k;  .cdddddddddddddddo;'.............'codddddddddddddo'    ......
//kOKXXXXKo.  .cddddddddddo:.              .dKKK0000000000Okdlldk0000000000000000000000k;  .cdddddddddddddddddddddddddddddddddddddddddddddddo'    ......
//xkOOOOOOc.   .',cddddddddl;,;,,,,.       .dKK00000000000OOxooxO0000000000000OOkxkxdool;..,ldddddddddddddddddddddddddddddddddddddddddddddddo:..... ....
//xxxxxxxx:.      ,oddddddddddxddxd;       .dKK0000O0000000OOOOO00000000000000Okollc'. .,lddddddddddddddddddddddddddddddddddddddddddddddddddddooo,    ..
//xxxxxxxxl;,,,,,,,,,,,,,,,,,,,;;,,,,,'.   .dKK0000OkkkOO000000000000000000000Okdooc.   ,oddddddddddxkO00d:,;ldddddddddddddddddddkO00d:,;lddddddd;    ..
//xxxxxxxxxxxxxxxo,.               'oxd:.  .dKK000OkolldkO00OO00000000000000000OOOOd'   ,oddddddddddxKWWNd. .;odddddddddddddddddx0NMWx. .;odddddd;    ..
//xxxxxxxxxxxxxxxo:''''''''''''.   .,;;'   .dKK000OkolodkOOOO0000000000000O00000O00x'   ,oddddddddddddddd;  .;odddddddddoc;;:lddddddd;. .;ddddddd;    ..
//oxxxxxxxxxxxdolllccccclclcclc;.          .dKKK000OkkkkOOOOO00000000O00OO000000000x'   ,oddddddddddo,.     .:ddddddddddc.  .;oxo;.     .;odddddd;    ..
//ldddddddddddolccccccccccccccc:'.......   .dKKK00000000000000000000OkkxkOO00000000x'   ,odxxxxxxxxxd:......'cddddddddddl,...:dxd:......'cdxxxxxx;    ..
//clccccccclllcccccccccccccccclccccccc:'.  .dKKK000000000000OO00000OkdlloxO00000000x'   ,odxkOOOOOOOkxdodddddddddddddddddddddddddddddddddxOOkkkOk:    ..
//ccccccccccccccccccccccccccccccccccccc,.  .dKKK0000000OOkkkOO000000kdoodkO00000000x'   ,odxkOOOkOOOkxdddc;,:ldddddddc;,;ldddddddc;,,:oddkkOOkkOkc.   ..
//ccccccccccccccccccccccccccccccccccccc,.  .dKKKKKK000OkdllokO0000000OOOOO000000000x'   ,odxkOOOOOOOOkddd;. .:dddddxo,  .:dddddxo,   .lddkOOOOOOk:    ..
//cccccccccccccccccccccccccccccccc:;,',.   .dKXKKKKK000kdoodkOO00000000000000000000kl;,,,;;cdkkkkkkkxxxdd;   .;;;;;;,.   .;;;;;;,.   .lddxkkxoc::'.  ...
//:ccccccccccc::;;;;;;;;;;;;;;;;;;,.       .dKXKKKKKKKK0OOOOO000000000000000000000000OOx;  .cdddddddddddd;                           .ldddddo,    ......
//;:::::c::cc::;;;;;;;;;;;;;;;;,''..       .:odkKKKKKKKK0000000000000000000000000000000Ol,',;::coddddddddc'..........................;lddl::;.    ......
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;'.             .:OXKKKKKXKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK0d.  .:ddddddddddddddddddddddddddddddddddddddxl'    ..........
//;;;;;;;;;;;;;;;;;;;;;;;;;,'''.............   'dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc.  .,ccccccccccccccccccccccccccccccccccccccc:.    ..........
//;;;;;;;;;;;;;;;;;;;;;;;;,..  .:oooooooooo:.    ..........................................                                              ...............
//;;;;;;;;;;;;;,,,,,,,,,,,,.   .:dddddddlll;.        .......                                     ........             .......            ...............
//;;;;;;;;;;;;,.............   .:ddddddc.. ....    .:looooo:.   ............................   .;looooool,    ...    .coooooc.    ......................
//''''''''''''.............     '::::::,.   ...    .;::::::,.   .............................  .,::::::::'    ....   .;:::::;.    ......................
//.........................             ............            ................................              .......             ......................
//..........................            ............            ................................             ........            .......................
//......................................................................................................................................................
//......................................................................................................................................................
//
// ✧･ﾟ: *✧･ﾟ:* cutest meme ever made is making a comeback *:･ﾟ✧*:･ﾟ✧
//♬♩♪♩ nyan ♩♪♩♬ ♬♩♪♩ nyan ♩♪♩♬ ♬♩♪♩ nyan ♩♪♩♬ ♬♩♪♩ nyan ♩♪♩♬ ♬♩♪♩ nyan ♩♪♩♬ 
//
//
// website: nyan.cat 
//
// license: MIT
//-------------------------------------------
contract ERC20Interface {
    function totalSupply() public view returns (uint);
    function balanceOf(address tokenOwner) public view returns (uint balance);
    function allowance(address tokenOwner, address spender) public view returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}

// ----------------------------------------------------------------------------
// Safe Math Library
// ----------------------------------------------------------------------------
contract SafeMath {
    function safeAdd(uint a, uint b) public pure returns (uint c) {
        c = a + b;
        require(c >= a);
    }
    function safeSub(uint a, uint b) public pure returns (uint c) {
        require(b <= a); c = a - b; } function safeMul(uint a, uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function safeDiv(uint a, uint b) public pure returns (uint c) { require(b > 0);
        c = a / b;
    }
}


contract nyan_cat is ERC20Interface, SafeMath {
    string public name;
    string public symbol;
    uint8 public decimals; // 18 decimals is the strongly suggested default, avoid changing it

    uint256 public _totalSupply;

    mapping(address => uint) balances;
    mapping(address => mapping(address => uint)) allowed;

    /**
     * Constrctor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    constructor() public {
        name = "nyan.cat";
        symbol = "NYAN";
        decimals = 9;
        _totalSupply = 1000000000000000000000;

        balances[msg.sender] = _totalSupply;
        emit Transfer(address(0), msg.sender, _totalSupply);
    }

    function totalSupply() public view returns (uint) {
        return _totalSupply  - balances[address(0)];
    }

    function balanceOf(address tokenOwner) public view returns (uint balance) {
        return balances[tokenOwner];
    }

    function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
        return allowed[tokenOwner][spender];
    }

    function approve(address spender, uint tokens) public returns (bool success) {
        allowed[msg.sender][spender] = tokens;
        emit Approval(msg.sender, spender, tokens);
        return true;
    }

    function transfer(address to, uint tokens) public returns (bool success) {
        balances[msg.sender] = safeSub(balances[msg.sender], tokens);
        balances[to] = safeAdd(balances[to], tokens);
        emit Transfer(msg.sender, to, tokens);
        return true;
    }

    function transferFrom(address from, address to, uint tokens) public returns (bool success) {
        balances[from] = safeSub(balances[from], tokens);
        allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);
        balances[to] = safeAdd(balances[to], tokens);
        emit Transfer(from, to, tokens);
        return true;
        
    }
}