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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: H = None
        self.w: H = None
        self.s: A = None
        self.t: E = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: A = None
        self.v: F = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: H = None
        self.w: H = None
        self.s: A = None
        self.t: E = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: E = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: A = None
        self.v: F = None
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: F = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

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

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