class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: D = None
        self.q: C = None
        self.w: J = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: E = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.x: H = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: J = None
        self.w: B = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: E = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.x: H = None
        self.s: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: J = None
        self.w: B = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: G = None
        self.txt = txt

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

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