class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: A = None
        self.z: C = None
        self.p: F = None
        self.q: F = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: I = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: B = None
        self.t: B = None
        self.q: D = None
        self.v: C = None
        self.x: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: J = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: J = None
        self.u: A = None
        self.z: C = None
        self.p: F = None
        self.q: F = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: I = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: B = None
        self.t: B = None
        self.q: D = None
        self.v: C = None
        self.x: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: J = None
        self.t: G = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: G = None
        self.s: F = None
        self.txt = txt

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

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