class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: E = None
        self.t: B = None
        self.v: C = None
        self.q: J = None
        self.x: C = None
        self.y: B = None
        self.w: G = None
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.u: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: J = None
        self.v: G = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.p: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.q: G = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: H = None
        self.u: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: J = None
        self.v: G = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.p: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: B = None
        self.q: G = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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