class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: I = None
        self.p: I = None
        self.u: E = None
        self.x: G = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: F = None
        self.t: C = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: B = None
        self.p: B = None
        self.u: A = None
        self.s: I = None
        self.r: G = None
        self.q: C = None
        self.y: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.o: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: C = None
        self.w: H = None
        self.u: E = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: F = None
        self.t: C = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: B = None
        self.p: B = None
        self.u: A = None
        self.s: I = None
        self.r: G = None
        self.q: C = None
        self.y: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.o: G = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: C = None
        self.w: H = None
        self.u: E = None
        self.y: H = None
        self.txt = txt

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

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

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

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