class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: J = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.v: J = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: J = None
        self.w: D = None
        self.o: H = None
        self.z: F = None
        self.u: G = None
        self.s: E = None
        self.p: J = None
        self.v: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: D = None
        self.o: C = None
        self.t: J = None
        self.u: J = None
        self.r: H = None
        self.s: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: J = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: D = None
        self.w: B = None
        self.r: I = None
        self.x: G = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.v: J = None
        self.t: D = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: J = None
        self.w: D = None
        self.o: H = None
        self.z: F = None
        self.u: G = None
        self.s: E = None
        self.p: J = None
        self.v: H = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: D = None
        self.o: C = None
        self.t: J = None
        self.u: J = None
        self.r: H = None
        self.s: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: J = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: D = None
        self.w: B = None
        self.r: I = None
        self.x: G = None
        self.t: A = None
        self.txt = txt

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

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