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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: B = None
        self.y: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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