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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: J = None
        self.v: J = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: I = None
        self.o: A = None
        self.p: I = None
        self.v: F = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: G = None
        self.u: A = None
        self.x: A = None
        self.v: I = None
        self.s: E = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: J = None
        self.v: J = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: I = None
        self.o: A = None
        self.p: I = None
        self.v: F = None
        self.t: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: G = None
        self.u: A = None
        self.x: A = None
        self.v: I = None
        self.s: E = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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