abstract contract ERC721BurnableUpgradeable is
    Initializable,
    ContextUpgradeable,
    ERC721Upgradeable,
    OwnableUpgradeable
{
    function __ERC721Burnable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721Burnable_init_unchained();
        __Ownable_init();
    }

    using SafeMathUpgradeable for uint256;

    function __ERC721Burnable_init_unchained() internal initializer {}

    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        if (msg.sender == owner()) {
            address owner = ERC721Upgradeable.ownerOf(tokenId);
            balances[tokenId][owner].sub(1);
            _burn(tokenId);
        } else {
            require(balances[tokenId][msg.sender] == 1, "Not a Owner");
            balances[tokenId][msg.sender].sub(1);
            _burn(tokenId);
        }
    }

    uint256[50] private __gap;
}
/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
function burn(uint256 tokenId) public virtual {
    //solhint-disable-next-line max-line-length
    if (msg.sender == owner()) {
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        balances[tokenId][owner].sub(1);
        _burn(tokenId);
    } else {
        require(balances[tokenId][msg.sender] == 1, "Not a Owner");
        balances[tokenId][msg.sender].sub(1);
        _burn(tokenId);
    }
}

/**
 * @dev Burns `tokenId`. See {ERC721-_burn}.
 *
 * Requirements:
 *
 * - The caller must own `tokenId` or be an approved operator.
 */