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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.v: G = None
        self.q: H = None
        self.w: F = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.p: G = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: H = None
        self.x: A = None
        self.q: D = None
        self.o: B = None
        self.y: C = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: G = None
        self.p: H = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.y: F = None
        self.o: E = None
        self.x: D = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

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

j = A("j")
i = B("i")
g = C("g")
k = D("k")
n = E("n")
f = F("f")
a = G("a")
h = H("h")
b = H("b")
l = B("l")

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.v: G = None
        self.q: H = None
        self.w: F = None
        self.y: A = None
        self.u: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: B = None
        self.p: G = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: H = None
        self.x: A = None
        self.q: D = None
        self.o: B = None
        self.y: C = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: G = None
        self.p: H = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.y: F = None
        self.o: E = None
        self.x: D = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

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

j = A("j")
i = B("i")
g = C("g")
k = D("k")
n = E("n")
f = F("f")
a = G("a")
h = H("h")
b = H("b")
l = B("l")

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