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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.txt = txt

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

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