class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: D = None
        self.p: D = None
        self.w: F = None
        self.z: E = None
        self.r: C = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: G = None
        self.p: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: E = None
        self.x: C = None
        self.s: F = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: G = None
        self.p: A = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: E = None
        self.x: C = None
        self.s: F = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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