class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.r: B = None
        self.y: B = None
        self.w: B = None
        self.x: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: D = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
i = D("i")
j = E("j")
k = F("k")
c = G("c")
g = H("g")
m = F("m")
f = H("f")

n.u = f
n.z = e
n.s = k
l.p = c
l.w = c
l.r = j
e.q = l
e.p = j
e.y = j
e.u = c
e.v = n
e.t = k
i.x = m
i.u = c
i.y = e
i.s = g
i.w = l
j.r = c
j.w = l
j.t = i
k.s = n
k.o = e
k.r = e
c.o = l
c.u = l
c.r = l
c.y = l
c.w = l
c.x = l
c.t = i
g.y = i
g.s = i
g.o = i
g.x = c
m.s = n
m.o = e
m.r = e
f.y = i
f.s = i
f.o = i
f.x = c
assert k.s.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: B = None
        self.r: B = None
        self.y: B = None
        self.w: B = None
        self.x: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: D = None
        self.x: G = None
        self.o: D = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
i = D("i")
j = E("j")
k = F("k")
c = G("c")
g = H("g")
m = F("m")
f = H("f")

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