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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: E = None
        self.x: G = None
        self.p: E = None
        self.v: F = None
        self.u: H = None
        self.q: H = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: D = None
        self.p: J = None
        self.r: H = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: J = None
        self.z: H = None
        self.v: G = None
        self.o: G = None
        self.w: C = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.y: E = None
        self.o: G = None
        self.r: G = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.s: E = None
        self.x: G = None
        self.p: E = None
        self.v: F = None
        self.u: H = None
        self.q: H = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: D = None
        self.p: J = None
        self.r: H = None
        self.s: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: J = None
        self.z: H = None
        self.v: G = None
        self.o: G = None
        self.w: C = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.y: E = None
        self.o: G = None
        self.r: G = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

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