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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.q: B = None
        self.v: D = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.q: D = None
        self.w: F = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

d = A("d")
f = B("f")
h = C("h")
n = D("n")
j = E("j")
a = F("a")
k = G("k")
i = E("i")
m = C("m")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: D = None
        self.q: B = None
        self.v: D = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: E = None
        self.q: D = None
        self.w: F = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

d = A("d")
f = B("f")
h = C("h")
n = D("n")
j = E("j")
a = F("a")
k = G("k")
i = E("i")
m = C("m")

d.z = f
d.r = i
d.y = a
d.u = a
d.p = k
d.o = n
f.u = h
h.r = d
h.s = f
n.u = f
n.t = f
n.p = m
n.z = k
n.s = k
n.q = j
j.z = f
j.s = d
j.r = a
j.w = a
j.t = i
j.y = k
a.z = k
a.w = n
a.v = n
a.x = n
a.q = f
a.s = f
k.z = n
k.q = n
k.t = n
k.x = n
k.v = j
k.w = a
i.z = f
i.s = d
i.r = a
i.w = a
i.t = j
i.y = k
m.r = d
m.s = f
assert a.z.v.z.txt == "f"