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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.p: C = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: I = None
        self.p: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.x: D = None
        self.o: B = None
        self.v: E = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: B = None
        self.p: C = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: I = None
        self.p: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: A = None
        self.x: D = None
        self.o: B = None
        self.v: E = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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