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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.u: H = None
        self.z: B = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: A = None
        self.u: H = None
        self.z: B = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

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

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

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