class A:
    def __init__(self, txt: str):
        self.s: J = None
        self.v: D = None
        self.y: E = None
        self.t: D = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: G = None
        self.u: J = None
        self.v: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.o: D = None
        self.p: I = None
        self.z: F = None
        self.t: E = None
        self.v: G = None
        self.u: B = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: G = None
        self.u: J = None
        self.v: J = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.o: D = None
        self.p: I = None
        self.z: F = None
        self.t: E = None
        self.v: G = None
        self.u: B = None
        self.y: F = None
        self.txt = txt

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

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