class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: D = None
        self.t: D = None
        self.y: F = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: H = None
        self.r: G = None
        self.w: D = None
        self.v: H = None
        self.o: G = None
        self.u: G = None
        self.p: J = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.v: G = None
        self.q: J = None
        self.o: F = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: D = None
        self.t: D = None
        self.y: F = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: H = None
        self.r: G = None
        self.w: D = None
        self.v: H = None
        self.o: G = None
        self.u: G = None
        self.p: J = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: H = None
        self.v: G = None
        self.q: J = None
        self.o: F = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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