class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: J = None
        self.t: I = None
        self.w: A = None
        self.o: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: C = None
        self.w: D = None
        self.p: B = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: J = None
        self.t: I = None
        self.w: A = None
        self.o: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: C = None
        self.w: D = None
        self.p: B = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: D = None
        self.txt = txt

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

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

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