class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.x: G = None
        self.u: F = None
        self.o: F = None
        self.p: D = None
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: G = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: G = None
        self.t: G = None
        self.v: G = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: D = None
        self.r: A = None
        self.p: F = None
        self.x: B = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

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

m.q = l
m.z = l
m.u = l
m.o = l
m.x = k
m.p = b
m.y = e
g.z = e
g.p = f
e.r = g
e.u = g
b.v = f
b.o = k
b.u = e
b.x = g
f.z = g
f.y = g
f.s = k
f.t = k
f.v = k
f.u = l
l.o = k
l.x = g
k.o = m
k.r = m
k.z = b
k.v = b
k.p = l
k.x = g
k.t = f
assert f.z.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.x: G = None
        self.u: F = None
        self.o: F = None
        self.p: D = None
        self.y: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: G = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: G = None
        self.t: G = None
        self.v: G = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: D = None
        self.r: A = None
        self.p: F = None
        self.x: B = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

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

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