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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: C = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: E = None
        self.x: D = None
        self.u: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: C = None
        self.v: E = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: E = None
        self.x: D = None
        self.u: A = None
        self.z: G = None
        self.txt = txt

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

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