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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: H = None
        self.r: C = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.txt = txt

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

h.s = d
h.r = d
h.t = b
h.p = m
h.o = a
a.z = h
m.x = a
f.t = m
f.x = a
f.r = n
k.q = h
k.r = h
k.u = m
n.u = a
n.z = a
n.p = a
n.o = a
n.w = f
n.t = h
n.y = h
b.z = d
b.q = d
b.r = m
b.o = k
b.p = k
d.y = n
d.o = a
assert h.o.z.o.z.t.p.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: H = None
        self.t: G = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: H = None
        self.r: C = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.txt = txt

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

h.s = d
h.r = d
h.t = b
h.p = m
h.o = a
a.z = h
m.x = a
f.t = m
f.x = a
f.r = n
k.q = h
k.r = h
k.u = m
n.u = a
n.z = a
n.p = a
n.o = a
n.w = f
n.t = h
n.y = h
b.z = d
b.q = d
b.r = m
b.o = k
b.p = k
d.y = n
d.o = a
assert h.o.z.o.z.t.p.u.x.txt == "a"