class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: H = None
        self.w: C = None
        self.s: E = None
        self.t: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.r: A = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: I = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: C = None
        self.t: D = None
        self.v: B = None
        self.q: B = None
        self.x: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: H = None
        self.w: C = None
        self.s: E = None
        self.t: B = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.r: A = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: I = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: C = None
        self.t: D = None
        self.v: B = None
        self.q: B = None
        self.x: G = None
        self.txt = txt

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

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

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