class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.w: A = None
        self.v: A = None
        self.s: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: D = None
        self.u: D = None
        self.t: B = None
        self.s: B = None
        self.x: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.r: G = None
        self.q: B = None
        self.o: B = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: G = None
        self.w: A = None
        self.v: A = None
        self.s: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: D = None
        self.u: D = None
        self.t: B = None
        self.s: B = None
        self.x: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.r: G = None
        self.q: B = None
        self.o: B = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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