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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.u: D = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: C = None
        self.u: D = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

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