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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.p: A = None
        self.t: C = None
        self.u: H = None
        self.x: I = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: H = None
        self.y: I = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: D = None
        self.q: H = None
        self.s: E = None
        self.o: B = None
        self.y: I = None
        self.w: A = None
        self.p: E = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: I = None
        self.p: A = None
        self.t: C = None
        self.u: H = None
        self.x: I = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: H = None
        self.y: I = None
        self.v: H = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: D = None
        self.q: H = None
        self.s: E = None
        self.o: B = None
        self.y: I = None
        self.w: A = None
        self.p: E = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

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

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