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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.o: H = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: H = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: G = None
        self.o: H = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: H = None
        self.q: I = None
        self.r: I = None
        self.txt = txt

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

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

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

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