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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.t: A = None
        self.r: D = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.p: C = None
        self.s: A = None
        self.v: F = None
        self.o: B = None
        self.txt = txt

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

i = A("i")
a = B("a")
c = C("c")
g = D("g")
f = E("f")
e = F("e")
k = D("k")

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.t: A = None
        self.r: D = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.p: C = None
        self.s: A = None
        self.v: F = None
        self.o: B = None
        self.txt = txt

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

i = A("i")
a = B("a")
c = C("c")
g = D("g")
f = E("f")
e = F("e")
k = D("k")

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