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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: H = None
        self.v: G = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: A = None
        self.o: A = None
        self.y: G = None
        self.z: D = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: D = None
        self.x: D = None
        self.v: I = None
        self.w: J = None
        self.t: E = None
        self.o: B = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.z: G = None
        self.w: B = None
        self.u: A = None
        self.r: G = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: C = None
        self.r: F = None
        self.y: E = None
        self.s: C = None
        self.v: F = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: H = None
        self.v: G = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: A = None
        self.o: A = None
        self.y: G = None
        self.z: D = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: D = None
        self.x: D = None
        self.v: I = None
        self.w: J = None
        self.t: E = None
        self.o: B = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.z: G = None
        self.w: B = None
        self.u: A = None
        self.r: G = None
        self.o: E = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: C = None
        self.r: F = None
        self.y: E = None
        self.s: C = None
        self.v: F = None
        self.o: H = None
        self.txt = txt

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

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