class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.t: G = None
        self.s: E = None
        self.r: A = None
        self.o: B = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.u: C = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: H = None
        self.r: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.p: B = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.y: B = None
        self.t: H = None
        self.z: B = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.t: C = None
        self.u: A = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: D = None
        self.u: C = None
        self.p: H = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: H = None
        self.r: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.p: B = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: H = None
        self.y: B = None
        self.t: H = None
        self.z: B = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.t: C = None
        self.u: A = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

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