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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: G = None
        self.r: A = None
        self.z: F = None
        self.t: H = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: I = None
        self.w: D = None
        self.y: A = None
        self.t: A = None
        self.x: B = None
        self.o: B = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.v: F = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: G = None
        self.r: A = None
        self.z: F = None
        self.t: H = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: I = None
        self.w: D = None
        self.y: A = None
        self.t: A = None
        self.x: B = None
        self.o: B = None
        self.q: E = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.v: F = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

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

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

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