class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.v: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.w: I = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: B = None
        self.r: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.r: G = None
        self.o: D = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

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

k = A("k")
e = B("e")
a = C("a")
c = D("c")
i = E("i")
g = F("g")
m = G("m")
j = H("j")
d = I("d")
f = J("f")

k.s = d
k.q = a
e.o = c
e.v = c
e.w = i
e.r = j
a.t = g
a.q = g
a.w = d
a.s = f
c.t = j
c.z = j
c.u = e
c.r = m
i.w = g
i.z = g
i.o = d
i.q = d
i.y = d
i.s = d
i.v = k
i.u = f
i.r = f
g.o = f
g.q = j
g.z = d
g.p = d
g.x = k
g.u = e
g.v = e
m.w = g
j.x = g
j.s = a
j.r = m
j.o = c
j.w = d
j.v = k
d.o = g
d.u = f
f.o = k
f.w = g
f.y = j
f.s = e
assert f.o.s.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.v: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: F = None
        self.w: I = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: B = None
        self.r: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.r: G = None
        self.o: D = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

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

k = A("k")
e = B("e")
a = C("a")
c = D("c")
i = E("i")
g = F("g")
m = G("m")
j = H("j")
d = I("d")
f = J("f")

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