class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: C = None
        self.w: F = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: C = None
        self.z: C = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.txt = txt

l = A("l")
m = B("m")
f = C("f")
d = D("d")
c = E("c")
a = F("a")
g = F("g")
i = E("i")
j = D("j")
k = B("k")

l.q = g
m.r = k
m.z = f
m.w = g
m.u = g
m.y = c
f.u = d
f.q = l
f.w = m
f.p = k
f.y = a
f.t = i
d.u = g
d.t = f
d.z = f
d.q = f
d.o = j
c.z = l
c.x = j
c.u = i
c.q = i
c.s = g
a.s = c
a.x = g
g.s = c
g.x = a
i.z = l
i.x = j
i.u = c
i.q = c
i.s = g
j.u = a
j.t = f
j.z = f
j.q = f
j.o = d
k.r = m
k.z = f
k.w = g
k.u = g
k.y = i
assert k.w.s.z.q.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: C = None
        self.w: F = None
        self.y: E = None
        self.u: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: C = None
        self.z: C = None
        self.q: C = None
        self.o: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.txt = txt

l = A("l")
m = B("m")
f = C("f")
d = D("d")
c = E("c")
a = F("a")
g = F("g")
i = E("i")
j = D("j")
k = B("k")

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