class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.p: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: A = None
        self.s: I = None
        self.y: C = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: H = None
        self.o: A = None
        self.y: H = None
        self.x: B = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.r: B = None
        self.z: F = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: E = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: A = None
        self.s: I = None
        self.y: C = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: H = None
        self.o: A = None
        self.y: H = None
        self.x: B = None
        self.s: D = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: H = None
        self.r: B = None
        self.z: F = None
        self.p: G = None
        self.y: D = None
        self.txt = txt

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

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