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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: H = None
        self.w: C = None
        self.r: E = None
        self.p: I = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: H = None
        self.w: C = None
        self.r: E = None
        self.p: I = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: B = None
        self.v: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: H = None
        self.txt = txt

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

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