class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.z: F = None
        self.y: A = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.w: G = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.z: F = None
        self.y: A = None
        self.p: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.w: G = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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