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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: G = None
        self.x: B = None
        self.o: G = None
        self.z: J = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.s: B = None
        self.r: A = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: D = None
        self.x: J = None
        self.o: I = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.q: H = None
        self.o: F = None
        self.t: A = None
        self.s: G = None
        self.z: B = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.w: I = None
        self.y: H = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: G = None
        self.x: B = None
        self.o: G = None
        self.z: J = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.s: B = None
        self.r: A = None
        self.y: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: D = None
        self.x: J = None
        self.o: I = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.q: H = None
        self.o: F = None
        self.t: A = None
        self.s: G = None
        self.z: B = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: B = None
        self.w: I = None
        self.y: H = None
        self.r: F = None
        self.txt = txt

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

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