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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: G = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: I = None
        self.v: E = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: H = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: G = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: I = None
        self.v: E = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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