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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.t: C = None
        self.o: H = None
        self.u: H = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.x: H = None
        self.o: G = None
        self.r: B = None
        self.u: H = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: C = None
        self.q: C = None
        self.v: D = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.t: C = None
        self.o: H = None
        self.u: H = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.x: H = None
        self.o: G = None
        self.r: B = None
        self.u: H = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: C = None
        self.q: C = None
        self.v: D = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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