class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.y: B = None
        self.w: B = None
        self.o: G = None
        self.s: B = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: J = None
        self.v: G = None
        self.x: G = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.v: A = None
        self.t: G = None
        self.x: A = None
        self.q: J = None
        self.o: A = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: E = None
        self.s: J = None
        self.r: E = None
        self.w: D = None
        self.v: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.x: J = None
        self.q: E = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.u: D = None
        self.y: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: J = None
        self.v: G = None
        self.x: G = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: G = None
        self.v: A = None
        self.t: G = None
        self.x: A = None
        self.q: J = None
        self.o: A = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: E = None
        self.s: J = None
        self.r: E = None
        self.w: D = None
        self.v: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.x: J = None
        self.q: E = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.u: D = None
        self.y: I = None
        self.txt = txt

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

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