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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.z: A = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: E = None
        self.z: A = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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