contract Owned {
    address public owner;
    address public candidate;

    function Owned() internal {
        owner = msg.sender;
    }
    
    // A functions uses the modifier can be invoked only by the owner of the contract
    modifier onlyOwner {
        require(owner == msg.sender);
        _;
    }

    // To change the owner of the contract, putting the candidate
    function changeOwner(address _owner) onlyOwner public {
        candidate = _owner;
    }

    // The candidate must call this function to accept the proposal for the transfer of the rights of contract ownership
    function acceptOwner() public {
        require(candidate != address(0));
        require(candidate == msg.sender);
        owner = candidate;
        delete candidate;
    }
}
function acceptOwner() public {
        require(candidate != address(0));
        require(candidate == msg.sender);
        owner = candidate;
        delete candidate;
    }
// The candidate must call this function to accept the proposal for the transfer of the rights of contract ownership