class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

g = A("g")
m = B("m")
f = C("f")
n = D("n")
k = E("k")
b = F("b")
a = G("a")
d = C("d")
h = F("h")
c = E("c")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

g = A("g")
m = B("m")
f = C("f")
n = D("n")
k = E("k")
b = F("b")
a = G("a")
d = C("d")
h = F("h")
c = E("c")

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