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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.y: F = None
        self.s: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.o: G = None
        self.x: G = None
        self.s: C = None
        self.p: F = None
        self.z: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: E = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.y: F = None
        self.s: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.o: G = None
        self.x: G = None
        self.s: C = None
        self.p: F = None
        self.z: H = None
        self.txt = txt

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

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

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

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