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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: A = None
        self.y: F = None
        self.t: E = None
        self.p: I = None
        self.q: G = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: A = None
        self.v: E = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: A = None
        self.y: F = None
        self.t: E = None
        self.p: I = None
        self.q: G = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: A = None
        self.v: E = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: C = None
        self.txt = txt

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

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