class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: I = None
        self.t: A = None
        self.p: E = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.o: B = None
        self.u: I = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.s: C = None
        self.p: A = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.t: B = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

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

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

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

k.q = i
k.o = n
i.q = g
i.r = f
i.s = f
i.x = f
i.t = e
i.p = m
n.y = i
n.o = i
n.v = m
n.u = f
n.p = f
b.t = h
b.v = h
b.x = h
m.y = j
m.z = e
m.p = e
m.s = n
m.q = h
m.v = g
j.y = h
h.s = i
h.t = i
h.y = g
h.z = g
h.q = b
g.x = j
g.y = m
g.z = e
g.o = e
g.w = n
g.p = n
g.v = f
f.q = h
f.s = b
f.t = j
f.p = j
f.r = n
f.y = n
f.u = g
f.w = m
e.q = i
e.o = n
assert i.s.r.v.y.y.z.x.y.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: I = None
        self.t: A = None
        self.p: E = None
        self.s: I = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.o: B = None
        self.u: I = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: A = None
        self.s: C = None
        self.p: A = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.t: B = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

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

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

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

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