class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: E = None
        self.v: I = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: G = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: D = None
        self.t: A = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: G = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: D = None
        self.t: A = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: C = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

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

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