class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: H = None
        self.u: J = None
        self.y: B = None
        self.s: J = None
        self.x: H = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.t: C = None
        self.w: H = None
        self.p: G = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: H = None
        self.y: F = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: F = None
        self.y: D = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: E = None
        self.z: B = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.z: A = None
        self.q: D = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.t: C = None
        self.w: H = None
        self.p: G = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: H = None
        self.y: F = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: F = None
        self.y: D = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: E = None
        self.z: B = None
        self.y: F = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: A = None
        self.z: A = None
        self.q: D = None
        self.o: B = None
        self.x: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

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

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