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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.w: F = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

g.z = e
g.t = h
g.s = h
g.u = i
g.w = c
n.q = f
n.v = i
h.r = g
i.t = j
i.v = c
j.z = b
j.x = g
l.s = n
f.t = i
f.x = h
f.w = g
e.s = b
e.t = b
e.u = i
e.z = c
c.r = i
c.o = i
c.s = j
b.z = n
b.u = n
b.x = i
b.w = l
b.q = j
assert i.v.s.x.w.o.t.x.z.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: C = None
        self.s: C = None
        self.u: D = None
        self.w: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: C = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: D = None
        self.s: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.w: F = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

g.z = e
g.t = h
g.s = h
g.u = i
g.w = c
n.q = f
n.v = i
h.r = g
i.t = j
i.v = c
j.z = b
j.x = g
l.s = n
f.t = i
f.x = h
f.w = g
e.s = b
e.t = b
e.u = i
e.z = c
c.r = i
c.o = i
c.s = j
b.z = n
b.u = n
b.x = i
b.w = l
b.q = j
assert i.v.s.x.w.o.t.x.z.z.o.txt == "i"