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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: I = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: I = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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