class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: E = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

j = A("j")
b = B("b")
a = C("a")
i = D("i")
d = E("d")
c = F("c")
n = G("n")
h = H("h")
k = H("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

j = A("j")
b = B("b")
a = C("a")
i = D("i")
d = E("d")
c = F("c")
n = G("n")
h = H("h")
k = H("k")

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