class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: D = None
        self.y: G = None
        self.z: H = None
        self.s: C = None
        self.o: I = None
        self.t: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.x: I = None
        self.v: D = None
        self.o: D = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: I = None
        self.r: E = None
        self.q: A = None
        self.w: I = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.p: C = None
        self.z: I = None
        self.q: I = None
        self.u: F = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.x: I = None
        self.v: D = None
        self.o: D = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: I = None
        self.r: E = None
        self.q: A = None
        self.w: I = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.p: C = None
        self.z: I = None
        self.q: I = None
        self.u: F = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.r: G = None
        self.txt = txt

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

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