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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: E = None
        self.w: B = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: J = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.p: D = None
        self.z: E = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.q: I = None
        self.r: I = None
        self.o: A = None
        self.t: H = None
        self.y: C = None
        self.v: C = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: C = None
        self.x: A = None
        self.txt = txt

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

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

b = A("b")
a = B("a")
i = C("i")
h = D("h")
n = E("n")
g = F("g")
l = G("l")
k = H("k")
m = I("m")
e = J("e")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: E = None
        self.w: B = None
        self.y: G = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: J = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.p: D = None
        self.z: E = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.q: I = None
        self.r: I = None
        self.o: A = None
        self.t: H = None
        self.y: C = None
        self.v: C = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: C = None
        self.x: A = None
        self.txt = txt

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

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

b = A("b")
a = B("a")
i = C("i")
h = D("h")
n = E("n")
g = F("g")
l = G("l")
k = H("k")
m = I("m")
e = J("e")

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