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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: D = None
        self.x: C = None
        self.u: E = None
        self.w: A = None
        self.t: A = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.s: H = None
        self.q: G = None
        self.z: F = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: E = None
        self.z: G = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: A = None
        self.w: A = None
        self.y: B = None
        self.v: D = None
        self.x: G = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: E = None
        self.y: F = None
        self.p: F = None
        self.v: G = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.t: F = None
        self.y: G = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: D = None
        self.x: C = None
        self.u: E = None
        self.w: A = None
        self.t: A = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.s: H = None
        self.q: G = None
        self.z: F = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: E = None
        self.z: G = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: A = None
        self.w: A = None
        self.y: B = None
        self.v: D = None
        self.x: G = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: E = None
        self.y: F = None
        self.p: F = None
        self.v: G = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.t: F = None
        self.y: G = None
        self.p: F = None
        self.txt = txt

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

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