class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: D = None
        self.z: E = None
        self.o: D = None
        self.p: H = None
        self.u: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: I = None
        self.p: A = None
        self.w: H = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: B = None
        self.o: A = None
        self.z: I = None
        self.x: F = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: G = None
        self.q: D = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: I = None
        self.p: A = None
        self.w: H = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: B = None
        self.o: A = None
        self.z: I = None
        self.x: F = None
        self.s: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: G = None
        self.q: D = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: H = None
        self.txt = txt

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

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