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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.w: C = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.w: C = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

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

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