class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: J = None
        self.u: E = None
        self.y: J = None
        self.q: F = None
        self.o: J = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: B = None
        self.s: A = None
        self.r: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: E = None
        self.q: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: J = None
        self.w: C = None
        self.p: J = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: J = None
        self.u: E = None
        self.y: J = None
        self.q: F = None
        self.o: J = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: B = None
        self.s: A = None
        self.r: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: E = None
        self.q: G = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: J = None
        self.w: C = None
        self.p: J = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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