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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.u: D = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.w: I = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.z: F = None
        self.o: B = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: I = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: D = None
        self.p: G = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.u: D = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.w: I = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.z: F = None
        self.o: B = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: I = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: D = None
        self.p: G = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

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

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