class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.o: F = None
        self.z: F = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.z: F = None
        self.s: A = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: I = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.p: I = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: I = None
        self.t: I = None
        self.w: I = None
        self.v: B = None
        self.p: F = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: A = None
        self.z: F = None
        self.s: A = None
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: I = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.p: I = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: I = None
        self.t: I = None
        self.w: I = None
        self.v: B = None
        self.p: F = None
        self.u: B = None
        self.txt = txt

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

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

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