class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: G = None
        self.t: F = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.t: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.z: C = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.w: D = None
        self.v: F = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.x: C = None
        self.z: D = None
        self.y: I = None
        self.o: C = None
        self.u: E = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: G = None
        self.t: F = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.t: A = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.z: C = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.w: D = None
        self.v: F = None
        self.t: D = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: C = None
        self.x: C = None
        self.z: D = None
        self.y: I = None
        self.o: C = None
        self.u: E = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

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

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

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

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