class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.u: A = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: D = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

n = A("n")
d = B("d")
j = C("j")
l = D("l")
g = A("g")
a = C("a")
i = D("i")
b = A("b")
e = A("e")
h = B("h")

n.x = h
n.o = g
n.u = g
n.r = d
d.z = h
d.o = l
d.t = l
d.u = j
j.u = i
j.z = b
j.w = n
l.y = d
l.z = n
l.r = i
g.x = h
g.o = n
g.u = e
g.r = d
a.u = i
a.z = g
a.w = e
i.y = d
i.z = n
i.r = l
b.x = d
b.r = d
b.o = n
b.u = n
e.x = d
e.r = d
e.o = g
e.u = n
h.z = d
h.o = l
h.t = l
h.u = j
assert j.z.r.u.w.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.u: A = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: D = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: A = None
        self.r: D = None
        self.txt = txt

n = A("n")
d = B("d")
j = C("j")
l = D("l")
g = A("g")
a = C("a")
i = D("i")
b = A("b")
e = A("e")
h = B("h")

n.x = h
n.o = g
n.u = g
n.r = d
d.z = h
d.o = l
d.t = l
d.u = j
j.u = i
j.z = b
j.w = n
l.y = d
l.z = n
l.r = i
g.x = h
g.o = n
g.u = e
g.r = d
a.u = i
a.z = g
a.w = e
i.y = d
i.z = n
i.r = l
b.x = d
b.r = d
b.o = n
b.u = n
e.x = d
e.r = d
e.o = g
e.u = n
h.z = d
h.o = l
h.t = l
h.u = j
assert j.z.r.u.w.x.t.txt == "l"