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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.z: F = None
        self.y: D = None
        self.q: J = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: H = None
        self.s: J = None
        self.r: B = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: F = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.q: G = None
        self.x: G = None
        self.p: B = None
        self.v: G = None
        self.o: B = None
        self.w: G = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: A = None
        self.u: A = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: F = None
        self.z: F = None
        self.y: D = None
        self.q: J = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: H = None
        self.s: J = None
        self.r: B = None
        self.p: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: F = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: C = None
        self.q: G = None
        self.x: G = None
        self.p: B = None
        self.v: G = None
        self.o: B = None
        self.w: G = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: A = None
        self.u: A = None
        self.y: I = None
        self.txt = txt

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

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