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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: D = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: B = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

k = A("k")
j = B("j")
n = C("n")
c = D("c")
g = E("g")
d = A("d")
e = B("e")
b = D("b")

k.p = g
k.u = g
k.x = e
k.t = b
j.o = e
j.w = b
j.z = n
j.p = g
n.p = g
n.x = g
n.w = e
n.u = c
c.q = b
c.r = k
c.w = g
c.o = g
g.u = d
g.z = j
g.p = e
d.p = g
d.u = g
d.x = j
d.t = c
e.o = j
e.w = b
e.z = n
e.p = g
b.q = c
b.r = d
b.w = g
b.o = g
assert d.p.z.w.r.t.r.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: B = None
        self.u: E = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: D = None
        self.z: C = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: B = None
        self.u: D = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: B = None
        self.p: B = None
        self.txt = txt

k = A("k")
j = B("j")
n = C("n")
c = D("c")
g = E("g")
d = A("d")
e = B("e")
b = D("b")

k.p = g
k.u = g
k.x = e
k.t = b
j.o = e
j.w = b
j.z = n
j.p = g
n.p = g
n.x = g
n.w = e
n.u = c
c.q = b
c.r = k
c.w = g
c.o = g
g.u = d
g.z = j
g.p = e
d.p = g
d.u = g
d.x = j
d.t = c
e.o = j
e.w = b
e.z = n
e.p = g
b.q = c
b.r = d
b.w = g
b.o = g
assert d.p.z.w.r.t.r.u.u.txt == "d"