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

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

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

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

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

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

e = A("e")
b = B("b")
f = C("f")
g = D("g")
k = E("k")
l = F("l")
d = B("d")

e.t = k
e.u = k
e.z = k
e.s = f
e.w = f
e.p = g
b.y = e
b.p = e
b.u = e
b.w = f
b.v = f
b.q = d
f.r = e
f.t = e
f.o = e
f.y = d
f.u = g
f.x = g
g.z = e
g.q = l
k.r = e
k.t = b
k.w = l
l.s = g
d.y = e
d.p = e
d.u = e
d.w = f
d.v = f
d.q = b
assert g.q.s.q.s.z.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.s: C = None
        self.p: D = None
        self.w: C = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

e = A("e")
b = B("b")
f = C("f")
g = D("g")
k = E("k")
l = F("l")
d = B("d")

e.t = k
e.u = k
e.z = k
e.s = f
e.w = f
e.p = g
b.y = e
b.p = e
b.u = e
b.w = f
b.v = f
b.q = d
f.r = e
f.t = e
f.o = e
f.y = d
f.u = g
f.x = g
g.z = e
g.q = l
k.r = e
k.t = b
k.w = l
l.s = g
d.y = e
d.p = e
d.u = e
d.w = f
d.v = f
d.q = b
assert g.q.s.q.s.z.z.w.txt == "l"