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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: C = None
        self.y: F = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.t: I = None
        self.o: C = None
        self.r: I = None
        self.q: H = None
        self.u: C = None
        self.w: H = None
        self.x: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.z: D = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: C = None
        self.y: F = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.t: I = None
        self.o: C = None
        self.r: I = None
        self.q: H = None
        self.u: C = None
        self.w: H = None
        self.x: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.z: D = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

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