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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.u: F = None
        self.p: E = None
        self.x: B = None
        self.w: C = None
        self.t: H = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

j = A("j")
a = B("a")
l = C("l")
d = D("d")
i = E("i")
f = F("f")
g = G("g")
h = H("h")
b = A("b")
e = E("e")

j.q = f
a.u = j
a.o = j
a.v = b
l.s = d
l.u = d
d.q = l
i.v = d
i.q = h
i.t = h
i.u = f
i.p = e
i.x = a
i.w = l
i.y = l
f.w = a
f.o = g
f.y = g
g.z = l
g.w = f
g.u = f
h.y = e
h.w = j
h.z = a
b.q = f
e.v = d
e.q = h
e.t = h
e.u = f
e.p = i
e.x = a
e.w = l
e.y = l
assert b.q.w.v.q.y.z.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.o: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.u: F = None
        self.p: E = None
        self.x: B = None
        self.w: C = None
        self.t: H = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

j = A("j")
a = B("a")
l = C("l")
d = D("d")
i = E("i")
f = F("f")
g = G("g")
h = H("h")
b = A("b")
e = E("e")

j.q = f
a.u = j
a.o = j
a.v = b
l.s = d
l.u = d
d.q = l
i.v = d
i.q = h
i.t = h
i.u = f
i.p = e
i.x = a
i.w = l
i.y = l
f.w = a
f.o = g
f.y = g
g.z = l
g.w = f
g.u = f
h.y = e
h.w = j
h.z = a
b.q = f
e.v = d
e.q = h
e.t = h
e.u = f
e.p = i
e.x = a
e.w = l
e.y = l
assert b.q.w.v.q.y.z.s.txt == "d"