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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.y: D = None
        self.s: H = None
        self.q: E = None
        self.r: H = None
        self.z: F = None
        self.w: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.y: D = None
        self.s: H = None
        self.q: E = None
        self.r: H = None
        self.z: F = None
        self.w: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

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

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