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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: A = None
        self.t: E = None
        self.r: D = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: A = None
        self.t: E = None
        self.r: D = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

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

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