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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.y: F = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: G = None
        self.s: G = None
        self.w: C = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.w: H = None
        self.t: D = None
        self.y: B = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.y: F = None
        self.q: F = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: G = None
        self.s: G = None
        self.w: C = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.w: H = None
        self.t: D = None
        self.y: B = None
        self.v: H = None
        self.txt = txt

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

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

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