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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: G = None
        self.y: F = None
        self.t: J = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: B = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: G = None
        self.y: F = None
        self.t: J = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: E = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: B = None
        self.u: B = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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