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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.r: F = None
        self.o: A = None
        self.s: E = None
        self.v: C = None
        self.z: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.y: F = None
        self.o: E = None
        self.z: H = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.y: H = None
        self.v: C = None
        self.z: A = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: G = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.y: D = None
        self.t: B = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: A = None
        self.r: F = None
        self.o: A = None
        self.s: E = None
        self.v: C = None
        self.z: D = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: E = None
        self.y: F = None
        self.o: E = None
        self.z: H = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.y: H = None
        self.v: C = None
        self.z: A = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: G = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: F = None
        self.y: D = None
        self.t: B = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

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

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