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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: F = None
        self.x: G = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: G = None
        self.x: B = None
        self.v: E = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.v: G = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: G = None
        self.r: G = None
        self.t: D = None
        self.o: D = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: F = None
        self.x: G = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: G = None
        self.x: B = None
        self.v: E = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.v: G = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: G = None
        self.r: G = None
        self.t: D = None
        self.o: D = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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