class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.v: F = None
        self.u: B = None
        self.q: H = None
        self.r: C = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.q: G = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

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

n.z = m
n.u = c
n.y = c
f.y = h
f.u = j
f.x = e
j.t = h
j.u = f
j.y = c
j.z = c
j.p = c
j.r = c
j.x = n
m.w = a
m.p = a
m.v = c
m.u = f
m.o = f
m.q = h
m.r = j
m.t = e
e.v = a
c.r = h
c.o = m
c.p = j
a.x = e
a.o = j
a.r = j
h.w = f
h.z = n
h.q = a
h.v = e
h.o = c
assert e.v.o.t.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.y: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.v: F = None
        self.u: B = None
        self.q: H = None
        self.r: C = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.q: G = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

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

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