class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.v: D = None
        self.u: C = None
        self.q: B = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.v: E = None
        self.x: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.y: A = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

g = A("g")
d = B("d")
k = C("k")
b = D("b")
f = E("f")
i = F("i")
e = G("e")
m = E("m")
n = E("n")

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.v: E = None
        self.x: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.y: A = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

g = A("g")
d = B("d")
k = C("k")
b = D("b")
f = E("f")
i = F("i")
e = G("e")
m = E("m")
n = E("n")

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