class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: F = None
        self.o: C = None
        self.v: G = None
        self.w: B = None
        self.s: G = None
        self.p: H = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: H = None
        self.s: E = None
        self.w: C = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: D = None
        self.u: C = None
        self.z: B = None
        self.x: C = None
        self.q: C = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: A = None
        self.y: G = None
        self.o: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.w: H = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: H = None
        self.s: E = None
        self.w: C = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: D = None
        self.u: C = None
        self.z: B = None
        self.x: C = None
        self.q: C = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: A = None
        self.y: G = None
        self.o: B = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.w: H = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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