class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.t: A = None
        self.x: C = None
        self.u: G = None
        self.o: D = None
        self.z: G = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

m = A("m")
b = B("b")
k = C("k")
h = D("h")
d = E("d")
a = F("a")
i = G("i")
g = H("g")
n = I("n")
c = E("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: E = None
        self.t: A = None
        self.x: C = None
        self.u: G = None
        self.o: D = None
        self.z: G = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.u: B = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

m = A("m")
b = B("b")
k = C("k")
h = D("h")
d = E("d")
a = F("a")
i = G("i")
g = H("g")
n = I("n")
c = E("c")

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