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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: F = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: D = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: J = None
        self.p: C = None
        self.v: G = None
        self.r: C = None
        self.w: G = None
        self.s: J = None
        self.u: I = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.v: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: F = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: D = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: G = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: J = None
        self.p: C = None
        self.v: G = None
        self.r: C = None
        self.w: G = None
        self.s: J = None
        self.u: I = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.o: F = None
        self.v: B = None
        self.q: G = None
        self.txt = txt

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

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

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

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