class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: C = None
        self.z: D = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: F = None
        self.q: D = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: B = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

c = A("c")
h = B("h")
i = C("i")
k = D("k")
l = E("l")
a = F("a")
e = C("e")
n = A("n")

c.w = n
c.s = e
c.z = k
c.q = l
h.x = i
h.y = n
h.z = n
h.u = l
h.r = k
h.o = c
i.s = n
i.r = a
i.q = k
i.z = k
i.v = c
k.v = n
l.w = i
l.s = i
l.u = i
l.q = n
l.o = a
l.y = k
a.p = l
a.t = l
a.q = h
a.z = k
e.s = n
e.r = a
e.q = k
e.z = k
e.v = c
n.w = c
n.s = e
n.z = k
n.q = l
assert k.v.q.s.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: C = None
        self.z: D = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: F = None
        self.q: D = None
        self.z: D = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: B = None
        self.t: E = None
        self.z: D = None
        self.txt = txt

c = A("c")
h = B("h")
i = C("i")
k = D("k")
l = E("l")
a = F("a")
e = C("e")
n = A("n")

c.w = n
c.s = e
c.z = k
c.q = l
h.x = i
h.y = n
h.z = n
h.u = l
h.r = k
h.o = c
i.s = n
i.r = a
i.q = k
i.z = k
i.v = c
k.v = n
l.w = i
l.s = i
l.u = i
l.q = n
l.o = a
l.y = k
a.p = l
a.t = l
a.q = h
a.z = k
e.s = n
e.r = a
e.q = k
e.z = k
e.v = c
n.w = c
n.s = e
n.z = k
n.q = l
assert k.v.q.s.s.q.txt == "l"