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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.y: H = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.t: C = None
        self.q: D = None
        self.p: C = None
        self.v: E = None
        self.w: F = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: H = None
        self.y: H = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: B = None
        self.t: C = None
        self.q: D = None
        self.p: C = None
        self.v: E = None
        self.w: F = None
        self.y: H = None
        self.txt = txt

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

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