class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: J = None
        self.t: J = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: I = None
        self.o: I = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: I = None
        self.v: A = None
        self.x: J = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: J = None
        self.u: E = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.x: A = None
        self.o: A = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.x: H = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.x: B = None
        self.r: A = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: I = None
        self.o: I = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: I = None
        self.v: A = None
        self.x: J = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: J = None
        self.u: E = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.x: A = None
        self.o: A = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: H = None
        self.x: H = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: E = None
        self.x: B = None
        self.r: A = None
        self.p: E = None
        self.s: D = None
        self.txt = txt

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

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

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

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