class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: F = None
        self.r: H = None
        self.p: C = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.w: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.w: F = None
        self.y: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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