class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.t: B = None
        self.p: I = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.w: H = None
        self.y: B = None
        self.p: I = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: A = None
        self.r: C = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: A = None
        self.t: B = None
        self.p: I = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.w: H = None
        self.y: B = None
        self.p: I = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: B = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: A = None
        self.r: C = None
        self.z: D = None
        self.txt = txt

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

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