class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.x: I = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: J = None
        self.v: E = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

g.r = l
g.p = n
g.x = e
g.w = f
c.s = l
c.z = a
c.q = a
c.t = e
i.v = a
l.q = m
l.o = i
l.x = j
n.w = e
n.u = i
n.v = l
j.r = g
j.z = m
j.v = n
j.s = l
f.t = g
a.v = e
a.s = g
a.z = i
a.w = f
e.z = f
e.o = g
e.t = g
m.z = f
m.s = c
m.w = j
assert j.z.z.t.w.t.p.u.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: E = None
        self.x: I = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: C = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: J = None
        self.v: E = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: B = None
        self.w: F = None
        self.txt = txt

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

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