class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: D = None
        self.t: B = None
        self.p: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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