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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.o: E = None
        self.y: C = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.q: F = None
        self.r: A = None
        self.s: A = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.o: E = None
        self.y: C = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: C = None
        self.x: G = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: C = None
        self.q: F = None
        self.r: A = None
        self.s: A = None
        self.p: A = None
        self.y: A = None
        self.txt = txt

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

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