class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: A = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: C = None
        self.txt = txt

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

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