class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.x: I = None
        self.u: I = None
        self.t: F = None
        self.w: I = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.v: G = None
        self.r: I = None
        self.o: I = None
        self.p: F = None
        self.u: I = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.p: I = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: I = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: G = None
        self.x: I = None
        self.u: I = None
        self.t: F = None
        self.w: I = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: B = None
        self.v: G = None
        self.r: I = None
        self.o: I = None
        self.p: F = None
        self.u: I = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.p: I = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: I = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

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

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