class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: H = None
        self.q: D = None
        self.v: H = None
        self.x: C = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: I = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: I = None
        self.o: D = None
        self.v: A = None
        self.x: I = None
        self.p: F = None
        self.t: G = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: I = None
        self.t: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: I = None
        self.o: D = None
        self.v: A = None
        self.x: I = None
        self.p: F = None
        self.t: G = None
        self.y: H = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

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

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

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