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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: C = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

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