class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.t: I = None
        self.q: D = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: C = None
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: I = None
        self.o: B = None
        self.v: D = None
        self.s: I = None
        self.txt = txt

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

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

a = A("a")
k = B("k")
e = C("e")
n = D("n")
j = E("j")
l = F("l")
h = G("h")
g = H("g")
d = I("d")
c = B("c")

a.y = l
a.v = n
a.q = n
a.t = d
a.o = d
k.v = c
k.r = e
k.z = d
e.w = k
e.t = d
e.x = j
n.x = l
j.u = d
l.s = n
l.o = k
l.x = j
l.w = h
l.u = h
l.q = e
l.v = c
l.t = a
h.x = g
h.r = d
h.s = d
h.o = c
h.v = n
g.t = j
d.r = j
d.z = n
c.v = k
c.r = e
c.z = d
assert a.q.x.t.o.r.u.r.u.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: D = None
        self.t: I = None
        self.q: D = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: C = None
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: I = None
        self.o: B = None
        self.v: D = None
        self.s: I = None
        self.txt = txt

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

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

a = A("a")
k = B("k")
e = C("e")
n = D("n")
j = E("j")
l = F("l")
h = G("h")
g = H("g")
d = I("d")
c = B("c")

a.y = l
a.v = n
a.q = n
a.t = d
a.o = d
k.v = c
k.r = e
k.z = d
e.w = k
e.t = d
e.x = j
n.x = l
j.u = d
l.s = n
l.o = k
l.x = j
l.w = h
l.u = h
l.q = e
l.v = c
l.t = a
h.x = g
h.r = d
h.s = d
h.o = c
h.v = n
g.t = j
d.r = j
d.z = n
c.v = k
c.r = e
c.z = d
assert a.q.x.t.o.r.u.r.u.r.u.txt == "d"