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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.r: G = None
        self.q: H = None
        self.x: J = None
        self.o: G = None
        self.v: J = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: D = None
        self.u: D = None
        self.z: H = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: A = None
        self.x: D = None
        self.o: D = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.u: I = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.r: G = None
        self.q: H = None
        self.x: J = None
        self.o: G = None
        self.v: J = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: D = None
        self.u: D = None
        self.z: H = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: A = None
        self.x: D = None
        self.o: D = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.u: I = None
        self.t: G = None
        self.txt = txt

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

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