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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.p: G = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: G = None
        self.x: G = None
        self.u: D = None
        self.o: H = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: B = None
        self.u: C = None
        self.p: I = None
        self.s: A = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.p: G = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: G = None
        self.x: G = None
        self.u: D = None
        self.o: H = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: B = None
        self.u: C = None
        self.p: I = None
        self.s: A = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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