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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.v: F = None
        self.r: E = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.s: C = None
        self.z: C = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

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

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

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

m.y = j
m.v = j
m.u = j
m.w = j
m.t = d
m.z = f
m.x = f
d.u = j
d.q = f
d.o = m
g.z = j
g.u = e
g.v = e
g.r = a
g.w = a
g.o = a
j.v = d
a.y = f
a.t = m
a.s = g
a.z = g
a.o = j
a.v = j
e.y = j
e.u = f
e.x = g
e.s = d
f.t = a
f.w = a
f.o = j
f.u = e
f.p = e
f.s = g
assert a.y.s.r.y.s.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.u: D = None
        self.t: B = None
        self.z: G = None
        self.x: G = None
        self.w: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.v: F = None
        self.r: E = None
        self.w: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.s: C = None
        self.z: C = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

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

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

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

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