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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: B = None
        self.p: B = None
        self.y: A = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.o: C = None
        self.t: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: H = None
        self.t: H = None
        self.v: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: B = None
        self.p: B = None
        self.y: A = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.o: C = None
        self.t: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: H = None
        self.t: H = None
        self.v: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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