class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: G = None
        self.t: D = None
        self.w: H = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: G = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: G = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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