class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.r: B = None
        self.w: D = None
        self.q: C = None
        self.z: E = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.q: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: G = None
        self.v: B = None
        self.x: C = None
        self.r: F = None
        self.t: C = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: A = None
        self.q: A = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: G = None
        self.v: B = None
        self.x: C = None
        self.r: F = None
        self.t: C = None
        self.y: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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