class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: D = None
        self.p: E = None
        self.o: D = None
        self.w: H = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: F = None
        self.r: D = None
        self.v: H = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: D = None
        self.p: E = None
        self.o: D = None
        self.w: H = None
        self.y: H = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: F = None
        self.r: D = None
        self.v: H = None
        self.t: B = None
        self.txt = txt

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

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