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

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.q: D = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: A = None
        self.u: C = None
        self.w: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: H = None
        self.q: F = None
        self.t: I = None
        self.w: G = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: A = None
        self.q: D = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: A = None
        self.u: C = None
        self.w: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: H = None
        self.q: F = None
        self.t: I = None
        self.w: G = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

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