class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: B = None
        self.z: H = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.p: I = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.y: C = None
        self.o: D = None
        self.w: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.s: H = None
        self.y: G = None
        self.p: A = None
        self.o: C = None
        self.t: A = None
        self.w: B = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: B = None
        self.p: I = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.y: C = None
        self.o: D = None
        self.w: E = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: H = None
        self.s: H = None
        self.y: G = None
        self.p: A = None
        self.o: C = None
        self.t: A = None
        self.w: B = None
        self.q: G = None
        self.txt = txt

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

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