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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.y: C = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

i = A("i")
k = B("k")
b = C("b")
m = D("m")
g = E("g")
e = D("e")
c = E("c")
n = B("n")

i.p = b
i.z = e
k.p = i
k.w = g
k.z = e
k.s = c
k.t = m
b.u = e
b.o = e
b.y = m
m.o = b
m.x = k
m.p = i
m.y = e
g.x = i
g.t = i
g.y = b
g.z = c
g.s = c
e.o = b
e.x = k
e.p = i
e.y = m
c.x = i
c.t = i
c.y = b
c.z = g
c.s = g
n.p = i
n.w = c
n.z = m
n.t = m
n.s = g
assert b.y.x.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: A = None
        self.y: C = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

i = A("i")
k = B("k")
b = C("b")
m = D("m")
g = E("g")
e = D("e")
c = E("c")
n = B("n")

i.p = b
i.z = e
k.p = i
k.w = g
k.z = e
k.s = c
k.t = m
b.u = e
b.o = e
b.y = m
m.o = b
m.x = k
m.p = i
m.y = e
g.x = i
g.t = i
g.y = b
g.z = c
g.s = c
e.o = b
e.x = k
e.p = i
e.y = m
c.x = i
c.t = i
c.y = b
c.z = g
c.s = g
n.p = i
n.w = c
n.z = m
n.t = m
n.s = g
assert b.y.x.z.o.txt == "b"