class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: H = None
        self.t: G = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.t: E = None
        self.q: F = None
        self.z: B = None
        self.w: I = None
        self.r: A = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: F = None
        self.v: B = None
        self.z: G = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: A = None
        self.u: D = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: E = None
        self.t: E = None
        self.q: F = None
        self.z: B = None
        self.w: I = None
        self.r: A = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: F = None
        self.v: B = None
        self.z: G = None
        self.u: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: A = None
        self.u: D = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

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

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