class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: D = None
        self.w: H = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: C = None
        self.t: C = None
        self.s: H = None
        self.w: G = None
        self.z: H = None
        self.v: I = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: E = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.y: B = None
        self.z: G = None
        self.p: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.s: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: C = None
        self.t: C = None
        self.s: H = None
        self.w: G = None
        self.z: H = None
        self.v: I = None
        self.q: D = None
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: E = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: H = None
        self.y: B = None
        self.z: G = None
        self.p: B = None
        self.q: E = None
        self.txt = txt

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

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