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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.o: D = None
        self.p: E = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.s: B = None
        self.q: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.o: D = None
        self.p: E = None
        self.s: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.s: B = None
        self.q: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

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