public class ListNode<T> {
    T value;
    ListNode<T> nextNode;
    ListNode<T> prevNode;

    public ListNode(T value, ListNode<T> nextNode, ListNode<T> prevNode) {
        this.value = value;
        this.nextNode = nextNode;
        this.prevNode = prevNode;
    }
}
