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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: B = None
        self.y: I = None
        self.x: C = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: J = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: B = None
        self.y: I = None
        self.x: C = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: J = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.txt = txt

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

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

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