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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: H = None
        self.x: H = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: H = None
        self.x: H = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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