class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.w: B = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.v: H = None
        self.s: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.r: F = None
        self.z: B = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.v: H = None
        self.s: F = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.r: F = None
        self.z: B = None
        self.s: F = None
        self.q: F = None
        self.txt = txt

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

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