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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: I = None
        self.txt = txt

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

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

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

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

f = A("f")
a = B("a")
c = C("c")
d = D("d")
h = E("h")
e = F("e")
n = G("n")
g = H("g")
l = I("l")
k = J("k")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: I = None
        self.txt = txt

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

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

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

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

f = A("f")
a = B("a")
c = C("c")
d = D("d")
h = E("h")
e = F("e")
n = G("n")
g = H("g")
l = I("l")
k = J("k")

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