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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: B = None
        self.r: H = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.u: A = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.x: H = None
        self.p: A = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: B = None
        self.r: H = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.u: A = None
        self.x: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: D = None
        self.x: H = None
        self.p: A = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

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

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