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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.y: I = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.q: H = None
        self.y: E = None
        self.r: B = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: E = None
        self.w: B = None
        self.v: F = None
        self.p: D = None
        self.s: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.y: I = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.q: H = None
        self.y: E = None
        self.r: B = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: E = None
        self.w: B = None
        self.v: F = None
        self.p: D = None
        self.s: D = None
        self.z: D = None
        self.txt = txt

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

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

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

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