class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.w: D = None
        self.t: D = None
        self.x: I = None
        self.s: I = None
        self.r: B = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.r: J = None
        self.t: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.u: C = None
        self.p: H = None
        self.t: E = None
        self.o: E = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: H = None
        self.v: F = None
        self.x: A = None
        self.y: H = None
        self.r: J = None
        self.u: J = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: F = None
        self.o: G = None
        self.r: G = None
        self.z: E = None
        self.w: E = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.v: B = None
        self.x: B = None
        self.q: E = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: A = None
        self.r: J = None
        self.t: F = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: F = None
        self.u: C = None
        self.p: H = None
        self.t: E = None
        self.o: E = None
        self.s: C = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: H = None
        self.v: F = None
        self.x: A = None
        self.y: H = None
        self.r: J = None
        self.u: J = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: F = None
        self.o: G = None
        self.r: G = None
        self.z: E = None
        self.w: E = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.v: B = None
        self.x: B = None
        self.q: E = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

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

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