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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: H = None
        self.r: D = None
        self.v: I = None
        self.z: G = None
        self.s: C = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: H = None
        self.s: C = None
        self.w: I = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: A = None
        self.w: A = None
        self.z: H = None
        self.x: B = None
        self.r: G = None
        self.u: C = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.x: I = None
        self.s: C = None
        self.q: H = None
        self.u: C = None
        self.v: B = None
        self.z: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: E = None
        self.p: H = None
        self.z: D = None
        self.u: H = None
        self.o: A = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.z: A = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: H = None
        self.r: D = None
        self.v: I = None
        self.z: G = None
        self.s: C = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: H = None
        self.s: C = None
        self.w: I = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: A = None
        self.w: A = None
        self.z: H = None
        self.x: B = None
        self.r: G = None
        self.u: C = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.x: I = None
        self.s: C = None
        self.q: H = None
        self.u: C = None
        self.v: B = None
        self.z: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: E = None
        self.p: H = None
        self.z: D = None
        self.u: H = None
        self.o: A = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.z: A = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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