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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: H = None
        self.s: G = None
        self.w: G = None
        self.q: E = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.p: I = None
        self.t: J = None
        self.w: J = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: I = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: H = None
        self.s: G = None
        self.w: G = None
        self.q: E = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.p: I = None
        self.t: J = None
        self.w: J = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: I = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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