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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.w: A = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: F = None
        self.w: A = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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