class A:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: B = None
        self.x: B = None
        self.v: G = None
        self.p: C = None
        self.u: J = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: J = None
        self.q: I = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.x: I = None
        self.s: J = None
        self.r: F = None
        self.u: H = None
        self.w: J = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: J = None
        self.z: J = None
        self.x: G = None
        self.o: G = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.p: C = None
        self.v: E = None
        self.r: E = None
        self.t: E = None
        self.u: B = None
        self.s: E = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: J = None
        self.q: I = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.x: I = None
        self.s: J = None
        self.r: F = None
        self.u: H = None
        self.w: J = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: J = None
        self.z: J = None
        self.x: G = None
        self.o: G = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.p: C = None
        self.v: E = None
        self.r: E = None
        self.t: E = None
        self.u: B = None
        self.s: E = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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