class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: C = None
        self.x: C = None
        self.v: J = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.p: F = None
        self.r: H = None
        self.s: J = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: B = None
        self.z: A = None
        self.v: J = None
        self.o: C = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: F = None
        self.o: F = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: J = None
        self.y: J = None
        self.x: C = None
        self.v: B = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.p: F = None
        self.r: H = None
        self.s: J = None
        self.u: H = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.x: B = None
        self.z: A = None
        self.v: J = None
        self.o: C = None
        self.p: A = None
        self.w: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: F = None
        self.o: F = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: J = None
        self.y: J = None
        self.x: C = None
        self.v: B = None
        self.p: D = None
        self.o: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

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

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