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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: J = None
        self.v: E = None
        self.o: H = None
        self.z: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.t: A = None
        self.w: A = None
        self.z: A = None
        self.r: I = None
        self.q: F = None
        self.y: E = None
        self.u: E = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: J = None
        self.v: E = None
        self.o: H = None
        self.z: D = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.t: A = None
        self.w: A = None
        self.z: A = None
        self.r: I = None
        self.q: F = None
        self.y: E = None
        self.u: E = None
        self.x: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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