class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: G = None
        self.p: D = None
        self.s: G = None
        self.y: D = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.z: G = None
        self.p: D = None
        self.s: G = None
        self.y: D = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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