class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: E = None
        self.u: H = None
        self.t: F = None
        self.q: H = None
        self.z: H = None
        self.y: H = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.p: F = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.t: C = None
        self.y: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.y: H = None
        self.t: G = None
        self.w: D = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.r: H = None
        self.x: H = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: A = None
        self.p: F = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.t: C = None
        self.y: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.y: H = None
        self.t: G = None
        self.w: D = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.r: H = None
        self.x: H = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.v: G = None
        self.z: A = None
        self.txt = txt

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

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