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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.p: B = None
        self.o: A = None
        self.u: E = None
        self.v: G = None
        self.w: B = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: G = None
        self.u: A = None
        self.y: D = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: B = None
        self.s: A = None
        self.q: G = None
        self.p: H = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: G = None
        self.p: B = None
        self.o: A = None
        self.u: E = None
        self.v: G = None
        self.w: B = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: G = None
        self.u: A = None
        self.y: D = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: B = None
        self.s: A = None
        self.q: G = None
        self.p: H = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

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

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