class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: A = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

j = A("j")
i = B("i")
c = C("c")
h = C("h")
d = A("d")
k = C("k")
e = A("e")
l = A("l")
b = B("b")
n = B("n")

j.t = i
i.z = n
i.x = e
i.v = b
c.o = n
c.v = n
c.w = h
h.o = i
h.v = n
h.w = k
d.t = n
k.o = i
k.v = n
k.w = h
e.t = b
l.t = n
b.z = n
b.v = n
b.x = j
n.z = i
n.v = i
n.x = d
assert e.t.x.t.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: A = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

j = A("j")
i = B("i")
c = C("c")
h = C("h")
d = A("d")
k = C("k")
e = A("e")
l = A("l")
b = B("b")
n = B("n")

j.t = i
i.z = n
i.x = e
i.v = b
c.o = n
c.v = n
c.w = h
h.o = i
h.v = n
h.w = k
d.t = n
k.o = i
k.v = n
k.w = h
e.t = b
l.t = n
b.z = n
b.v = n
b.x = j
n.z = i
n.v = i
n.x = d
assert e.t.x.t.v.x.txt == "j"