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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: C = None
        self.o: G = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.y: H = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: I = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: A = None
        self.t: B = None
        self.u: I = None
        self.x: D = None
        self.r: B = None
        self.p: I = None
        self.y: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: C = None
        self.o: G = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: H = None
        self.y: H = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: I = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: A = None
        self.t: B = None
        self.u: I = None
        self.x: D = None
        self.r: B = None
        self.p: I = None
        self.y: E = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.w: I = None
        self.o: H = None
        self.txt = txt

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

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

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

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