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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: A = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: G = None
        self.p: D = None
        self.q: C = None
        self.r: G = None
        self.u: A = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.txt = txt

m = A("m")
d = B("d")
c = C("c")
e = D("e")
b = E("b")
k = F("k")
i = G("i")
h = H("h")
g = D("g")
j = G("j")

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: A = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: D = None
        self.r: B = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: G = None
        self.p: D = None
        self.q: C = None
        self.r: G = None
        self.u: A = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.txt = txt

m = A("m")
d = B("d")
c = C("c")
e = D("e")
b = E("b")
k = F("k")
i = G("i")
h = H("h")
g = D("g")
j = G("j")

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