class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: A = None
        self.z: F = None
        self.o: B = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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