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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: H = None
        self.o: A = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: G = None
        self.w: B = None
        self.u: J = None
        self.s: G = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: D = None
        self.o: J = None
        self.s: B = None
        self.x: H = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.q: C = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: J = None
        self.r: C = None
        self.z: A = None
        self.s: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: H = None
        self.o: A = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: G = None
        self.w: B = None
        self.u: J = None
        self.s: G = None
        self.o: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.v: D = None
        self.o: J = None
        self.s: B = None
        self.x: H = None
        self.z: A = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.q: C = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: J = None
        self.r: C = None
        self.z: A = None
        self.s: H = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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