class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: C = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.u: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.v: E = None
        self.p: A = None
        self.r: A = None
        self.t: B = None
        self.y: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.u: H = None
        self.x: B = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: D = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.u: H = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.v: E = None
        self.p: A = None
        self.r: A = None
        self.t: B = None
        self.y: D = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: F = None
        self.u: H = None
        self.x: B = None
        self.y: E = None
        self.txt = txt

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

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

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