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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.u: G = None
        self.x: E = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: I = None
        self.y: E = None
        self.z: E = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: J = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

d = A("d")
m = B("m")
b = C("b")
n = D("n")
c = E("c")
g = F("g")
k = G("k")
i = H("i")
a = I("a")
h = J("h")

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: I = None
        self.u: G = None
        self.x: E = None
        self.y: A = None
        self.p: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: I = None
        self.y: E = None
        self.z: E = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: J = None
        self.y: B = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

d = A("d")
m = B("m")
b = C("b")
n = D("n")
c = E("c")
g = F("g")
k = G("k")
i = H("i")
a = I("a")
h = J("h")

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