class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: D = None
        self.y: I = None
        self.s: D = None
        self.u: G = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: A = None
        self.y: I = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: A = None
        self.u: B = None
        self.x: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: I = None
        self.u: J = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: H = None
        self.v: B = None
        self.o: I = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: G = None
        self.w: J = None
        self.q: A = None
        self.z: E = None
        self.o: A = None
        self.r: A = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.y: E = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: A = None
        self.y: I = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: A = None
        self.u: B = None
        self.x: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: I = None
        self.u: J = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: H = None
        self.v: B = None
        self.o: I = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: G = None
        self.w: J = None
        self.q: A = None
        self.z: E = None
        self.o: A = None
        self.r: A = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: E = None
        self.y: E = None
        self.w: G = None
        self.txt = txt

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

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