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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.w: E = None
        self.u: H = None
        self.x: B = None
        self.p: G = None
        self.v: A = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.w: E = None
        self.u: H = None
        self.x: B = None
        self.p: G = None
        self.v: A = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.txt = txt

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

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