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

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

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

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

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

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

i = A("i")
f = B("f")
a = C("a")
h = D("h")
l = E("l")
b = F("b")

i.s = f
i.w = a
i.z = l
i.q = l
f.y = a
f.z = a
a.s = h
a.q = f
a.y = f
a.u = b
a.z = l
a.t = l
h.t = b
h.p = b
l.w = i
l.t = a
l.z = f
l.x = f
b.r = a
b.v = l
b.q = f
b.w = i
b.y = h
assert a.q.z.q.z.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: C = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

i = A("i")
f = B("f")
a = C("a")
h = D("h")
l = E("l")
b = F("b")

i.s = f
i.w = a
i.z = l
i.q = l
f.y = a
f.z = a
a.s = h
a.q = f
a.y = f
a.u = b
a.z = l
a.t = l
h.t = b
h.p = b
l.w = i
l.t = a
l.z = f
l.x = f
b.r = a
b.v = l
b.q = f
b.w = i
b.y = h
assert a.q.z.q.z.q.z.txt == "a"