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

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

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

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

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

c = A("c")
k = B("k")
n = C("n")
a = D("a")
d = E("d")
g = D("g")
l = A("l")
m = E("m")
e = C("e")

c.w = k
c.o = g
c.y = n
c.q = a
k.o = g
k.p = g
k.w = m
k.x = e
k.v = d
n.z = g
n.q = k
n.r = d
n.y = d
n.p = l
a.w = k
d.r = a
d.x = c
d.o = e
g.w = k
l.w = k
l.o = a
l.y = n
l.q = g
m.r = g
m.x = l
m.o = n
e.z = a
e.q = k
e.r = d
e.y = d
e.p = l
assert c.o.w.v.o.q.x.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: D = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

c = A("c")
k = B("k")
n = C("n")
a = D("a")
d = E("d")
g = D("g")
l = A("l")
m = E("m")
e = C("e")

c.w = k
c.o = g
c.y = n
c.q = a
k.o = g
k.p = g
k.w = m
k.x = e
k.v = d
n.z = g
n.q = k
n.r = d
n.y = d
n.p = l
a.w = k
d.r = a
d.x = c
d.o = e
g.w = k
l.w = k
l.o = a
l.y = n
l.q = g
m.r = g
m.x = l
m.o = n
e.z = a
e.q = k
e.r = d
e.y = d
e.p = l
assert c.o.w.v.o.q.x.z.w.txt == "k"