class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: C = None
        self.v: I = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.u: G = None
        self.q: E = None
        self.x: G = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: I = None
        self.v: I = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: J = None
        self.o: G = None
        self.r: H = None
        self.v: B = None
        self.t: I = None
        self.s: B = None
        self.x: H = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: B = None
        self.x: I = None
        self.p: I = None
        self.z: I = None
        self.u: F = None
        self.r: C = None
        self.t: F = None
        self.y: I = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.u: G = None
        self.q: E = None
        self.x: G = None
        self.w: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: I = None
        self.v: I = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: J = None
        self.o: G = None
        self.r: H = None
        self.v: B = None
        self.t: I = None
        self.s: B = None
        self.x: H = None
        self.z: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: E = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: B = None
        self.x: I = None
        self.p: I = None
        self.z: I = None
        self.u: F = None
        self.r: C = None
        self.t: F = None
        self.y: I = None
        self.s: E = None
        self.txt = txt

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

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