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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.u: A = None
        self.q: C = None
        self.t: E = None
        self.x: F = None
        self.o: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: A = None
        self.s: A = None
        self.r: C = None
        self.v: A = None
        self.y: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: D = None
        self.w: C = None
        self.q: D = None
        self.u: B = None
        self.x: E = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.u: A = None
        self.q: C = None
        self.t: E = None
        self.x: F = None
        self.o: C = None
        self.s: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: A = None
        self.s: A = None
        self.r: C = None
        self.v: A = None
        self.y: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: D = None
        self.w: C = None
        self.q: D = None
        self.u: B = None
        self.x: E = None
        self.y: F = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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