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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: E = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.y: A = None
        self.o: D = None
        self.w: A = None
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: E = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.y: A = None
        self.o: D = None
        self.w: A = None
        self.u: H = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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