class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: I = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: I = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: D = None
        self.z: G = None
        self.v: H = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: J = None
        self.q: H = None
        self.s: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.t: H = None
        self.v: H = None
        self.s: E = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: J = None
        self.y: F = None
        self.r: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: I = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: D = None
        self.z: G = None
        self.v: H = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: J = None
        self.q: H = None
        self.s: D = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.t: H = None
        self.v: H = None
        self.s: E = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: J = None
        self.y: F = None
        self.r: G = None
        self.txt = txt

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

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

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