# Circular creation. The following is an example of creating a circular group of items: pragma solidity ^0.4.22; contract Item { Item public nextItem; address owner; constructor() public { owner = msg.sender; } function setNext(Item n) public returns (Item) { require(n != address(0) && msg.sender == owner); nextItem = n; return n; } } contract Chain { Item[3] public items; constructor() public { items[0] = new Item(); items[1] = new Item(); items[2] = new Item(); items[0].setNext(items[1]) .setNext(items[2]) .setNext(items[0]); } }