class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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