class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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