class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

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

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

e.v = b
e.o = b
e.q = n
e.u = j
l.t = n
l.w = e
l.u = b
g.x = i
g.s = i
g.o = j
g.u = d
b.z = l
b.q = n
b.y = j
b.w = d
f.v = j
f.o = b
f.u = b
f.q = l
j.z = l
j.q = l
j.y = b
j.w = d
i.x = a
i.s = a
i.o = b
i.u = d
a.x = i
a.o = j
a.u = f
a.s = g
n.t = l
n.w = d
n.u = j
d.v = b
d.o = j
d.u = j
d.q = l
assert g.o.z.u.q.u.w.v.txt == "b"