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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.y: G = None
        self.u: A = None
        self.p: B = None
        self.v: A = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

g = A("g")
b = B("b")
e = C("e")
m = D("m")
k = E("k")
i = F("i")
a = G("a")

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.y: G = None
        self.u: A = None
        self.p: B = None
        self.v: A = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: A = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

g = A("g")
b = B("b")
e = C("e")
m = D("m")
k = E("k")
i = F("i")
a = G("a")

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