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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: G = None
        self.q: C = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.r: D = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: I = None
        self.y: E = None
        self.t: G = None
        self.r: G = None
        self.w: F = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: G = None
        self.q: C = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.r: D = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: I = None
        self.y: E = None
        self.t: G = None
        self.r: G = None
        self.w: F = None
        self.u: F = None
        self.x: A = None
        self.txt = txt

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

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