class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.q: I = None
        self.r: H = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.o: F = None
        self.r: I = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.x: E = None
        self.v: I = None
        self.p: E = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: G = None
        self.x: G = None
        self.u: I = None
        self.q: I = None
        self.z: B = None
        self.s: I = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.s: D = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.s: E = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.o: F = None
        self.r: I = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.x: E = None
        self.v: I = None
        self.p: E = None
        self.o: E = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: G = None
        self.x: G = None
        self.u: I = None
        self.q: I = None
        self.z: B = None
        self.s: I = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.s: D = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.s: E = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: A = None
        self.txt = txt

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

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