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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: G = None
        self.v: D = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.x: G = None
        self.z: H = None
        self.u: F = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.s: B = None
        self.y: G = None
        self.x: G = None
        self.o: F = None
        self.v: C = None
        self.z: G = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.o: E = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: I = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: G = None
        self.v: D = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: E = None
        self.x: G = None
        self.z: H = None
        self.u: F = None
        self.p: G = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: G = None
        self.s: B = None
        self.y: G = None
        self.x: G = None
        self.o: F = None
        self.v: C = None
        self.z: G = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.o: E = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: I = None
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

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