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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.x: D = None
        self.t: B = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.o: I = None
        self.x: H = None
        self.t: A = None
        self.w: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.x: D = None
        self.t: B = None
        self.u: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.o: I = None
        self.x: H = None
        self.t: A = None
        self.w: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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