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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: H = None
        self.v: A = None
        self.s: A = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: D = None
        self.x: D = None
        self.t: E = None
        self.w: B = None
        self.z: A = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: H = None
        self.v: A = None
        self.s: A = None
        self.u: C = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: D = None
        self.x: D = None
        self.t: E = None
        self.w: B = None
        self.z: A = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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