class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: F = None
        self.q: G = None
        self.t: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.y: J = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: H = None
        self.y: B = None
        self.w: C = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.y: J = None
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: H = None
        self.y: B = None
        self.w: C = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

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

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