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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

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

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