class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: E = None
        self.z: C = None
        self.w: A = None
        self.q: C = None
        self.u: A = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: A = None
        self.w: I = None
        self.z: B = None
        self.x: H = None
        self.s: G = None
        self.o: H = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.o: I = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.o: H = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.u: F = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: E = None
        self.z: C = None
        self.w: A = None
        self.q: C = None
        self.u: A = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: A = None
        self.w: I = None
        self.z: B = None
        self.x: H = None
        self.s: G = None
        self.o: H = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.o: I = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.o: H = None
        self.r: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.u: F = None
        self.z: E = None
        self.txt = txt

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

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